Learning Deep Input-Output Stable Dynamics

Ryosuke Kojima, Yuji Okamoto

This paper, presented at NeurIPS 2022, introduces a method to ensure that neural network-based dynamical models remain stable and robust, even when encountering inputs they didn't see during training. By "baking" stability into deep learning models of dynamical systems using a differentiable projection based on the Hamilton-Jacobi inequality, the authors ensure that the model’s output remains bounded relative to its input. This prevents the catastrophic "blow-ups" common in standard neural networks when they face novel stimuli.

The Challenge of Input-Output Stability

In fields like robotics and systems biology, we often use neural networks to learn how a system evolves over time based on inputs (like a motor command or a drug dose). While standard neural networks are excellent at mimicking training data, they are notorious "black boxes" that do not inherently respect physical constraints.

A major issue is input-output stability. A naively trained model might perform perfectly on a specific training set but fail spectacularly when given a new input signal that is slightly larger or different in shape. In these cases, the model's predicted state or output can grow infinitely (diverge), which is physically impossible and dangerous for real-world applications. The core challenge is constraining a complex, nonlinear neural network to be mathematically guaranteed as stable without ruining its ability to learn complex dynamics.

Deep Input-Output Stable Dynamics (DIOS)

The authors propose a framework called Deep Input-Output Stable Dynamics (DIOS), which relies on several key technical innovations to enforce stability:

  1. The Hamilton-Jacobi Inequality (HJI): This is a classic tool from control theory. If a system satisfies this inequality, it is guaranteed to be $\mathcal{L}_2$ stable—meaning the "energy" of the output is always bounded by the "energy" of the input, scaled by a factor called the gain ($\gamma$).
  2. Differentiable Projection: Instead of just hoping the network learns to be stable, the authors define "nominal" dynamics (the raw neural network) and then mathematically "project" those dynamics onto a space that satisfies the HJI.
  3. Analytical Solution: Finding this projection is normally a complex optimization problem (a Quadratic Constraint Quadratic Programming or QCQP problem). The authors derived a specific analytical solution using "ramp" and "clamp" functions. This allows the projection to be calculated instantly and plugged directly into the backpropagation process during training.
  4. Hybrid Loss Function: The training loss includes the standard prediction error (MSE), a penalty for violating the HJI (a hinge loss), and a term that encourages the model to find the smallest possible stable gain ($\gamma$).
Illustration of the differentiable projection method. The nominal dynamics are projected into a stable region defined by the Hamilton-Jacobi inequality (blue area), ensuring mathematical stability during training.

Key Insights and Results

The method was evaluated on two primary benchmarks: a challenging Bistable Model (which tests if the method can handle systems that "flip" between two stable equilibrium points) and a 6-dimensional Glucose-Insulin Simulator (representing a complex physiological system where stability is a life-or-death requirement).

  • Input-Independent Stability: The beauty of using the HJI is that the stability condition doesn't actually depend on the specific input $u$. This means once the condition is met, the system is stable for any possible input signal.
  • Learning the "Shape" of Dynamics: In the bistable experiment, vanilla neural networks failed to find the two stable points when data was scarce. The DIOS models, forced to be stable, correctly identified the underlying physical structure of the system.
  • Robustness to Novel Inputs: When tested with "step" inputs much larger than those in the training set, vanilla neural networks diverged to infinity. The DIOS models remained bounded and physically plausible.
Model performance showing accurate tracking on training-like data (A) and bounded, stable responses to novel step inputs (B), demonstrating the robustness of the DIOS framework.

Furthermore, the proposed method significantly reduced "GainIO error" (a measure of stability violation) compared to standard neural networks and specialized linear models like ARX or MOESP. The DIOS variants also performed remarkably well even with very small datasets (e.g., only 100 samples), whereas unconstrained models required much more data to reach similar accuracy.

Limitations and Future Work

While highly effective, the method currently requires a pre-defined "Lyapunov function" ($V(x)$), which acts as a mathematical map of the system's energy. While the authors used simple quadratic functions, choosing the right $V(x)$ for highly complex systems remains an open challenge.

Additionally, the current work focuses on deterministic systems. Extending this to stochastic dynamics (systems with random noise) is a vital next step for real-world deployment. Beyond $\mathcal{L}_2$ stability, the authors aim to expand the method to "dissipativity," a more general framework that covers various physical properties like passivity and sector constraints.

Summary updated

BibTeX
@inproceedings{kojima2022learning,
  author = {Ryosuke Kojima and Yuji Okamoto},
  title = {{Learning Deep Input-Output Stable Dynamics}},
  booktitle = {Advances in Neural Information Processing Systems},
  year = {2022},
  url = {https://openreview.net/forum?id=BTeJpF_BhQ6},
}
Figure