Early warning signals are vital in predicting critical transitions in complex dynamical systems. For behavioral epidemiology systems in particular, this includes shifts in vaccine sentiments that may precede disease outbreaks. Conventional statistical indicators, such as variance and lag-1 autocorrelation, often struggle in noisy environments and may fail in real-world scenarios. In this study, we leveraged universal signals of critical slowing down to train deep learning classifiers, specifically using long short-term memory (LSTM) and residual neural network (ResNet) architectures, for detecting early warning signals in disease-related social media time series. These classifiers were trained on simulated data from a stochastic coupled behavior-disease model with additive Lévy noise, a non-Gaussian noise that better reflects the heavy-tailed nature of real-world fluctuations. Our results show that these classifiers consistently outperform conventional indicators in both sensitivity and specificity on theoretical data while delivering quantitatively clear results that are easier to interpret on empirical data. Integrating deep learning with real-time social media monitoring offers a powerful tool for preventing disease outbreaks through proactive public health interventions.
Citation: Zitao He, Chris T. Bauch. Forecasting infectious disease outbreak risks from vaccine sentiments on social media: A data-driven dynamical systems approach[J]. Mathematical Biosciences and Engineering, 2025, 22(10): 2761-2779. doi: 10.3934/mbe.2025101
Early warning signals are vital in predicting critical transitions in complex dynamical systems. For behavioral epidemiology systems in particular, this includes shifts in vaccine sentiments that may precede disease outbreaks. Conventional statistical indicators, such as variance and lag-1 autocorrelation, often struggle in noisy environments and may fail in real-world scenarios. In this study, we leveraged universal signals of critical slowing down to train deep learning classifiers, specifically using long short-term memory (LSTM) and residual neural network (ResNet) architectures, for detecting early warning signals in disease-related social media time series. These classifiers were trained on simulated data from a stochastic coupled behavior-disease model with additive Lévy noise, a non-Gaussian noise that better reflects the heavy-tailed nature of real-world fluctuations. Our results show that these classifiers consistently outperform conventional indicators in both sensitivity and specificity on theoretical data while delivering quantitatively clear results that are easier to interpret on empirical data. Integrating deep learning with real-time social media monitoring offers a powerful tool for preventing disease outbreaks through proactive public health interventions.
| [1] | Centers for Disease Control and Prevention, History of measles, 2024. Available from: https://www.cdc.gov/measles/about/history.html. |
| [2] | Centers for Disease Control and Prevention, Measles, mumps, and rubella (MMR) vaccination: What everyone should know, 2024. Available from: https://www.cdc.gov/vaccines/vpd/mmr/public/index.html. |
| [3] | R. M. Anderson, R. M. May, Infectious diseases of humans: Dynamics and control, Oxford University Press, 1991. https://doi.org/10.1093/oso/9780198545996.001.0001 |
| [4] |
A. N. Desai, M. S. Majumder, What is herd immunity? JAMA, 324 (2020), 2113. https://doi.org/10.1001/jama.2020.20895 doi: 10.1001/jama.2020.20895
|
| [5] | California Department of Public Health, School immunizations in kindergarten by academic year, 2020. Available from: https://data.chhs.ca.gov/dataset/school-immunizations-in-kindergarten-by-academic-year. |
| [6] | P. Krishnakumar, S. Karlamangla, How stricter vaccine laws spared California from a major measles outbreak, 2019. Available from: https://www.latimes.com/projects/la-me-measles-us-california-outbreak-vaccine-new-york-disneyland/. |
| [7] | J. Zipprich, K. Winter, J. Hacker, D. Xia, J. Watt, K. Harriman, Measles outbreak — California, December 2014–February 2015, MMWR. Morb. Mortal. Wkly. Rep., 64 (2015), 153–154. http://www.ncbi.nlm.nih.gov/pmc/articles/pmc4584705/ |
| [8] |
L. Worden, S. F. Ackley, J. Zipprich, K. Harriman, W. T. A. Enanoria, R. Wannier, et al., Measles transmission during a large outbreak in California, Epidemics, 30 (2020), 100375. https://doi.org/10.1016/j.epidem.2019.100375 doi: 10.1016/j.epidem.2019.100375
|
| [9] |
M. K. Doll, J. W. Correira, Revisiting the 2014-15 Disneyland measles outbreak and its influence on pediatric vaccinations, Hum. Vaccin. Immunother., 17 (2021), 4210–4215. https://doi.org/10.1080/21645515.2021.1972707 doi: 10.1080/21645515.2021.1972707
|
| [10] | Centers for Disease Control and Prevention, About the National Immunization Surveys (NIS), 2024. Available from: https://www.cdc.gov/vaccines/imz-managers/nis/about.html. |
| [11] | Government of Canada, Vaccination coverage in Canada, 2024. Available from: https://www.canada.ca/en/public-health/services/immunization-vaccines/vaccination-coverage.html. |
| [12] | UK Health Security Agency, Cover of vaccination evaluated rapidly (COVER) programme: annual data, 2015. Available from: https://www.gov.uk/government/publications/cover-of-vaccination-evaluated-rapidly-cover-programme-annual-data. |
| [13] |
F. T. Cutts, P. Claquin, M. C. Danovaro-Holliday, D. A. Rhoda, Monitoring vaccination coverage: Defining the role of surveys, Vaccine, 34 (2016), 4103–4109. https://doi.org/10.1016/j.vaccine.2016.06.053 doi: 10.1016/j.vaccine.2016.06.053
|
| [14] |
A. E. Aiello, A. Renson, P. N. Zivich, Social media- and Internet-based disease surveillance for public health, Annu. Rev. Public Health, 41 (2020), 101–118. https://doi.org/10.1146/annurev-publhealth-040119-094402 doi: 10.1146/annurev-publhealth-040119-094402
|
| [15] |
A. E. Wilson, C. U. Lehmann, S. N. Saleh, J. Hanna, R. J. Medford, Social media: A new tool for outbreak surveillance, Antimicrob. Steward. Healthc. Epidemiol., 1 (2021), e50. https://doi.org/10.1017/ash.2021.225 doi: 10.1017/ash.2021.225
|
| [16] |
P. Pilipiec, I. Samsten, A. Bota, Surveillance of communicable diseases using social media: A systematic review, PLoS One, 18 (2023), e0282101. https://doi.org/10.1371/journal.pone.0282101 doi: 10.1371/journal.pone.0282101
|
| [17] | E. Aramaki, S. Maskawa, M. Morita, Twitter catches the flu: Detecting influenza epidemics using Twitter, in Proceedings of the 2011 Conference on Empirical Methods in Natural Language Processing (eds. R. Barzilay, M. Johnson), Association for Computational Linguistics, (2011), 1568–1576. https://dl.acm.org/doi/10.5555/2145432.2145600 |
| [18] |
M. Salathé, S. Khandelwal, Assessing vaccination sentiments with online social media: Implications for infectious disease dynamics and control, PLoS Comput. Biol., 7 (2011), e1002199. https://doi.org/10.1371/journal.pcbi.1002199 doi: 10.1371/journal.pcbi.1002199
|
| [19] |
S. Ajovalasit, V. M. Dorgali, A. Mazza, A. d'Onofrio, P. Manfredi, Evidence of disorientation towards immunization on online social media after contrasting political communication on vaccines. Results from an analysis of Twitter data in Italy, PLoS One, 16 (2021), e0253569. https://doi.org/10.1371/journal.pone.0253569 doi: 10.1371/journal.pone.0253569
|
| [20] |
J. Sooknanan, D. M. G. Comissiong, Trending on social media: Integrating social media into infectious disease dynamics, Bull. Math. Biol., 82 (2020), 86. https://doi.org/10.1007/s11538-020-00757-4 doi: 10.1007/s11538-020-00757-4
|
| [21] |
J. Cui, Y. Sun, H. Zhu, The impact of media on the control of infectious diseases, J. Dyn. Diff. Equat., 20 (2007), 31–53. https://doi.org/10.1007/s10884-007-9075-0 doi: 10.1007/s10884-007-9075-0
|
| [22] |
Y. Xiao, T. Zhao, S. Tang, Dynamics of an infectious diseases with media/psychology induced non-smooth incidence, Math. Biosci. Eng., 10 (2013), 445–461. https://doi.org/10.3934/mbe.2013.10.445 doi: 10.3934/mbe.2013.10.445
|
| [23] |
L. Mitchell, J. V. Ross, A data-driven model for influenza transmission incorporating media effects, R. Soc. Open Sci., 3 (2016), 160481. https://doi.org/10.1098/rsos.160481 doi: 10.1098/rsos.160481
|
| [24] |
G. O. Agaba, Y. N. Kyrychko, K. B. Blyuss, Mathematical model for the impact of awareness on the dynamics of infectious diseases, Math. Biosci., 286 (2017), 22–30. https://doi.org/10.1016/j.mbs.2017.01.009 doi: 10.1016/j.mbs.2017.01.009
|
| [25] |
E. Southall, T. S. Brett, M. J. Tildesley, L. Dyson, Early warning signals of infectious disease transitions: A review, J. R. Soc. Interface, 18 (2021), 20210555. https://doi.org/10.1098/rsif.2021.0555 doi: 10.1098/rsif.2021.0555
|
| [26] |
M. Scheffer, J. Bascompte, W. A. Brock, V. Brovkin, S. R. Carpenter, V. Dakos, et al., Early-warning signals for critical transitions, Nature, 461 (2009), 53–59. https://doi.org/10.1038/nature08227 doi: 10.1038/nature08227
|
| [27] |
V. Dakos, S. R. Carpenter, W. A. Brock, A. M. Ellison, V. Guttal, A. R. Ives, et al., Methods for detecting early warnings of critical transitions in time series illustrated using simulated ecological data, PLoS One, 7 (2012), e41010. https://doi.org/10.1371/journal.pone.0041010 doi: 10.1371/journal.pone.0041010
|
| [28] |
T. S. Brett, J. M. Drake, P. Rohani, Anticipating the emergence of infectious diseases, J. R. Soc. Interface, 14 (2017), 20170115. https://doi.org/10.1098/rsif.2017.0115 doi: 10.1098/rsif.2017.0115
|
| [29] |
T. S. Brett, E. B. O'Dea, É. Marty, P. B. Miller, A. W. Park, J. M. Drake, et al., Anticipating epidemic transitions with imperfect data, PLoS Comput. Biol., 14 (2018), e1006204. https://doi.org/10.1371/journal.pcbi.1006204 doi: 10.1371/journal.pcbi.1006204
|
| [30] | Z. Wang, W. Yan, T. Oates, Time series classification from scratch with deep neural networks: A strong baseline, in 2017 International Joint Conference on Neural Networks (IJCNN), (2017), 1578–1585. https://doi.org/10.1109/IJCNN.2017.7966039 |
| [31] |
H. Ismail Fawaz, G. Forestier, J. Weber, L. Idoumghar, P.-A. Muller, Deep learning for time series classification: A review, Data Min. Knowl. Dis., 33 (2019), 917–963. https://doi.org/10.1007/s10618-019-00619-1 doi: 10.1007/s10618-019-00619-1
|
| [32] |
T. M. Bury, R. I. Sujith, I. Pavithran, M. Scheffer, T. M. Lenton, M. Anand, et al., Deep learning for early warning signals of tipping points, Proc. Natl. Acad. Sci. U.S.A., 118 (2021), e2106140118. https://doi.org/10.1073/pnas.2106140118 doi: 10.1073/pnas.2106140118
|
| [33] |
T. M. Bury, D. Dylewsky, C. T. Bauch, M. Anand, L. Glass, A. Shrier, et al., Predicting discrete-time bifurcations with deep learning, Nat. Commun., 14 (2023), 6331. https://doi.org/10.1038/s41467-023-42020-z doi: 10.1038/s41467-023-42020-z
|
| [34] |
D. Dylewsky, M. Anand, C. T. Bauch, Early warning signals for bifurcations embedded in high dimensions, Sci. Rep., 14 (2024), 18277. https://doi.org/10.1038/s41598-024-68177-1 doi: 10.1038/s41598-024-68177-1
|
| [35] |
A. D. Pananos, T. M. Bury, C. Wang, J. Schonfeld, S. P. Mohanty, B. Nyhan, et al., Critical dynamics in population vaccinating behavior, Proc. Natl. Acad. Sci. U.S.A., 114 (2017), 13762–13767. https://doi.org/10.1073/pnas.1704093114 doi: 10.1073/pnas.1704093114
|
| [36] |
R. Liu, P. Chen, K. Aihara, L. Chen, Identifying early-warning signals of critical transitions with strong noise by dynamical network markers, Sci. Rep., 5 (2015), 17501. https://doi.org/10.1038/srep17501 doi: 10.1038/srep17501
|
| [37] |
Z. He, C. T. Bauch, Effect of homophily on coupled behavior-disease dynamics near a tipping point, Math. Biosci., 376 (2024), 109264. https://doi.org/10.1016/j.mbs.2024.109264 doi: 10.1016/j.mbs.2024.109264
|
| [38] |
S. Funk, M. Salathé, V. A. A. Jansen, Modelling the influence of human behaviour on the spread of infectious diseases: A review, J. R. Soc. Interface, 7 (2010), 1247–1256. https://doi.org/10.1098/rsif.2010.0142 doi: 10.1098/rsif.2010.0142
|
| [39] | P. Manfredi, A. d'Onofrio, Modeling the interplay between human behavior and the spread of infectious diseases, Springer, 2013. https://doi.org/10.1007/978-1-4614-5474-8 |
| [40] |
Z. Wang, C. T. Bauch, S. Bhattacharyya, A. d'Onofrio, P. Manfredi, M. Perc, et al., Statistical physics of vaccination, Phys. Rep., 664 (2016), 1–113. https://doi.org/10.1016/j.physrep.2016.10.006 doi: 10.1016/j.physrep.2016.10.006
|
| [41] |
F. Verelst, L. Williem, P. Beutels, Behavioural change models for infectious disease transmission: A systematic review (2010–2015), J. R. Soc. Interface, 13 (2016), 20160820. https://doi.org/10.1098/rsif.2016.0820 doi: 10.1098/rsif.2016.0820
|
| [42] |
C. T. Bauch, Imitation dynamics predict vaccinating behaviour, Proc. R. Soc. B, 272 (2005), 1669–1675. https://doi.org/10.1098/rspb.2005.3153 doi: 10.1098/rspb.2005.3153
|
| [43] |
T. C. Reluga, C. T. Bauch, A. P. Galvani, Evolving public perceptions and stability in vaccine uptake, Math. Biosci., 204 (2006), 185–198. https://doi.org/10.1016/j.mbs.2006.08.015 doi: 10.1016/j.mbs.2006.08.015
|
| [44] |
A. P. Galvani, T. C. Reluga, G. B. Chapman, Long-standing influenza vaccination policy is in accord with individual self-interest but not with the utilitarian optimum, Proc. Natl. Acad. Sci. U.S.A., 104 (2007), 5692–5697. https://doi.org/10.1073/pnas.0606774104 doi: 10.1073/pnas.0606774104
|
| [45] |
A. d'Onofrio, P. Manfredi, E. Salinelli, Vaccinating behaviour, information, and the dynamics of SIR vaccine preventable diseases, Theor. Popul. Biol., 71 (2007), 301–317. https://doi.org/10.1016/j.tpb.2007.01.001 doi: 10.1016/j.tpb.2007.01.001
|
| [46] |
E. Shim, G. B. Chapman, J. P. Townsend, A. P. Galvani, The influence of altruism on influenza vaccination decisions, J. R. Soc. Interface, 9 (2012), 2234–2243. https://doi.org/10.1098/rsif.2012.0115 doi: 10.1098/rsif.2012.0115
|
| [47] |
X. Chen, F. Fu, Imperfect vaccine and hysteresis, Proc. R. Soc. B, 286 (2019), 20182406. https://doi.org/10.1098/rspb.2018.2406 doi: 10.1098/rspb.2018.2406
|
| [48] |
S. L. Chang, M. Piraveenan, P. Pattison, M. Prokopenko, Game theoretic modelling of infectious disease dynamics and intervention methods: A review, J. Biol. Dyn., 14 (2020), 57–89. https://doi.org/10.1080/17513758.2020.1720322 doi: 10.1080/17513758.2020.1720322
|
| [49] |
C. T. Bauch, S. Bhattacharyya, Evolutionary game theory and social learning can determine how vaccine scares unfold, PLoS Comput. Biol., 8 (2012), e1002452. https://doi.org/10.1371/journal.pcbi.1002452 doi: 10.1371/journal.pcbi.1002452
|
| [50] |
E. Shim, J. J. Grefenstette, S. M. Albert, B. E. Cakouros, D. S. Burke, A game dynamic model for vaccine skeptics and vaccine believers: Measles as an example, J. Theor. Biol., 295 (2012), 194–203. https://doi.org/10.1016/j.jtbi.2011.11.005 doi: 10.1016/j.jtbi.2011.11.005
|
| [51] |
F. Fu, D. I. Rosenbloom, L. Wang, M. A. Nowak, Imitation dynamics of vaccination behaviour on social networks, Proc. R. Soc. B, 278 (2010), 42–49. https://doi.org/10.1098/rspb.2010.1107 doi: 10.1098/rspb.2010.1107
|
| [52] |
M. L. Ndeffo Mbah, J. Liu, C. T. Bauch, Y. I. Tekel, J. Medlock, L. A. Meyers, et al., The impact of imitation on vaccination behavior in social contact networks, PLoS Comput. Biol., 8 (2012), e1002469. https://doi.org/10.1371/journal.pcbi.1002469 doi: 10.1371/journal.pcbi.1002469
|
| [53] |
T. Oraby, V. Thampi, C. T. Bauch, The influence of social norms on the dynamics of vaccinating behaviour for paediatric infectious diseases, Proc. R. Soc. B, 281 (2014), 20133172. https://doi.org/10.1098/rspb.2013.3172 doi: 10.1098/rspb.2013.3172
|
| [54] |
R. E. Baker, J.-M. Peña, J. Jayamohan, A. Jérusalem, Mechanistic models versus machine learning, a fight worth fighting for the biological community? Biol. Lett., 14 (2018), 20170660. https://doi.org/10.1098/rsbl.2017.0660 doi: 10.1098/rsbl.2017.0660
|
| [55] | K. He, X. Zhang, S. Ren, J. Sun, Deep residual learning for image recognition, in 2016 IEEE Conference on Computer Vision and Pattern Recognition (CVPR), (2016), 770–778. https://doi.org/10.1109/CVPR.2016.90 |
| [56] |
F. M. Guerra, S. Bolotin, G. Lim, J. Heffernan, S. L. Deeks, Y. Li, et al., The basic reproduction number ($R_0$) of measles: a systematic review, Lancet Infect. Dis., 17 (2017), e420–e428. https://doi.org/10.1016/s1473-3099(17)30307-9 doi: 10.1016/s1473-3099(17)30307-9
|
| [57] |
R. Liu, J. Wu, H. Zhu, Media/psychological impact on multiple outbreaks of emerging infectious diseases, Comput. Math. Methods Med., 8 (2007), 612372. https://doi.org/10.1080/17486700701425870 doi: 10.1080/17486700701425870
|
| [58] |
M. McPherson, L. Smith-Lovin, J. M. Cook, Birds of a feather: Homophily in social networks, Annu. Rev. Sociol., 27 (2001), 415–555. https://doi.org/10.1146/annurev.soc.27.1.415 doi: 10.1146/annurev.soc.27.1.415
|
| [59] |
T. M. Bury, Ewstools: A Python package for early warning signals of bifurcations in time series data, J. Open Source Softw., 8 (2023), 5038. https://doi.org/10.21105/joss.05038 doi: 10.21105/joss.05038
|
| [60] | P. Warden, Geodict: A simple Python library/tool for pulling location information from unstructured text, 2010. Available from: https://github.com/petewarden/geodict. |
| [61] |
İ. Aygün, B. Kaya, M. Kaya, Aspect based Twitter sentiment analysis on vaccination and vaccine types in COVID-19 Pandemic with deep learning, IEEE J. Biomed. Health Inform., 26 (2022), 2360–2369. https://doi.org/10.1109/JBHI.2021.3133103 doi: 10.1109/JBHI.2021.3133103
|
| [62] |
W. Alotaibi, F. Alomary, R. Mokni, COVID-19 vaccine rejection causes based on Twitter people's opinions analysis using deep learning, Soc. Netw. Anal. Min., 13 (2023), 62. https://doi.org/10.1007/s13278-023-01059-y doi: 10.1007/s13278-023-01059-y
|
| [63] |
M. Müller, M. Salathé, P. E. Kummervold, COVID-Twitter-BERT: A natural language processing model to analyse COVID-19 content on Twitter, Front. Artif. Intell., 6 (2023), 1023281. https://doi.org/10.3389/frai.2023.1023281 doi: 10.3389/frai.2023.1023281
|
| [64] |
R. McDonald, P. S. Ruppert, M. Souto, D. E. Johns, K. McKay, N. Bessette, et al., Notes from the field: Measles outbreaks from imported cases in orthodox Jewish communities — New York and New Jersey, 2018–2019, MMWR. Morb. Mortal. Wkly. Rep., 68 (2019), 444–445. https://doi.org/10.15585/mmwr.mm6819a4 doi: 10.15585/mmwr.mm6819a4
|
| [65] |
A. Carlson, M. Riethman, P. Gastañaduy, A. Lee, J. Leung, M. Holshue, et al., Notes from the field: Community outbreak of measles — Clark County, Washington, 2018–2019, MMWR. Morb. Mortal. Wkly. Rep., 68 (2019), 446–447. https://doi.org/10.15585/mmwr.mm6819a5 doi: 10.15585/mmwr.mm6819a5
|
| [66] |
L. Sherrard, J. Hiebert, S. Squires, Measles surveillance in Canada: Trends for 2014, Can. Commun. Dis. Rep., 41 (2015), 157–168. https://doi.org/10.14745/ccdr.v41i07a01 doi: 10.14745/ccdr.v41i07a01
|
| [67] |
W. See, Y. K. Ng, L. Cui, Y. Kita, S P.-L. Ooi, V. Lee, et al., Singapore's efforts to achieve measles elimination in 2018, Western Pac. Surveill. Response J., 12 (2021). https://doi.org/10.5365/wpsar.2019.10.4.002 doi: 10.5365/wpsar.2019.10.4.002
|
| [68] | T. Marks, S. Vanderslott, Which countries have mandatory childhood vaccination policies? 2021. Available from: https://ourworldindata.org/childhood-vaccination-policies |
| [69] | World Health Organization, Measles vaccination coverage, 2025. Available from: https://immunizationdata.who.int/global/wiise-detail-page/measles-vaccination-coverage. |
| [70] | World Health Organization, Measles reported cases and incidence, 2025. Available from: https://immunizationdata.who.int/global/wiise-detail-page/measles-reported-cases-and-incidence. |
| [71] |
G. Fenza, M. Gallo, V. Loia, F. Orciuoli, E. Herrera-Viedma, Data set quality in machine learning: Consistency measure based on group decision making, Appl. Soft Comput., 106 (2021), 107366. https://doi.org/10.1016/j.asoc.2021.107366 doi: 10.1016/j.asoc.2021.107366
|
| [72] |
A. Tasciotti, F. Urban, F. de Dea, L. Bortolussi, G. Caravagna, A. D'Onofrio, Deep learning-informed Bayesian model-based analysis to estimate superspreading events in epidemic outbreaks, IEEE Access, 12 (2024), 161375–161400. https://doi.org/10.1109/ACCESS.2024.3490374 doi: 10.1109/ACCESS.2024.3490374
|
| [73] | H. Ismail Fawaz, G. Forestier, J. Weber, L. Idoumghar, P.-A. Muller, Transfer learning for time series classification, in 2018 IEEE International Conference on Big Data (Big Data), (2018), 1367–1376. https://doi.org/10.1109/BigData.2018.8621990 |
| [74] |
A. P. Fiebelkorn, S. B. Redd, P. A. Gastañaduy, N. Clemmons, P. A. Rota, J. S. Rota, et al., A comparison of postelimination measles epidemiology in the United States, 2009–2014 versus 2001–2008, J. Pediatric Infect. Dis. Soc., 6 (2015), 40–48. https://doi.org/10.1093/jpids/piv080 doi: 10.1093/jpids/piv080
|
| [75] |
S. Bidari, W. Yang, Global resurgence of measles in the vaccination era and influencing factors, Int. J. Infect. Dis., 147 (2024), 107189. https://doi.org/10.1016/j.ijid.2024.107189 doi: 10.1016/j.ijid.2024.107189
|
| [76] |
N. Boers, Early-warning signals for Dansgaard-Oeschger events in a high-resolution ice core record, Nat. Commun., 9 (2018), 2556. https://doi.org/10.1038/s41467-018-04881-7 doi: 10.1038/s41467-018-04881-7
|