# A Physics-Inspired Classical Digital Twin of Cortical Dynamics: A Band-Stratified Metriplectic Port-Hamiltonian Neural Network Learned from Brain-Computer-Interface EEG

arXiv: https://arxiv.org/abs/2607.10439 · HTML: https://mlsanity.com/paper/2607.10439/

## Key facts

- No citing papers in the map yet (data through 14 Oct 2026).
- Builds on 4 of its 34 references that are in the map.
- First posted on arXiv 11 Jul 2026.

## Builds on (most cited first, 4 of 4)

- [Fourier Neural Operator for Parametric Partial Differential Equations](https://mlsanity.com/paper/2010.08895/) (2020)
- [Hamiltonian Neural Networks](https://mlsanity.com/paper/1906.01563/) (2019)
- [The frontier of simulation-based inference](https://mlsanity.com/paper/1911.01429/) (2019)
- [Dissipative SymODEN: Encoding Hamiltonian Dynamics with Dissipation and Control into Deep Learning](https://mlsanity.com/paper/2002.08860/) (2020)

## Abstract (arXiv)

We present a physics-inspired classical digital twin of brain-computer- interface (BCI) data: a graph neural network constrained to a band-stratified, metriplectic port-Hamiltonian form, with parameters learned from scalp EEG recorded during rest and motor imagery. The port-Hamiltonian structure is a modelling choice - it buys passivity, a certified steady-state power balance, and a clean separation of storage, routing and dissipation - not a claim about what the brain is. The state pairs each channel's instantaneous phase with its angular frequency, and stored energy decomposes over the five canonical frequency bands. A phase-locking prior measured from the same recordings gates the learned connectome, and a metriplectic formulation places the twin at a non- equilibrium steady state sustained by a metabolic port. Fitted to 1,109,250 phasor samples from the PhysioNet EEG Motor Movement/Imagery database under a leakage-free split, the twin reaches a held-out reconstruction error of 1.30×10-4. Scored free-running against invariants it did not author, the verdict is mixed: it reproduces near-critical avalanche branching (σ≈1) but not the aperiodic 1/f slope or the long-range temporal correlations of the recordings. Skew-symmetry and non-negative dissipation hold by construction rather than by penalty, making the twin a structure-preserving substrate on which closed-loop neuromodulation can be designed and tested.
