Cubic-Rate Third-Order Langevin Optimizer
Implementation & benchmark of arXiv:2607.20882 — An Eyring--Kramers Law for the Hypoelliptic Third-Order Langevin Diffusion
Source paper: An Eyring--Kramers Law for the Hypoelliptic Third-Order Langevin Diffusion arXiv:2607.20882 ⓘ · analyzed Aug 30, 2026
AI-generated research hypothesis, automatically tested. Not peer-reviewed.
Idea description
Replace the usual parameter-plus-momentum Langevin state with a three-level chain consisting of parameters, velocity, and acceleration, while injecting Gaussian noise only into the highest auxiliary state. At a saddle, the escaping direction has a positive rate given by a cubic characteristic equation; use this rate to choose damping or adapt the temperature so that basin escape is accelerated without making the dynamics unstable.
Formulas
Mathematical statement
The paper defines the Gibbs target $\pi_{\varepsilon}^{\theta}(d\theta)=Z_{\varepsilon}^{-1}e^{-U(\theta)/\varepsilon}d\theta$, where $U:\mathbb{R}^{d}\to\mathbb{R}$ is the objective, $\varepsilon>0$ is temperature, and $Z_{\varepsilon}$ is the normalizing constant. It contrasts this with overdamped Langevin, $d\theta_t=-\nabla U(\theta_t)dt+\sqrt{2\varepsilon}dB_t$, where $B_t$ is standard Brownian motion. The transferable adaptation is the third-order chain $dx_t=v_tdt$, $dv_t=a_tdt$, $da_t=-\nabla U(x_t)dt-\gamma a_tdt+\sqrt{2\gamma\varepsilon}\,dB_t$, with parameter $x_t$, velocity $v_t$, acceleration $a_t$, damping $\gamma>0$, and Brownian motion $B_t$. Linearizing along a Hessian eigenvector with eigenvalue $h$ gives the characteristic polynomial $p_h(\lambda)=\lambda^3+\gamma\lambda^2+h$. At an index-one saddle, $h=-\kappa<0$, so the unique positive unstable rate $r(\gamma,\kappa)$ satisfies $r^3+\gamma r^2-\kappa=0$. The paper also gives the weak capacity-hitting identity $\int_{\partial A_\varepsilon}\mathbb{E}_z[\tau_{S_\varepsilon}]\nu_\varepsilon(dz)=\operatorname{Cap}_\varepsilon(A_\varepsilon,S_\varepsilon)^{-1}\int h_\varepsilon^*(z)\pi_\varepsilon(dz)$, where $A_\varepsilon$ and $S_\varepsilon$ are source and target wells, $\tau_{S_\varepsilon}$ is a hitting time, $h_\varepsilon^*$ is the adjoint committor, $\nu_\varepsilon$ is the weak equilibrium measure, and $\operatorname{Cap}_\varepsilon$ is weak capacity. Its intrawell asymptotic is $\int h_\varepsilon^*d\pi_\varepsilon\sim Z_\varepsilon^{-1}(2\pi\varepsilon)^{3d/2}[L^d\sqrt{\det\nabla^2U(m)}]^{-1}e^{-U(m)/\varepsilon}$, where $m$ is a local minimum and $L$ is a kinetic normalization constant. The implementation uses the cubic unstable rate as a local curvature-aware integration and escape diagnostic; the full capacity prefactor is not assumed to transfer exactly to minibatch training.
Implementation notes
Integrate the method into the optimizer state update, replacing SGD with momentum or Adam's single velocity tensor by two fp32 tensors $v$ and $a$ matching the parameter shapes. For each minibatch, compute $g=\nabla_x\ell(x)$ and use it as an estimate of $\nabla U(x)$. With step size $dt$, damping $\gamma$, and temperature $\varepsilon$, use the following update: sample $\xi\sim\mathcal{N}(0,I)$; set $a\leftarrow a+dt(-g-\gamma a)+\sqrt{2\gamma\varepsilon dt}\,\xi$; set $v\leftarrow v+dt\,a$; set $x\leftarrow x+dt\,v$. Noise must enter only the acceleration state. Weight decay can be applied separately to $g$, and gradient clipping should be tested only as a controlled stability baseline. Every $K$ optimizer steps, estimate the most negative local curvature using 3--5 Hessian-vector products and a small Lanczos iteration. If the smallest estimated Hessian eigenvalue is $\lambda_{\min}$, define $\kappa=\max(0,-\lambda_{\min})$. Solve $r^3+\gamma r^2-\kappa=0$ by bisection on $[0,\kappa^{1/3}+\sqrt{\kappa/\gamma}+1]$, or use Newton iteration initialized at $\max(\kappa^{1/3},10^{-3})$. Enforce $dt\,r\leq0.2$ for explicit integration; reduce $dt$ when this bound is violated. A more ambitious controller changes $\gamma$ to target $dt\,r\approx0.1$. The SDE and cubic relation come from the paper; the curvature estimate and damping controller are empirical adaptations. Begin with a small MLP on a synthetic four-well objective or two-dimensional moons classification, then test a small ResNet on CIFAR-10. Match all methods by gradient evaluations and wall-clock time against SGD, SGD with momentum, and underdamped Langevin. Record loss descent, escape time from deliberately poor basins, parameter-norm growth, gradient variance, and test accuracy across at least 20 seeds. Success is faster escape or lower loss at equal compute without exploding $\|a\|$; failure is loss divergence, NaNs, or no improvement over momentum after tuning.
Verification
Stage 1 · Toy mechanism gate: Passed ✓
Stage 2 · Mechanism transferred to benchmark: Not reproduced ✗
Stage 2 · Practical benchmark result: Significantly worse ✗
Methodology: 8 paired seeds, permutation test (p<0.05) against a learning-rate-tuned baseline. How verification works
Stage 1 — Mechanism check agent confidence 9/10
Built a PyTorch third-order Langevin optimizer with velocity and acceleration states, acceleration-only Gaussian noise, cubic-rate solver, and optional curvature-based step-size limiting. The mechanism checks succeeded: measured unstable rates matched the cubic root within 0.04%, curvature-scaling slopes matched (0.33730 observed vs 0.33720 predicted), rates increased monotonically with negative curvature, and dt·r≈0.2 produced only 5.66% rate error. The optimizer did not win the toy MLP benchmark: momentum reached loss 0.0516 versus 1.7160 for third-order Langevin after 300 steps.
- Agent confidence
- 9/10
- Baseline
- Momentum SGD: final loss 0.0516, accuracy 99.17%, 0.529 seconds; plain SGD: final loss 0.2256, accuracy 94.34%.
- Idea
- Third-order Langevin: final loss 1.7160, accuracy 51.32%, 1.030 seconds. Mechanism: fixed-rate relative error 0.034%; observed versus predicted scaling slope 0.33730 versus 0.33720; dt*r=0.197 yielded 5.66% rate error.
Limitations: Only a scalar linearized saddle and one small synthetic full-batch MLP were tested; no 20-seed study, minibatch training, CIFAR-10, Hessian-vector-product curvature estimator, adaptive damping controller, sampling-distribution validation, or systematic hyperparameter tuning was performed.
How to run: python3 verify_cubic_langevin.py && /home/maxwelhelp/main/bin/python3 benchmark_mlp.py
Stage 2 — Benchmark vs. tuned baseline (arXiv:2607.20882)
Significantly WORSE than the tuned baseline (+2971.8%, p=0.0081, wins 0 / 8 paired seeds).
- Benchmark
- Tabular regression (Friedman)
- Model
- mlp_tiny
- Paired seeds
- 8
- Baseline mean
- 7.1832
- Idea mean
- 220.6534
- Effect (Δ)
- 213.4702 (+2971.8%; negative = idea better)
- Wins
- 0 / 8 paired seeds
- p-value
- 0.0081 (permutation test, 20 000 shuffles)
- Smallest detectable effect
- ±85.5%
- Mechanism
- Not confirmed ✗
- Practical effect
- Hurts
- Baseline tuning
- swept over 6 configs
Only the structurally appropriate built-in tabular optimizer track was run. No vision, sequence, or dynamics track was tested; no Hessian-vector curvature controller or nonzero-temperature escape experiment was included in the official round.
How to run: python3 stage2_official_bench.py
Verdict computed by deterministic test code from paired-seed statistics — not by the language model.
Stage 2 — Benchmark latest Failed ✗
Agent confidence: 10/10
The official registered tabular track was run with the matched mlp_tiny architecture, an 8-seed paired evaluation, and a tuned Adam baseline sweep. The best third-order configuration reached test MSE 220.653 versus 7.183 for the baseline; delta_mean was +213.470 and p=0.0081, yielding the official verdict idea worse (significant). The mechanism signature was not confirmed and the idea did not transfer successfully.
- Baseline
- Adam via official bench.train_model, lr=0.01, weight_decay=0.0001; full 8-seed mean test MSE 7.183188855648041.
- Comparison
- delta_mean=213.4701982140541; idea_wins=0/8; permutation p_value=0.0081; verdict=idea worse (significant).
- Idea
- Third-order Langevin, dt=0.003, gamma=1.0, temperature=0; full 8-seed mean test MSE 220.65338706970215.
Benchmark result
Significantly WORSE than the tuned baseline (+2971.8%, p=0.0081, wins 0 / 8 paired seeds).
- Benchmark
- Tabular regression (Friedman)
- Model
- mlp_tiny
- Paired seeds
- 8
- Baseline mean
- 7.1832
- Idea mean
- 220.6534
- Effect (Δ)
- 213.4702 (+2971.8%; negative = idea better)
- Wins
- 0 / 8 paired seeds
- p-value
- 0.0081 (permutation test, 20 000 shuffles)
- Smallest detectable effect
- ±85.5%
- Mechanism
- Not confirmed ✗
- Practical effect
- Hurts
- Baseline tuning
- swept over 6 configs
Only the structurally appropriate built-in tabular optimizer track was run. No vision, sequence, or dynamics track was tested; no Hessian-vector curvature controller or nonzero-temperature escape experiment was included in the official round.
How to run: python3 stage2_official_bench.py
Artifacts
- bench_report.json 4.6 KB View Raw
- benchmark_mlp.py 1.8 KB View Raw
- benchmark_results.json 1.1 KB View Raw
- report.md 1.7 KB View
- report_bench_2026-08-31T153402.md 4.3 KB View
- results.json 3.7 KB View Raw
- stage2_local_bench.py 5.6 KB View Raw
- stage2_official_bench.py 4.9 KB View Raw
- third_order_optimizer.py 3.4 KB View Raw
- verify_cubic_langevin.py 3.8 KB View Raw