To develop and evaluate machine learning models for predicting early clinical response to calcitonin gene-related peptide (CGRP)-targeting migraine medications using routinely collected electronic health record data.
CGRP-targeting therapies represent a major advancement in migraine prevention, but response rates vary widely across patients. Identifying baseline characteristics predictive of treatment response could guide personalized therapy selection and optimize outcomes in clinical practice.
This retrospective cohort study included 1325 patients treated with a CGRP-targeting preventive at the Jefferson Headache Center between August 2019 and August 2025. Baseline variables included age, sex, race, body mass index (BMI), comorbid diagnoses, migraine-associated symptoms, headache location, and initial headache burden (monthly headache days [MHD], worst pain intensity, and MIDAS score). The binary outcome was ≥30% reduction in MHD from baseline to 3-month follow-up. Six models were trained and evaluated using 5-fold stratified cross-validation: logistic regression, random forest, XGBoost, LightGBM, TabNet, and a deep neural network (DNN).
The cohort was 82% female, with a mean age of 45.9 ± 14.8 years, BMI 28.9 ± 7.4, and baseline MHD 21.3 ± 8.9. 27.1% of patients met responder criteria at 3 months. Among the models, the random forest achieved the highest accuracy (0.74 ± 0.02), but low recall (0.25 ± 0.05), while the DNN achieved the highest recall (0.65 ± 0.05) and F1 (0.49 ± 0.02). XGBoost and LightGBM demonstrated balanced performance (ROC-AUC ≈ 0.67–0.70). Key predictors of response included baseline MHD, MIDAS, BMI, chronic migraine status, medication type, and psychiatric or sleep comorbidities.
Machine learning models using baseline clinical features moderately predicted early response to CGRP-targeting therapies. Baseline headache burden, comorbidities, and medication type were consistent predictors across models. These findings support the feasibility of data-driven approaches for individualized migraine treatment selection and highlight opportunities for future model refinement using longitudinal and multimodal data.