Bridging Physics-based and Data-driven modeling for Learning Dynamical Systems

Rui Wang, Danielle C. Maddix, Christos Faloutsos, Yuyang Wang, Rose Yu

Abstract

How can we learn a dynamical system to make forecasts, when some variables are unobserved? For instance, in COVID-19, we want to forecast the number of infected patients and death cases but we do not know the exact number of susceptible or exposed individuals. This paper investigates the limitations of deep learning (DL) in forecasting dynamical systems under distribution shifts and proposes a hybrid approach that integrates physics-based mechanistic models with data-driven optimization.

Introduction

Predicting the evolution of dynamical systems—systems that change over time according to specific rules—is a fundamental challenge in science and engineering. While deep learning has achieved remarkable success in time-series forecasting, it often fails to generalize when faced with "distribution shifts." These shifts occur when the future data range differs from the training set (data domain shift) or when the underlying system parameters change, such as during a policy intervention in a pandemic (parameter domain shift).

The authors identify an "extrapolation trap": DL models are excellent at interpolation but struggle with extrapolation. They often "mimic" the shape of training data without capturing the underlying causal mechanisms. Consequently, when a system enters an unseen regime, these models' accuracy degrades significantly.

Methodology

To bridge the gap between flexible data-driven models and robust physics-based models, the authors introduce two primary contributions:

1. AutoODE

AutoODE is a framework for learning physics-based models using automatic differentiation. Instead of manual parameter tuning, it leverages the same optimization techniques used in neural networks to estimate the parameters of Ordinary Differential Equations (ODEs). By implementing a 4th-order Runge-Kutta (RK4) method in a differentiable programming environment (PyTorch), the entire integration process becomes end-to-end trainable.

2. ST-SuEIR

The authors propose ST-SuEIR, a novel spatiotemporal compartmental model specifically designed for epidemiological forecasting. It extends the standard SEIR (Susceptible-Exposed-Infected-Removed) model by incorporating "Unreported" and "Death" compartments. To handle regional dependencies, it utilizes a low-rank approximation of a sparse transmission matrix to model interactions between different states. Furthermore, it employs piecewise linear functions to capture time-varying transmission rates resulting from social distancing policies.

Experimental Evaluation

The models were evaluated on both synthetic and real-world datasets:

  • Synthetic Systems: Sine waves, Lotka-Volterra (predator-prey), FitzHugh-Nagumo (neuron spikes), and standard SEIR models were used to test robustness against domain shifts.
  • COVID-19 Data: Real-world data from Johns Hopkins University (April to September 2020) tracked cumulative infected, removed, and death cases across the 50 U.S. states.

Key Results

The proposed ST-SuEIR model demonstrated superior performance over a wide range of deep learning baselines, including Seq2Seq LSTMs, Transformers, NeuralODEs, and Graph Neural Networks (GCN/GAT).

Table 1: Mean Absolute Error (MAE) comparison across different models and time periods for Infected (I), Removed (R), and Death (D) cases.

As shown in Table 1, ST-SuEIR consistently achieved the lowest MAE in most categories. Notably, it achieved a 57.4% reduction in MAE for 7-day ahead predictions compared to the best-performing deep learning competitor. While simple DL models like fully connected networks (FC) were competitive in predicting death counts, they were significantly outperformed in the more volatile "Infected" and "Removed" categories.

Figure 1: Qualitative comparison of forecasting performance for Infected, Removed, and Death cases in Massachusetts.

In synthetic tests, physics-based models via AutoODE maintained low error even when parameters were shifted outside the training range, whereas DL models' errors exploded. This confirms that physics-based constraints provide a crucial inductive bias for extrapolation.

Conclusion and Future Work

The study highlights that while DL models are powerful, their lack of physical constraints makes them vulnerable to distribution shifts in dynamical systems. The success of ST-SuEIR suggests that the most promising path forward lies in hybrid modeling—incorporating compartmental physics directly into deep learning architectures. Future research should focus on deriving theoretical generalization bounds and developing "global" versions of AutoODE that can learn mappings across diverse systems.

Summary updated

BibTeX
@inproceedings{wang2021bridging,
  author = {Rui Wang and Danielle C. Maddix and Christos Faloutsos and Yuyang Wang and Rose Yu},
  title = {{Bridging Physics-based and Data-driven modeling for Learning Dynamical Systems}},
  booktitle = {L4DC},
  year = {2021},
  url = {https://openreview.net/forum?id=M-4t5xTrD-Z},
}
Figure