Sequential Cascaded Hamiltonian Neural Networks
Ajay Mandyam Rangarajan, Jeyashree Krishnan · Team TheLoneCabbages
Submitted to AI Safety x Physics Grand Challenge. Sprint projects are early-stage work by participants, not Apart Research publications.
Understanding how neural networks can be enhanced to learn physically meaningful representations is fundamental to advancing scientific machine learning and ensuring AI safety in physics-critical applications where unpredictable model behavior can lead to catastrophic failures. We present a novel Sequential Cascaded Hamiltonian Neural Network (SC-HNN) approach that dramatically improves the generalization capabilities of standard neural networks through post-training with energy-conserving constraints. Our method consists of two stages: first training a baseline neural network on trajectory data $(x, t)$, then using automatic differentiation to extract velocities and train a separate Hamiltonian Neural Network that learns the underlying energy function. This approach requires only Hamiltonian structure knowledge (similar to standard HNNs) but operates on trajectory data rather than requiring direct access to phase space coordinates $(x, v)$. Using the harmonic oscillator as our test system, we demonstrate that this cascaded approach achieves comparable long-term stability and energy conservation to direct HNN training while significantly outperforming standalone baseline networks and PINNs. Most remarkably, we find that even when baseline neural networks fail to accurately predict long-term dynamics, their learned trajectory representations provide sufficient data fitting quality that can be leveraged to train separate Hamiltonian networks for improved generalization. The SC-HNN reduces energy variance by over 90\% compared to baseline approaches while maintaining computational efficiency. Our results suggest that standard neural networks may possess inherent physical understanding that can be recovered and enhanced through appropriate post-training procedures, opening new pathways for improving the reliability and physical consistency of learned dynamical systems without requiring physics knowledge during initial training.
Reviews
Excellent and really thorough work!! Well presented and innovative, hats off!
The project introduces and validates a novel method for training Hamiltonian neural networks involving standard neural network training as a preliminary step. The idea is interesting and the results are presented rigorously and clearly. I do have some critiques.
1) The project leans more towards AI for physics rather than physics for AI safety (however, the report does a good job discussing implications for AI safety).
2) The energy variance numbers reported in Figure 1 and Table 1 are not consistent.
3) At 8 pages + appendices, the report exceeds the page limit of 6 pages + appendices.
Cite this project
@misc{rangarajan2025sequential,
title = {{Sequential Cascaded Hamiltonian Neural Networks}},
author = {Ajay Mandyam Rangarajan and Jeyashree Krishnan},
year = {2025},
month = jul,
note = {Submitted to AI Safety x Physics Grand Challenge, an Apart Research Sprint},
howpublished = {\url{https://apartresearch.com/sprints/projects/sequential-cascaded-hamiltonian-neural-networks-4zzi}},
url = {https://apartresearch.com/sprints/projects/sequential-cascaded-hamiltonian-neural-networks-4zzi}
}More from AI Safety x Physics Grand Challenge
- Prize winnerView project: Constrained Belief Updates and Geometric Structures in Transformer Representations for the RRXOR Process
Constrained Belief Updates and Geometric Structures in Transformer Representations for the RRXOR Process
In this work, we seek to further understand the computational structure formed by transformers trained to predict the next token of a data set. In particular, we extend the work of (Piotrowski et al., 2025) by analyzing …
- Prize winnerView project: Momentum–Point-Perplexity Mechanics in Large Language Models=
Momentum–Point-Perplexity Mechanics in Large Language Models=
Fractal
This work analyzes the hidden states of twenty different open-source transformer language models, ranging from small to medium size and covering five major architectures. The key discovery is that these models show …
- Prize winnerView project: AI agentic system epidemiology
AI agentic system epidemiology
XIA-for-Med
As AI systems scale into decentralized, multi-agent deployments, emergent vulnerabilities challenge our ability to evaluate and manage systemic risks. In this work, we adapt classical epidemiological modeling …