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 R. Clark, Xihang Yu, Anthony M. Bloch, Ram Vasudevan, Maani Ghaffari

Abstract

This work generalizes the classical metriplectic formalism to model Hamiltonian systems with nonconservative dissipation. Classical metriplectic representations allow for the description of energy conservation and production of entropy via a suitable selection of an entropy function and a bilinear symmetric metric. By relaxing the Casimir invariance requirement of the entropy function, this paper shows that the generalized formalism induces the free energy analogous to thermodynamics. The monotonic change of free energy can serve as a more precise criterion than mechanical energy or entropy alone. This paper provides examples of the generalized metriplectic system in a 2-dimensional Hamiltonian system and $\mathrm{SO}(3)$. This paper also provides a bilevel convex optimization approach for the identification of the metriplectic system given measurements of the system.

Introduction

Modeling physical systems that simultaneously conserve energy and exhibit dissipation is a cornerstone of modern physics and engineering. While Hamiltonian mechanics elegantly describes ideal, energy-conserving motion, real-world systems are inevitably subject to non-conservative forces like friction and viscosity. The metriplectic formalism was developed to unify these aspects by combining a "Poisson bracket" for conservation and a "metric bracket" for dissipation.

Traditionally, this framework required the system's entropy to be a "Casimir function," meaning it could not interfere with the energy-conserving dynamics. However, this restriction limits the ability to model complex dissipative phenomena. This paper addresses two critical challenges: generalizing the metriplectic math to handle non-conservative dissipation and developing a data-driven method to identify the underlying physical parameters—metric and entropy—from observed trajectory data.

The Generalized Metriplectic System

The authors propose a significant advancement by relaxing the "Casimir invariance" requirement. By allowing the entropy function to interact with the Hamiltonian flow, the framework induces a Free Energy ($E = H + S$) as the primary driver of the system's evolution. In this generalized setup, the free energy changes monotonically, serving as a more precise criterion for the system's trajectory toward equilibrium than energy or entropy alone. This shift brings the metriplectic system closer to classical thermodynamics, where energy conservation and entropy production are often coupled.

System Identification via Bilevel Optimization

To discover the physical laws governing a system from data, the authors treat the identification problem as a search for optimal polynomial representations of the metric ($K$) and entropy ($S$). Because finding both simultaneously is a non-convex problem, they introduce a bilevel convex optimization approach:

  1. Bilevel Alternating Search: The algorithm fixes $S$ to solve for $K$, then fixes $K$ to solve for $S$. Each sub-problem is convex and computationally efficient.
  2. Sum of Squares (SOS) Programming: To ensure the metric $K$ remains physically valid (positive semi-definite), the authors employ SOS constraints.
  3. Stochastic Optimization: A stochastic version using mini-batches helps the solver escape local minima and scale to larger datasets.

Experimental Results and Validation

The method was evaluated using synthetic datasets from two classic physical models: a 2D linear Hamiltonian system and a rigid body rotating in 3D space ($\mathrm{SO}(3)$).

In the 2D case, the free energy creates a distinct "infinity-shaped" ($\infty$) attractor in phase space. As shown in Figure 1, simulated trajectories successfully converge to this predicted zero-level set.

Phase space trajectories of a 2D linear Hamiltonian system converging to an infinity-shaped free energy attractor.

The identification algorithm demonstrated high-fidelity recovery of the ground-truth physical parameters. The loss functions for both the metric and entropy showed superlinear convergence, dropping from $10^5$ to nearly $10^{-15}$ over several hundred iterations, as illustrated in Figure 3.

Convergence of metric and entropy losses during the bilevel optimization process, demonstrating high-fidelity recovery.

Conclusion and Future Work

This work provides a robust framework for modeling and learning complex dissipative systems. By leveraging the concept of free energy and bilevel optimization, the authors bridge the gap between theoretical mechanics and data-driven system identification.

While the stochastic approach is effective, the authors note that global optimality is not strictly guaranteed due to the underlying non-convexity. Future research will focus on defining "regularity conditions" to ensure unique solutions and applying this framework to real-world robotics data, such as autonomous vehicles operating in highly dissipative environments like water or wind.

Summary updated

BibTeX
@inproceedings{teng2024generalized,
  author = {Sangli Teng and Kaito Iwasaki and William R. Clark and Xihang Yu and Anthony M. 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