                                Geometric Contact Flows: Contactomorphisms for Dynamics and Control
                        ×10 1 ×10 1
                          3                                        D. Experimental Setup




                                     Lagrangian Action
                               3




                   Uncertainty
                                 2                       2                                  D.1. System Configuration and Architectural Settings

                                 1                       1                                  The framework runs on a machine equipped with 13th Gen
                                                                                            Intel Core i7-13850HX CPUs. Positional data is normal-
                               0
                        ×10 2 ×10 1                                                         ized to the range [−0.5, 0.5]. Other coordinates are adjusted
                          8    4     Lagrangian Action                                      accordingly to maintain physical coherence. Additionally,
                               3                                                            velocity data is normalized to [−1, 1] by scaling the dura-
                   Uncertainty



                          6
                                                                                            tion of the trajectory. In the experiments, the input to our
                                 4                       2
                                                                                            framework is the current system state at tk , while the output
                                 2                       1                                  is the next state at tk+1 . This prediction is repeated at each
                               0                                                            time step to reconstruct the full dynamics. Our approach
                        ×10 2 ×10
                               3
                                  1
                                                                                            treats the dynamical system as autonomous, excluding time
                                     Lagrangian Action




                                                                                            as an explicit input. The number of contactomorphisms
                                 2                       2
                   Uncertainty




                                                                                            N used in the ensemble depends on the task, whether it
                                                         1
                                                                                            involves reconstructing a dynamical system or generalizing
                                 1
                                                                                            a demonstrated trajectory for control execution. In the first
                                                         0                                  case (e.g., the spring mesh and quantum system), a single
                                                                                            contactomorphism (N = 1) is used. In the second case (e.g.,
Figure 13. Demonstration reconstruction in the ambient space (left)                         the handwriting dataset and robotics tests), the ensemble
and latent space (right) for different values of the latent weighting                       consists of N = 5 contactomorphisms. In the latent space,
factor wz : wz = 0 (top), wz = 0.01 (middle), and wz = 1                                    the stable baseline dynamics given by Equation (7b) is used
(bottom).                                                                                   in all experiments. Additionally, for the execution of the
                                                                                            robotics tasks, the safe dynamics from Equation (7c) is also
Table 10. Reconstruction error of character L EAF 2 via DTWD
for different parametrization of the contact Hamiltonian                                    employed to leverage its energy-aware behavior.
       Hamiltonian                                                       Score              Each contactomorphism φr , is composed of a sequence of
        1 ⊤
                                                                                            K = 12 individual parametrized flows φrθk , with a dura-
        2 p M (p)p + V (q) + F (q)s                                      0.44±0.12          tion of τ = 0.2 seconds each. The scalar functions defining
        1 ⊤
        2 p p + V (q) + F (q)s                                           0.61±0.08          each flow, Mθk (p), Vθk (q), Fθk (q), are implemented using
        1 ⊤
        2 p M (p)p + V (q)                                               0.94±0.18          Random Fourier Features networks with nf = 200 hidden
        1 ⊤
        2 p p + V (q)                                                    2.14±0.52          units and a kernel bandwidth of 1. A tanh activation func-
                                                                                            tion bounds the output of these scalar functions to the range
                                                                                            [−2, 2]. Across experiments, the GCF networks consist of
Table 11. Reconstruction error via DTWD for different learning                              7200 trainable parameters. The baseline models were evalu-
models used to reconstruct the contact Hamiltonian.                                         ated with various parameter configurations, ranging from the
    Character                    MLP                           RBF           RFFN           original author-released versions to implementations with
                                                                                            parameter counts comparable to that of GCF. Ultimately, we
                       0.94±0.18                             0.58±0.15     0.44±0.12
                                                                                            selected the architecture that yielded the best performance
                       0.69±0.11                             0.48±0.09     0.43±0.07        for each method (EF: 2000, NCDS: 2000, DHNN: 4572,
                                                                                            HNN: 2286, MLP: 7168).

                                                                                            D.2. Robot setup.
                                                                                            The W RAP - AND -P ULL and the D ISHWASHER LOADING
                                                                                            robotics tasks employ a 7-DoF Franka Emika Panda robot
                                                                                            as the test platform, with ROS2 acting as the middleware
                                                                                            to interface either the GCF or the state-of-the-art bench-
                                                                                            mark method with the robot. The trajectory predicted by
                                                                                            the GCF or the benchmark method is sent to a low-level
                                                                                            Cartesian Impedance Controller, which is built on top of the
                                                                                            Franka torque control system using libfranka functionalities.
                                                                                            Via the Franka Control Interface (FCI), motor signals are
                                                                                            sent to the robotic manipulator in real-time at a rate of 1
                                                                                            KHz. The GCF learning model, trained according to the

                                                                                       19
