Compositional Modeling of Nonlinear Dynamical Systems with ODE-based Random Features

Thomas M. McDonald, Mauricio A Álvarez

Introduction

Modeling real-world dynamical systems—such as blood pressure fluctuations or weather patterns—often requires balancing two competing paradigms. On one hand, mechanistic models use Ordinary Differential Equations (ODEs) to describe physical laws; they generalize well but are frequently too rigid or simple for messy, real-world data. On the other hand, data-driven models (like Deep Learning) are incredibly flexible but are "physics-blind," often failing or becoming overconfident when they encounter scenarios slightly different from their training set.

While "Latent Force Models" (LFMs) previously attempted to bridge this gap by plugging ODEs into Gaussian Processes, they were traditionally "shallow." This limited their ability to handle highly complex, non-stationary signals. To address this, researchers have developed the Deep Latent Force Model (DLFM), a new framework that combines the physical grounding of differential equations with the flexible learning power of Deep Gaussian Processes (DGPs).

The Deep Latent Force Model (DLFM) Architecture

The DLFM introduces a deep architecture that retains physical constraints while scaling to complex, multivariate data. The "secret sauce" of the model relies on three core components:

  1. Physics-Informed Random Features: Instead of using standard mathematical functions (like the sines and cosines found in typical Random Fourier Features), the DLFM derives features from the Green’s function of a first-order ODE. This essentially bakes the "rules" of a physical system directly into the model's architecture.
  2. Compositional Structure: These physics-informed features are stacked in layers, similar to a Deep Gaussian Process or a Deep Neural Network. Each layer acts as a frequency filter that transforms the input, allowing the model to represent much more complex dynamics than a single ODE could.
  3. Approximate Inference: Because deep probabilistic models are mathematically intractable to solve exactly, the authors employ Stochastic Variational Inference. This allows the model to scale to large datasets by treating the weights and frequencies as distributions that are optimized during training.
Architecture comparison between standard Deep Gaussian Processes and the proposed Deep Latent Force Model.

In a standard Deep GP, layers simply "warp" the input space. In a DLFM, the Green’s function acts as a frequency filter, meaning the model selectively smooths or emphasizes specific physical frequencies at each layer rather than just bending the data arbitrarily.

Datasets and Evaluation

The model was rigorously evaluated across three distinct types of data:

  • Compositional Toy Problem: A synthetic system designed to test if the model can successfully recover hierarchical ODE structures.
  • PhysioNet (CHARIS dataset): Real-world multivariate healthcare data containing electrocardiogram (ECG), arterial blood pressure (ABP), and intracranial pressure (ICP) signals.
  • UCI Regression Benchmarks: Standard machine learning datasets (Powerplant and Protein) used to test general regression performance against non-physics-based models.

Key Results: Extrapolation is the Litmus Test

The most striking insight from the research is the DLFM's ability to extrapolate. While standard Deep GPs can fit training data perfectly, they often break down when asked to predict the future. Because the DLFM is built on ODE-based features, its predictions remain physically plausible even outside the training range.

Extrapolation performance comparison showing GP, DGP, and DLFM on time-series data.

Visualizations of the model's performance clearly demonstrate this qualitative superiority. While standard GPs produce "flat" or erratic predictions with massive uncertainty bounds during extrapolation, the DLFM maintains the characteristic "pulses" and oscillations of biological signals.

Quantitatively, the DLFM significantly outperformed standard Deep GPs and Deep Neural Networks on the CHARIS healthcare dataset. For example, in predicting Arterial Blood Pressure (ABP), the DLFM achieved a Normalized Mean Squared Error (NMSE) of 0.39, compared to 0.73 for a standard Deep GP. Furthermore, the DLFM consistently provided better Mean Negative Log Likelihood (MNLL) scores. This indicates superior uncertainty quantification: when the model is wrong, it "knows" it is wrong, which is a critical safety feature for high-stakes fields like healthcare. Even on general UCI benchmark tasks where physics isn't the primary driver, the DLFM remained competitive with state-of-the-art models.

Limitations and Future Work

While highly effective, the current iteration of the DLFM primarily utilizes a simple first-order ODE. This limits the model's ability to represent more complex physical laws, such as second-order oscillations or fluid dynamics. Additionally, the authors note that they do not currently place a variational distribution over the kernel hyperparameters (like lengthscales), which could further improve uncertainty quantification.

Future directions for this research include moving toward Partial Differential Equations (PDEs) and higher-order ODEs. Integrating these into the deep learning framework would allow the model to capture even more sophisticated physical phenomena while maintaining robust uncertainty estimates.

Summary updated

BibTeX
@inproceedings{mcdonald2021compositional,
  author = {Thomas M. McDonald and Mauricio A Álvarez},
  title = {{Compositional Modeling of Nonlinear Dynamical Systems with ODE-based Random Features}},
  booktitle = {Advances in Neural Information Processing Systems},
  year = {2021},
  url = {https://openreview.net/forum?id=9fHO2sjdZq8},
}
Figure