Deep learning has a growing obsession with physics. Researchers are increasingly building "physics-informed" models that don't just recognize visual patterns, but actually try to learn the underlying laws of nature—like energy conservation—directly from video pixels. But there’s a catch: How do we know if a model actually learned the physics, or if it’s just a very good "cheat" at video reconstruction?
In their NeurIPS 2021 paper, researchers introduce SyMetric, a new framework for measuring the quality of learned Hamiltonian dynamics. By moving beyond simple image-matching metrics, they’ve unlocked a way to build more stable, interpretable, and physically accurate AI.
The Problem: MSE is a Liar
Imagine training an AI to watch a video of a swinging pendulum and predict its future motion. Traditionally, we evaluate this model using Mean Squared Error (MSE)—essentially asking, "Does the predicted image look like the real one?"
The authors argue this is a poor proxy for physical understanding. A model can achieve low MSE by:
- Reconstructing static backgrounds perfectly while failing to track the moving object.
- "Cheating" with time: Instead of learning dynamics, the model might just learn to index frames by time. This approach fails the moment you try to predict further into the future (extrapolation) or run the simulation backward.
To truly learn Hamiltonian dynamics (the math governing energy-conserving systems), a model must preserve the structure of the "phase space"—the fundamental relationship between position and momentum. Until now, there was no reliable way to measure this when a model learns strictly from raw pixels.
The Solution: SyMetric
The authors propose that if a model has truly learned the physics, there must exist a canonical transformation between the model’s hidden "latent space" and the real-world physical states.
Their evaluation pipeline, SyMetric, works in three steps:
- Learning the Mapping ($F$): They train a simple regressor to map the model's internal states to the ground-truth physical states.
- Goodness of Fit ($R^2$): They measure how much information about the real physics is actually contained in the model's latents.
- Measuring Symplecticity ($Sym$): This is the "secret sauce." They check the Jacobian of the mapping to see if it preserves the mathematical structure required by Hamiltonian mechanics (the symplectic condition).
SyMetric acts as a strict binary "pass/fail" score: a model passes only if it is both highly informative ($R^2 > 0.9$) and mathematically consistent with Hamiltonian physics ($Sym < 0.05$).
HGN++ and Key Results
Using these metrics as a guide, the researchers refined an existing architecture (Hamiltonian Generative Networks, or HGN) into HGN++. They optimized hyperparameters and architectural choices—such as using Swish activation functions and training for both forward and backward time predictions—to strictly enforce these physical constraints.
The researchers tested their approach on 13 different datasets spanning classic physics (mass-springs, pendulums), game theory (Matching Pennies), molecular dynamics, and visual navigation.
The results demonstrated massive improvements:
- Superior Extrapolation: HGN++ significantly outperformed the original HGN. On average, HGN++ could predict 267 steps into the future accurately (measured as Valid Prediction Time, or VPT), compared to just 11 steps for the baseline.
- Bidirectional Stability: By enforcing symplecticity, HGN++ remains stable both forward and backward in time, allowing for "essentially infinite" rollouts on simpler datasets without degrading.
- Emergent Interpretability: Perhaps most surprisingly, HGN++ discovered physically meaningful latent variables entirely on its own. By traversing the model's latent space, researchers found specific dimensions that controlled the mass of an object or its color, even though the model was never explicitly told these properties existed.
Limitations and Future Work
While SyMetric is a powerful new yardstick, it has limitations. Currently, calculating SyMetric requires access to the ground-truth physical states (e.g., the actual coordinates of the pendulum) to learn the mapping. While this isn't needed for training the model, it limits the metric's use in evaluating models on real-world video where the "ground truth" is unknown. Additionally, truly chaotic systems, like many-particle molecular dynamics, remain a challenge due to their extreme sensitivity to initial conditions.
Ultimately, SyMetric proves that we can—and should—demand more from physics-informed AI than just pretty video reconstructions. The authors suggest the next frontier is building models that are "symplectic by design," potentially removing the need for a post-hoc evaluation process entirely.
Summary updated