AI Predicts Migraine Risk a Day Ahead
Study finds 91.2% precision as month-long headache patterns emerge as key warning signal.
AI model predicted next-day migraine risk in a large real-world dataset.
Researchers analyzed data from 53,065 Nerivio app users covering more than 770,000 days.
Previous 30-day headache patterns were more influential than immediate warning symptoms.
Could artificial intelligence warn people that a migraine attack is likely to occur the following day?
A new study suggests it may be possible, after researchers developed a machine-learning model that achieved 91.2% precision when predicting next-day migraine risk. However, the figure does not mean the system correctly predicted 91% of all migraine attacks.
Researchers analyzed data from 53,065 users of the Nerivio app, producing 770,473 qualifying daily records collected between January 2020 and July 2025. The dataset included electronic headache diaries, questionnaires, demographic information and location-based weather data.
The researchers tested seven machine-learning approaches to determine whether information already recorded by users could help identify whether a migraine was likely to occur the following day.
The best-performing model was a customized version of XGBoost, which achieved 91.2% precision. In practical terms, when the model predicted that a migraine would occur the next day, an attack was reported in about 91 out of 100 such predictions within the study dataset.
The model's overall accuracy was 81%, while its sensitivity was 80%, meaning it detected about four out of five days on which a migraine occurred. Its specificity was 83%, while its area under the curve was 0.893.
The previous month provides the strongest clue
One of the study's most notable findings was that the strongest predictive information did not necessarily come from symptoms immediately preceding an attack.
Instead, the model placed significant weight on the individual's headache history during the previous 30 days.
The rolling average of headache severity during that period was the single most influential feature. Information derived from the previous 30 days collectively accounted for about 56% of the model's input importance.
The finding highlights the potential value of maintaining detailed headache records over time. Rather than examining each day independently, an AI system can look for patterns across several weeks that may be difficult to recognize manually.
What does the 91% figure really mean?
The study's results need to be interpreted carefully.
The 91.2% figure represents precision, not overall accuracy. It answers the question: When the model predicts a migraine, how often is that prediction correct?
Overall accuracy, meanwhile, considers both days when migraines occurred and days when they did not.
As a result, saying simply that “AI predicts migraines with 91% accuracy” could give readers a broader impression than the study actually supports.
Prediction is not treatment
The researchers tested how well the model could forecast migraine risk. They did not test whether receiving a prediction could prevent an attack, reduce its severity or improve a patient's quality of life.
The technology is intended to provide information about the likelihood of a migraine rather than replace medical diagnosis or treatment decisions.
A high-risk prediction also does not guarantee that an attack will occur, while a low-risk prediction does not mean an attack is impossible.
The study's participants were all users of the same migraine-treatment app, meaning the findings will need to be validated in broader and different populations before the model's performance can be generalized.
The results nevertheless suggest that routinely collected health data could eventually help people anticipate migraine risk and prepare for potentially difficult days.
For now, the research represents a step toward personalized migraine forecasting, rather than a system that can definitively predict or prevent tomorrow's headache.