Machine Learning and Pandemic Prediction in Epidemiology

Photo: Google DeepMind / Pexels
On December 31, 2019, a Toronto company called BlueDot sent its clients an alert about a cluster of pneumonia cases in Wuhan, China. The company says that was five days ahead of the World Health Organization (WHO). The claim is hard to audit, but it points at a real shift: software now reads the world's news, flight bookings, and virus genomes looking for the first sign of trouble. This article covers what machine learning pandemic prediction does well, where it fails, and why its failures are as instructive as its successes.
Educational content, not medical advice. Talk to your doctor before changing any medication, treatment, or routine. Information here reflects current research but every person's situation differs.
Key takeaways
- Machine learning is most useful for early warning, for short-term forecasts of cases, deaths, and hospital demand, and for tracking viral genomes.
- Ensembles of many models beat nearly any single model, but accuracy falls sharply as the forecast horizon lengthens.
- Predicting which viruses could infect humans is possible in a rough, probabilistic sense. Predicting when a pandemic will begin is not.
- Data quality and human behavior limit these systems more than algorithms do.
What "predicting a pandemic" can actually mean
The phrase hides at least four different jobs, and conflating them is the root of most hype. The first is detection: noticing that something unusual is happening before official reports confirm it. The second is forecasting: estimating how many cases, deaths, or hospital admissions will occur in the coming weeks. The third is tracing: working out how a pathogen is moving and changing from its genetic code. The fourth is risk ranking: estimating which animal viruses could infect people at all.
Each job uses different data and has a different failure mode. Detection fails by missing signals or by crying wolf. Forecasting fails when conditions change. Tracing fails when sequences arrive late. Risk ranking fails because most dangerous viruses are rare. A fair assessment treats them separately, which is how the rest of this article proceeds. If you want a refresher on what machine learning is before going on, our explainer what is machine learning covers the basics.
Early warning: reading the world faster than the reporting chain
Traditional disease surveillance works like a postal system. A patient visits a clinic, the clinician reports a notifiable disease, a local health authority collates the reports, a national agency analyzes them, and international bodies are informed. Each handoff takes time, and the chain is blind to illness that never reaches a clinic or does not match a known diagnosis.
Automated epidemic intelligence systems skip the postal chain and read the public information directly. WHO runs one of the largest, the Epidemic Intelligence from Open Sources (EIOS) initiative, which analyzes open electronic sources in near real time to help detect and assess public health threats. By the end of 2025, according to WHO, 120 countries and 30 organizations and networks were using the system.
BlueDot and the Wuhan alert
BlueDot was founded by infectious disease physician Kamran Khan, whose experience of the 2003 SARS outbreak in Toronto motivated the project. The company was incorporated in 2013 as BioDiaspora and renamed BlueDot in 2014. It describes its system as a combination of machine learning and human expertise that tracks hundreds of infectious diseases and forecasts their global spread. For its 2014 Ebola work, the company says its risk models used billions of passenger itineraries.
BlueDot's own account is that it warned clients on December 31, 2019, five days ahead of WHO. That is a company statement and should be read as one. What can be checked independently is the follow-up science. In early 2020, Khan and colleagues published a paper in the Journal of Travel Medicine that assessed how the Wuhan pneumonia cluster could spread internationally through commercial air travel. It is a useful example of the logic behind these systems: if you know where people fly from an outbreak, you know where to look next.
HealthMap and the hazard of false alarms
HealthMap, created by John Brownstein and Clark Freifeld and in operation since September 2006, aggregates reports from sources that include ProMED-mail, a human-curated reporting service. In March 2014, according to press accounts, it tracked early press and social media reports of a hemorrhagic fever in West Africa that WHO later identified as Ebola.
The value of such systems is not that they are always right. It is that they reduce the delay between an event and a human analyst looking at it. The cost is noise. A system tuned to catch everything will flag a great deal that turns out to be nothing, and every false alarm erodes the attention of the people who must follow up.
The cautionary tale: Google Flu Trends
No account of this field is honest without Google Flu Trends. Launched in 2008, it estimated influenza activity from the volume of certain search queries. The founding paper, published in Nature in 2009, reported that the frequency of particular queries closely tracked the percentage of physician visits for flu-like symptoms, and that weekly estimates for each US region could be produced with a reporting lag of about one day. At the time, that was dramatically faster than official surveillance.
Then it went wrong. A 2013 Nature news report by Declan Butler found that Google Flu Trends had predicted twice as many doctor visits for flu-like illness as the Centers for Disease Control and Prevention (CDC) recorded over one stretch of the 2012 flu season. In 2014, David Lazer, Ryan Kennedy, Gary King, and Alessandro Vespignani published "The Parable of Google Flu: Traps in Big Data Analysis" in Science. They argued that the algorithm's developers had been opaque about the search terms and that the model needed ongoing recalibration, and that combining it with lagged CDC data could substantially improve performance. Google stopped publishing current estimates on August 9, 2015.
Why did it fail? Two ideas explain most of it. The first is overfitting, where a model learns the quirks of its training period rather than the underlying relationship. The second is data drift: people's search habits change, and so do the search engine's own features. Heavy news coverage of flu, for instance, can drive searches by people who are not sick. In fall 2013, Google began compensating for search spikes caused by heavy flu news coverage, which tells you the team knew the problem existed.
Think of it as a thermometer that works only when the room is the same as the day you calibrated it. The lesson that survived is practical: signals from social or search data should be checked against clinical data, and a model should be re-tested as the world changes.
Forecasting: the weather-forecast model of epidemics
Once an outbreak is under way, the question shifts from "what is this?" to "what happens next?" Epidemic forecasting is like weather forecasting in one important respect: the best results come from combining many models rather than trusting one.
The US COVID-19 Forecast Hub, led by Nicholas Reich's group at the University of Massachusetts Amherst, is the best-studied example. Starting in April 2020, it collected tens of millions of predictions from more than 90 academic, industry, and independent research groups. A 2022 evaluation in PNAS (Cramer and colleagues) reached three conclusions that matter here.
- A multimodel ensemble that combined predictions from dozens of groups each week gave the most consistently accurate probabilistic forecasts of incident COVID-19 deaths at the state and national levels from April 2020 through October 2021.
- Of the 27 individual models that submitted complete forecasts, performance varied widely across time, location, and forecast horizon, and about two-thirds outperformed a naive baseline.
- Forecast error at a 20-week horizon was roughly three to five times larger than at a one-week horizon.
The second finding is easy to miss and important. One third of the individual models did no better than a simple baseline. Sophistication did not guarantee skill, and the ensemble's advantage came partly from averaging out individual models' mistakes.
CDC now coordinates this work through its Center for Forecasting and Outbreak Analytics. According to the agency, the center estimates respiratory virus trends using the time-varying reproduction number (Rt, the average number of people each infected person infects) at national, state, and local levels, coordinates the COVID-19 and RSV Forecast Hubs, which combine short-term forecasts of emergency department visits and hospital admissions, and runs scenario modeling for preparedness planning.
What kinds of models are in an ensemble
The label "machine learning" covers only part of what goes into forecasting. A typical ensemble mixes several families.
| Model family | Core idea | Typical strength | Typical weakness |
|---|---|---|---|
| Compartmental (SEIR-type) | Divides people into groups such as susceptible, exposed, infected, and recovered and models flows between them | Encodes biology; supports "what if" scenarios | Needs assumptions about behavior and immunity |
| Statistical time-series | Extrapolates recent trends | Simple and fast; hard to beat at one to two weeks | Blind to sudden changes |
| Machine learning | Learns patterns from data such as case counts, mobility, and hospital capacity | Flexible; can use many inputs | Can overfit; opaque; needs retraining when conditions shift |
| Agent-based | Simulates individual people and contacts | Captures networks and heterogeneity | Heavy computation; many parameters |
| Ensemble | Combines the above | Most consistently accurate in the Forecast Hub evaluation | Hides which assumptions drive the result |
Agent-based models were used well before COVID-19. A paper in the journal Epidemics describes a data-driven agent-based model built to forecast the 2014 to 2015 Ebola epidemic in Liberia, which was later used in an Ebola forecasting challenge. Machine learning's role in such models is often to calibrate parameters such as contact rates to observed data, rather than to make the forecast itself.
Models that shaped policy, and what they could not show
Forecasts matter because governments act on them. A study in Science by Matteo Chinazzi and colleagues, using a global metapopulation model calibrated to reported cases, estimated that the Wuhan travel quarantine starting January 23, 2020 delayed the overall epidemic in mainland China by only three to five days, because most Chinese cities had already received infected travelers. Internationally, the effect was larger: case importations fell by nearly 80 percent until mid-February. Sustained 90 percent travel restrictions changed the trajectory only modestly unless combined with at least a 50 percent reduction in transmission within communities.
The finding shows what models are good at: comparing scenarios and showing which levers matter. It also shows what they cannot do, which is guarantee that the assumptions inside them are right. The authors calibrated to reported cases, and reported cases depended on how much testing was happening. This is the quiet link between forecasting and the next section's subject, data quality. For more on how we judge whether any AI system is reliable, our guide to why AI benchmarks can be misleading applies the same skepticism.
Genomic epidemiology: reading the virus's family tree
Every time a virus copies itself, it makes occasional copying errors, called mutations. Those errors accumulate at a roughly measurable pace. If you sequence virus samples from many patients, you can line them up by similarity and draw a family tree, which tells you how outbreaks are linked, when a lineage emerged, and whether cases in two cities are one chain of transmission or two separate arrivals.
A good analogy is a manuscript copied by many scribes. Each scribe introduces a few typos. By comparing the copies, you can reconstruct which copy was made from which, even if you never saw the original. The challenge with a pandemic virus is scale, because tens of thousands, then millions, of copies must be compared.
The software that made it possible
Three open tools carried much of the load during COVID-19.
- Nextstrain (Hadfield and colleagues, 2018, Bioinformatics) combines a database of viral genomes, a pipeline for phylodynamic analysis, and an interactive visualization platform to give a near-live view of how pathogens evolve and spread. A 2026 description says it now offers continuously updated genomic surveillance for 21 viruses and Mycobacterium tuberculosis, with most pipelines running daily.
- UShER (Turakhia and colleagues, 2021, Nature Genetics) tackled a specific bottleneck: as the SARS-CoV-2 tree grew, placing each new sequence on it became too slow for real-time contact tracing. The authors built a data structure that encodes the virus's inferred evolutionary history, which greatly speeds up placing new samples on the tree.
- pangolin (O'Toole and colleagues, 2021, Virus Evolution) assigns the most likely lineage to a SARS-CoV-2 genome using the Pango dynamic nomenclature, which was proposed in 2020 by Rambaut and colleagues because the pandemic had produced tens of thousands of genomes and no accepted naming scheme. Nearly two million genomes had been submitted to its web application by the time of the paper.
A common misconception is that Pango names are the same as the Greek letters, such as Delta and Omicron. They are not. Those labels are assigned separately by WHO, while Pango names are technical lineage identifiers used by laboratories.
Not all of this is "machine learning" in the strict sense. Phylogenetic methods are statistical and computational, and some components, such as the early pangolin classifier, did use learned models. The honest summary is that genomic epidemiology is a data-heavy science in which machine learning is one tool among several.
Where genomic surveillance still stalls
Speed depends on data, and data depends on laboratories and reporting. A 2026 paper on Lassa virus tools built with Nextstrain notes a limitation: delays between sample collection and submission to public databases have averaged about two years over the last five years. A tracking system that is two years behind is a history book, not an early warning. COVID-19 had unusually rapid sharing, which should not be assumed for the next outbreak. For a closer look at how genetic data feeds into predicting mutations, see our article on AI and viral evolution prediction.
Can a model tell us which viruses will jump to humans?
This is the most ambitious use, and the evidence is the most modest. Researchers have tried to predict which animal viruses could infect people, based on features of the viral genome alone. A 2021 study in PLOS Biology by Nardus Mollentze, Simon Babayan, and Daniel Streicker trained machine learning models on 861 viral species with known zoonotic status (zoonotic means capable of passing from animals to people). Applied to 645 animal-associated viruses excluded from training, the models classified 272 as high risk and 41 as very high risk.
Two details deserve attention. First, predicted risk was significantly elevated only for viruses from nonhuman primates, not for other mammal or bird groups, so the model has limits in whom it can judge. Second, in a retrospective test, the models would have flagged SARS-CoV-2 as a relatively high-risk coronavirus without prior knowledge of the SARS-related viruses that had already jumped to humans. The authors present the approach as a rapid, low-cost way to support surveillance, not as a crystal ball.
The distinction is between prioritizing and predicting. A ranked list of 41 very high risk viruses tells surveillance teams where to look, which is valuable when sampling every bat cave is impossible. It does not say which one will cause the next outbreak, or when. To understand the biology behind the jump, see how viruses jump from animals to humans.
Why predictions fail: four hard limits
It would be misleading to present this technology as ready and waiting. The evidence supports four limits.
The horizon problem. The Forecast Hub evaluation found error at 20 weeks that was three to five times larger than at one week. Short forecasts are useful for hospital planning; long ones are closer to scenarios than predictions. Behavior, policy decisions, and new variants all change the path, and none is in the training data.
Data quality. Models learn from what is measured. If testing is uneven, case counts reflect testing as much as infection. If reports arrive late, as in the Lassa example, forecasts describe an older epidemic. The best algorithm cannot fix a missing measurement.
Drift. Google Flu Trends showed that relationships between a signal and the disease can change. Any model trained on past behavior assumes the future will resemble it, which a novel variant or a changed policy can violate.
The intervention paradox. A good forecast changes behavior, which changes the outcome, which makes the forecast look wrong. A model that predicts a surge and prompts a successful response appears to have failed. Evaluating models against the counterfactual, what would have happened without the response, is methodologically hard and rarely possible. This is one reason the field emphasizes scenarios and probabilities over single predictions.
There is also a quieter problem: equity. Systems built on English-language media, flight networks, and well-resourced laboratories see wealthy, connected places better than remote ones. Bias in the underlying data becomes bias in the alerts, a concern we examine more broadly in AI bias and discrimination.
What a realistic system looks like
Putting the pieces together, a sensible pandemic intelligence stack has layers.
- A wide net. Automated scanning of news, official notices, and animal-health reports, with human analysts checking what the software flags.
- A fast confirmation path. Laboratories that can sequence and share genomes quickly, with open data practices.
- Ensemble forecasting. Many models, scored openly against a baseline, with uncertainty shown rather than hidden.
- Scenario modeling. Explicit "if we do X" analysis, as with the travel-restriction study, for decision-makers.
- Risk ranking. Genome-based screening of animal viruses to focus sampling.
None of these layers claims to forecast the day or place of the next pandemic. Together they aim to shorten the interval between the first case and a competent response. For adjacent work on how AI is used in clinical care once patients arrive, see our overview of AI in healthcare.
The takeaway
The most accurate way to describe machine learning in outbreak work is as a speed and prioritization tool. It narrows the gap between an event and human attention, it improves the odds of a good short-range forecast when many models are combined, and it turns a pile of genomes into a map of transmission. It does not replace epidemiologists, laboratories, or political decisions, and it does not remove uncertainty. The Google Flu Trends episode and the steep growth of Forecast Hub error with horizon are reminders that a model is only as reliable as the data and the stability of the world it was trained on. Readers should treat claims of outbreak "prediction" skeptically and ask four questions: what was predicted, how far ahead, compared to what baseline, and with what data.
Frequently Asked Questions
Q: Did AI detect COVID-19 before the WHO did? A: BlueDot says it alerted clients on December 31, 2019, five days ahead of WHO. That timing comes from the company, not an independent audit. The broader point is supported: automated systems that scan open sources can flag unusual clusters before formal international notification, though a flag still needs human verification and a response.
Q: Can machine learning predict when the next pandemic will start? A: No. Models can rank which animal viruses look more likely to infect people, as in a 2021 study that flagged 272 high-risk and 41 very high-risk viruses among 645 tested. That helps target surveillance but does not give a date, a place, or a specific pathogen for the next outbreak.
Q: Why did Google Flu Trends fail? A: It estimated flu from search queries and, according to a 2013 Nature report, predicted twice as many doctor visits as the CDC recorded over one stretch of the 2012 season. Researchers pointed to opaque methods, overfitting, and changing search behavior, including searches driven by news coverage. Google stopped publishing current estimates on August 9, 2015.
Q: How accurate are epidemic forecasts? A: It depends on the horizon. In the US COVID-19 Forecast Hub, error at 20 weeks was roughly three to five times larger than at one week, and about two-thirds of individual models beat a naive baseline. A multimodel ensemble gave the most consistently accurate forecasts of deaths from April 2020 through October 2021.
Q: What is genomic epidemiology? A: It uses pathogen genome sequences to work out how outbreaks are connected. Because viruses accumulate mutations as they spread, comparing genomes from many patients lets scientists build family trees that show transmission links and the emergence of new lineages. Tools such as Nextstrain, UShER, and pangolin automate the analysis.
Q: Are Delta and Omicron the same as Pango lineage names? A: No. Pango names, assigned with tools such as pangolin, are technical identifiers for lineages of SARS-CoV-2, designed in 2020 to organize tens of thousands of genomes. The Greek-letter labels are separate names assigned by WHO for variants of concern.
Sources
- BlueDot. About BlueDot. Company history, founder, and the December 31, 2019 alert claim.
- World Health Organization. Epidemic Intelligence from Open Sources (EIOS).
- Bogoch II, Watts A, Thomas-Bachli A, Huber C, Kraemer MUG, Khan K. Pneumonia of unknown aetiology in Wuhan, China: potential for international spread via commercial air travel. Journal of Travel Medicine. 2020;27(2):taaa008. doi:10.1093/jtm/taaa008
- Ginsberg J, Mohebbi MH, Patel RS, Brammer L, Smolinski MS, Brilliant L. Detecting influenza epidemics using search engine query data. Nature. 2009;457:1012-1014. doi:10.1038/nature07634
- Lazer D, Kennedy R, King G, Vespignani A. The parable of Google Flu: traps in big data analysis. Science. 2014;343(6176):1203-1205. doi:10.1126/science.1248506
- Cramer EY, Ray EL, Lopez VK, et al. Evaluation of individual and ensemble probabilistic forecasts of COVID-19 mortality in the United States. PNAS. 2022;119(15):e2113561119. doi:10.1073/pnas.2113561119
- Centers for Disease Control and Prevention. Center for Forecasting and Outbreak Analytics: modeling and forecasting.
- Chinazzi M, Davis JT, Ajelli M, et al. The effect of travel restrictions on the spread of the 2019 novel coronavirus (COVID-19) outbreak. Science. 2020;368(6489):395-400. doi:10.1126/science.aba9757
- Venkatramanan S, Lewis B, Chen J, Higdon D, Vullikanti A, Marathe M. Using data-driven agent-based models for forecasting emerging infectious diseases. Epidemics. 2018;22:43-49. doi:10.1016/j.epidem.2017.02.010
- Hadfield J, Megill C, Bell SM, et al. Nextstrain: real-time tracking of pathogen evolution. Bioinformatics. 2018;34(23):4121-4123. doi:10.1093/bioinformatics/bty407
- Andrews KR, Chang J, Roemer C, et al. Nextstrain automates real-time phylogenetic analysis of open data for endemic and emerging pathogens. Bioinformatics. 2026;42(10). doi:10.1093/bioinformatics/btag705
- Turakhia Y, Thornlow B, Hinrichs AS, et al. Ultrafast Sample placement on Existing tRees (UShER) enables real-time phylogenetics for the SARS-CoV-2 pandemic. Nature Genetics. 2021;53(6):809-816. doi:10.1038/s41588-021-00862-7
- O'Toole Á, Scher E, Underwood A, et al. Assignment of epidemiological lineages in an emerging pandemic using the pangolin tool. Virus Evolution. 2021;7(2):veab064. doi:10.1093/ve/veab064
- Rambaut A, Holmes EC, O'Toole Á, et al. A dynamic nomenclature proposal for SARS-CoV-2 lineages to assist genomic epidemiology. Nature Microbiology. 2020;5(11):1403-1407. doi:10.1038/s41564-020-0770-5
- Daodu RO, Chang J, Prescott JB, Reinert K, Kühnert D. Lassa virus live tracking and lineage assignment: how Nextstrain can enhance surveillance and public health in Africa and beyond. Emerging Microbes & Infections. 2026;15(1). doi:10.1080/22221751.2026.2640699
- Mollentze N, Babayan SA, Streicker DG. Identifying and prioritizing potential human-infecting viruses from their genome sequences. PLOS Biology. 2021;19(9):e3001390. doi:10.1371/journal.pbio.3001390
Read next:
Follow new articles
Add SciHub101 to your feed reader to see new science and technology stories.
About the Author
SciHub101 is an independent science and technology publication founded and edited by Buğra Sözeri, a software engineer and app developer based in Türkiye. AI tools assist with drafting and research. Source documentation in the existing archive is uneven, and articles are being reviewed and corrected. The Editorial Team byline identifies editorial responsibility; it does not certify specialist or independent human review. Where we compare products, anything built by our own team is labelled as such — see the editorial guidelines and About page for how corrections and disclosures work.
Related Articles

Neural Networks and the Microscope: How AI Sees Biology in New Ways
Deep learning now outlines cells, restores noisy images, predicts fluorescent labels, and turns cell photos into numbers. Here is how, and where it breaks.

AI in Organ Transplantation: Matching, Allocation, and Saving More Lives
Machine learning is being tested on organ matching, graft-survival prediction, and kidney nonuse. Here is what the evidence shows and where it stops.

How Pandemics Spread — and What Stops Them
What decides how fast a disease spreads, how many people it kills, and which defenses work? The epidemiology of pandemics, from reproduction numbers to vaccines, with the 1918 flu and COVID-19 as test cases.

Personalized Medicine & AI-Driven Genomics
How genetic data and machine learning guide drug choice, and what trials of cancer, warfarin, and antidepressant testing actually show.

Machine Learning in Drug Discovery: AI Finds Medicines
How neural networks accelerate drug discovery from years to months.

AlphaFold: How AI Solved Protein Folding
DeepMind's AlphaFold solved a 50-year biological mystery: predicting how proteins fold.