Learning Generalized Hamiltonians using fully Symplectic Mappings
Harsh Choudhary, Chandan Gupta, Vyacheslav Kungurtsev, Melvin Leok, Georgios Korpas
TL;DR
The paper tackles learning generalized, non-separable Hamiltonians from noisy trajectory data while preserving long-term physical structure. It introduces a fully implicit, symplectic Hamiltonian neural network that uses an implicit-midpoint forward pass and adjoint sensitivity for gradient computation, avoiding backpropagation through ODE solvers. By eliminating separability biases and leveraging predictor–corrector fixed-point iterations, the approach achieves accurate Hamiltonian reconstruction and energy conservation on non-separable and chaotic systems, with favorable memory efficiency. The results on Double Well, Coupled Harmonic Oscillator, and Henon–Heiles illustrate robust learning under noise and demonstrate the practical viability of fully symplectic, adjoint-based training for complex Hamiltonian dynamics.
Abstract
Many important physical systems can be described as the evolution of a Hamiltonian system, which has the important property of being conservative, that is, energy is conserved throughout the evolution. Physics Informed Neural Networks and in particular Hamiltonian Neural Networks have emerged as a mechanism to incorporate structural inductive bias into the NN model. By ensuring physical invariances are conserved, the models exhibit significantly better sample complexity and out-of-distribution accuracy than standard NNs. Learning the Hamiltonian as a function of its canonical variables, typically position and velocity, from sample observations of the system thus becomes a critical task in system identification and long-term prediction of system behavior. However, to truly preserve the long-run physical conservation properties of Hamiltonian systems, one must use symplectic integrators for a forward pass of the system's simulation. While symplectic schemes have been used in the literature, they are thus far limited to situations when they reduce to explicit algorithms, which include the case of separable Hamiltonians or augmented non-separable Hamiltonians. We extend it to generalized non-separable Hamiltonians, and noting the self-adjoint property of symplectic integrators, we bypass computationally intensive backpropagation through an ODE solver. We show that the method is robust to noise and provides a good approximation of the system Hamiltonian when the state variables are sampled from a noisy observation. In the numerical results, we show the performance of the method concerning Hamiltonian reconstruction and conservation, indicating its particular advantage for non-separable systems.
