Learning continuous models for continuous physics

Aditi S. Krishnapriyan, Alejandro F. Queiruga, N. Benjamin Erichson, Michael W. Mahoney

TL;DR

Most machine learning models for dynamical systems are "DiscreteNets"—they accurately predict the next data point but fail to capture the underlying continuous physics. This paper introduces a principled convergence test from numerical analysis to verify if a model has truly learned a continuous differential operator, enabling significantly better interpolation and extrapolation for scientific tasks.

What Problem Does This Paper Address?

Dynamical systems in the real world—like a swinging pendulum or flowing fluid—evolve continuously. However, we usually observe them through discrete snapshots in time (spaced by some interval $\Delta t$).

The standard machine learning approach is to train a model to map a state at time $t$ to a state at time $t + \Delta t$. While these models can achieve impressively low "validation error," the authors argue they are often "continuity-unaware." They essentially learn a discrete jump rather than the underlying rules of motion. Consequently, if you try to use these models to predict what happens at a smaller time step (interpolation) or start from a new initial condition (extrapolation), they often fall apart. They have become "DiscreteNets" that overfit the specific temporal discretization of the training data.

Methods

The authors bridge the gap between ML and classical numerical analysis by introducing a convergence test for Neural ODEs (ODE-Nets).

  1. The Convergence Test: In classical numerical analysis, an integration scheme is "convergent" if the error vanishes as the step size $h$ goes to zero. The authors adapt this: they evaluate a trained model across a wide range of step sizes $h$ (both much smaller and larger than the training $\Delta t$).
  2. ContinuousNet vs. DiscreteNet: A model passes the test (becoming a "ContinuousNet") if its error remains stable or decreases as $h \to 0$. If the error explodes when $h \neq \Delta t$, it is a "DiscreteNet."
  3. Model Architectures: They primarily test ODE-Nets, where a neural network represents the vector field (the derivative), and SINDy (Sparse Identification of Nonlinear Dynamical Systems), which uses symbolic regression to find governing equations.
  4. Integration Schemes: They compare simple schemes like Forward Euler against higher-order schemes like Runge-Kutta 4 (RK4) to see how the choice of solver during training affects the "continuity" of the learned model.

Datasets

The researchers evaluated their methodology on several canonical "toy" and complex physical systems:

  • Linear Harmonic Oscillator: A basic spring-mass system.
  • Non-linear Pendulum: A classic system for testing extrapolation to new initial conditions.
  • Lotka-Volterra: The "predator-prey" equations.
  • Cartesian Pendulum: A "stiff" dynamical system (notoriously difficult for numerical solvers).
  • Double Gyre: A complex fluid dynamics model used to test high-dimensional latent space representations and fine-scale reconstruction.

Key Insights and Ideas

  • The "Dip" of Doom: In "DiscreteNets" (often those trained with simple Euler schemes), the error plot shows a sharp, narrow dip exactly at $h = \Delta t$. While the model looks perfect at that specific resolution, the error skyrockets if you change the resolution even slightly.
  • Solver Choice as Inductive Bias: Using a higher-order integrator like RK4 during training acts as a powerful inductive bias. It forces the neural network to learn a vector field that is consistent across multiple sub-steps, making it much more likely to pass the convergence test.
  • Interpolation is a Choice: A model that passes the convergence test can resolve fine-scale features of a solution even if it was only trained on coarse, "gap-filled," or irregularly sampled data.
  • Extrapolation Requires Continuity: To predict trajectories starting from initial conditions the model has never seen, the model must understand the local physics (the derivative), not just the global jump.

Key Results

  • Euler vs. RK4: Models trained with Forward Euler almost always failed the convergence test, becoming DiscreteNets. Models trained with RK4 consistently passed, becoming ContinuousNets.
  • Fluid Dynamics: In the Double Gyre experiment, the ContinuousNet successfully reconstructed high-frame-rate videos of fluid flow from low-frame-rate training data. The DiscreteNet produced "grainy" and physically incorrect results at intermediate time steps.
  • Irregular Data: The authors showed that ContinuousNets could be trained on "jittery" data (where $\Delta t$ isn't constant) and still recover the smooth, underlying physics, whereas standard ML approaches struggled.
  • SINDy Validation: The test isn't just for neural networks; it also correctly identified that SINDy models using low-order finite difference stencils (FD-1) overfit the discretization, while higher-order stencils (FD-4) produced truly continuous models.

Limitations and Future Work

  • System Complexity: The study focused on non-chaotic and non-divergent systems. Testing these methods on chaotic systems (like the Lorenz attractor), where errors grow exponentially by definition, remains a challenge.
  • Heuristic Thresholds: The convergence test relies on a heuristic comparison ($\text{Error}(h) \lesssim \text{Error}(\Delta t)$). Defining a more rigorous, automated threshold for "passing" would be beneficial.
  • Stiff Systems: While they touched on the Cartesian pendulum, extremely stiff systems might require implicit solvers or more specialized numerical treatments to pass the test.
  • Future Directions: The authors suggest exploring adaptive time-stepping and symplectic (energy-preserving) integrators within this convergence framework.

Summary updated

BibTeX
@inproceedings{krishnapriyan2023learning,
  author = {Aditi S. Krishnapriyan and Alejandro F. Queiruga and N. Benjamin Erichson and Michael W. Mahoney},
  title = {{Learning continuous models for continuous physics}},
  booktitle = {Communications},
  year = {2023},
  doi = {10.1038/s42005-023-01433-4},
}
Figure