Papers
Topics
Authors
Recent
Search
2000 character limit reached

Geometric Hamiltonian Neural Networks

Updated 19 July 2026
  • GeoHNNs are Hamiltonian neural networks that encode geometric priors, such as symplectic and Riemannian structures, to model dynamics.
  • They leverage Hamilton’s equations to generate dynamics from a scalar energy function, ensuring energy conservation and long-term stability.
  • Extensions of GeoHNN include multiscale modeling, reduced-order dynamics, graph embeddings, and stochastic formulations for high-dimensional systems.

Geometric Hamiltonian Neural Networks (GeoHNNs) are Hamiltonian neural architectures that learn dynamics by explicitly encoding geometric priors of physical laws, most centrally the symplectic geometry of phase space and, in some formulations, the Riemannian geometry of inertia. In their canonical form, the state lies in the cotangent bundle TQT^*Q with coordinates (q,p)(q,p), the network represents a scalar Hamiltonian Hθ(q,p)H_\theta(q,p), and dynamics are generated through Hamilton’s equations rather than by directly fitting an arbitrary vector field. Across the literature, the GeoHNN label covers both this canonical setting and broader structure-preserving variants involving symplectic integrators, latent symplectic reduction, nonseparable Hamiltonians, multiscale decompositions, constrained mechanics, graph embeddings, and stochastic or port-Hamiltonian extensions (Miller et al., 2020, Choudhary et al., 25 Jun 2026, Aboussalah et al., 21 Jul 2025).

1. Canonical formulation and the map-building viewpoint

The canonical GeoHNN construction begins from Hamiltonian mechanics on phase space with canonical coordinates (q,p)(q,p), symplectic form, and Hamiltonian vector field

q˙=Hp,p˙=Hq.\dot{q} = \frac{\partial H}{\partial p}, \qquad \dot{p} = -\frac{\partial H}{\partial q}.

In this formulation, a neural network outputs a single scalar Hθ(q,p)H_\theta(q,p), and automatic differentiation supplies the vector field J1HθJ^{-1}\nabla H_\theta. The 2020 study on high-dimensional dynamics formalized precisely this setup by contrasting a conventional neural network that learns derivatives directly with a Hamiltonian neural network that learns the Hamiltonian function and obtains the derivatives through Hamilton’s equations (Miller et al., 2020).

That paper cast the distinction geometrically. A conventional neural network for dynamics learns a map from phase-space coordinates to the tangent-space components of the vector field, whereas a Hamiltonian neural network learns a single scalar energy surface whose gradient generates the full flow. For the one-dimensional harmonic oscillator, the ideal HNN map is the paraboloid

H(q,p)=q2+p22,H(q,p)=\frac{q^2+p^2}{2},

while the conventional network must approximate separate component fields for q˙\dot q and q¨\ddot q. The authors summarized this asymmetry by stating that “HNNs learn the single energy surface, while NNs learn the tangent space,” and emphasized that the advantage grows with dimension because the number of derivative components scales as (q,p)(q,p)0, whereas the number of scalar Hamiltonians to be learned remains one (Miller et al., 2020).

In the implementation reported there, the architecture itself was standard feed-forward, but its interpretation was geometric: two hidden layers, (q,p)(q,p)1 neurons per hidden layer, (q,p)(q,p)2 activation, Adam training, and matched capacity and training budget for the HNN and the baseline NN. The essential constraint was not in the layer type but in the output semantics: the network outputs only (q,p)(q,p)3, and the dynamics are computed via canonical derivatives rather than arbitrary learned derivatives. This architectural prior makes the learned vector field Hamiltonian by construction (Miller et al., 2020).

2. Symplectic structure, integrators, and modified Hamiltonians

The defining geometric property of a canonical GeoHNN is that its continuous-time vector field is Hamiltonian. As a consequence, the learned flow is symplectic, phase-space volume preserving, and energy conserving at the continuous level. The same 2020 high-dimensional study stated that minimizing the HNN loss “assures symplectic dynamics, including energy conservation and motion on phase space tori,” and showed empirically that even with simple numerical integration the energy behavior of HNNs was vastly better than that of unconstrained neural networks (Miller et al., 2020).

However, the discrete-time learning and rollout scheme matters. The 2020 analysis of “Deep Hamiltonian networks based on symplectic integrators” showed that the integrator embedded in the network should be regarded as a structural hyperparameter. For symplectic integrators, the inverse modified equation remains Hamiltonian, and the network target is a modified Hamiltonian

(q,p)(q,p)4

whose deviation from the true Hamiltonian is governed by the order (q,p)(q,p)5 of the integrator. By contrast, for non-symplectic integrators the induced target may fail to be Hamiltonian at all, so a scalar network target need not exist (Zhu et al., 2020).

This observation motivated “Symplectic Learning for Hamiltonian Neural Networks,” which replaced the forward-Euler-style HNN loss with a loss derived from symplectic Euler or implicit midpoint. The paper proved that an exact modified Hamiltonian (q,p)(q,p)6 exists for these schemes, eliminating the artificial lower bound present in the standard HNN loss and enabling explicit error analysis. It also derived post-training correction formulas that recover the true Hamiltonian from the learned modified Hamiltonian up to arbitrary order; for implicit midpoint, the leading correction is

(q,p)(q,p)7

This placed HNN training squarely inside the framework of geometric numerical integration (David et al., 2021).

A later extension addressed general, nonseparable Hamiltonians and noisy observations by combining an implicit midpoint integrator with a symplectic adjoint method. In that formulation, the forward dynamics use the fully implicit midpoint rule, the backward pass integrates the adjoint system with the same symplectic Runge–Kutta scheme, and the resulting gradients coincide with discrete backpropagation while using constant memory in the number of timesteps. The method further used a predictor–corrector fixed-point iteration to reduce the overhead of the implicit solver, and interpreted backward error analysis as a post-processing tool for improving the learned Hamiltonian without retraining (Choudhary et al., 25 Jun 2026).

3. High-dimensional scaling, reduction, and generalized Hamiltonians

One of the central arguments for GeoHNNs is their scaling behavior in high-dimensional Hamiltonian systems. In the map-building picture, a conventional network must approximate (q,p)(q,p)8 phase-space derivatives, whereas an HNN learns one scalar generator. The 2020 high-dimensional study validated this on uncoupled oscillators and coupled bistable chains. For the (q,p)(q,p)9-dimensional quadratic oscillator

Hθ(q,p)H_\theta(q,p)0

the relative energy error for Hθ(q,p)H_\theta(q,p)1 followed the power law

Hθ(q,p)H_\theta(q,p)2

and HNN forecasts were reported as up to Hθ(q,p)H_\theta(q,p)3 better than conventional NNs. For the quartic oscillator

Hθ(q,p)H_\theta(q,p)4

the HNN advantage reached up to Hθ(q,p)H_\theta(q,p)5. For the high-dimensional coupled bistable chain, HNN energy errors were up to Hθ(q,p)H_\theta(q,p)6 lower than NN errors in the regime with sufficient training pairs. On a one-dimensional harmonic oscillator, the HNN energy stayed within Hθ(q,p)H_\theta(q,p)7 over Hθ(q,p)H_\theta(q,p)8, while the NN lost nearly Hθ(q,p)H_\theta(q,p)9 (Miller et al., 2020).

Scaling by reduction rather than by direct full-state learning was developed further in the reduced-order Hamiltonian framework. There, a geometrically constrained symplectic autoencoder learns a nonlinear symplectic submanifold of the full phase space, and a geometric HNN models dynamics on that latent manifold. The reduction map is constructed as a cotangent lift of a constrained autoencoder in configuration space, which yields exact symplecticity of the decoder differential, while mass and damping matrices in the latent model are parameterized on (q,p)(q,p)0 and trained with Riemannian Adam. The reported systems ranged from a (q,p)(q,p)1-DOF coupled pendulum to a (q,p)(q,p)2-DOF thin cloth and a (q,p)(q,p)3-DOF particle vortex, and the reduced-order approach was described as extending HNNs to intrinsically high-dimensional dynamics while maintaining long-horizon stability and energy behavior (Friedl et al., 29 Sep 2025).

The explicit GeoHNN framework introduced in 2025 formulated the same dual geometric commitment at a higher level: it enforced the Riemannian geometry of inertia by parameterizing inertia matrices in the natural space of symmetric positive-definite matrices, and the symplectic geometry of phase space by using a constrained autoencoder to preserve phase-space volume in a reduced latent space. The resulting models were reported to achieve superior long-term stability, accuracy, and energy conservation on systems ranging from coupled oscillators to high-dimensional deformable objects (Aboussalah et al., 21 Jul 2025).

4. Multiscale and continuum formulations

The GeoHNN idea has also been extended from canonical finite-dimensional mechanics to multiscale systems and Hamiltonian PDEs. The Frequency-Separable Hamiltonian Neural Network (FS-HNN) preserved the Hamiltonian form

(q,p)(q,p)4

but altered the representation of (q,p)(q,p)5 to address multiple timescales. It decomposed the Hamiltonian into multiple components trained on temporally subsampled trajectories and then combined them through a nonlinear multi-scale combiner,

(q,p)(q,p)6

so that fast and slow modes could be learned by distinct Hamiltonian subnetworks. The motivation was the spectral bias of deep networks, which favors low-frequency dynamics and impairs long-horizon accuracy in slow–fast Hamiltonian systems (Li et al., 6 Mar 2026).

For ODEs, FS-HNN retained the canonical symplectic matrix (q,p)(q,p)7. For PDEs, where the structure operator is often noncanonical and not known in closed form, it learned the action of a skew-symmetric operator (q,p)(q,p)8 on Hamiltonian gradients and enforced the orthogonality condition

(q,p)(q,p)9

through an explicit projection

q˙=Hp,p˙=Hq.\dot{q} = \frac{\partial H}{\partial p}, \qquad \dot{p} = -\frac{\partial H}{\partial q}.0

thereby ensuring conservation of the learned Hamiltonian in the continuous-time idealization. The Hamiltonian functional itself was represented with a DeepONet, and the learned structure operator was state- and boundary-conditioned (Li et al., 6 Mar 2026).

Empirically, the multiscale decomposition yielded substantial gains. On the pendulum, the combined FS-HNN reached rollout MSE q˙=Hp,p˙=Hq.\dot{q} = \frac{\partial H}{\partial p}, \qquad \dot{p} = -\frac{\partial H}{\partial q}.1, compared with q˙=Hp,p˙=Hq.\dot{q} = \frac{\partial H}{\partial p}, \qquad \dot{p} = -\frac{\partial H}{\partial q}.2 for the best HNN baseline. On the double pendulum, the combined FS-HNN reported q˙=Hp,p˙=Hq.\dot{q} = \frac{\partial H}{\partial p}, \qquad \dot{p} = -\frac{\partial H}{\partial q}.3, versus approximately q˙=Hp,p˙=Hq.\dot{q} = \frac{\partial H}{\partial p}, \qquad \dot{p} = -\frac{\partial H}{\partial q}.4 for the combined HNN baseline. On the FPUT chain, the combined FS-HNN reached q˙=Hp,p˙=Hq.\dot{q} = \frac{\partial H}{\partial p}, \qquad \dot{p} = -\frac{\partial H}{\partial q}.5, compared with q˙=Hp,p˙=Hq.\dot{q} = \frac{\partial H}{\partial p}, \qquad \dot{p} = -\frac{\partial H}{\partial q}.6 for SympNet. In the PDE setting, the combined FS-HNN achieved q˙=Hp,p˙=Hq.\dot{q} = \frac{\partial H}{\partial p}, \qquad \dot{p} = -\frac{\partial H}{\partial q}.7 on the shallow-water random-initialization benchmark, compared with q˙=Hp,p˙=Hq.\dot{q} = \frac{\partial H}{\partial p}, \qquad \dot{p} = -\frac{\partial H}{\partial q}.8 for FNO and q˙=Hp,p˙=Hq.\dot{q} = \frac{\partial H}{\partial p}, \qquad \dot{p} = -\frac{\partial H}{\partial q}.9 for PHNN, and Hθ(q,p)H_\theta(q,p)0 on the Taylor–Green vortex benchmark, compared with Hθ(q,p)H_\theta(q,p)1 for both FNO and PHNN (Li et al., 6 Mar 2026).

5. Broader extensions of the GeoHNN idea

Beyond canonical mechanical modeling, the GeoHNN concept has been extended to several adjacent settings. In graph learning, Hamiltonian Dynamic GNN (HDG) and HamGNN treated node embeddings as Hamiltonian orbits on a learned manifold. Each node carries a position-like feature Hθ(q,p)H_\theta(q,p)2 and a learned momentum Hθ(q,p)H_\theta(q,p)3, a graph-aware Hamiltonian Hθ(q,p)H_\theta(q,p)4 or Hθ(q,p)H_\theta(q,p)5 is computed by a GNN, and node features evolve according to Hamilton’s equations on the graph cotangent bundle. In that formulation, Hamiltonian orbits generalize the exponential maps used in fixed-manifold GNNs, allowing the geometry of the graph embedding space to be learned rather than prescribed. The reported benefits included adaptation to Euclidean, hyperbolic, and mixed graph geometries, improved robustness to over-smoothing, and strong performance on both node classification and link prediction (Kang et al., 2023, Kang et al., 2023).

For constrained mechanics, Hamiltonian neural networks have been generalized to systems with holonomic and nonholonomic constraints by adopting a pseudo-Hamiltonian formulation

Hθ(q,p)H_\theta(q,p)6

where Hθ(q,p)H_\theta(q,p)7 defines the constraint distribution. The proposed architecture used three networks in parallel to learn the Hamiltonian, the constraints, and the Lagrange multipliers simultaneously, and was tested on a rolling disk and a ball on a spinning table, including noisy training data (T. et al., 2024).

Symmetry has likewise been incorporated explicitly. SymHNN augmented a standard HNN with a Lie algebra framework that learns infinitesimal symmetry generators Hθ(q,p)H_\theta(q,p)8 together with the Hamiltonian, penalizing the Lie derivative Hθ(q,p)H_\theta(q,p)9 so that the learned Hamiltonian becomes invariant under the exponentiated group action. This allowed simultaneous learning of the Hamiltonian and symmetry group action and, through the momentum-map construction, recovery of conserved quantities associated with the detected symmetries (Dierkes et al., 2023).

At the level of open and stochastic systems, the port-Hamiltonian program has extended geometric Hamiltonian learning to deterministic and stochastic input–state–output systems. In that framework, the learned drift takes the form

J1HθJ^{-1}\nabla H_\theta0

and the stochastic extension augments it with a diffusion term while generalizing passivity to the stochastic regime. The corresponding stochastic port-Hamiltonian neural networks were proposed for interconnected stochastic systems, including damped mass-spring systems, Duffing oscillators, and robotic control tasks (Persio et al., 8 Sep 2025).

A conceptually different but still geometric use of Hamiltonian structure appears in neural networks constructed directly on statistical manifolds. On the lognormal statistical manifold, the gradient flow induced by the Fisher metric was reformulated as a Hamiltonian system, embedded into the Poincaré disk, and used to derive the layer’s rotation matrix, translation, and activation function from geometric principles. In that setting, the network’s synaptic weight matrix becomes an element of J1HθJ^{-1}\nabla H_\theta1, with its rotational part given by the exponential of the Poisson bivector (Assandje et al., 30 Sep 2025).

6. Limitations, misconceptions, and open directions

A recurring misconception is that encoding Hamilton’s equations alone suffices for long-term geometric fidelity. The literature makes a sharper distinction. Continuous-time Hamiltonian structure ensures a Hamiltonian vector field, but the discrete solver, adjoint scheme, and latent reduction map can still destroy symplecticity or induce energy drift if they are not chosen geometrically. This is why symplectic integrators, symplectic adjoints, and modified-Hamiltonian analysis play a central role in later GeoHNN work (Zhu et al., 2020, David et al., 2021, Choudhary et al., 25 Jun 2026).

A second misconception is that Hamiltonian priors eliminate data requirements. The high-dimensional oscillator study showed the opposite: in severely data-scarce, high-dimensional regimes, both NN and HNN struggle, even if the geometric bias strongly favors the HNN once the number of training pairs is increased. The same paper explicitly noted that when the NN appears to outperform the HNN in the low-J1HθJ^{-1}\nabla H_\theta2, high-J1HθJ^{-1}\nabla H_\theta3 corner, neither model has actually learned well (Miller et al., 2020).

Current limitations recur across the modern GeoHNN literature. Implicit midpoint and related nonseparable symplectic solvers require nonlinear solves at each step, even if predictor–corrector schemes mitigate the cost. Many formulations assume known canonical coordinates J1HθJ^{-1}\nabla H_\theta4, while extensions to noncanonical Poisson structures require learning the Poisson tensor as well. Experiments in symplectic-adjoint HNNs reach up to J1HθJ^{-1}\nabla H_\theta5-dimensional phase space and explicitly identify scaling to extremely high-dimensional systems, partial observations, and more realistic noise models as unresolved challenges (Choudhary et al., 25 Jun 2026). In multiscale settings, the decomposition into component Hamiltonians is not unique, the PDE datasets are only approximately conservative, and rigorous convergence or homogenization-style guarantees are still absent (Li et al., 6 Mar 2026). In reduced-order settings, noncanonical symplectic forms and stronger non-Hamiltonian effects remain open directions (Friedl et al., 29 Sep 2025).

The main research trajectory suggested by this body of work is therefore not the abandonment of Hamiltonian neural models, but their geometric completion: higher-order symplectic integrators, noncanonical and constrained Hamiltonian systems, learned symplectic or Poisson structures, adaptive time-stepping, stochastic and dissipative geometric extensions, and latent reductions that remain exact at the level of symplectic structure rather than only approximate in reconstruction error (Choudhary et al., 25 Jun 2026, Friedl et al., 29 Sep 2025). This suggests that GeoHNN is best understood not as a single architecture, but as a design principle: learn the generator, preserve the geometry, and let the training and rollout pipeline respect the same structure as the target dynamics.

Topic to Video (Beta)

No one has generated a video about this topic yet.

Whiteboard

No one has generated a whiteboard explanation for this topic yet.

Follow Topic

Get notified by email when new papers are published related to Geometric Hamiltonian Neural Networks (GeoHNN).