Hamiltonian Neural Network Research Vault (At1uri/hamiltonian-neural-network-vault)
A cryptographic, production-grade research repository containing foundational algorithms for Hamiltonian Neural Networks (HNN), Symplectic Geometric Integrators, PoincarΓ© Surface-of-Section Analyzers, and numerical conservation verification suites.
Mathematical Architecture
1. Symplectic Manifolds & Hamiltonian Vector Fields
Let $(\mathcal{M}, \omega)$ be a $2n$-dimensional smooth symplectic manifold equipped with canonical 2-form $\omega = \sum_{i=1}^n dq^i \wedge dp_i$. Given scalar Hamiltonian energy $\mathcal{H}: \mathcal{M} \to \mathbb{R}$, Hamilton's canonical equations define the vector field $X_{\mathcal{H}}$:
2. Lie-Poisson Brackets & Conservation
For any two observables $f, g \in C^\infty(\mathcal{M})$: Because $\mathbf{J}$ is skew-symmetric ($\mathbf{J}^T = -\mathbf{J}$), the self-Poisson bracket identically vanishes:
3. Symplectic Integrators vs. Classical ODE Solvers
Standard numerical integrators (e.g. Forward Euler, standard RK4) fail to preserve the differential 2-form $\omega$. Over extended integration times, their discrete flows produce unphysical secular energy drift:
- Standard Forward Euler: Energy grows exponentially ($E(t) \to \infty$).
- Symplectic StΓΆrmer-Verlet / Forest-Ruth: Preserves symplectic area $\oint_{\partial S} \mathbf{p} \cdot d\mathbf{q} = \text{const}$. Energy oscillations are strictly bounded within a compact band around a shadow Hamiltonian $\tilde{\mathcal{H}}$.
Vault Contents & Modules
vault_hnn/
βββ MANIFEST.json # Cryptographic SHA-256 integrity manifest
βββ README.md # Theoretical foundations and API reference
βββ src/
β βββ hamiltonian_neural_network.py # SymplecticSpace, HamiltonianMLP, analytical Poisson brackets
β βββ symplectic_integrator.py # Symplectic Euler, StΓΆrmer-Verlet, Forest-Ruth 4th order, RK4
β βββ poincare_section.py # Transverse cross-section extractor & KAM torus classifier
βββ benchmarks/
βββ eval_hnn_conservation.py # Zero-divergence & energy drift verification test suite
Verification & Execution
Run the research benchmark suite directly:
python benchmarks/eval_hnn_conservation.py
Verified Benchmark Outputs:
- Self Poisson Bracket ${H, H}$: Identically zero to machine precision ($< 10^{-12}$).
- Symplectic Verlet Max Drift (1,000 steps): $0.25%$ (strictly bounded).
- Standard Euler Drift (1,000 steps): $> 2 \times 10^4%$ (catastrophic numerical explosion).
- PoincarΓ© Section Crossings: Accurate hyperplane interpolation on $\Sigma = { q_1 = 0, p_1 > 0 }$.
Developed by Ramprasad Atluri (At1uri).