Inverse modified differential equations for discovery of dynamics

Aiqing Zhu, Pengzhan Jin, Yifa TangarXiv 2020

TL;DR

This paper introduces "Inverse Modified Differential Equations" (IMDEs) to provide a theoretical framework for understanding and analyzing the behavior of ODE-nets, a deep learning approach for discovering dynamical systems. By formalizing the relationship between a learned ODE and its underlying numerical integrator, the authors derive rigorous error bounds and shed light on the behavior of Hamiltonian neural networks.

What Problem Does This Paper Address?

Discovering the underlying dynamics of a system from observed data is a crucial task in many scientific fields. Deep learning models, particularly those that integrate neural networks with numerical solvers (like ODE-nets), have shown promise in this area. However, a rigorous theoretical understanding of why these models work, what they are actually learning, and how to bound their errors has been lacking. Specifically, existing ODE-based models often struggle with theoretical guarantees, especially for complex systems like Hamiltonian systems where conservation laws are important. This paper aims to bridge this gap by providing a formal analysis of ODE-net's learning process and error behavior.

Methods

The core contribution of this paper is the introduction of Inverse Modified Differential Equations (IMDEs). This concept builds upon the idea of "modified differential equations," which interpret numerical solutions as exact solutions to slightly perturbed differential equations. The authors extend this by showing that when a neural network (like in an ODE-net) is trained to approximate a dynamical system's vector field, it effectively learns an approximation of the IMDE associated with the numerical integrator used.

Key techniques include:

  • Formal Power Series Expansion: Used to derive the IMDE for various numerical integrators (Runge-Kutta, linear multistep).
  • Lie Derivatives: Employed to systematically derive IMDEs for linear multistep methods.
  • Backward Error Analysis: The theoretical foundation for understanding how numerical integrators introduce errors and how these relate to the IMDE.
  • Analyticity and Boundedness Assumptions: Crucial for deriving rigorous error bounds, particularly for the vector field and its derivatives.

The paper also discusses how IMDEs can be used to analyze specific types of systems, such as Hamiltonian systems, and how the choice of a symplectic integrator is critical for learning conservation laws.

Datasets

The paper does not introduce new benchmark datasets. Instead, it uses synthetic data generated from well-known dynamical systems for evaluation:

  • Pendulum Problem: A classic example of a Hamiltonian system.
  • Damped Harmonic Oscillator: A system with damping and cubic nonlinearities.
  • Lorenz System: A chaotic system often used to test dynamical system identification.

The data is generated in two ways:

  1. Flow data: Points sampled along a single trajectory.
  2. Random data on domain: Points sampled randomly from the system's state space.

Key Insights and Ideas

  • ODE-nets learn IMDEs, not necessarily the original ODE: The most significant insight is that ODE-nets, when trained to minimize loss, are effectively learning an approximation of the Inverse Modified Differential Equation associated with the numerical integrator, rather than directly learning the true vector field of the original system. This explains why their behavior can differ from the original ODE, especially for larger step sizes.
  • Symplectic integrators are key for Hamiltonian systems: The IMDE framework reveals that for Hamiltonian systems, using a symplectic numerical integrator in an ODE-net is crucial for the learned dynamics to also be Hamiltonian, thus preserving conservation laws. Non-symplectic integrators lead to IMDEs that are not Hamiltonian, explaining why ODE-nets with such integrators often fail to learn conservation laws.
  • Error bounds are achievable: The paper derives rigorous error bounds for ODE-nets, showing that the error between the learned vector field and the true vector field is bounded by a combination of the learning loss, discrete error (related to the integrator's order and step size), and a discrepancy term that can be made sub-exponentially small.
  • IMDEs provide a unified analysis: The IMDE framework offers a unified way to analyze different ODE-based learning models, including ODE-nets, linear multistep neural networks (LMNets), and Hamiltonian neural networks (HNNs).

Key Results

  • Theoretical Error Bounds: The paper establishes that the error of an ODE-net can be bounded by the sum of discrete error (related to the integrator's order $p$ and step size $h$) and learning loss, specifically $\|f_{net}(x) - f(x)\| \leq C_1 e^{-\gamma/T^{2/q}} + CL$ and $\|f_{net}(x) - f(x)\| \leq c_2 h^p + CL$, where $f_{net}$ is the learned vector field, $f$ is the true vector field, $L$ is a measure of learning loss, and $h$ is the discrete step.
  • Hamiltonian System Learning: It's proven that if a symplectic integrator is used, the IMDE for a Hamiltonian system remains Hamiltonian, providing theoretical support for learning conservation laws.
  • Numerical Verification: Experiments on pendulum, damped oscillator, and Lorenz systems numerically validate the theoretical findings. For instance, in the pendulum problem, the learned dynamics accurately capture the IMDE, and the error between the learned and true vector fields scales with the expected order of the numerical integrator. The results also show that sufficient data leads to better approximation of the IMDE.

Limitations and Future Work

  • Analyticity and Generalization Requirements: The theoretical analysis relies on the assumption that the vector field and the learned network are real analytic and bounded on a complex ball. The authors acknowledge that quantifying generalization error and implicit regularization for supervised learning under these conditions remains an open research problem.
  • Low-Frequency Discovery: The paper notes that their results primarily hold for low-frequency discovery, and extending this to high-frequency dynamics is a future direction.
  • Choice of ODE Solver: The approximation target (IMDE) depends on the ODE solver. Further analysis is needed for specific solvers, especially for HNNs requiring symplectic integrators.
  • Complex Space vs. Real Space: While the analysis uses complex balls for mathematical rigor, the authors conjecture that there's no essential difference between complex and real spaces for these problems.

Future work suggested includes investigating generalization error, implicit regularization, and extending the analysis to high-frequency dynamics and different ODE solvers.

Summary updated

BibTeX
@misc{zhu2020inverse,
  author = {Aiqing Zhu and Pengzhan Jin and Yifa Tang},
  title = {{Inverse modified differential equations for discovery of dynamics}},
  year = {2020},
  eprint = {2009.01058},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2009.01058},
}
Figure