✗ Mechanism failed 2026

Hamiltonian Horizon-Critical Optimizer

Implementation & benchmark of arXiv:2609.03862 — Equivalence classes of finite-time transitions in optimal control and non-equilibrium relaxation

Usefulness8/10
Difficulty6/10
Novelty8/10

Source paper: Equivalence classes of finite-time transitions in optimal control and non-equilibrium relaxation arXiv:2609.03862 ⓘ · analyzed Sep 4, 2026

AI-generated research hypothesis, automatically tested. Not peer-reviewed.

Idea description

Replace a fixed first-order parameter update by a finite-horizon controlled local model for each important curvature mode of the network. The optimizer computes the Hamiltonian flow and its Riccati feedback gain; if the chosen horizon approaches a conjugate point, it shortens the horizon or increases control cost before the gain becomes singular. This converts the paper's finite-time transition into a measurable trust-region and scheduling mechanism for neural training.

Formulas

$$\dot{x}=a x+b u,\qquad J=\frac{p_f}{2}x(t_f)^2+\frac12\int_0^{t_f}\left(qx(t)^2+r u(t)^2\right)dt$$
$$\frac{d}{dt}\begin{bmatrix}x\\p\end{bmatrix}=H\begin{bmatrix}x\\p\end{bmatrix},\qquad H=\begin{bmatrix}a&-b^2/r\\-q&-a\end{bmatrix},\qquad \det H=\frac{b^2q}{r}-a^2$$
$$P(t)=\frac{M_{21}(T)+M_{22}(T)p_f}{M_{11}(T)+M_{12}(T)p_f},\qquad M(T)=e^{HT},\qquad u(t)=-\frac{b}{r}P(t)x(t)$$
$$D(T)=M_{11}(T)+M_{12}(T)p_f=0\quad\text{defines the finite-time transition or conjugate point}$$

Mathematical statement

For a local scalar parameter mode x with approximate dynamics \(\dot{x}=a x+b u\), use the finite-horizon quadratic objective \(J=\frac12 p_f x(t_f)^2+\frac12\int_0^{t_f}(q x(t)^2+r u(t)^2)\,dt\), where \(a\) is estimated local drift, \(b\) is control effectiveness, \(q\ge 0\) penalizes deviation, \(r>0\) penalizes update magnitude, and \(p_f\ge0\) is a terminal penalty. Pontryagin's equations are \(\frac{d}{dt}[x,p]^T=H[x,p]^T\), with \(H=\begin{bmatrix}a&-b^2/r\\-q&-a\end{bmatrix}\). The determinant \(\det H=b^2q/r-a^2\) classifies the local flow: positive determinant gives oscillatory or elliptic behavior, negative determinant gives hyperbolic behavior, and zero determinant is parabolic. Let \(M(T)=\exp(HT)\), \(T=t_f-t\), and impose \(p(t_f)=p_f x(t_f)\). The induced Riccati gain is \(P(t)=(M_{21}(T)+M_{22}(T)p_f)/(M_{11}(T)+M_{12}(T)p_f)\), with control \(u(t)=-(b/r)P(t)x(t)\). A conjugate-point transition occurs when \(D(T)=M_{11}(T)+M_{12}(T)p_f=0\); the optimizer should remain on the side where \(D(T)>0\) and the gain is finite.

Implementation notes

1. Integration point: use this as an optimizer wrapper around SGD or Adam on a small set of approximately independent parameter or curvature modes. Every K steps, obtain a diagonal or block-diagonal Hessian estimate \(\hat{\lambda}_i\) using one Hutchinson Hessian-vector product or a Lanczos pass. Represent the deviation of mode i from its local target by \(x_i\), set \(a_i=-\hat{\lambda}_i\), \(b_i=1\), \(q_i=\max(\hat{\lambda}_i,\epsilon)\), choose \(r_i\) from the squared gradient-noise scale, and set terminal penalty \(p_{f,i}=q_i\). 2. Pseudocode: estimate \(a_i,q_i,r_i\); construct \(H_i=[[a_i,-1/r_i],[-q_i,-a_i]]\); compute \(M_i=\exp(H_i T)\) for the proposed horizon T; compute \(D_i=M_{11}+M_{12}p_{f,i}\). If any \(D_i<\delta\), reduce T by multiplying it by 0.8 or increase \(r_i\) until all denominators exceed \(\delta\). Compute \(P_i=(M_{21}+M_{22}p_{f,i})/D_i\), then apply the controlled update \(\Delta\theta_i=-\eta_i(b_i/r_i)P_i x_i\), with the ordinary gradient direction used to define x_i or u_i in the full vector implementation. For a practical version, use the feedback multiplier \(g_i=(b_i/r_i)P_i\) on the Adam update. 3. Computed versus estimated: matrix exponentials and \(D_i\) are computed exactly for the estimated local quadratic model; \(a_i\), Hessian curvature, and noise-derived \(r_i\) are empirical estimates. Use clipping only as a safety fallback, not as the primary stabilization mechanism. 4. First cheap experiment: train a 2-layer MLP on MNIST or Fashion-MNIST with SGD, Adam, and this method, using a 20- to 100-dimensional Lanczos subspace rather than all parameters. Sweep T logarithmically and record loss, gradient norm, feedback gain, and \(\min_i D_i\). The quantitative prediction is a sharp optimizer transition when \(\min_i D_i\) approaches zero: gain variance and gradient excursions should rise sharply, while adaptive horizon control should prevent divergence. In the elliptic regime, the first singularity should occur near the zero of the analytically computed \(D_i(T)\), with measured instability threshold within 20%; away from the boundary, controlled training should exhibit lower loss oscillation than fixed-horizon SGD at matched update norm.

Verification

Mechanism failed

Stage 1 · Toy mechanism gate: Failed ✗

Stage 2 · Mechanism transferred to benchmark: Not tested

Stage 2 · Practical benchmark result: Not run

Methodology: Toy-system gate first; the benchmark stage runs only after a pass. How verification works

Stage 1 — Mechanism check agent confidence 9/10

Built the Hamiltonian feedback implementation, conjugate-point diagnostic, quadratic optimizer comparison, and digits MLP mini-test in experiment.py. The core math claim fails as written: det([[a,-b²/r],[-q,-a]]) = -a²-b²q/r, not b²q/r-a², so q>=0 cannot produce the stated elliptic regime. A hyperbolic D(T)=0 crossing was numerically observed near the predicted 0.17698 horizon, but both fixed-horizon and nominally adaptive feedback diverged on the quadratic; the MLP gain result is not evidence of a fair optimizer win because it used a fixed common 4.73x gradient scaling.

Agent confidence
9/10
Baseline
Digits SGD: final train loss 0.7375, test accuracy 0.9000; quadratic final loss 1.37e-9, no divergence.
Idea
Digits feedback-scaled SGD: final train loss 0.1820, test accuracy 0.9622, but used fixed multiplier 4.729; quadratic fixed horizon diverged (NaN), adaptive horizon also diverged (NaN), with adaptive min_D 0.0858.
Math
For a=-1,b=1,q=1,r=0.2, stated determinant=4.0 versus actual determinant=-6.0; predicted hyperbolic conjugate T=0.17698 and numerical grid crossing=0.176.

Limitations: Only a tiny diagonal quadratic and sklearn digits MLP were tested; no Hessian-vector/Lanczos curvature estimates, Adam comparison, matched-FLOP or matched-update-norm evaluation, horizon sweep, repeated seeds, or corrected Hamiltonian sign convention was tested.

How to run: python3 experiment.py

Verdict computed by deterministic test code from paired-seed statistics — not by the language model.

Artifacts

Implementation overview ⬇ Download all as ZIP 3 files · code, reports and structured results