Local energy decomposition improves accuracy in hamiltonian neural networks
Improving Hamiltonian Learning through Local Energy Decomposition
Machine Learning
Summary
Understanding how physical systems change over time often involves predicting energy and motion accurately. The authors found that usual neural networks used for this tend to miss small, important details in energy. They propose a new method that breaks down energy into local parts related to physical interactions, making it easier for the network to learn fine details. This new approach not only predicts energy changes better but also works well for situations it hasn't seen before.
What this means in practice
- •For robotics engineers: Model complex conservative dynamics of robots more accurately for longer-duration predictions.
- •For simulation developers: Enhance physical simulation software by improving neural network-based energy models to extend accuracy over diverse scenarios.
Authors
Yaojun Li, Yulong Yang, Christine Allen-Blanchette
Abstract
Hamiltonian neural networks provide a principled framework for learning conservative dynamics. A scalar Hamiltonian is parameterized by a neural network and the vector field is derived using Hamilton's equations. However, preserving Hamiltonian structure does not guarantee that the energy function itself is represented accurately. When modeled by a conventional multilayer perceptron, the Hamiltonian inherits the spectral bias of coordinate-based neural representations, favoring smooth over fine-scale structure. These fine-scale errors can be amplified by differentiation when computing the dynamics. To address this limitation, we introduce Local Multiscale Hamiltonian Neural Network (LM-HNN), which restructures the Hamiltonian according to its physical interaction structure. LM-HNN decomposes the energy into kinetic and potential components and represents them as sums of shared local functions over multiple interaction neighborhoods. This replaces a single high-dimensional approximation problem with lower-dimensional, reusable interaction laws, making fine-scale energy structure easier to resolve while preserving Hamiltonian dynamics. Across low-dimensional, interacting, and fast--slow systems, LM-HNN consistently achieves more accurate Hamiltonian derivatives and long-horizon rollouts than competing structure-preserving models, while substantially extending the effective spectral range of the learned energy. The same structured representation also generalizes more reliably to energy levels not observed during training. These results show that accuracy depends on the Hamiltonian representation as well as its structure, and that incorporating locality, decomposition, and shared interaction laws provides a simple and effective route to more accurate and generalizable Hamiltonian learning.