Anchored Neural Lyapunov Certificate
Implementation & benchmark of arXiv:2608.17290 — Universal Approximation of Maximal Lyapunov Functions with Anchored Neural Networks
Source paper: Universal Approximation of Maximal Lyapunov Functions with Anchored Neural Networks arXiv:2608.17290 ⓘ · analyzed Sep 1, 2026
AI-generated research hypothesis, automatically tested. Not peer-reviewed.
Idea description
Replace an unconstrained scalar MLP certificate with an anchored positive-definite network whose value and gradient are fixed at the equilibrium. Train it so that its Lie derivative along a neural or physical vector field is strictly negative on a prescribed region of attraction. The construction makes stability robust to approximation error: a certificate remains valid whenever the value, gradient, and Lie-derivative errors stay below the target's strict-decrease margin.
Formulas
Mathematical statement
Let f: R^n to R^n be a continuously differentiable vector field with equilibrium f(0)=0, and let phi(t,x) be its flow. The domain of attraction is A={x: phi(t,x) tends to 0 as t tends to infinity}. A maximal Lyapunov function U is positive definite, proper on A, and satisfies L_f U(x)=D U(x) f(x)<0 for every x not equal to 0. Use the anchored family V_theta(x)=||x||^2 exp(g_theta(x)), where g_theta is an MLP. This gives V_theta(0)=0, V_theta(x)>0 for x not equal to 0, and D V_theta(0)=0. On a compact annular set K contained in A excluding the origin, assume U(x)>=m_V>0 and -L_f U(x)>=m_D>0. If ||V_theta-U||_{C^1(K)}<=epsilon, then positivity is preserved for epsilon<m_V, and strict decrease is preserved when epsilon times sup_{x in K}||f(x)|| is less than m_D, because |L_f(V_theta-U)| is at most ||D(V_theta-U)|| times ||f||.
Implementation notes
1. Exact integration point: use this network as a certificate for a learned dynamics model f_hat_psi, a neural ODE x_dot=f_hat_psi(x), or a policy-controlled system x_dot=f(x,pi_omega(x)). Give the certificate MLP g_theta the normalized state coordinates used by the dynamics model. Compute V_theta(x)=||x||^2 exp(g_theta(x)); this removes the need to separately enforce V(0)=0 or positivity away from the equilibrium. 2. Pseudocode: sample states x_i from a ball or replay buffer, excluding a small radius around zero; compute V_i=||x_i||^2 exp(g_theta(x_i)), d_i=gradient_x V_theta(x_i) transpose f_psi(x_i) using automatic differentiation, and optimize L=L_task+lambda_D mean([d_i+alpha||x_i||^2]_+^2)+lambda_fit mean[(V_i-U_i)^2]. If no target U is available, omit the fitting term and normalize V using mean[V_i]=1 on a reference annulus. Reject or backtrack a dynamics or controller update when the empirical decrease margin becomes nonpositive. 3. Computed exactly: V_theta, its gradient, and the Lie derivative are obtained by autodiff; f_psi is either the known plant or the current learned model. Estimated empirically: m_V=min_i V_i, m_D=-max_i d_i, F_K=max_i||f(x_i)||, and the C1 approximation error. Use dense validation samples, perturbations, or interval bounds to detect unsampled violations. 4. First cheap experiment: use the two-dimensional nonlinear stable system x_dot_1=-x_1+x_2^2 and x_dot_2=-2x_2, for which a quadratic Lyapunov function can be constructed, and compare an unconstrained scalar MLP against the anchored network on an annulus K={x:rho<=||x||<=R}. Sweep certificate loss weight and network width, then inject parameter noise or fit the certificate from finite samples. The quantitative prediction is a certification boundary: violations should become likely when the measured gradient error exceeds approximately m_D/F_K; below this threshold, the validation fraction with d_i>=0 should remain near zero. For increasing R, the certified sublevel region should expand until the domain-of-attraction boundary, while the minimum Lie-derivative margin should decrease toward zero.
Verification
Stage 1 · Toy mechanism gate: Passed ✓
Stage 2 · Mechanism transferred to benchmark: Not reproduced ✗
Stage 2 · Practical benchmark result: No measurable effect
Methodology: 8 paired seeds, permutation test (p<0.05) against a learning-rate-tuned baseline. How verification works
Stage 1 — Mechanism check agent confidence 8/10
Built an anchored certificate V(x)=||x||² exp(g(x)) with autodiff Lie derivatives and compared it to an unconstrained MLP on the prescribed nonlinear stable system. The exact anchor check gave V(0)=0 and ||DV(0)||=0; the positivity boundary appeared at epsilon/m_V≈1.0, and the adversarial Lie-derivative transition was observed at epsilon≈0.2799 versus the conservative guaranteed bound m_D/F_K≈0.0199. In training, the anchored model had zero nonpositive values and zero Lie-derivative violations, while the baseline had 1.67% nonpositive values, so the mechanism showed a real positivity benefit, although the derivative bound was highly conservative.
- Agent confidence
- 8/10
- Baseline
- Unconstrained MLP: min V=-0.02920, fraction V<=0=0.01673, fraction Lie derivative >=0=0, minimum -Lie derivative=0.05332.
- Idea
- Anchored V: min V=0.02254, fraction V<=0=0, fraction Lie derivative >=0=0, minimum -Lie derivative=0.04512; anchor V(0)=0 and ||DV(0)||=0. Gradient-error guarantee m_D/F_K=0.01992, observed adversarial onset between 0.27891 and 0.27991; positivity onset at epsilon/m_V≈1.
Limitations: Only a two-dimensional known stable plant and one annulus were tested; no learned dynamics, controller, uncertainty, interval certification, sublevel-region expansion, or wall-clock/FLOP comparison was evaluated. The derivative perturbation sweep used a constructed worst-direction perturbation and dense Monte Carlo samples rather than formal interval bounds.
How to run: python3 experiment.py
Stage 2 — Benchmark vs. tuned baseline (arXiv:2608.17290)
No significant difference vs. the tuned baseline (0 metric points, p=0.9207, wins 3 / 8 paired seeds).
- Benchmark
- Dynamics forecasting
- Model
- rnn_small
- Paired seeds
- 8
- Baseline mean
- 0
- Idea mean
- 0.0009
- Effect (Δ)
- 0 (n/a; negative = idea better)
- Wins
- 3 / 8 paired seeds
- p-value
- 0.9207 (permutation test, 20 000 shuffles)
- Smallest detectable effect
- n/a
- Mechanism
- Not confirmed ✗
- Practical effect
- No effect
- Baseline tuning
- swept over 6 configs
Only the built-in controlled damped-pendulum dynamics track was tested. The benchmark used a compact finite-state penalty based on the last observed state, not a learned vector-field certificate over a dense certified region; no interval bounds, controller retraining, longer horizons, or additional dynamics datasets were evaluated.
How to run: python3 bench_anchored_lyapunov.py
Verdict computed by deterministic test code from paired-seed statistics — not by the language model.
Stage 2 — Benchmark latest Failed ✗
Agent confidence: 9/10
Implemented the anchored Lyapunov certificate as an end-to-end training intervention on the structurally matched dynamics track using identical rnn_small systems. The idea did not improve test MSE: baseline mean was 0.0008831035 versus 0.0008837998 for the idea, with paired delta +6.96e-7 and permutation p=0.92075. The exact equilibrium anchor held, but validation certificates generally lacked strict decrease, so the mechanism signature was not confirmed.
- Baseline
- Best cfg lr=0.005, weight_decay=0.0001, 18 epochs; 8-seed test MSE mean=0.0008831035, std=0.0004180328.
- Idea
- Best cfg lr=0.005, weight_decay=0.0, 18 epochs; 8-seed test MSE mean=0.0008837998, std=0.0004266093; paired delta=+6.9627e-7, idea wins=3/8, p=0.92075.
- Mechanism signature
- At epsilon=0.5*(m_D/F_K), predicted violation fraction was 0, observed mean fraction was 0.1534375; mean predicted boundary m_D/F_K was -0.1328036. Anchor checks were near exact: max |V(0)|=8.88e-10 and max ||DV(0)||=1.66e-9.
Benchmark result
No significant difference vs. the tuned baseline (0 metric points, p=0.9207, wins 3 / 8 paired seeds).
- Benchmark
- Dynamics forecasting
- Model
- rnn_small
- Paired seeds
- 8
- Baseline mean
- 0
- Idea mean
- 0.0009
- Effect (Δ)
- 0 (n/a; negative = idea better)
- Wins
- 3 / 8 paired seeds
- p-value
- 0.9207 (permutation test, 20 000 shuffles)
- Smallest detectable effect
- n/a
- Mechanism
- Not confirmed ✗
- Practical effect
- No effect
- Baseline tuning
- swept over 6 configs
Only the built-in controlled damped-pendulum dynamics track was tested. The benchmark used a compact finite-state penalty based on the last observed state, not a learned vector-field certificate over a dense certified region; no interval bounds, controller retraining, longer horizons, or additional dynamics datasets were evaluated.
How to run: python3 bench_anchored_lyapunov.py
Artifacts
- bench_anchored_lyapunov.py 5.9 KB View Raw
- bench_report.json 4.3 KB View Raw
- experiment.py 5.7 KB View Raw
- report.md 1.7 KB View
- report_bench_2026-09-01T122618.md 4.8 KB View
- results.json 5.3 KB View Raw