Source-linked AI summary
Symplectic Recurrent Neural Networks
Zhengdao Chen, Jianyu Zhang, Martin Arjovsky, Léon Bottou
TL;DR
Learning physical laws from trajectories is difficult when Hamiltonian dynamics are noisy, stiff, or numerically unstable. The paper proposes SRNNs, combining neural Hamiltonians with symplectic integration, multi-step training, and initial state optimization; they outperform prior methods on complex and noisy systems and extend to stiff rebound dynamics.
Problem
Hamiltonian systems learned from observed trajectories face numerical challenges from discretization error, measurement noise, stiffness, and noisy initial states.
Method
SRNN models the Hamiltonian with a neural network and combines symplectic integration, multi-step training, and initial state optimization, with an augmented integrator for rebounds.
Results
SRNN outperforms previous methods in predicting complex and noisy Hamiltonian systems and can handle perfect rebound dynamics.
Takeaways & Limitations
SRNN learning can compensate for numerical discretization error and extend ODE-based learning to stiff systems such as bouncing billiards.
Takeaways & Limitations
The framework focuses on conservative and separable Hamiltonians; extending it to non-conservative systems requires additional dissipation or intervention operators.
Abstract
from arXiv · showhide
We propose Symplectic Recurrent Neural Networks (SRNNs) as learning algorithms that capture the dynamics of physical systems from observed trajectories. An SRNN models the Hamiltonian function of the system by a neural network and furthermore leverages symplectic integration, multiple-step training and initial state optimization to address the challenging numerical issues associated with Hamiltonian systems. We show that SRNNs succeed reliably on complex and noisy Hamiltonian systems. We also show how to augment the SRNN integration scheme in order to handle stiff dynamical systems such as bouncing billiards.
1 Introduction
Hamiltonian learning combines neural representations of physical laws with structure-preserving integration, but stiffness, discretization error, and noise make trajectory prediction difficult. SRNNs address rebound events by augmenting leapfrog integration with a trainable operator.
- Hamiltonian Neural Networks represent H(q, p) with a multilayer neural network and train its derivatives against observed time derivatives.The approach learns physical dynamics from trajectory data while respecting Hamiltonian structure.
- Discretization errors and measurement noise can make predicted Hamiltonian trajectories diverge quickly, especially outside the simplest systems.Stiff systems may require very small integration time-steps for numerical stability.
- Symplectic integrators are designed to preserve conserved quantities and are generally more stable and structure-preserving than non-symplectic methods.
- For rebound events, SRNN augments leapfrog integration with a trainable operator that models rebounds and relates their occurrence to visual hints.The event timing can make predefined time-grid simulation inadequate.
2 Related work
The paper sits within trajectory-based approaches that learn governing differential equations rather than only object interactions. Its contribution is an SRNN that performs well on noisy and complex systems and extends to perfect rebound.
- Trajectory-based physics-learning methods seek differential equations governing system evolution from observed trajectories, complementing methods focused on intuitive object interactions.
- SRNN learns Hamiltonian dynamics directly from position and momentum time series.
- SRNN performs well on noisy and complex systems, including spring-chain and three-body systems, and is compatible with initial state optimization.
- The method is augmented to handle perfect rebound, an example of very stiff Hamiltonian dynamics.
3 Framework
The framework learns either ordinary- or Hamiltonian-form derivative models from discrete trajectories and propagates them with configurable numerical integrators. Its design independently varies model type, training horizon, and training or testing integrators.
- 3.1 Hamiltonian systems: Hamiltonian systems use momentum p and position q, with evolution determined by a Hamiltonian function through Hamilton’s equations.
- 3.1 Hamiltonian systems: The paper focuses on conservative, time-independent and separable Hamiltonians written as H(p, q) = K(p) + V(q).Non-conservative and non-separable extensions are identified as scope boundaries or future adaptations.
- 3.1 Hamiltonian systems: H-NET represents the Hamiltonian as a neural network whose partial derivatives provide the time derivatives, whereas O-NET directly models those derivatives.
- 3.2 From ODEs to discrete trajectories: A numerical integrator approximates an ODE solution at discrete time points; leapfrog is emphasized for Hamiltonian systems because it is structure-preserving and more accurate than Euler’s method there.
- 3.3 Learning dynamics from trajectories: Training estimates model parameters by minimizing trajectory mean squared error while back-propagating through numerical-integration steps.
- 3.4 Symplectic Recurrent Neural Network: The framework varies O-NET versus H-NET, Euler versus leapfrog training, single-step versus multi-step training, and testing integrator or step size.The labels E-E, E-L, and L-L encode training and testing integrator choices.
4 SRNN can learn complex and noisy Hamiltonian dynamics
Experiments on a 20-mass spring chain show that symplectic integration, recurrent multi-step training, and initial state optimization improve trajectory prediction under noiseless and noisy observations.
- The spring-chain experiment uses 20 masses connected by randomly chosen springs, with trajectories starting from random positions and momenta.
- 4.1 Going symplectic - rescuing HNN with the leapfrog integrator: In the noiseless case, leapfrog integration keeps single-step H-NET predictions stable and periodic longer than Euler integration.Using leapfrog during both training and testing substantially improves performance, highlighting the importance of integration consistency.
- 4.2 Going recurrent - using multi-step training when noise is present: With noisy positions and momenta, recurrent training consistently improves predictions for most methods, while recurrent E-E H-NET does not improve over single-step E-E H-NET.The best-performing model is the SRNN, corresponding to recurrent L-L H-NET, and it improves substantially over single-step L-L H-NET.
- 4.3 Initial state optimization (ISO): Noisy initial states bias predictions, so ISO estimates p̂0 and q̂0 per trajectory and optimizes them while fixing the model parameters.At testing time, the first 10 noisy time steps support the same L-BFGS-B optimization before predicting the remaining 200 steps.
- 4.3 Initial state optimization (ISO): SRNN-ISO yields the best prediction among the evaluated methods in the noisy case, with qualitative improvements over HNN and SRNN.Vanilla RNN and LSTM do not appear to benefit from ISO, likely because ISO requires an already reasonable system model.
- Across the reported spring-chain comparisons, SRNN models achieve the lowest testing errors under the table’s L2 position-error evaluation.Table 1 uses fixed initial states, while Table 2 evaluates methods that optimize noisy initial states.
5 SRNN can learn the dynamics of a three-body system
SRNN performs best among the tested learning models on the noiseless chaotic three-body system and can even outperform direct simulation with the same time step. The results suggest that recurrent training and learned compensation for discretization error improve predictions.
- SRNN is the best-performing model in the three-body experiment, while single-step L-L H-NET is second-best.
- SRNN and single-step L-L H-NET outperform leapfrog simulation of the correct equations at the same time-step size.The comparison uses time-step ∆t = 1.
- Learned models can compensate for numerical discretization error, making their predictions better than those from the correct equations under coarse integration.
- Recurrently trained models outperform their corresponding single-step-trained models.
6 Learning perfect rebound with an augmented SRNN
The paper augments leapfrog-based SRNNs with a trainable rebound operator to model perfect rebounds in a stiff billiard system. The operator predicts rebound timing and momentum changes while preserving ordinary leapfrog evolution when no rebound occurs.
- Perfect rebound models a billiard reversing wall-normal momentum without energy loss at an instantaneous, infinite-force event.The singular event makes direct Hamiltonian simulation difficult.
- The augmented SRNN inserts a trainable operator into leapfrog integration to model rebound events and their timing.
- The rebound operation leaves momentum unchanged for n = 0 and reverses momentum when n is a unit wall-normal vector.Smaller vector lengths can model energy dissipation.
- Figure 4 compares actual and predicted heavy-billiard trajectories produced by SRNN with the rebound module.
- The forward model uses ordinary leapfrog updates over α∆t and (1−α)∆t around the rebound event.
- The model predicts n and α from the tentative and current positions, using visual hints to avoid inefficiently learning wall locations from rebound events alone.
7 Conclusion
The paper presents SRNNs as data-driven learners of Hamiltonian dynamics that combine structure-preserving integration, multi-step training, and initial-state optimization. It reports strong performance on complex and noisy systems and extends the approach to perfect rebound dynamics.
- SRNN learns Hamiltonian-system dynamics from observed position and momentum trajectories.
- Symplectic integration, multi-step training, and initial-state optimization improve prediction of complex and noisy Hamiltonian systems.
- SRNN can outperform simulation with exact equations by learning to compensate for numerical discretization error.
- An augmented SRNN learns perfect rebound from data, extending ODE-based learning to a stiff Hamiltonian system.
A.1 The spring-chain experiment
The experiments use coarse time grids and neural networks representing either the vector field or a separable Hamiltonian. The spring-chain setup uses image trajectories with a compact O-NET and separate kinetic- and potential-energy networks.
- Spring-chain ground-truth trajectories use ∆t = 0.1 after leapfrog simulation at ∆t′ = 0.001 and coarsening by a factor of 100.
- The O-NET represents fθ(p, q) with a one-hidden-layer MLP containing 40 input units, 2048 hidden units, and 40 output units.
- The H-NET represents Hθ(p, q) as the sum of separate kinetic-energy and potential-energy networks.
- For the image-based billiard setup, the input image is 128x128 pixels with a 104x104-pixel free space and a 3x3-pixel billiard.
- The billiard O-NET uses a one-hidden-layer MLP with 4 input units, 32 hidden units, and 4 output units.
B The Maximum Likelihood Estimation perspective
The paper frames noisy trajectory learning as maximum-likelihood inference, which supports optimizing both neural-network parameters and initial states. It then analyzes when initial-state optimization may be locally strongly convex for symplectic flows.
- Maximum-likelihood inference provides a justification for treating initial states as trainable parameters in noisy trajectory learning.
- The generalized model optimizes the neural-network parameters θ and the initial state z0 jointly rather than fixing z0 to the observed initial state.
- This initial-value approach can suffer from local minima and unstable numerical ODE solutions, although leapfrog integration mitigates the numerical-instability issue for Hamiltonian models.
- The analysis asks whether the L2 trajectory loss as a function of the initial state is possibly locally convex for different dynamics and numerical integrators.
- For exact Hamiltonian flows or symplectic integrators, the flow-map Jacobian is symplectic, so its Gram matrix is positive definite; with small prediction error, the Hessian is heuristically strongly convex.
D Additional plots of the spring-chain experiments
The appendix provides additional spring-chain plots, extending the experiment to ten masses and separating single-step, recurrent, and initial-state-optimized variants across O-NET, H-NET, Vanilla RNN, and LSTM models.
- The spring-chain appendix includes an extension from the original experiment to ten masses, with the first mass nearest an end and the tenth at the center.
- Single-step models: Additional plots cover single-step E-E O-NET, E-E H-NET, L-L O-NET, and L-L H-NET configurations.
- Recurrent models: Recurrently trained plots compare E-E O-NET, E-E H-NET, L-L O-NET, and SRNN recurrent L-L H-NET configurations.
- Initial-state optimization: The appendix also shows recurrent configurations with initial-state optimization, including SRNN-ISO for recurrent L-L H-NET.
- Baselines: Vanilla RNN and LSTM are included as additional comparison models in the spring-chain plots.
E Additional plots of the three-body experiments
The appendix supplements the three-body experiment with plots comparing actual trajectories against predictions from single-step and recurrent methods, alongside leapfrog simulations at two time steps.
- Single-step training: The three-body plots compare actual trajectories with predictions from the various single-step-trained methods.
- Recurrent training: A companion figure compares actual trajectories with predictions from the various recurrently trained methods.
- Integrator comparison: The appendix compares the actual trajectory with leapfrog-integrator simulations using time-step 1 and time-step 0.1.
F Additional plots of the heavy billiard experiment
The heavy-billiard appendix compares SRNN variants with and without rebound handling, a recurrent O-NET with rebound handling, and a Vanilla RNN.
- SRNN variants: One plot shows an SRNN rebound module that does not learn α and therefore effectively treats α as 1.
- SRNN variants: Another plot shows an SRNN without the rebound module.
- Rebound handling: A recurrent L-L O-NET configuration is shown with the rebound module.
- Baseline: Vanilla RNN is included as a comparison model for the heavy-billiard experiment.