Abstract
Background
Migraine is highly heterogeneous, and patients exhibit substantial variability in their responses to preventive treatment. The dose-escalation strategy of topiramate further complicates early evaluation of therapeutic efficacy. Identifying neurobiological markers that can predict treatment response is therefore essential for individualized therapy. In this study, we constructed predictive models based on individualized periodic and aperiodic power features derived from source-reconstructed electroencephalography (EEG) to identify electrophysiological indicators associated with topiramate efficacy, thereby providing a foundation for personalized prediction in migraine prevention.
Methods
In total, 112 patients with episodic migraine without aura received baseline EEG assessment and subsequently completed 3 months of topiramate treatment. EEG signals were source-reconstructed, and periodic and aperiodic components were separated using FOOOF with adjustment by each participant’s individual α frequency (IAF). Predictive models were developed using XGBoost, with stratified cross-validation and 0.632 + bootstrap used to estimate generalization performance. Shapley Additive exPlanations (SHAP) analysis quantified feature contributions. Correlation analysis and Leave-One-Out Cross-Validation (LOOCV) regression were subsequently performed to examine the relationships between key features and treatment outcomes.
Results
The model achieved an area under the receiver operating characteristic curve (AUROC) of 0.859 in identifying treatment responders. SHAP analysis indicated that the most influential features were periodic α-band power localized to the cuneus, pericalcarine cortex, medial orbitofrontal cortex, frontal pole, and precuneus. Principal component analysis (PCA) of the functional brain networks comprising these regions showed that the principal components of the visual network (VN) and default mode network (DMN) were significantly associated with headache improvement, and their joint inclusion in a LOOCV regression model explained 26.1% of the variance in treatment efficacy.
Conclusion
Periodic α activity represents a strong predictive biomarker of topiramate efficacy, with higher α power indicating poorer clinical response. These findings provide an interpretable neurobiological basis for individualized prediction in migraine preventive therapy.
Clinical trial number
Not applicable.
Keywords: Migraine, EEG, Topiramate, Predictive modeling
Introduction
Preventive treatment for migraine faces several challenges, including long evaluation periods, multiple drug options, and differing mechanisms of action. Typically, only 30% to 50% of migraine prevention medications achieve satisfactory efficacy [1, 2], reflecting the heterogeneity of migraine treatment and creating significant challenges in its management. Currently, finding an effective preventive treatment for individual patients often involves a trial-and-error approach, which exacerbates the treatment burden and disease impact. Topiramate is considered one of the first-line treatments for migraine due to its relatively good therapeutic effects and low cost [3]. However, the dose-escalation process involved in its treatment makes early efficacy evaluation more challenging compared to other medications. Therefore, there is a need to establish individualized approaches to predict the efficacy of preventive treatments, thereby improving treatment precision and reducing reliance on empirical therapies.
In recent years, several studies have attempted to predict the efficacy of migraine preventive treatments using clinical features and imaging data [2, 4–6], but existing research on predicting topiramate efficacy has not achieved satisfactory model performance [7]. Electroencephalography (EEG), a non-invasive neurophysiological technique with millisecond-level temporal resolution, offers unique advantages by recording oscillatory signals generated by the synchronous activity of thousands of neurons, thus enabling the detection of potential neurobiological differences [8]. However, research on predicting migraine treatment efficacy based on baseline EEG data remains limited. Evidence suggests that α-band activity may play a crucial role in this context. For example, one study found that chronic migraine patients who did not show clinical improvement after flunarizine treatment had significantly elevated α power in the primary visual cortex at baseline, suggesting that visual cortex α activity may reflect drug responsiveness to some extent [9]. Additionally, other studies have shown that levetiracetam treatment partially reverses excessive phase synchronization of α rhythms observed in migraine patients under occipital flash stimulation. However, this phase synchronization alteration was not similarly reversed after topiramate treatment [10]. These results suggest that the therapeutic mechanism of topiramate may not be limited to the occipital cortex and may not primarily involve modulation of α rhythm phase synchronization. Previous studies typically predefined research regions, focusing on group differences and overlooking the multidimensional nature of neural activity and individual variability, which reduces the predictive performance of EEG for treatment outcomes. Machine learning, however, can handle multidimensional neural activity features and effectively account for individual differences, thereby providing predictive probabilities for individualized treatment responses.
This study focuses on α-band activity and employs the Fitting Oscillations and One-Over-F (FOOOF) algorithm to separate periodic and aperiodic components in EEG signals. Considering individual variability, we adjusted the α-band frequency range according to each participant’s individual α frequency and corrected for age and baseline migraine frequency. A machine learning model was then developed to enable early identification of responders to topiramate treatment. Next, high-contribution features were selected, followed by correlation and regression analyses to explore the relationship between these features and migraine treatment efficacy, providing a basis for identifying biomarkers of response to topiramate.
Methods
Design and setting
This was a prospective, single-arm, interventional cohort study. From May 2023 to June 2025, patients with migraine without aura (MwoA) were consecutively recruited at the Neurology Department of the First Medical Center, PLA General Hospital. All recruitment procedures were performed by two neurologists specializing in headache disorders. The study protocol was approved by the Ethics Committee of PLA General Hospital (2023−460) and was conducted in accordance with the ethical principles outlined in the Declaration of Helsinki. Written informed consent was obtained from all participants after a comprehensive explanation of the study procedures. This study was not prospectively registered.
Participants
All migraine patients met the following criteria: (1) Diagnosed with MwoA according to the ICHD-3 criteria, with a history of migraine for at least one year. (2) Met the criteria for initiating migraine preventive treatment: experiencing 4 to 14 migraine days per month, with no use of preventive migraine medications in the past three months and no previous use of topiramate. (3) No abortive medications were used within 24 h prior to EEG recording. All participants were right-handed and aged between 18 and 65 years. Exclusion criteria included: (1) Co-occurrence of other types of headaches, chronic pain, epilepsy, stroke, neurological disorders, severe depression, or anxiety, or long-term use of medications for other conditions; (2) Pregnant women; (3) Presence of contraindications for topiramate treatment.
At baseline, each participant completed a structured demographic questionnaire and headache-related surveys, including personal background, medical history, family history, headache history, headache characteristics, and previous medication use. Additionally, the Pittsburgh Sleep Quality Index (PSQI), Generalized Anxiety Disorder-7 (GAD-7), Patient Health Questionnaire-9 (PHQ-9), and Migraine Disability Assessment Scale (MIDAS) were administered. Each participant underwent one EEG recording during the inter-ictal phase.
Experimental procedure
Baseline EEG recordings were taken, followed by the initiation of preventive treatment with topiramate capsules for MwoA patients. The starting dose was 25 mg per night, which was increased to 25 mg twice daily in the second week, to 25 mg in the morning and 50 mg at night in the third week, and then to 50 mg twice daily in the fourth week, which was maintained thereafter. Adverse events were monitored throughout the treatment. A daily dose of at least 50 mg was considered an effective treatment dose. If dose escalation to this level was not possible due to adverse effects, the patient was classified into the adverse reaction group and switched to another preventive medication. Rizatriptan benzoate or nonsteroidal anti-inflammatory drugs could be used as abortive medications. Participants were regularly followed up either in person or by phone, and they were required to maintain a headache diary for at least three months, recording the location, nature, intensity, duration of headache, and medication usage. After completing three months of topiramate preventive treatment, patients were classified into responder and non-responder groups based on treatment outcomes. Responders were defined as those with at least a 50% reduction in the monthly migraine days (MMD) from baseline to the third month. Non-responders were defined as those whose MMD decreased by less than 50% or increased from baseline to the third month.
EEG data acquisition and preprocessing
To minimize the impact of circadian rhythm variability, all EEG recordings were scheduled between 2:30 PM and 5:30 PM. Participants were instructed to relax, close their eyes, and remain awake throughout the 5-minute recording. EEG data were recorded using the Compumedics Neuvo system with 64 Ag-AgCl scalp electrodes, placed according to the international 10–20 system, with a sampling rate of 1000 Hz and an online reference set to average reference. Electrode impedance was kept below 10 kΩ. EEG data were preprocessed using EEGLAB v2024.0. First, a bandpass filter from 1 to 45 Hz was applied to the raw data. The data were then segmented into 2-second epochs, and visually inspected to remove segments with obvious contamination. Channels with poor quality were interpolated (no more than 5 electrodes per participant), and independent component analysis was used to remove artifacts from eye movements and muscle activity. Finally, to ensure data consistency across participants, 90 clean, artifact-free epochs were selected for each participant, and the data were re-referenced to the average reference.
Source reconstruction and power spectral density estimation
Source-level brain activity was estimated using the Linearly Constrained Minimum Variance beamformer in Brainstorm software [11]. The analysis was based on the ICBM152 2023B template, with the forward model implemented using the OpenMEEG single-layer Boundary Element Method. The source space was constrained to the cortical surface, and the dipole direction was fixed to the cortical normal. Noise covariance was computed and regularized using the preprocessed full-length resting-state EEG data, yielding the time series for each vertex virtual sensor. Next, the Desikan-Killiany atlas was used to divide the cortical surface into 68 regions of interest (ROIs) [12]. For each ROI, the first principal component of the time series was extracted using Singular Value Decomposition as the representative activity, with a standardized sign direction. After source reconstruction, the power spectral density (PSD) of the time series for each ROI was estimated using the Welch method (2-second Hann window, 50% overlap, frequency resolution of 0.5 Hz), within the frequency range of 1–45 Hz. This was computed separately for each participant [13, 14].
FOOOF analysis
To further separate periodic components from aperiodic activity in the power spectrum, this study applied the FOOOF algorithm to parametrize the Welch average PSD for each participant and each region of interest [15]. According to previous studies, the power spectral density of EEG signals can be modeled as follows:
![]() |
![]() |
![]() |
Where L represents the aperiodic component, G the periodic component, and N the number of periodic components fitted by a Gaussian model. The aperiodic offset is denoted by b, F is the frequency, and χ is the aperiodic exponent. The relative power of the periodic component is denoted by h, the peak frequency by C, and the bandwidth by w [15].
Specifically, the input frequency range was set from 2 to 45 Hz to avoid low-frequency plateau artifacts that may arise from a 1 Hz high-pass filter. The FOOOF model was used to model the PSD as the sum of an aperiodic component and overlaid periodic Gaussian peaks. The aperiodic component was modeled using the “fixed” mode (pure 1/f form with no knee point). The main parameters were set as follows: peak width limitation 1–6 Hz, a maximum of 6 peaks, a minimum peak height of 0.1, and a peak threshold of 2.0 (relative standard deviation).
Considering the significant impact of individual differences on fixed-frequency α power and its predictive efficacy [16], the oscillatory peak closest to the 8–13 Hz range detected by FOOOF was defined as the IAF. If multiple peaks were found within this range, the peak with the highest periodic power was selected [15, 17]. The individualized α band power was calculated as the integral of the periodic component within the range of IAF − 2 to IAF + 4 Hz and was then log-transformed [18–20]. The model’s R² = 0.9623 ± 0.0344. Additionally, participants with more than 10% of ROIs lacking an identifiable α peak were excluded.
Machine learning
The following three core spectral parameters were selected as input features: individualized α periodic power (IAPP), aperiodic offset, and aperiodic exponent. Since IAPP and aperiodic offset exhibit highly skewed distributions, their logarithms were applied. Missing values were imputed with the mean of the specific feature column calculated independently within each training fold. Since spectral parameters between homologous regions of the left and right hemispheres are typically highly correlated, z-score normalization was first applied separately to each ROI within the training folds. The mean (reflecting bilateral symmetry) and difference (reflecting lateralization) were then calculated. Age and baseline MMD were adjusted for by residualization within the training folds during cross-validation, and the same fold-specific transformations were applied to the corresponding held-out folds. For classification labels, label 0 was assigned to non-responders and label 1 to responders.
XGBoost was used as the classifier, with stratified 5-fold cross-validation as the outer loop. Within each fold, a 5-fold stratified grid search was performed to optimize hyperparameters, followed by regularization. The XGBoost search space included n_estimators [50, 100, 200], learning_rate [0.01, 0.1, 0.3], max_depth [3, 5, 7], subsample [0.6, 0.8, 1.0], L1 regularization [0, 0.1, 1.0, 10.0], and L2 regularization [1.0, 10.0, 100.0]. Model performance was evaluated based solely on out-of-fold predictions.
The primary metrics included accuracy, F1 score, precision, recall, AUROC, and Brier score. The 95% confidence intervals for each metric were computed using percentile bootstrap (5000 resamples) based on the 5-fold results.
To correct for the potential overfitting risk associated with small sample high-dimensional data, we employed the .632+ Bootstrap method (5000 resamples) for optimism-corrected performance evaluation [21]. Apparent performance (trained and tested on full data) and out-of-bag (OOB) performance (tested on the approximately 36.8% of samples not selected during Bootstrap resampling) were computed. Dynamic weighting was applied using the formula w, where R represents the relative overfitting rate, calculated based on the non-informative rate γ of the Brier score and restricted to the range [0, 1]:
![]() |
![]() |
This method generates corrected AUROC and Brier scores as a conservative estimate of the model’s generalization performance.
To provide physiologically meaningful interpretability, this study used the SHAP library’s TreeExplainer, applying an interventional approach to calculate SHAP values [22], with the background distribution based on all training samples from the current fold. Global feature importance was determined by averaging the absolute SHAP values across folds.
Correlation analysis
To further validate the predictive value of the periodic α power in the occipital and frontal regions for predicting the improvement in MMD after treatment, as revealed by SHAP analysis, this study conducted exploratory correlation and regression analyses. The migraine improvement rate, y, was defined as the relative reduction in the average number of monthly migraine days from baseline to 3 months follow-up:
![]() |
Based on normalized mean absolute SHAP values, ROI-level features were ranked according to their global importance within each fold of the 5-fold cross-validation. The most informative features were defined a priori as those ranking among the top 10 features in at least 4 of the 5 cross-validation folds. Using this stability criterion, five ROIs were identified, including the cuneus, pericalcarine cortex, medial orbitofrontal cortex, frontal pole, and precuneus. To reduce multicollinearity while preserving the physiological organization of functional brain networks, these ROIs were grouped according to their canonical network affiliations: the cuneus and pericalcarine cortex were assigned to VN, whereas the medial orbitofrontal cortex, frontal pole, and precuneus were assigned to DMN.
PCA was then applied within each functional network, and only the first principal component (PC1) was retained to represent network-level α-band activity. Age and baseline MMD were adjusted for by residualization, and associations between the residualized VN-PC1 and DMN-PC1 and the outcome variable were assessed using Pearson correlation, Spearman rank correlation, and percentage-bending robust correlation (10% bilateral trimming), with 95% confidence intervals reported after Fisher’s z transformation.
Within a LOOCV framework, PCA and covariate residualization were performed separately within each training fold to prevent information leakage, followed by linear regression modeling using the resulting network-level principal components. Models were constructed with or without an interaction term between VN PC1 and DMN PC1; when included, interaction terms were mean-centered prior to model fitting. Model performance was quantified using the coefficient of determination (R²) and mean absolute error (MAE).
Data and statistical analysis
This study was conducted strictly according to the pre-specified analysis plan. No prior statistical power calculation was performed; the sample size was determined based on the feasibility and actual recruitment conditions of previous similar migraine preventive-treatment studies. All statistical tests were two-tailed, with a significance level set at p < 0.05.
Continuous variables are reported as median and interquartile range (IQR), while categorical variables are reported as frequency (percentage). Gender differences between the two groups were assessed using Chi-square test, while differences in other demographic and clinical baseline characteristics were assessed using the Mann-Whitney U test. Multiple comparisons were corrected using the Bonferroni correction, and 95% confidence intervals were computed using 5000 resamples with percentile bootstrap.
Statistical analysis was performed using SPSS 26.0, while EEG data preprocessing and spectral analysis were conducted using MATLAB R2023b. All other analyses were performed in Python 3.11, with the following libraries used: NumPy 1.26.4, pandas 2.2.3, SciPy 1.14.1, scikit-learn 1.5.1, xgboost 2.1.1, specparam 2.0.0, SHAP 0.45.0, matplotlib 3.9.2, statsmodels 0.14.2, and seaborn 0.13.2.
Results
Demographic and clinical characteristics
In this study, 141 MwoA patients undergoing preventive treatment were recruited. During follow-up, 5 patients (3.5%) were lost to follow-up, and 14 patients (10.0%) discontinued topiramate treatment due to intolerable adverse effects. Ultimately, 122 patients completed 3 months of follow-up, with 69 in the non-responder group and 53 in the responder group. During subsequent EEG analysis, 7 patients were excluded during data preprocessing (5 from the non-responder group and 2 from the responder group), and 3 additional patients were excluded during the FOOOF analysis (1 from the non-responder group and 2 from the responder group). A total of 112 patients were included in the final analysis, with 63 in the non-responder group and 49 in the responder group. Figure 1 shows the participant enrollment flowchart, and Table 1 presents the demographic and baseline clinical data. No statistically significant differences were found in the demographic and clinical characteristics between the responder and non-responder groups, although the age difference approached statistical significance.
Fig. 1.

Study flowchart
Table 1.
Demographic and clinical characteristics
| Characteristic | Non-responder | Responder | Group comparison | |
|---|---|---|---|---|
| n = 63 | n = 49 | |||
| Age, median (IQR), y | 33.0 (28.0–40.0) | 37.5 (28.5–45.0) | U = 1217.5, p = 0.056 | |
| Sex, (Males/Females) | 21/42 | 15/34 | χ2 = 0.54, p = 0.987 | |
| Males (%) | 21 (33.3) | 15 (30.6) | ||
| Females (%) | 42 (66.7) | 34 (69.4) | ||
| Educational level | 4.0 (4.0–4.0) | 4.0 (4.0–4.0) | U = 1553.0, p = 0.946 | |
| Migraine frequency, median (IQR), days per month | 6.0 (4.0-8.5) | 6.0 (5.0–10.0) | U = 1351.5, p = 0.255 | |
| History of migraine, median (IQR), y | 10.0 (5.0–13.0) | 10.0 (5.0–18.0) | U = 1404.0, p = 0.412 | |
| Duration of migraine, median (IQR), h | 24.0 (8.0–24.0) | 12.0 (7.0–24.0) | U = 1632.0, p = 0.593 | |
| VAS, median (IQR) | 7.0 (6.5-8.0) | 7.0 (6.0–8.0) | U = 1748.0, p = 0.224 | |
| GAD-7, median (IQR) | 3.0 (1.0–6.0) | 5.0 (2.0–7.0) | U = 1488.5, p = 0.747 | |
| PHQ-9, median (IQR) | 6.0 (4.0-8.5) | 7.0 (4.0–9.0) | U = 1452.0, p = 0.592 | |
| PSQI, median (IQR) | 7.0 (6.0-10.5) | 7.0 (6.0–11.0) | U = 1448.0, p = 0.575 | |
| MIDAS, median (IQR) | 25.0 (12.0–34.0) | 27.0 (15.0–40.0) | U = 1346.5, p = 0.249 | |
The median and interquartile range are employed to present the data. Chi-square test was used to assess sex differences between groups, and the Mann-Whitney U test was used to assess differences in other clinical characteristics between groups. Educational level is coded as: 1 = primary school or below, 2 = junior high school, 3 = high school, 4 = university, 5 = master’s degree, 6 = doctoral degree. The “duration of migraine” refers to the average duration of migraine attacks. Abbreviations: VAS = visual analogue scale; GAD-7 = Generalized Anxiety Disorder-7; PHQ-9 = Patient Health Questionnaire-9; PSQI = Pittsburgh Sleep Quality Index; MIDAS = Migraine Disability Assessment; IQR = interquartile range
Source reconstruction and spectral parameterization
Source reconstruction was performed for each participant, and the data were mapped to 68 brain regions of the Desikan-Killiany atlas. The periodic α power, aperiodic offset, and aperiodic exponent for each region were then extracted using the FOOOF toolbox (Fig. 2). The mapping values and differences for each brain region are shown in Fig. 3.
Fig. 2.

Extraction of periodic and aperiodic components of spectral power. (A) Source reconstruction was performed on EEG data, and cortical regions were defined using the Desikan–Killiany atlas. (B) Power spectral density was computed for each cortical region. (C) Periodic and aperiodic components of the power spectrum were separated; individualized periodic α-band power was extracted based on the individual alpha frequency (IAF). (D) Aperiodic components were fitted over the 2–45 Hz frequency range and characterized by two parameters: the aperiodic offset and the aperiodic exponent. IAF, individual α frequency
Fig. 3.

Topographic distributions of periodic α power, aperiodic offset, and aperiodic exponent in responders and non-responders to topiramate treatment, and their corresponding difference maps
Machine learning classification results
The model ultimately included 63 non-responders (label: 0) and 49 responders (label: 1) to topiramate treatment. A total of 204 features were included, comprising 68 features for periodic α power, aperiodic offset, and aperiodic exponent, with each category containing 34 features for the left and right hemispheres’ average and difference, respectively. The model achieved the following performance in identifying responders: AUROC: 0.859 (95% CI: 0.780–0.935); Accuracy: 0.759 (95% CI: 0.686–0.823); F1 Score: 0.731 (95% CI: 0.652–0.806); Precision: 0.714 (95% CI: 0.623–0.786); Recall: 0.753 (95% CI: 0.687–0.840); Brier: 0.175 (95% CI: 0.137–0.218). The ROC curve and confusion matrix for the model are shown in Fig. 4A-B. The model’s results are shown in Table 2.
Fig. 4.

Model performance and feature importance for identifying responders to topiramate treatment. (A) Mean receiver operating characteristic (ROC) curve across cross-validation folds with 95% confidence intervals. (B) Confusion matrix of the classification model (label 0: non-responders; label 1: responders). (C) SHAP summary plot illustrating global feature importance for the XGBoost model, with features ranked by the mean absolute SHAP values (gray bars). (D) SHAP dependence plots showing the relationship between feature values and model output for representative important features (red dots: responders; blue dots: non-responders). ROC, receiver operating characteristic curve; AUC, area under the curve; CI, confidence interval; SHAP, Shapley Additive exPlanations; Mean, (Left + Right)/2; Diff, (Left − Right)/2
Table 2.
XGBoost model performance
| AUROC | Accuracy | F1 Score | Precision | Recall |
|---|---|---|---|---|
| 0.859 [0.780–0.935] | 0.759 [0.686–0.823] | 0.731 [0.652–0.806] | 0.714 [0.623–0.786] | 0.753 [0.687–0.840] |
This table presents the performance of XGBoost in detecting responders. Values expressed as means and 95% confidence intervals. Abbreviations: AUROC = Area Under the Receiver Operating Characteristic Curve; F1 Score = Harmonic mean of precision and recall
To correct for potential overfitting in small sample high-dimensional data, we further applied the .632 + Bootstrap method to compute the optimism-corrected performance. This method resulted in an OOB AUROC of 0.856 (dynamic weight w = 0.821), with the final corrected AUROC of 0.881 (Brier score = 0.130). These results support the robustness of the model in internal validation.
We presented a SHAP swarm plot displaying the top 14 predictors with the highest mean absolute SHAP values across the 5-fold cross-validation models (Fig. 4C-D). To identify stable and informative predictors, ROI-level features were ranked within each fold according to their normalized mean absolute SHAP values. Features that ranked among the top 10 predictors in at least 4 of the 5 cross-validation folds were retained for subsequent analyses. Five stable features met this criterion: Periodic α Power in Cuneus (Mean), Periodic α Power in Pericalcarine (Mean), Periodic α Power in Medial Orbitofrontal (Mean), Periodic α Power in Frontal Pole (Mean), and Periodic α Power in Precuneus (Mean).
Correlation and regression analysis results
We then examined the association between migraine improvement rate and network-level representations derived from the selected brain regions. After grouping the regions according to their functional network affiliations, PCA was performed separately within the VN and the DMN, and only PC1 from each network was retained to represent network-level periodic α-band activity. PCA revealed that VN-PC1 and DMN-PC1 accounted for 97.7% and 82.0% of the variance within their respective networks.
Correlation analyses based on these network-level principal components demonstrated that both VN-PC1 and DMN-PC1 were significantly and negatively associated with the migraine improvement rate (DMN-PC1: Pearson r = − 0.505; both p < 0.001; VN-PC1: Pearson r = − 0.513; Fig. 5A-B). Pearson correlation, Spearman rank correlation, and percentage-bending robust correlation yielded highly consistent results for both networks, indicating a predominantly linear relationship that was robust to non-normal distributions and potential outliers (Table 3).
Fig. 5.

Correlation and regression analyses of network-level periodic α-band activity and migraine improvement rate. (A) Correlation analyses between the migraine improvement rate and network-level principal components derived from regions within the default mode network (DMN). (B) Correlation analyses between the migraine improvement rate and network-level principal components derived from regions within the visual network (VN). (C) Leave-one-out cross-validation (LOOCV) linear regression model predicting the migraine improvement rate using PCA-derived features from the DMN and VN. DMN, default mode network; VN, visual network; PCA, principal component analysis; LOOCV, leave-one-out cross-validation; r, correlation coefficient; R², coefficient of determination. Red shaded areas indicate the 95% confidence intervals of the regression lines
Table 3.
Correlation coefficients between selected features and migraine frequency reduction rate
| Feature | Pearson r | P value | Spearman r | P value | Robust Pearson r | P value |
|---|---|---|---|---|---|---|
| DMN-PC1 | -0.505 [-0.631, -0.353] | <0.001 | -0.569 [-0.682, -0.428] | <0.001 | -0.583 [-0.693, -0.446] | <0.001 |
| VN-PC1 | -0.513 [-0.638, -0.362] | <0.001 | -0.587 [-0.697, -0.451] | <0.001 | -0.573 [-0.685, -0.433] | <0.001 |
This table summarizes the associations between network-level representations of periodic α-band activity and the migraine improvement rate. Principal component analysis (PCA) was performed separately within the default mode network (DMN) and the visual network (VN), and the first principal component (PC1) from each network was retained. Pearson, Spearman rank, and percentage-bending robust correlation coefficients are reported. Values are presented as correlation coefficients with 95% confidence intervals (CIs) in brackets, estimated using Fisher’s z transformation
To further evaluate the predictive value of these network-level features, linear regression models were constructed using VN-PC1 and DMN-PC1 as predictors, with model performance assessed using LOOCV. The additive model without an interaction term achieved an R² value of 0.261 in predicting the migraine improvement rate (Fig. 5C). Inclusion of an interaction term between VN-PC1 and DMN-PC1 was not statistically significant (p = 0.189).
Discussion
This study utilized EEG combined with source localization and FOOOF spectral parameterization to investigate the neurophysiological predictors associated with clinical response after preventive treatment with topiramate in patients with MwoA at the source-level. Using an XGBoost-based machine learning model, we observed promising predictive performance for treatment response (AUROC = 0.859). The core finding of this study is that higher baseline IAPP within the VN and DMN distinguished non-responders and showed a significant negative correlation with the migraine improvement rate.
Previous EEG power spectrum studies on migraine have shown significant heterogeneity, likely due to the failure to separate periodic components from aperiodic components [23–25]. These components represent different phenomena: periodic components primarily reflect synchronized oscillations of neuronal populations, related to thalamocortical circuit rhythmic regulation [26], while aperiodic components capture the overall synaptic activity background, possibly indicating global shifts in the excitatory/inhibitory balance [27]. This confusion led to analytical biases. In this study, we applied the FOOOF algorithm during feature extraction to parameterize source-level EEG spectra into periodic α components, aperiodic offset, and aperiodic exponent, and treated these as candidate neurophysiological predictors. Moreover, variability in treatment responses can partly explain the differences in treatment outcomes. Studies have shown that IAF is negatively correlated with pain sensitivity and is influenced by factors such as age. Ignoring individual IAF variability can amplify predictive bias for clinical responses. Therefore, we standardized α power based on IAF and used covariate analysis to adjust for MMD and age, controlling for these confounding factors’ effects on treatment outcome. After optimism bias correction, the AUROC of our model was 0.881 (Brier score 0.130), outperforming the predictive accuracy achieved using clinical scales alone in previous studies. This suggests that EEG features may provide additional predictive value in predicting the efficacy of migraine preventive treatment and may inform the future development of large-scale predictive platforms for multiple drugs, pending validation in independent external cohorts.
SHAP analysis further revealed the interpretability of the model, with the five most important global features concentrated in specific brain regions of periodic α power. These regions include the cuneus and pericalcarine cortex within VN, and the medial orbitofrontal cortex, frontal pole, and precuneus within DMN. These features consistently contributed to model prediction during cross-validation, suggesting that they may index baseline neurophysiological states associated with subsequent clinical outcome. The findings regarding the cuneus and pericalcarine cortex are consistent with previous studies predicting the efficacy of flunarizine for migraine prevention, which found that non-responders exhibited higher α power in the primary visual cortex. Higher occipital α power has been interpreted as reflecting a more severe migraine state [9], in which altered occipital cortical excitability is associated with heightened sensitivity to external stimuli [28]. This increased excitability has been associated with migraine exacerbation [29] and may be accompanied by compensatory inhibitory regulation to maintain excitatory/inhibitory balance [30]. Occipital α power is thought to play a gating function for inhibition [31]. The increase in baseline α power may represent an active inhibition of irrelevant external stimuli, potentially representing a compensatory process related to sensory hypersensitivity in migraine patients. The significant increase in occipital α power during a migraine attack further supports this hypothesis [32, 33].
To further examine whether these brain regions provided network-level predictive information, we constructed a multiple linear regression model based on the PC1 of VN and DMN. The results showed that PC1 of VN and DMN explained the majority of the variance within the visual and default networks, respectively. Together, they significantly predicted MMD improvement. However, the model’s performance did not significantly improve after adding interaction terms, suggesting that VN and DMN features may provide relatively independent predictive information regarding clinical improvement after treatment. The DMN is involved in several core brain functions, including attention and monitoring of the surrounding environment [34]. It also plays an important role in chronic pain [35, 36], with fMRI showing impaired deactivation of the DMN in patients with chronic low back pain. The degree of deactivation was negatively correlated with the duration of pain, suggesting that this relative increase in neuronal synchrony and/or activity may reflect plasticity reorganization of the DMN caused by chronic pain. The increase in periodic α power in DMN-related brain regions observed in our study may also reflect pathological remodeling of the DMN associated with migraine [37], which could reduce the response to topiramate preventive treatment. The predictive role of the DMN in migraine prevention has been supported by several non-pharmacological treatments. For example, a taVNS study showed that multiple DMN-related brain regions had higher baseline fALFF values [38], which were associated with a reduction in migraine frequency. Similarly, acupuncture studies have reported the predictive role of baseline DMN functional connectivity in migraine treatment [39]. It should be noted that although longitudinal EEG studies on flunarizine have shown that increased baseline α power in the primary visual cortex predicts poor response, no systematic analysis has been performed on the DMN regions in the frontal-parietal cortex. Therefore, it is currently unclear whether increased periodic α power in the DMN is specific to clinical response after topiramate treatment or reflects a broader prognostic marker across preventive treatments.
This study has several limitations. First, the sample size was limited and all patients were recruited from a single centre in China, requiring external validation in larger, multi-centre and demographically diverse cohorts. Second, the single-arm, baseline-only EEG design limits treatment-specific and causal interpretation, as higher baseline periodic α power may also reflect migraine severity, nonspecific prognostic factors, or natural disease fluctuation. Future longitudinal EEG and mechanistic studies, including animal experiments, are needed to clarify whether elevated α activity contributes to poor treatment response or represents an epiphenomenon. Third, although age and MMD were adjusted for, sex-related and hormonal factors, including menstrual cycle phase, oral contraceptive use, hormone therapy, and menopausal status, may still confound migraine characteristics, electrophysiological activity, and treatment response. Fourth, because patients who discontinued topiramate due to intolerable adverse effects were excluded, the model mainly applies to patients who tolerated and completed treatment rather than the overall outcome of initiating topiramate therapy. Finally, despite source reconstruction and FOOOF parameterization, the spatial resolution limitations of EEG may still lead to underestimation of anatomical signals.
Conclusion
This study separated IAPP and aperiodic components, using these features to construct a machine learning model. We identified VN-related and DMN-related brain regions as key targets for early identification of responders to topiramate preventive treatment and their migraine improvement rate. This finding provides important evidence for developing individualized efficacy prediction models based on neurophysiological features, with the potential to reduce clinical trial-and-error and improve the precision of migraine preventive treatment.
Abbreviations
- EEG
Electroencephalography
- IAF
Individual α frequency
- SHAP
Shapley Additive exPlanations
- LOOCV
Leave-One-Out Cross-Validation
- AUROC
Area under the receiver operating characteristic curve
- PCA
Principal component analysis
- VN
Visual network
- DMN
Default mode network
- FOOOF
Fitting oscillations and One-Over-F
- MwoA
migraine without aura
- MMD
monthly migraine days
- PSQI
Pittsburgh Sleep Quality Index
- GAD-7
Generalized Anxiety Disorder-7
- PHQ-9
Patient Health Questionnaire-9
- MIDAS
Migraine Disability assessment
- ROI
Regions of interest
- PSD
Power spectral density
- IAPP
Individualized α periodic power
- OOB
Out-of-bag
- PC1
First principal component
- R²
Coefficient of determination
- MAE
Mean absolute error
- IQR
Interquartile range
Author contributions
Study concept and design: Siyuan Xie, Zhao Dong. Acquisition of data: Siyuan Xie, Chenghui Pi, Kang Jin, Longtang Ma, Yunyun Huo, Miaomiao Hu, Xiaoyan Zhang, Suyuan Tai, Jiayin Lin, Shengyuan Yu, Ye Ran, Zhao Dong. Analysis and interpretation of data: Siyuan Xie, Chenghui Pi. Drafting of the manuscript: Siyuan Xie, Chenghui Pi, Zhao Dong. Revising it for intellectual content: Siyuan Xie, Zhao Dong. Final approval of the completed manuscript: Zhao Dong.
Funding
This study was supported by the National Key Research and Development Program of China (2023YFC2508703).
Data availability
The datasets and code used and/or analyzed during the current study are available from the corresponding author on reasonable request.
Declarations
Competing interests
The authors declare no competing interests.
Footnotes
Publisher’s note
Springer Nature remains neutral with regard to jurisdictional claims in published maps and institutional affiliations.
Siyuan Xie and Chenghui Pi indicate shared first authorship.
Contributor Information
Ye Ran, Email: ranyenk@126.com.
Zhao Dong, Email: dong_zhaozhao@126.com.
References
- 1.Diener HC, Dodick DW, Lipton RB, Manack Adams A, DeGryse RE, Silberstein SD (2020) Benefits Beyond Headache Days With OnabotulinumtoxinA Treatment: A Pooled PREEMPT Analysis. Pain Ther 9:683–694. 10.1007/s40122-020-00198-w [DOI] [PMC free article] [PubMed] [Google Scholar]
- 2.Gonzalez-Martinez A, Pagán J, Sanz-García A, García-Azorín D, Rodríguez-Vico JS, Jaimes A, García AG, de Terán JD, González-García N, Quintas S, Belascoaín R, Casas Limón J, Latorre G, de Calle C, Sierra Á, Guerrero-Peral ÁL, Trevino-Peinado C, Gago-Veiga AB (2022) Machine-learning-based approach for predicting response to anti-calcitonin gene-related peptide (CGRP) receptor or ligand antibody treatment in patients with migraine: A multicenter Spanish study. Eur J Neurol 29:3102–3111. 10.1111/ene.15458 [DOI] [PubMed] [Google Scholar]
- 3.Raffaelli B, García-Azorín D, Boucherie DM, Amin FM, Deligianni CI, Gil-Gouveia R, Kirsh S, Lampl C, Sacco S, Uluduz D, Versijpt J, MaassenVanDenBrink A, Zeraatkar D, Sanchez-Del-Rio M, Reuter U (2023) European Headache Federation (EHF) critical reappraisal and meta-analysis of oral drugs in migraine prevention - part 3: topiramate. J Headache Pain 24:134. 10.1186/s10194-023-01671-5 [DOI] [PMC free article] [PubMed] [Google Scholar]
- 4.Fu C, Zhang Y, Ye Y, Hou X, Wen Z, Yan Z, Luo W, Feng M, Liu B (2022) Predicting response to tVNS in patients with migraine using functional MRI: A voxels-based machine learning analysis. Front Neurosci 16:937453. 10.3389/fnins.2022.937453 [DOI] [PMC free article] [PubMed] [Google Scholar]
- 5.Wei HL, Yang WJ, Zhou GP, Chen YC, Yu YS, Yin X, Li J, Zhang H (2022) Altered static functional network connectivity predicts the efficacy of non-steroidal anti-inflammatory drugs in migraineurs without aura. Front Mol Neurosci 15:956797. 10.3389/fnmol.2022.956797 [DOI] [PMC free article] [PubMed] [Google Scholar]
- 6.Yang XJ, Liu L, Xu ZL, Zhang YJ, Liu DP, Fishers M, Zhang L, Sun JB, Liu P, Zeng X, Wang LP, Qin W (2020) Baseline Brain Gray Matter Volume as a Predictor of Acupuncture Outcome in Treating Migraine. Front Neurol 11:111. 10.3389/fneur.2020.00111 [DOI] [PMC free article] [PubMed] [Google Scholar]
- 7.Chiang CC, Schwedt TJ, Dumkrieger G, Wang L, Chao CJ, Ouellette HA, Banerjee I, Chen YC, Jones BM, Burke KM, Wang H, Murray AM, Montenegro MM, Stern JI, Whealy M, Kissoon N, Cutrer FM (2024) Advancing toward precision migraine treatment: Predicting responses to preventive medications with machine learning models based on patient and migraine features. Headache 64:1094–1108. 10.1111/head.14806 [DOI] [PubMed] [Google Scholar]
- 8.Yuan H, Zotev V, Phillips R, Drevets WC, Bodurka J (2012) Spatiotemporal dynamics of the brain at rest–exploring EEG microstates as electrophysiological signatures of BOLD resting state networks. NeuroImage 60:2062–2072. 10.1016/j.neuroimage.2012.02.031 [DOI] [PubMed] [Google Scholar]
- 9.Pan LH, Chen WT, Wang YF, Chen SP, Lai KL, Liu HY, Hsiao FJ, Wang SJ (2022) Resting-state occipital alpha power is associated with treatment outcome in patients with chronic migraine. Pain 163:1324–1334. 10.1097/j.pain.0000000000002516 [DOI] [PubMed] [Google Scholar]
- 10.de Tommaso M, Marinazzo D, Nitti L, Pellicoro M, Guido M, Serpino C, Stramaglia S (2007) Effects of levetiracetam vs topiramate and placebo on visually evoked phase synchronization changes of alpha rhythm in migraine. Clin Neurophysiol 118:2297–2304. 10.1016/j.clinph.2007.06.060 [DOI] [PubMed] [Google Scholar]
- 11.Tadel F, Baillet S, Mosher JC, Pantazis D, Leahy RM (2011) Brainstorm: a user-friendly application for MEG/EEG analysis. Comput Intell Neurosci 2011:879716. 10.1155/2011/879716 [DOI] [PMC free article] [PubMed] [Google Scholar]
- 12.Desikan RS, Ségonne F, Fischl B, Quinn BT, Dickerson BC, Blacker D, Buckner RL, Dale AM, Maguire RP, Hyman BT, Albert MS, Killiany RJ (2006) An automated labeling system for subdividing the human cerebral cortex on MRI scans into gyral based regions of interest. NeuroImage 31:968–980. 10.1016/j.neuroimage.2006.01.021 [DOI] [PubMed] [Google Scholar]
- 13.Zhou YJ, van Es MWJ, Haegens S (2025) Distinct alpha networks modulate different aspects of perceptual decision-making. PLoS Biol 23:e3003461. 10.1371/journal.pbio.3003461 [DOI] [PMC free article] [PubMed] [Google Scholar]
- 14.Han Q, Wang H, Lu X, Li Y, Guo Y, Zhao X, Feng Y, Hu L (2025) Preoperative resting-state electrophysiological signals predict acute but not chronic postoperative pain. Eur J Pain 29:e4757. 10.1002/ejp.4757 [DOI] [PubMed] [Google Scholar]
- 15.Donoghue T, Haller M, Peterson EJ, Varma P, Sebastian P, Gao R, Noto T, Lara AH, Wallis JD, Knight RT, Shestyuk A, Voytek B (2020) Parameterizing neural power spectra into periodic and aperiodic components. Nat Neurosci 23:1655–1665. 10.1038/s41593-020-00744-x [DOI] [PMC free article] [PubMed] [Google Scholar]
- 16.Klimesch W (1999) EEG alpha and theta oscillations reflect cognitive and memory performance: a review and analysis. Brain Res Brain Res Rev 29:169–195. 10.1016/s0165-0173(98)00056-3 [DOI] [PubMed] [Google Scholar]
- 17.McSweeney M, Morales S, Valadez EA, Buzzell GA, Yoder L, Fifer WP, Pini N, Shuffrey LC, Elliott AJ, Isler JR, Fox NA (2023) Age-related trends in aperiodic EEG activity and alpha oscillations during early- to middle-childhood. NeuroImage 269:119925. 10.1016/j.neuroimage.2023.119925 [DOI] [PMC free article] [PubMed] [Google Scholar]
- 18.Li J, Xiong D, Gao C, Huang Y, Li Z, Zhou J, Ning Y, Wu F, Wu K (2025) Individualized Spectral Features in First-Episode and Drug-Naïve Major Depressive Disorder: Insights From Periodic and Aperiodic Electroencephalography Analysis. Biol Psychiatry Cogn Neurosci Neuroimaging 10:574–586. 10.1016/j.bpsc.2024.12.014 [DOI] [PubMed] [Google Scholar]
- 19.Tröndle M, Popov T, Pedroni A, Pfeiffer C, Barańczuk-Turska Z, Langer N (2023) Decomposing age effects in EEG alpha power. Cortex 161:116–144. 10.1016/j.cortex.2023.02.002 [DOI] [PubMed] [Google Scholar]
- 20.Klimesch W (2012) α-band oscillations, attention, and controlled access to stored information. Trends Cogn Sci 16:606–617. 10.1016/j.tics.2012.10.007 [DOI] [PMC free article] [PubMed] [Google Scholar]
- 21.Efron B, Tibshirani R (1997) Improvements on Cross-Validation: The 632 + Bootstrap Method. J Am Stat Assoc 92:548–560. 10.1080/01621459.1997.10474007 [DOI] [Google Scholar]
- 22.Lundberg SM, Erion G, Chen H, DeGrave A, Prutkin JM, Nair B, Katz R, Himmelfarb J, Bansal N, Lee SI (2020) From Local Explanations to Global Understanding with Explainable AI for Trees. Nat Mach Intell 2:56–67. 10.1038/s42256-019-0138-9 [DOI] [PMC free article] [PubMed] [Google Scholar]
- 23.Bjørk MH, Stovner LJ, Engstrøm M, Stjern M, Hagen K, Sand T (2009) Interictal quantitative EEG in migraine: a blinded controlled study. J Headache Pain 10:331–339. 10.1007/s10194-009-0140-4 [DOI] [PMC free article] [PubMed] [Google Scholar]
- 24.Vellieux G, Amiel H, Roos C, Crassard I, Houdart E, Kubis N, Lozeron P (2021) Spectral analysis of EEG in etiological assessment of patients with transient neurological deficits. Neurophysiol Clin 51:225–232. 10.1016/j.neucli.2021.04.001 [DOI] [PubMed] [Google Scholar]
- 25.Clemens B, Bánk J, Piros P, Bessenyei M, Veto S, Tóth M, Kondákor I (2008) Three-dimensional localization of abnormal EEG activity in migraine: a low resolution electromagnetic tomography (LORETA) study of migraine patients in the pain-free interval. Brain Topogr 21:36–42. 10.1007/s10548-008-0061-6 [DOI] [PubMed] [Google Scholar]
- 26.Llinás RR, Ribary U, Jeanmonod D, Kronberg E, Mitra PP (1999) Thalamocortical dysrhythmia: A neurological and neuropsychiatric syndrome characterized by magnetoencephalography. Proc Natl Acad Sci U S A 96:15222–15227. 10.1073/pnas.96.26.15222 [DOI] [PMC free article] [PubMed] [Google Scholar]
- 27.Gao R, Peterson EJ, Voytek B (2017) Inferring synaptic excitation/inhibition balance from field potentials. NeuroImage 158:70–78. 10.1016/j.neuroimage.2017.06.078 [DOI] [PubMed] [Google Scholar]
- 28.Aurora SK, Cao Y, Bowyer SM, Welch KM (1999) The occipital cortex is hyperexcitable in migraine: experimental evidence. Headache 39:469–476. 10.1046/j.1526-4610.1999.3907469.x [DOI] [PubMed] [Google Scholar]
- 29.Restuccia D, Vollono C, del Piero I, Martucci L, Zanini S (2013) Different levels of cortical excitability reflect clinical fluctuations in migraine. Cephalalgia 33:1035–1047. 10.1177/0333102413482199 [DOI] [PubMed] [Google Scholar]
- 30.Vecchia D, Pietrobon D (2012) Migraine: a disorder of brain excitatory-inhibitory balance? Trends Neurosci 35:507–520. 10.1016/j.tins.2012.04.007 [DOI] [PubMed] [Google Scholar]
- 31.Jensen O, Mazaheri A (2010) Shaping functional architecture by oscillatory alpha activity: gating by inhibition. Front Hum Neurosci 4:186. 10.3389/fnhum.2010.00186 [DOI] [PMC free article] [PubMed] [Google Scholar]
- 32.Bjørk M, Sand T (2008) Quantitative EEG power and asymmetry increase 36 h before a migraine attack. Cephalalgia 28:960–968. 10.1111/j.1468-2982.2008.01638.x [DOI] [PubMed] [Google Scholar]
- 33.Bjørk MH, Stovner LJ, Nilsen BM, Stjern M, Hagen K, Sand T (2009) The occipital alpha rhythm related to the migraine cycle and headache burden: a blinded, controlled longitudinal study. Clin Neurophysiol 120:464–471. 10.1016/j.clinph.2008.11.018 [DOI] [PubMed] [Google Scholar]
- 34.Buckner RL, Andrews-Hanna JR, Schacter DL (2008) The brain’s default network: anatomy, function, and relevance to disease. Ann N Y Acad Sci 1124:1–38. 10.1196/annals.1440.011 [DOI] [PubMed] [Google Scholar]
- 35.Kucyi A, Moayedi M, Weissman-Fogel I, Goldberg MB, Freeman BV, Tenenbaum HC, Davis KD (2014) Enhanced medial prefrontal-default mode network functional connectivity in chronic pain and its association with pain rumination. J Neurosci 34:3969–3975. 10.1523/jneurosci.5055-13.2014 [DOI] [PMC free article] [PubMed] [Google Scholar]
- 36.Tessitore A, Russo A, Giordano A, Conte F, Corbo D, De Stefano M, Cirillo S, Cirillo M, Esposito F, Tedeschi G (2013) Disrupted default mode network connectivity in migraine without aura. J Headache Pain 14:89. 10.1186/1129-2377-14-89 [DOI] [PMC free article] [PubMed] [Google Scholar]
- 37.Baliki MN, Geha PY, Apkarian AV, Chialvo DR (2008) Beyond feeling: chronic pain hurts the brain, disrupting the default-mode network dynamics. J Neurosci 28:1398–1403. 10.1523/jneurosci.4123-07.2008 [DOI] [PMC free article] [PubMed] [Google Scholar]
- 38.Feng M, Zhang Y, Wen Z, Hou X, Ye Y, Fu C, Luo W, Liu B (2022) Early Fractional Amplitude of Low Frequency Fluctuation Can Predict the Efficacy of Transcutaneous Auricular Vagus Nerve Stimulation Treatment for Migraine Without Aura. Front Mol Neurosci 15:778139. 10.3389/fnmol.2022.778139 [DOI] [PMC free article] [PubMed] [Google Scholar]
- 39.Zou Y, Tang W, Li X, Xu M, Li J (2019) Acupuncture reversible effects on altered default mode network of chronic migraine accompanied with clinical symptom relief. Neural Plast 2019(5047463). 10.1155/2019/5047463 [DOI] [PMC free article] [PubMed]
Associated Data
This section collects any data citations, data availability statements, or supplementary materials included in this article.
Data Availability Statement
The datasets and code used and/or analyzed during the current study are available from the corresponding author on reasonable request.






