Port-Hamiltonian Neural ODE / report.md
Mechanism confirmed, baseline not beaten
Эксперимент: Port-Hamiltonian Neural ODE (#1075)
{ "worked": true, "confidence": 9, "verdict": "Built a port-Hamiltonian neural vector field with exact skew-symmetric J=A-A^T, PSD R=LL^T+epsilon I, and an autograd-computed learned energy gradient. The mechanism manifested: skew residual was exactly 0, the minimum R eigenvalue stayed at or above epsilon=0.03, and the continuous energy identity matched numerically to 3.3e-16 with no positive derivatives. The dissipation sweep confirmed the predicted quadratic dependence on factor scale, and the PH model had lower long-horizon RMSE than the unconstrained baseline, though with higher parameter count and training cost.", "metrics": { "baseline": "Unconstrained neural vector field: long-horizon RMSE 0.5380; 1,218 parameters; training time 0.561 s.", "idea": "Port-Hamiltonian neural ODE: long-horizon RMSE 0.1530; 3,757 parameters; training time 2.724 s; maximum skew residual 0; minimum R eigenvalue 0.030000; energy identity residual 3.33e-16; RK4 energy increases 0.", "predictions": "J antisymmetry predicted exact and observed maximum residual 0. R eigenvalue predicted >= epsilon=0.03 and observed minimum 0.0300000. Dissipation dH/dt was predicted affine in lambda^2: slope -19.3686 predicted versus -19.4580 observed." }, "how_to_run": "/home/maxwelhelp/main/bin/python3 experiment.py", "files": [ "experiment.py" ], "limitations": "Only a small 2D damped nonlinear oscillator was tested, with fixed-step RK4, short training, and unequal parameter counts. Adaptive solvers, forced balance residuals, a standard Hamiltonian baseline, FLOP-matched training, and larger datasets were not tested. Discrete RK4 energy non-increase is empirical rather than an unconditional guarantee." }