Learning Neural Contracting Dynamics: Extended Linearization and Global Guarantees

Sean Jaffe, Alexander Davydov, Deniz Lapsekili, Ambuj Singh, Francesco Bullo

Introduction

In the field of robotics and autonomous systems, training neural networks to model physical dynamics—such as a robotic arm reaching for a target—requires more than just high predictive accuracy. It requires formal guarantees of stability and robustness. While standard deep learning models often act as "black boxes" that can behave unpredictably when perturbed, researchers at UC Santa Barbara have introduced Extended Linearized Contracting Dynamics (ELCD). This framework provides the first neural network approach that guarantees global stability and robustness across arbitrary metrics by parameterizing the "extended linearization" of a vector field.

The Challenge: Beyond Simple Stability

When a system is pushed off its intended path by noise or external disturbances, it must reliably return to its equilibrium. While simple stability ensures a system eventually reaches a target point, contractivity is a much stronger and more desirable property for real-world applications. In a contracting system, any two trajectories will converge toward each other exponentially fast. This inherent property makes the system naturally robust to noise.

Previous attempts to learn contracting dynamics, such as Neural Contractive Dynamical Systems (NCDS), faced two significant hurdles:

  1. Computational Complexity: These models often required solving complex line integrals during every training step to ensure the Jacobian of the system remained valid.
  2. Representational Restrictiveness: Many prior models were limited to "negative gradient flows," which are inherently symmetric. This restriction prevents them from accurately modeling oscillatory or swirling behaviors, such as those found in a swinging pendulum.

Methodology: Extended Linearization

ELCD overcomes these limitations by utilizing a technique known as Extended Linearization. Rather than learning a general function $f(x)$ directly, the authors factorize the dynamics into a specific matrix-vector form:

$$\dot{x} = A(x, x^*)(x - x^*)$$

where $x^*$ represents the target equilibrium. The core innovation lies in how the matrix $A$ is structured using neural networks ($P_s$ and $P_a$):

  • Asymmetric Jacobians: Unlike previous models that relied on symmetric structures, ELCD incorporates an asymmetric component ($P_a - P_a^\top$). This allows the model to capture complex, non-conservative motions (like oscillations) while maintaining strict stability guarantees.
  • Latent Space Diffeomorphisms: To handle high-dimensional or complex real-world data, ELCD learns a "warping" function (a diffeomorphism) that maps raw data into a latent space where the dynamics are easier to represent, then maps them back to the original space.
  • Eliminating Integration: By parameterizing the vector field directly through this factorization rather than its Jacobian, ELCD bypasses the need for the expensive line integrals required by prior state-of-the-art methods, significantly speeding up training.

Experimental Evaluation

The researchers evaluated ELCD against several benchmarks, including NCDS, Stable Deep Dynamics (SDD), and Euclideanizing Flows (EFlow), across three distinct challenges:

  1. LASA Handwriting Dataset: A benchmark of 2D, 4D, and 8D human-drawn shapes used to test the ability to follow non-linear paths to a single point.
  2. Multi-link Pendulum: Simulated systems ranging from 4D to 16D, designed to test the model’s handling of physics-based oscillatory dynamics.
  3. Rosenbrock Datasets: Based on the "banana function," these 8D and 16D datasets represent "stiff" dynamics that are notoriously difficult for stable models to learn.

Key Results and Insights

ELCD consistently outperformed existing models in both accuracy and robustness:

  • Superior Accuracy: In the LASA 2D task, ELCD achieved a Mean Dynamic Time Warping Distance (DTWD) of 0.12, compared to 0.59 for NCDS and 0.37 for SDD.
  • Scalability to High Dimensions: On the 16D Pendulum task, ELCD maintained a high accuracy (0.44 DTWD), while NCDS struggled significantly (1.65 DTWD).
  • Robustness in Stiff Systems: On the difficult Rosenbrock dataset, the SDD model failed to converge (resulting in NaN values), whereas ELCD successfully learned the dynamics with the lowest error among all tested models.

The researchers also found that joint training—optimizing the coordinate transformation and the dynamics simultaneously—was far more effective than the traditional two-step approach of training a latent space first and then fitting the dynamics.

Conclusion and Future Work

ELCD represents a significant step forward in safe machine learning for dynamical systems. By allowing for asymmetric components, it captures a wider range of physical behaviors than previous stable models while providing a mathematical "safety net" that covers the entire state space.

Currently, the framework is designed for systems converging to a single stationary equilibrium point and is limited to Euclidean space ($\mathbb{R}^n$). Future research directions include extending ELCD to model limit cycles (such as periodic heartbeats) and adapting the formulation for more complex manifolds, such as the surface of a sphere or other non-Euclidean geometries.

Summary updated

BibTeX
@inproceedings{jaffe2024learning,
  author = {Sean Jaffe and Alexander Davydov and Deniz Lapsekili and Ambuj Singh and Francesco Bullo},
  title = {{Learning Neural Contracting Dynamics: Extended Linearization and Global Guarantees}},
  booktitle = {Advances in Neural Information Processing Systems},
  year = {2024},
  url = {https://openreview.net/forum?id=YYnP3Xpv3y},
}
Figure