Extended Neural Contractive Dynamical Systems: On Multiple Tasks and Riemannian Safety Regions

Hadi Beik Mohammadi, Søren Hauberg, Georgios Arvanitidis, Gerhard Neumann, Leonel Rozo

TL;DR

This paper extends Neural Contractive Dynamical Systems (NCDS) to provide robust stability guarantees for complex, multi-task robotic motions. By integrating Riemannian geometry and improved Jacobian regularization, the authors enable robots to learn stable trajectories that can avoid obstacles and handle non-Euclidean data like orientations, all while scaling efficiently to high-dimensional state spaces.

What Problem Does This Paper Address?

For autonomous robots to be truly useful, they must be safe. In the language of control theory, safety often boils down to stability: ensuring the robot doesn't oscillate wildly or fly off into an unsafe state when perturbed. While learning-from-demonstration (LfD) allows robots to acquire complex skills intuitively, standard neural networks are "black boxes" that offer no such stability guarantees.

Most existing stable LfD methods focus on asymptotic stability (converging to a single fixed point). However, many tasks require contraction stability, where all possible trajectories converge toward each other over time. This ensures the robot returns to its intended behavior regardless of its starting position or external pushes. The authors' previous work, NCDS, guaranteed this property, but it was limited to single tasks, struggled with obstacle avoidance in high dimensions, and lacked a nuanced way to control how the system converges.

Methods

The core of NCDS is a neural network that doesn't predict velocity directly. Instead, it predicts the Jacobian (the matrix of partial derivatives) of the system's dynamics. By forcing this Jacobian to be negative definite, the system is mathematically guaranteed to be contractive. The actual velocity is then recovered by integrating this Jacobian along a line.

This paper introduces several key extensions:

  • Advanced Regularization: The authors move beyond a simple constant regularization term. They explore state-independent and state-dependent vectors to control the "contraction spread"—the difference between how fast the system converges along different directions.
  • Conditional NCDS (CNCDS): By conditioning the network on task-related variables (like a target location or a visual embedding from a ResNet), a single model can now represent multiple different skills.
  • Riemannian Safety Regions: To handle obstacles, the authors use a Variational Autoencoder (VAE) with an injective decoder. They "pull back" information about obstacles from the high-dimensional workspace into a low-dimensional latent space using a Riemannian metric. This allows the robot to avoid obstacles and stay within "safe" (data-supported) regions without the computational burden of high-dimensional collision checking.
  • Manifold Learning for Orientation: They extend the framework to handle non-Euclidean data, such as 3D orientations (SO(3)), by mapping them into a Euclidean tangent space where NCDS can operate safely.

Datasets

The authors evaluated their framework on a diverse set of benchmarks:

  • LASA Handwriting Dataset: A standard 2D dataset for testing stability, which they also stacked into 4D and 8D versions to test scaling.
  • 7-DoF Franka-Emika Panda Robot: Real-world kinesthetic demonstrations of V-shaped drawing motions involving both position and orientation.
  • KIT Whole-Body Human Motion Database: High-dimensional (44D and 50D) data of human tennis forehands and leg kicks.
  • Vision-based Grasp-and-Drop: A custom task where the robot must grasp a soft object at different positions based on camera images.

Key Insights and Ideas

  • The Power of Symmetry: One of the most surprising findings was that a symmetric Jacobian (where the matrix equals its transpose) performed just as well as, and often generalized better than, an asymmetric one. While asymmetry offers more theoretical flexibility, the local tailoring of a symmetric Jacobian proved sufficient for complex robot skills. Comparison of symmetric vs asymmetric Jacobians
  • Contraction Spread Matters: It isn't just about if a system converges, but how. By manipulating the eigenvalues of the Jacobian (the "spread"), the authors could influence whether trajectories converge in straight lines or follow the "curvy" nuances of the original demonstrations. Effect of eigenvalue differences on contraction
  • Latent Obstacle Avoidance: By performing obstacle avoidance in the latent space via Riemannian metrics, the system can stay within the "manifold" of known safe behaviors, effectively treating regions without data as "obstacles" to be avoided.
Figure 5. Comparison of 2D vector fields learned with different Jacobian formulations. Left: Vector field obtained using the symmetric Jacobian formulation. Middle: Vector field obtained using the asymmetric Jacobian formulation. The learned vector field (grey) and demonstrations (black). Yellow and green trajectories show integral curves starting from demonstration starting points and random points, respectively. Right: Vector field with asymmetric Jacobian learned using NCDS with symmetric Jacobian.
Figure 2. The effect of eigenvalue differences and asymmetry of the Jacobian on the contraction behavior of the vector field. Left: In a contractive dynamical system with a symmetric Jacobian, when the eigenvalues are equal, the system contracts uniformly in all directions. Middle: In a contractive dynamical system with a symmetric Jacobian, when the eigenvalues are different, the system contracts more rapidly in the direction associated with the larger eigenvalue. Right: An example of a contractive dynamical system with an asymmetric Jacobian.

Key Results

  • Improved Convergence: Using state-independent regularization led to trajectories that converged to the demonstration region 276% faster than the original "vanilla" NCDS.
  • Superior Scaling: In high-dimensional tests (LASA-8D and 7-DoF Robot), NCDS significantly outperformed baselines like SEDS and Imitation Flow. For the 7-DoF robot task, NCDS achieved a reproduction error (DTWD) of 1.18, compared to 5.11 for Euclideanizing Flow.
  • Efficiency: Learning in a latent space provided a massive speedup. In an 8D scenario, integrating in the latent space took 20.2ms per step, compared to 40.9ms in the raw input space.

Limitations and Future Work

Despite the improvements, the authors note a few remaining hurdles:

  • Integration Sensitivity: The model is sensitive to the choice of numerical integration schemes; using adaptive step sizes is often necessary but increases computation time.
  • Computational Overhead: Calculating the Jacobian of the VAE decoder at every time step adds overhead, which might challenge strict real-time requirements for very high-speed robots.
  • Condition Reactivity: While CNCDS handles different tasks well, it is currently unclear how seamlessly it adapts if the task condition (like a target moving) changes during the execution of a motion.

Summary updated

BibTeX
@article{mohammadi2026extended,
  author = {Hadi Beik Mohammadi and Søren Hauberg and Georgios Arvanitidis and Gerhard Neumann and Leonel Rozo},
  title = {{Extended Neural Contractive Dynamical Systems: On Multiple Tasks and Riemannian Safety Regions}},
  journal = {Int. J. Robotics Res.},
  year = {2026},
  doi = {10.1177/02783649251366326},
}
Figure