NeurIPS 2026Coming to NeurIPS?Explore papers, orals & directions

A Generalized Metriplectic System via Free Energy and System~Identification via Bilevel Convex Optimization

Sangli Teng, Kaito Iwasaki, William Clark, Xihang Yu, Anthony Bloch, Ram Vasudevan, Maani Ghaffari

TL;DR

This paper introduces a generalized metriplectic framework that models complex, non-conservative dissipation in Hamiltonian systems by relaxing the classical requirement that entropy must be a Casimir function. This generalization naturally induces a thermodynamic-like "free energy" function that governs the system's monotonic evolution, and the authors provide a data-driven, bilevel convex optimization algorithm to learn these systems directly from trajectory data.

What Problem Does This Paper Address?

Modeling physical systems that simultaneously exhibit conservative (Hamiltonian) dynamics and dissipative behaviors is a long-standing challenge. The classical metriplectic formalism elegantly unifies these by combining a Poisson bracket (governing energy conservation) with a symmetric metric bracket (governing entropy production).

However, classical metriplectic systems come with a major catch: to guarantee strict energy conservation, the entropy function must be a "Casimir function," meaning its flow completely vanishes under the Poisson bracket. While this works for isolated thermodynamic systems, it fails to capture more complex, non-conservative dissipation—such as a rigid body moving through a viscous fluid—where mechanical energy is lost to the environment and the dissipation dynamics are far more intricate.

The authors set out to bridge this gap by generalizing the metriplectic framework to handle non-conservative dissipation and developing a practical, data-driven method to identify these systems from experimental observations.

Methods

The paper attacks the problem from both a theoretical and a computational angle:

  1. Generalized Metriplectic Formalism: By dropping the strict Casimir constraint on entropy ($S$) and the non-dissipative constraint on the metric ($K$), the authors show that the system's total energy can safely dissipate. Crucially, this relaxation induces a new quantity: Free Energy ($E = H + S$). Much like Gibbs free energy in chemistry, this free energy changes monotonically over time, serving as a precise mathematical criterion for how the system evolves.
  2. Bilevel Convex Optimization for System ID: Learning the metric ($K$) and entropy ($S$) from trajectory data ($\{x_i, \dot{x}_i\}$) is inherently non-convex because the two terms interact multiplicatively. To solve this, the authors exploit component-wise convexity:
  3. Metric Search: If you fix the entropy $S$, finding the metric $K$ becomes a convex problem solved via Linear Matrix Inequalities (LMI). Sum-of-Squares (SOS) polynomial constraints are used to guarantee that the metric remains positive semi-definite.
  4. Entropy Search: If you fix the metric $K$, finding the entropy $S$ reduces to a standard Linear Programming (LP) problem.
  5. Stochastic Mini-Batching: To prevent the optimization from getting stuck in local minima and to keep the number of slack variables computationally manageable, the authors introduce a stochastic version that samples mini-batches of the trajectory data at each iteration.

Datasets

The paper does not use real-world datasets. Instead, the proposed system identification method is evaluated on synthetic trajectory data generated from two simulated physical benchmarks:

  • A 2D Dissipative System: A two-dimensional state-space system governed by a polynomial free energy function.
  • An $SO(3)$ Rigid Body System: A 3D rigid body rotation system evolving on a matrix Lie group, simulating non-conservative rotational dissipation.

Key Insights and Ideas

  • Free Energy as the Ultimate Arbiter: Relaxing the classical constraints allows the mathematics to mirror real-world thermodynamics more faithfully. Free energy, rather than mechanical energy or entropy alone, dictates the direction of the system's trajectory.
  • Geometric Attractors: Under this generalized framework, dissipation drives the system trajectories directly to the zero-level set of the free energy. This creates beautiful, stable geometric structures in phase space, such as an infinity ($\infty$) shape or a sphere.
  • Alternating Convexity Trick: Turning a daunting non-convex system identification problem into an alternating sequence of LMI and LP steps makes data-driven discovery of metriplectic systems numerically feasible and highly efficient.

Key Results

  • 2D System Convergence: As shown in the phase space plot, the simulated trajectories successfully converge to the $\infty$-shaped zero-level set of the free energy.
Fig. 1: Trajectory of the 2D metriplectic system in the phase space. The trajectories converge to the zero-level set of the free energy (∞shape) via a selected entropy function and metric. The red dots denote the randomly sampled initial conditions.
  • Superlinear Optimization: For the 2D system, the stochastic bilevel optimization algorithm exhibits a superlinear convergence rate, driving the loss down to a trivial lower bound (around $10^{-10}$), indicating that it successfully found the global optimizer and perfectly recovered the metric and entropy.
Fig. 2: The convergence of the loss of Algorithm 2 for the 2D metriplectic system. The loss after solving each sub-problems are shown. Superlinear convergence rate is observed. As the loss converges to the trivial lower bound 0, we conclude that the algorithm find the global optimizer in this case.
  • Rigid Body on $SO(3)$: The framework successfully mapped a rigid body system where trajectories converge to a spherical free energy surface.
Fig. 3: Trajectory of the metriplectic system on SO(3). The trajectories converges to the zero-level set of the free energy as a sphere.

The algorithm successfully identified a complex 6th-order polynomial entropy and a quadratic metric, though some numerical chattering was observed in later iterations due to Semidefinite Programming (SDP) solver limitations.

Fig. 4: The convergence of the loss of Algorithm 2 for the metriplectic system on SO(3). The loss after solving each sub-problems are shown. The chattering at the last few iterations are due to the numerical issue of SDP solvers.

Limitations and Future Work

  • Lack of Global Guarantees: Although the individual subproblems (metric search and entropy search) are convex, the overall bilevel optimization problem remains non-convex. Global convergence is observed empirically but cannot be mathematically guaranteed for all systems.
  • Representation Non-uniqueness: Metriplectic representations can be non-unique; different combinations of polynomial metrics and entropies can result in identical vector fields. This makes true "identifiability" a challenge.
  • Future Directions: The authors plan to explore coordinate descent methods to better leverage component-wise convexity. They also aim to apply this framework to real-time state estimation and control problems in robotics, particularly for systems operating on Lie groups.

Summary updated

BibTeX
@inproceedings{teng2024generalized,
  author = {Sangli Teng and Kaito Iwasaki and William Clark and Xihang Yu and Anthony Bloch and Ram Vasudevan and Maani Ghaffari},
  title = {{A Generalized Metriplectic System via Free Energy and System~Identification via Bilevel Convex Optimization}},
  booktitle = {ACC},
  year = {2024},
}
Figure