AutoSEIR: Accurate Forecasting from Real-time Epidemic Data Using Machine Learning

Stefano Rizzo, Giovanna Vantini, Mohamad Saad, Sanjay ChawlamedRxiv 2020

Abstract

Since the SARS-CoV-2 virus outbreak has been recognized as a pandemic on March 11, 2020, several models have been proposed to forecast its evolution following the governments’ interventions. In particular, the need for fine-grained predictions, based on real-time and fluctuating data, has highlighted the limitations of traditional SEIR models and parameter fitting, encouraging the study of new models for greater accuracy. In this paper we propose a novel approach to epidemiological parameter fitting and epidemic forecasting, based on an extended version of the SEIR compartmental model and on an auto-differentiation technique for partially observable ODEs (Ordinary Differential Equations). The results on publicly available data show that the proposed model is able to fit the daily cases curve with greater accuracy, obtaining also a lower forecast error. Furthermore, the forecast accuracy allows to predict the peak with an error margin of less than one week, up to 50 days before the peak happens.

Introduction

Traditional epidemiological models, such as the Susceptible-Exposed-Infectious-Removed (SEIR) framework, often struggle when confronted with the complexities of real-world, real-time data. During the COVID-19 pandemic, researchers faced three primary hurdles: partial observability (only confirmed cases are visible), reporting delays (lags between infection and official data), and dynamic interventions (policy changes affecting transmission rates). AutoSEIR addresses these challenges by combining a sophisticated compartmental model with machine learning techniques to solve the "noise and lag" problem inherent in epidemic data.

Methodology: The 7-Compartment Model

The core of AutoSEIR is an extended compartmental model that moves beyond the basic SEIR structure. It explicitly models the path from infection to confirmation or recovery through seven distinct states: Susceptible, Exposed, Infected, Tested, Untested, Confirmed, and Removed.

The 7-compartment AutoSEIR model, distinguishing between observable and opaque compartments.

By including "Tested" and "Untested" compartments, the model accounts for the fact that only a fraction of the infected population is ever officially recorded. This "partial observability" is a critical feature; without it, models often produce unrealistic transmission estimates to fit the observed data.

Optimization via Automatic Differentiation

A key innovation of AutoSEIR is its use of a differentiable ODE solver. Instead of manual parameter tuning or static assumptions, the framework treats epidemiological parameters as learnable features.

The AutoSEIR optimization framework, utilizing backpropagation through an ODE solver to tune parameters.

The model learns five critical free parameters:

  1. Initial Infected ($I_0$): Estimated by simulating the epidemic starting before the first recorded case.
  2. Basic Reproduction Number ($R_0$): Initial transmissibility.
  3. Post-intervention Reproduction Number ($R_t$): Transmissibility after government actions.
  4. Testing Delay ($D_T$): The lag between infection and reporting.
  5. Testing Probability ($p_T$): The likelihood of an infected individual being confirmed.

By implementing the ODE solver with autograd, the system can backpropagate errors from the "Confirmed" compartment—the only observable data—back to these initial parameters, minimizing a hybrid loss function that considers both daily spikes and cumulative trends.

Key Results and Insights

The researchers validated AutoSEIR using data from diverse regions, including New York, Italy, Hubei, and Qatar. Key findings include:

  • Peak Prediction Accuracy: In a case study of Qatar, the model predicted the epidemic peak within a one-week margin up to 50 days in advance.
  • Robustness: The model remained stable even during significant "data dumps" (e.g., the Hubei reporting surge), treating them as outliers rather than fundamental shifts in dynamics.
  • Automatic Lag Detection: AutoSEIR successfully learns the specific reporting delays of different healthcare systems without requiring manual data shifting.

Conclusion

AutoSEIR demonstrates that integrating machine learning with traditional compartmental models can significantly improve the accuracy of epidemic forecasting. While the current version assumes a single major intervention point and a homogeneous population, its ability to handle noisy, partially observable data marks a significant step forward in real-time public health modeling. Future work may extend the model to account for multi-phase interventions and demographic variations.

Summary updated

Abstract

Abstract Since the SARS-CoV-2 virus outbreak has been recognized as a pandemic on March 11, 2020, several models have been proposed to forecast its evolution following the governments’ interventions. In particular, the need for fine-grained predictions, based on real-time and fluctuating data, has highlighted the limitations of traditional SEIR models and parameter fitting, encouraging the study of new models for greater accuracy. In this paper we propose a novel approach to epidemiological parameter fitting and epidemic forecasting, based on an extended version of the SEIR compartmental model and on an auto-differentiation technique for partially observable ODEs (Ordinary Differential Equations). The results on publicly available data show that the proposed model is able to fit the daily cases curve with greater accuracy, obtaining also a lower forecast error. Furthermore, the forecast accuracy allows to predict the peak with an error margin of less than one week, up to 50 days before the peak happens.
BibTeX
@misc{rizzo2020autoseir,
  author = {Stefano Rizzo and Giovanna Vantini and Mohamad Saad and Sanjay Chawla},
  title = {{AutoSEIR: Accurate Forecasting from Real-time Epidemic Data Using Machine Learning}},
  year = {2020},
  doi = {10.1101/2020.07.25.20159715},
  howpublished = {medRxiv},
}
Figure