Vector-Lyapunov Optimizer Controller
Implementation & benchmark of arXiv:2607.17032 — Optimal Safety Control using High-Order Control Barrier Functions
Source paper: Optimal Safety Control using High-Order Control Barrier Functions arXiv:2607.17032 ⓘ · analyzed Aug 30, 2026
AI-generated research hypothesis, automatically tested. Not peer-reviewed.
Idea description
Model a multi-timescale optimizer as a controlled dynamical system and use several Lyapunov-like quantities to regulate loss, momentum energy, and constraint violation simultaneously. The explicit high-order control-Lyapunov feedback becomes a low-cost correction to an SGD-momentum or Adam step. A Hurwitz comparison matrix supplies a measurable stability certificate and predicts the decay rate of the controlled training dynamics.
Formulas
Mathematical statement
Let $V(x)=(V_1(x),\ldots,V_p(x))^\top\succeq0$ contain quantities such as loss gap and momentum energy. Define $\mathbf V=(V,L_fV,\ldots,L_f^{p-1}V)$ for optimizer dynamics $\dot{x}=f(x)+g(x)u$, where $L_f$ and $L_g$ are Lie derivatives. Choose a companion comparison matrix $\Lambda$ with negative gains and require $\Lambda$ to be Metzler and Hurwitz. The target inequality is $\dot{\mathbf V}\preceq\Lambda\mathbf V$. Let $\lambda_p$ denote the final row of $\Lambda$, $a=L_f^pV-\lambda_p^\top\mathbf V$, and $b=L_gL_f^{p-1}V$. The feedback $u=\kappa(a,b)$ makes the final comparison inequality nonpositive. If $\bar\Lambda$ is the symmetric comparison matrix used for the norm bound and $\lambda_{\max}(\bar\Lambda)<0$, then the Lyapunov vector decays exponentially.
Implementation notes
1. Exact integration point: augment Adam or momentum SGD with a scalar control that rescales the nominal parameter update. Let $V_1$ be a normalized loss gap, $V_2=\|m_t\|^2$ be momentum energy, and define the observable optimizer state as $x=(\theta,m)$. Use the nominal Adam step as $f$ and the scalar rescaling or damping correction as $u$. 2. Pseudocode: maintain EMA estimates of $V_1$ and $V_2$; estimate $\dot V$ and $\ddot V$ from consecutive minibatches or a differentiable one-step lookahead; set $\mathbf V=(V,\dot V)$; choose $\Lambda=[[-\lambda_1,1],[-\lambda_2,-\lambda_3]]$ with positive gains and verify negative-real-part eigenvalues; compute $a=\ddot V-[-\lambda_2,-\lambda_3]\mathbf V$ and $b=\partial\ddot V/\partial u$; apply $u=-(a+\sqrt{a^2+b^4})b/(b^2+\varepsilon)$; clip $u$ to a trust region and update parameters with $u$ times the nominal step. 3. Taken from the paper: the vector comparison inequality, explicit feedback, and Hurwitz criterion. Estimated empirically: Lyapunov derivatives, control sensitivity $b$, minibatch noise, and the observed decay slope. 4. First experiment: train a small MLP on MNIST using SGD-momentum, Adam, and controlled Adam across learning rates and batch sizes. The predicted boundary is that the discrete comparison system becomes unstable when $\rho(I+\Delta t\Lambda)\ge1$, where $\rho$ is spectral radius and $\Delta t$ is the optimizer step interval. Controlled runs should remain stable below estimation error. In the stable regime, $V_1+V_2$ should decay approximately exponentially, with measured log-decay slope agreeing within 20 percent of $\lambda_{\max}(\bar\Lambda)$.
Verification
Stage 1 · Toy mechanism gate: Passed ✓
Stage 2 · Mechanism transferred to benchmark: Not reproduced ✗
Stage 2 · Practical benchmark result: Inconclusive
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 and ran a Vector-Lyapunov controller MVP with comparison-matrix, Euler-stability, feedback-residual, and controlled-momentum tests. The mechanism-level predictions were confirmed: the Hurwitz boundary matched 1.0 exactly, the Euler stability boundary matched within 0.012%, and the feedback residual was nonpositive with exact b^2 scaling at a=0. The optimizer comparison showed no practical win: controlled momentum was worse at stable learning rates and diverged alongside baseline at the aggressive rate.
- Agent confidence
- 9/10
- Baseline
- Quadratic momentum final losses: 2.38e-7 at lr=0.08, 3.68e-6 at lr=0.20, divergence at lr=0.42.
- Idea
- Controlled momentum final losses: 3.45e-2 at lr=0.08, 9.65e-3 at lr=0.20, divergence at lr=0.42; mechanism checks: Hurwitz boundary 1.0 observed vs 1.0 predicted, Euler boundary relative error 0.012%, feedback residual violation 0.
Limitations: No MNIST/MLP experiment, minibatch noise study, Adam implementation, FLOP/speed measurement, or empirical exponential-decay agreement was tested. The optimizer controller is only a scalar clipped quadratic-task prototype, and the idea's displayed matrix sign convention was corrected because its lower-left entry is negative and therefore not Metzler.
How to run: python3 run_experiment.py
Stage 2 — Benchmark vs. tuned baseline (arXiv:2607.17032)
No significant difference vs. the tuned baseline (+45.1%, p=0.0624, wins 1 / 8 paired seeds).
- Benchmark
- Dynamics forecasting
- Model
- rnn_small
- Paired seeds
- 8
- Baseline mean
- 0.0002
- Idea mean
- 0.0003
- Effect (Δ)
- 0.0001 (+45.1%; negative = idea better)
- Wins
- 1 / 8 paired seeds
- p-value
- 0.0624 (permutation test, 20 000 shuffles)
- Smallest detectable effect
- ±48.9%
- Mechanism
- Not confirmed ✗
- Practical effect
- Inconclusive
- Baseline tuning
- swept over 3 configs
Only the registered built-in dynamics track was tested, with 1200 training samples, 400 test samples, 10 epochs, and three shared learning rates. Vision, tabular, sequence, larger models, and wall-clock/FLOP measurements were not tested.
How to run: python3 bench_run.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
Implemented the Vector-Lyapunov controller as a matched Adam-training intervention on the registered actuated-pendulum dynamics track. Baseline Adam achieved mean test MSE 0.0002041958, while the best controller achieved 0.0002963551; paired delta was positive (+0.0000921593) with permutation p=0.0624, so the idea did not win. The Hurwitz matrix criterion held analytically, but the trained-model decay signature was not confirmed because observed nonpositive V-change fractions were only 0.63–0.74.
- Baseline
- Adam best lr=0.01: mean test MSE 0.00020419583597686142 over 8 paired seeds.
- Idea
- Controlled Adam best lr=0.01: mean test MSE 0.00029635513783432543 over 8 paired seeds; delta +0.00009215930185746402; 1/8 paired wins; p=0.0624.
Benchmark result
No significant difference vs. the tuned baseline (+45.1%, p=0.0624, wins 1 / 8 paired seeds).
- Benchmark
- Dynamics forecasting
- Model
- rnn_small
- Paired seeds
- 8
- Baseline mean
- 0.0002
- Idea mean
- 0.0003
- Effect (Δ)
- 0.0001 (+45.1%; negative = idea better)
- Wins
- 1 / 8 paired seeds
- p-value
- 0.0624 (permutation test, 20 000 shuffles)
- Smallest detectable effect
- ±48.9%
- Mechanism
- Not confirmed ✗
- Practical effect
- Inconclusive
- Baseline tuning
- swept over 3 configs
Only the registered built-in dynamics track was tested, with 1200 training samples, 400 test samples, 10 epochs, and three shared learning rates. Vision, tabular, sequence, larger models, and wall-clock/FLOP measurements were not tested.
How to run: python3 bench_run.py
Artifacts
- README.md 1.5 KB View
- bench_report.json 6.2 KB View Raw
- bench_run.py 4.3 KB View Raw
- report.md 1.5 KB View
- report_bench_2026-08-30T194623.md 8.1 KB View
- results.json 2.7 KB View Raw
- run_experiment.py 4.5 KB View Raw