A systematic comparison of physics-informed neural networks and mechanistic models for epidemic modeling and forecasting

Martina Rama, Yuhan Li, Bruno Lepri, Nicola Perra, Michele TizzoniarXiv 2026 · arXiv

This paper presents a rigorous head-to-head comparison between Physics-Informed Neural Networks (PINNs) and traditional stochastic mechanistic models for epidemic forecasting. While traditional models excel in controlled synthetic environments, PINNs demonstrate superior flexibility and performance on noisy real-world data, marking them as a powerful hybrid tool for public health modeling.

What Problem Does This Paper Address?

Epidemic forecasting is a high-stakes balancing act. On one side, we have mechanistic compartmental models (like the classic SEIR model). These are highly interpretable because they are built on the "physics" of disease transmission, but they can be rigid and struggle with noisy, real-world data. On the other side are deep learning models, which are incredibly flexible and data-hungry but often act as "black boxes" that ignore epidemiological principles.

Physics-Informed Neural Networks (PINNs) aim to bridge this gap by embedding the governing differential equations of disease spread directly into a neural network's loss function. While PINNs have shown promise, researchers haven't yet established whether they actually outperform well-calibrated traditional models in a fair, "apples-to-apples" comparison. This paper provides that systematic benchmark.

Methods

The authors developed a shared framework where both the PINN and the mechanistic model rely on the same underlying "engine": an age-structured SEIRD model (Susceptible-Exposed-Infectious-Recovered-Dead).

Fig. 1: Overview of the two forecasting frameworks. The PINN-based approach is shown in violet and the mechanistic approach in teal. Both rely on the same age-structured Susceptible-Exposed-Infectious-Recovered-Dead (SEIRD) model (a = 1, . . . , 16; left panel), with known parameters ψ = {ε, ξ, C, IFRa, Na}, unknown parameters λ = {R0, 1/δ}, and solution u(t; λ, ψ). Step 1 (offline, once). The PINN uN(t, R0, 1/δ) is trained on a parameter grid, with the ODE system embedded in the loss through LODE, to approximate u. The mechanistic approach builds a pool of stochastic chain-binomial simulations, one for each parameter set. Step 2 (every window). The unknown parameters are inferred from the weekly incidence data in the look-back window, via MCMC with a Poisson likelihood for the PINN and via likelihood-free ABC-SMC with a Weighted Mean Absolute Percentage Error (WMAPE) distance for the mechanistic model. For the London COVID-19 data, the observed quantity is weekly deaths and both R0 and 1/δ are estimated; for the synthetic scenarios, the observed quantity is weekly new infections and only R0 is esti- mated. Step 3 (every window). Probabilistic forecasts at horizons h1–h4 (1–4 weeks ahead) are obtained by evaluating the PINN at the posterior samples with their uncer- tainty and by selecting the pool trajectories associated with the accepted particles for the mechanistic-based framework. The central panel illustrates a single window: the dashed line separating Steps 2 and 3 passes through the last available observation at time tc, from which the forecasts start; filled circles are the observed data used in Step 2, open circles the future observations against which the forecasts are evalu- ated. Steps 2–3 are repeated every week in a rolling-window manner. The right panel shows, as an example, the resulting 1-week-ahead forecasts (h1) over the whole period (median, 50% and 90% prediction intervals), against the observed data (black); the same is done for horizons h2–h4.
  • The PINN Approach: Instead of solving the differential equations numerically every time, a neural network is trained once to approximate the solution across a wide range of epidemic parameters. During the actual forecasting phase, the model uses Markov Chain Monte Carlo (MCMC) to find the parameters that best fit the observed data.
  • The Mechanistic Approach: This uses a stochastic chain-binomial solver. It accounts for the inherent randomness of human interaction and is calibrated using Approximate Bayesian Computation Sequential Monte Carlo (ABC-SMC).
  • The Pipeline: Both models use a "rolling-window" strategy, recalibrating every week to produce probabilistic forecasts for the next 1 to 4 weeks.

Datasets

The models were evaluated on two types of data:

  1. Synthetic Scenarios: Two simulated COVID-like waves with known parameters ($R_0$ of 1.5 and 2.0) and added observational noise. This allowed the authors to check if the models could "recover" the true underlying parameters.
  2. Real-World Data: Weekly death incidence from the first COVID-19 wave in London (February to August 2020). This is a "minimal context" challenge, as the models were not given data on lockdowns or mobility changes.

Key Insights and Ideas

  • The "Synthetic vs. Real" Performance Flip: In synthetic scenarios where the data perfectly followed the assumed ODEs, the mechanistic model was slightly more accurate. However, on real-world London data, the PINN achieved significantly lower forecasting errors. This suggests that the neural network's ability to act as a "flexible functional approximator" helps it capture real-world dynamics that deviate from strict mathematical assumptions.
  • Uncertainty and Overconfidence: PINNs produced much narrower uncertainty intervals than the mechanistic model. While this looks "sharper," it often led to overconfidence (under-coverage), where the true data point fell outside the predicted range. This happens because the PINN only accounts for parameter uncertainty, whereas the mechanistic model also captures the "intrinsic noise" of the epidemic process itself.
  • Computational Decoupling: A major practical advantage of the PINN framework is that the heavy computational lifting (training the network) happens once, offline. The online phase (inference and forecasting) is relatively fast and doesn't require retraining the network as new data arrives.

Key Results

  • Accuracy on Real Data: In the London COVID-19 case study, the PINN-based framework outperformed the mechanistic model by 29–41% across various error metrics (MAE, RMSE, and Weighted Interval Score).
  • Parameter Recovery: In synthetic tests, both models recovered the basic reproduction number ($R_0$) accurately, but the PINN's estimates were "sharper" (narrower posterior distributions).
  • The Baseline Challenge: Interestingly, in the complex real-world London scenario, neither model consistently beat a simple "naive" baseline (which just predicts the last observed value). This underscores how difficult forecasting is when models are denied information about social interventions like lockdowns.

Limitations and Future Work

The authors acknowledge that their "minimalist" setting—excluding mobility data and interventions—was a deliberate choice to isolate model performance, but it limits real-world accuracy.

Future work should focus on:

  • Improving Uncertainty Quantification: Finding ways for PINNs to better account for stochastic process noise so they aren't quite so "overconfident."
  • Hybridization: Exploring ensemble models that combine the structural robustness of mechanistic models with the adaptive flexibility of PINNs.
  • Broader Benchmarking: Testing these frameworks across different geographical regions and different types of infectious diseases to ensure the findings generalize.

Summary updated

Abstract

Physics-Informed Neural Networks (PINNs) have recently been applied to epidemic modeling and forecasting with promising results. These methods integrate mechanistic knowledge with data-driven learning. Yet, their comparative performance against well-established, and simpler epidemic models is underexplored. Here, we conduct a systematic comparison of a PINN-based framework and a stochastic mechanistic model. Both approaches share the same age-structured SEIRD core and rolling-window forecasting pipeline, in a deliberately minimal setting. We evaluate their retrospective fits and probabilistic forecasts in two synthetic scenarios and the first COVID-19 wave in London. Interestingly, while PINNs underperform in synthetic scenarios, they achieve better performance on real data. Furthermore, PINNs provide narrower uncertainty intervals and sharper estimation of parameters in synthetic scenarios. Our findings confirm PINNs as a promising tool in epidemiology. At the same time, the results reaffirm the value of simpler approaches such as traditional compartmental models, and promote additional benchmarking studies.
BibTeX
@misc{rama2026systematic,
  author = {Martina Rama and Yuhan Li and Bruno Lepri and Nicola Perra and Michele Tizzoni},
  title = {{A systematic comparison of physics-informed neural networks and mechanistic models for epidemic modeling and forecasting}},
  year = {2026},
  eprint = {2611.18389},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2611.18389},
}
Figure