Original Article

Long-Term EEG-Based Modeling and Classification of Migraine Phases Using Hidden Markov Models

Abstract

Migraine is a complex neurological disorder characterized by dynamic alterations in brain activity during multiple phases: interictal (baseline), preictal, ictal, and postictal. This study aims to model and differentiate these migraine phases using electroencephalogram (EEG) and a Hidden Markov Model (HMM). EEG signals were collected from each subject over several months through frequent, short sessions—often multiple times per day. The recordings were temporally aligned with self-reported symptom diaries, allowing for precise labeling of migraine phases. A comprehensive set of features was extracted from the EEG signals, including spectral, temporal, and nonlinear measures—such as Dynamic Mode Decomposition (DMD) and Katz Fractal Dimension (KFD)—across various frequency bands. Despite the limited number of participants, the dense long-term recordings captured multiple migraine episodes, enabling reliable phase modeling. The HMM identified distinguishable neural patterns corresponding to migraine states, suggesting the feasibility of temporal EEG modeling for clinical applications in personalized migraine management.

1- Heidi G Sutherland, Cassie L Albury, and Lyn R Griffiths, "Advances in genetics of migraine." The journal of headache and pain, Vol. 20 (No. 1), p. 72, (2019).
2- Todd J Schwedt, "Chronic migraine." Bmj, Vol. 348(2014).
3- Nirosen Vijiaratnam et al., "Migraine: Does aura require investigation?" Clinical Neurology and Neurosurgery, Vol. 148pp. 110-14, (2016).
4- Stephen D Silberstein, "Considerations for management of migraine symptoms in the primary care setting." Postgraduate medicine, Vol. 128 (No. 5), pp. 523-37, (2016).
5- Abigail Ortiz et al., "Cross‐prevalence of migraine and bipolar disorder." Bipolar Disorders, Vol. 12 (No. 4), pp. 397-403, (2010).
6- Sait Ashina, Enrico Bentivegna, Paolo Martelletti, and Katharina Eikermann-Haerter, "Structural and functional brain changes in migraine." Pain and therapy, Vol. 10 (No. 1), pp. 211-23, (2021).
7- K Jindal et al., "Migraine disease diagnosis from EEG signals using Non-linear Feature Extraction Technique." in 2018 IEEE International Conference on Computational Intelligence and Computing Research (ICCIC), (2018): IEEE, pp. 1-4.
8- S Kazemi and P Katibeh, "Comparison of parametric and non-parametric EEG feature extraction methods in detection of pediatric migraine without aura." Journal of biomedical physics & engineering, Vol. 8 (No. 3), p. 305, (2018).
9- Louise O’Hare, Federica Menchinelli, and Simon J Durrant, "Resting-state alpha-band oscillations in migraine." Perception, Vol. 47 (No. 4), pp. 379-96, (2018).
10- Feng Li, Jing Xiang, Ting Wu, Donglin Zhu, and Jingping Shi, "Abnormal resting-state brain activity in headache-free migraine patients: A magnetoencephalography study." Clinical Neurophysiology, Vol. 127 (No. 8), pp. 2855-61, (2016).
11- Rajeev Sharma and Ram Bilas Pachori, "Classification of epileptic seizures in EEG signals based on phase space representation of intrinsic mode functions." Expert Systems with Applications, Vol. 42 (No. 3), pp. 1106-17, (2015).
12- Konstantin Dragomiretskiy and Dominique Zosso, "Variational mode decomposition." IEEE transactions on signal processing, Vol. 62 (No. 3), pp. 531-44, (2013).
13- S Sethi and R Upadhyay, "Classification of mental tasks using S-transform based fractal features." in 2017 International Conference on Computer, Communications and Electronics (Comptelix), (2017): IEEE, pp. 38-43.
14- S Batuhan Akben, Deniz Tuncel, and Ahmet Alkan, "Classification of multi-channel EEG signals for migraine detection." Biomed Res, Vol. 27 (No. 3), pp. 743-48, (2016).
15- Leonardo Angelini et al., "Steady-state visual evoked potentials and phase synchronization in migraine patients." Physical review letters, Vol. 93 (No. 3), p. 038103, (2004).
16- Lawrence R Rabiner, "A tutorial on hidden Markov models and selected applications in speech recognition." Proceedings of the IEEE, Vol. 77 (No. 2), pp. 257-86, (1989).
17- Deba Prasad Dash, Maheshkumar H Kolekar, and Kamlesh Jha, "Multi-channel EEG based automatic epileptic seizure detection using iterative filtering decomposition and Hidden Markov Model." Computers in biology and medicine, Vol. 116p. 103571, (2020).
18- Kevin P Murphy, Machine learning: a probabilistic perspective. MIT press, (2012).
19- Steven Tobochnik, Robyn Fahlstrom, Catherine Shain, Melodie R Winawer, and EPGP Investigators, "Familial aggregation of focal seizure semiology in the Epilepsy Phenome/Genome Project." Neurology, Vol. 89 (No. 1), pp. 22-28, (2017).
20- Melodie R Winawer, Robert Connors, and EPGP Investigators, "Evidence for a shared genetic susceptibility to migraine and epilepsy." Epilepsia, Vol. 54 (No. 2), pp. 288-95, (2013).
21- Fernando Tenório Gameleira, Luiz Ataíde Jr, and Maria Cristina Falcão Raposo, "Relations between epileptic seizures and headaches." Seizure, Vol. 22 (No. 8), pp. 622-26, (2013).
22- Peter J Schmid, "Dynamic mode decomposition of numerical and experimental data." Journal of fluid mechanics, Vol. 656pp. 5-28, (2010).
23- James C Bezdek, Robert Ehrlich, and William Full, "FCM: The fuzzy c-means clustering algorithm." Computers & geosciences, Vol. 10 (No. 2-3), pp. 191-203, (1984).
24- Headache Classification Committee of the International Headache Society, "The international classification of headache disorders." Cephalalgia, Vol. 38 (No. 1), p. 1, (2018).
25- Tatjana Zikov, Stephane Bibian, Guy A Dumont, Mihai Huzmezan, and Craig R Ries, "A wavelet based de-noising technique for ocular artifact correction of the electroencephalogram." in Proceedings of the Second Joint 24th Annual Conference and the Annual Fall Meeting of the Biomedical Engineering Society][Engineering in Medicine and Biology, (2002), Vol. 1: IEEE, pp. 98-105.
26- Anna Zduńska, Joanna Cegielska, and Jan Kochanowski, "Variability of the blink reflex in patients with migraine." Neurologia i Neurochirurgia Polska, Vol. 47 (No. 4), pp. 352-56, (2013).
27- Nazareth P Castellanos and Valeri A Makarov, "Recovering EEG brain signals: Artifact suppression with wavelet enhanced independent component analysis." Journal of neuroscience methods, Vol. 158 (No. 2), pp. 300-12, (2006).
28- Ian Daly, Reinhold Scherer, Martin Billinger, and Gernot Müller-Putz, "FORCe: Fully online and automated artifact removal for brain-computer interfacing." IEEE transactions on neural systems and rehabilitation engineering, Vol. 23 (No. 5), pp. 725-36, (2014).
29- Leonard E Baum, Ted Petrie, George Soules, and Norman Weiss, "A maximization technique occurring in the statistical analysis of probabilistic functions of Markov chains." The annals of mathematical statistics, Vol. 41 (No. 1), pp. 164-71, (1970).
30- Jeff A Bilmes, "A gentle tutorial of the EM algorithm and its application to parameter estimation for Gaussian mixture and hidden Markov models." International computer science institute, Vol. 4 (No. 510), p. 126, (1998).
31- Alexandre Bureau, James P Hughes, and Stephen C Shiboski, "An S-Plus implementation of hidden Markov models in continuous time." Journal of Computational and Graphical Statistics, Vol. 9 (No. 4), pp. 621-32, (2000).
32- Christopher M Bishop and Nasser M Nasrabadi, Pattern recognition and machine learning. (No. 4). Springer, (2006).
33- Asma Bashir, Richard B Lipton, Sait Ashina, and Messoud Ashina, "Migraine and structural changes in the brain: a systematic review and meta-analysis." Neurology, Vol. 81 (No. 14), pp. 1260-68, (2013).
34- Bihua Bie et al., "Electroencephalographic signatures of migraine in small prospective and large retrospective cohorts." Scientific Reports, Vol. 14 (No. 1), p. 28673, (2024).
35- K Jindal and R Upadhyay, "Epileptic seizure detection from EEG signal using Flexible Analytical Wavelet Transform." in 2017 International Conference on Computer, Communications and Electronics (Comptelix), (2017): IEEE, pp. 67-72.
36- Khakon Das, Debashis Daschakladar, Partha Pratim Roy, Atri Chatterjee, and Shankar Prasad Saha, "Epileptic seizure prediction by the detection of seizure waveform from the pre-ictal phase of EEG signal." Biomedical Signal Processing and Control, Vol. 57p. 101720, (2020).
37- Ming-Lin Li et al., "A state-of-the-art review of functional magnetic resonance imaging technique integrated with advanced statistical modeling and machine learning for primary headache diagnosis." Frontiers in Human Neuroscience, Vol. 17p. 1256415, (2023).
38- Michael J Marmura, "Triggers, protectors, and predictors in episodic migraine." Current pain and headache reports, Vol. 22 (No. 12), p. 81, (2018).
Files
IssueVol 13 No 2 (2026) QRcode
SectionOriginal Article(s)
DOI https://doi.org/10.18502/fbt.v13i2.21949
Keywords
Migraine Hidden Markov Model Dynamic Mode Decomposition Wavelet Transform Phase Classification Prediction Electroencephalogram Signal

Rights and permissions
Creative Commons License This work is licensed under a Creative Commons Attribution-NonCommercial 4.0 International License.
How to Cite
1.
Ashoorisefat S, Pooyan M, Saberi A. Long-Term EEG-Based Modeling and Classification of Migraine Phases Using Hidden Markov Models. Frontiers Biomed Technol. 2026;13(2):532-549.