Structure-Preserving Learning Using Gaussian Processes and Variational Integrators

Jan Brüdigam, Martin Schuck, Alexandre Capone, Stefan Sosnowski, Sandra Hirche

Abstract

Gaussian process regression is increasingly applied for learning unknown dynamical systems. In particular, the implicit quantification of the uncertainty of the learned model makes it a promising approach for safety-critical applications. However, standard learning approaches often fail to respect fundamental physical properties, such as energy conservation or kinematic constraints, leading to physically inconsistent predictions and numerical instability. This paper introduces a framework that combines Gaussian Process (GP) regression with Variational Integrators (VI) to ensure structure-preservation in learned mechanical systems.

Introduction

Modeling physical systems for control and simulation requires balancing data-driven flexibility with physical consistency. Traditional "black-box" machine learning models or standard discretization schemes—such as Runge-Kutta or explicit Euler—often neglect the underlying geometric structure of physics. This neglect leads to "numerical drift," where simulated agents gain or lose energy spuriously or violate kinematic constraints, such as joint limits. While Gaussian Processes (GPs) are effective at quantifying uncertainty and learning complex residuals like friction, they do not inherently guarantee physical stability when integrated over time.

Methodology

The authors propose a hybrid framework that embeds data-driven learning within a structure-preserving integrator. The approach consists of four main pillars:

  1. Variational Integrators (VI): Derived from the principle of least action, these symplectic integrators are mathematically guaranteed to preserve system properties like energy and momentum over long simulation horizons.
  2. Residual Learning with GPs: The GP models only the unmodeled dynamics (e.g., friction, air resistance) as a residual term added to the nominal VI-based physics prior. This makes the model significantly more data-efficient than pure black-box approaches.
  3. Nonlinear Constraint Projection: To handle known physical constraints, such as those in closed kinematic chains, the framework employs a nonlinear least-squares optimization step. This projects the GP's state predictions back onto the valid "constraint manifold."
  4. Safety Bounds: A key theoretical contribution is Theorem 1, which establishes formal probabilistic error bounds for GP predictions after they have been subjected to nonlinear projection, ensuring reliability in safety-critical contexts.

Experimental Evaluation

The framework was evaluated using simulated mechanical systems, including single and double pendulums, a cartpole, and a fourbar segment. Training involved 200 trajectories with random initializations, while testing utilized 100 separate trajectories.

Key Results

The proposed VI-GP framework demonstrates significant improvements in long-term stability and physical consistency compared to traditional methods.

Figure 1: Comparison of energy conservation (a) and constraint drift (b) between standard Explicit Euler and the proposed GP-based methods.
  • Energy Conservation: As shown in Figure 1a, the VI-GP combination maintains near-constant energy levels over time. In contrast, explicit Euler methods exhibit linear growth in energy error, eventually leading to system instability or "explosion."
  • Constraint Satisfaction: Figure 1b illustrates that the proposed method demonstrates zero constraint drift. Standard explicit methods suffer from rapidly accumulating errors that violate the system's kinematic structure.
  • Data Efficiency: By using a physics-informed prior, the model achieves high accuracy with as few as 32 training samples. As the number of samples increases to 512, the prediction error drops by several orders of magnitude.

Discussion and Conclusion

Integrating Variational Integrators with Gaussian Processes provides a robust method for learning dynamical systems while respecting physical laws. The authors also highlight that coordinate-independent representations, such as representing angles as [sin(θ), cos(θ)], further improve performance by avoiding mathematical singularities associated with raw angles.

However, limitations remain. The computational cost of solving nonlinear projections and optimizing GP hyperparameters may limit real-time application in high-frequency control loops. Furthermore, the formal error bounds rely on the projection being Lipschitz continuous; discontinuities in the projection could compromise safety guarantees. Future research will explore scaling these methods to high-degree-of-freedom systems like humanoid robots and improving the efficiency of the projection step.

Summary updated

BibTeX
@inproceedings{brudigam2022structure,
  author = {Jan Brüdigam and Martin Schuck and Alexandre Capone and Stefan Sosnowski and Sandra Hirche},
  title = {{Structure-Preserving Learning Using Gaussian Processes and Variational Integrators}},
  booktitle = {L4DC},
  year = {2022},
  url = {https://openreview.net/forum?id=ZVDIYE8cUuG},
}
Figure