        Geometric Contact Flows: Contactomorphisms for Dynamics and Control


                             Andrea Testa 1 2 Søren Hauberg 3 Tamim Asfour 2 Leonel Rozo 1


                           Abstract                                                                                                          0.30




                                                                                                                                                 Damping Coefficient
        Accurately modeling and predicting complex                                                                                           0.27




                                                                                                           Momentum
                                                                         Momentum
        dynamical systems, particularly those involving
        force exchange and dissipation, is crucial for                                                                                       0.24
        applications ranging from fluid dynamics to
                                                                                    Ground Truth                      Ground Truth           0.21
        robotics, but presents significant challenges due
                                                                                    MLP Reconstruction 1              GCF Reconstruction 1
        to the intricate interplay of geometric constraints                         MLP Reconstruction 2              GCF Reconstruction 2   0.18
        and energy transfer. This paper introduces Ge-                                  Position                          Position
        ometric Contact Flows (GFC), a novel framework                      Figure 1. A dynamical system modeled via an MLP (left) and our
        leveraging Riemannian and Contact geometry                          GCF (right). The first prediction (orange) starts within the data
        as inductive biases to learn such systems. GCF                      support and the second (red) outside. The MLP fails to reconstruct
        constructs a latent contact Hamiltonian model                       the dynamics and does not converge to the attractor, while GCF
        encoding desirable properties like stability or                     provides reliable and physically–interpretable predictions due to
        energy conservation. An ensemble of contacto-                       its contact Hamiltonian structure.
        morphisms then adapts this model to the target
        dynamics while preserving these properties. This                    support (orange trajectory). This stems from the model’s
        ensemble allows for uncertainty-aware geodesics                     inability to encode the physical relationships between
        that attract the system’s behavior toward the                       variables, which are governed by an underlying energy
        data support, enabling robust generalization and                    function. The model also extrapolates unreliably in data–
        adaptation to unseen scenarios. Experiments                         sparse regions (red trajectory), showing the lack of physical
        on learning dynamics for physical systems                           interpretability and generalization capacity in black-box
        and for controlling robots on interaction tasks                     approaches (Wang et al., 2020). To overcome these
        demonstrate the effectiveness of our approach.                      limitations, physics–informed models incorporate physical
                                                                            principles into the model architecture, to ensure consistency
                                                                            with the underlying dynamics. These physical inductive
1. Introduction                                                             biases appear as geometric structures, such as symplectic
Modeling dynamical systems is fundamental to many                           and contact manifolds (Blair & Blair, 2010), providing a
scientific and engineering disciplines, enabling the analysis               powerful differential geometric perspective that we exploit.
and prediction of system behaviors across diverse applica-                  This paper introduces G EOMETRIC C ONTACT F LOWS
tions (Yu & Wang, 2024). This involves generating state–                    (GFC), a novel framework leveraging Riemannian and con-
space trajectories to forecast the system evolution. While                  tact geometry as inductive biases to learn complex dynami-
the increasing availability of data has accelerated the adop-               cal systems. By integrating these geometries (Sec. 3) with
tion of data–driven methods, purely black-box models face                   a learning model, GCF provides robust, interpretable, and
substantial challenges (Chen et al., 2018). As exemplified in               physically–grounded dynamics modeling, overcoming the
Fig. 1, a naive MLP network fails to capture the true dynam-                limitations of black-box methods. First, a baseline latent dy-
ics, leading to inaccurate predictions even within the data                 namics encodes desired properties about the target dynamics
    1
    Bosch Center for Artificial Intelligence, Renningen, Germany            (e.g., stability, energy conservation) via a contact structure
2
 Institute for Anthropomatics and Robotics, Karlsruhe Institute of          and an associated Riemannian metric. We then adapt this
Technology (KIT), Karlsruhe, Germany 3 Section of Cognitive Sys-            baseline model to the target dynamics through a contact dif-
tems, Technical University of Denmark (DTU), Lyngby, Denmark.               feomorphism (Sec. 4). We improve the GCF generalization
Correspondence to: Andrea Testa <andrea.testa@de.bosch.com>.                robustness via an ensemble of contact diffeomorphisms to
Proceedings of the 42 nd International Conference on Machine                identify uncertain regions, allowing the model to adapt its
Learning, Vancouver, Canada. PMLR 267, 2025. Copyright 2025                 behavior accordingly. This is achieved by modifying the
by the author(s).                                                           Riemannian metric to incorporate uncertainty, resulting in

                                                                     1
