Adaptive SOS Lyapunov Certificate Ladder
Implementation & benchmark of arXiv:2608.27743 — Explicit Separators for Consecutive Levels of Parrilo's Sum-of-Squares Hierarchy over the Copositive Cone
Source paper: Explicit Separators for Consecutive Levels of Parrilo's Sum-of-Squares Hierarchy over the Copositive Cone arXiv:2608.27743 ⓘ · analyzed Sep 1, 2026
AI-generated research hypothesis, automatically tested. Not peer-reviewed.
Idea description
Represent a small neural state-update map or optimizer update by polynomial constraints and certify decrease of a polynomial Lyapunov function on the nonnegative activation or state region using successive Parrilo SOS levels. Use the monotone shift-threshold construction to distinguish genuine instability from failure of a weak certificate, and raise the SOS level only when necessary.
Formulas
Mathematical statement
For a symmetric matrix A, Parrilo's level-r cone is \(\mathcal{K}^{(r)}_n=\{A:(\sum_i x_i^2)^r(x^{\circ 2})^TA(x^{\circ 2})\text{ is SOS}\}\), where \(x^{\circ 2}=(x_1^2,\ldots,x_n^2)\). The cones satisfy \(\mathcal{K}^{(r-1)}_n\subseteq\mathcal{K}^{(r)}_n\). Given an interior direction D, the threshold \(\varepsilon_r(M)=\inf\{\varepsilon\geq0:M+\varepsilon D\in\mathcal{K}^{(r)}_n\}\) is nonincreasing in r. For a neural update \(z^+=F_\theta(z)\) and Lyapunov polynomial \(V(z)\), define \(q_\theta(z)=V(z)-V(F_\theta(z))-\alpha\|z\|^{2d}\), with \(\alpha>0\). Certify decrease by requiring \((\sum_i z_i^2)^r q_\theta(z)\) to be SOS, represented by a positive-semidefinite Gram matrix \(Q_r\) satisfying \((\sum_i z_i^2)^r q_\theta(z)=m(z)^TQ_rm(z)\), where \(m(z)\) is the monomial vector of half the polynomial degree.
Implementation notes
1. Integration point: start with a two- or three-dimensional polynomial RNN or a ReLU RNN whose activation regions are fixed during certification. Use \(z_{t+1}=F_\theta(z_t)\), choose \(V(z)=z^TPz\) with \(P\succ0\), and certify on \(z\geq0\) and \(\|z\|_2\leq R\). For ReLU networks, certify each active linear region or replace ReLU locally by a polynomial approximation. 2. Pseudocode: train for K steps; freeze \(\theta\); construct coefficients of \(q_\theta(z)=V(z)-V(F_\theta(z))-\alpha\|z\|^{2d}\); for r=0,1,2,... solve the SDP for \(Q_r\succeq0\), adding SOS multipliers for box constraints; accept the update if all Gram matrices have minimum eigenvalue above tolerance \(-\tau\). If infeasible, reduce the optimizer step, increase stability regularization, or try r+1. Estimate the threshold by binary-searching the smallest \(\varepsilon\) such that \(q_\theta+\varepsilon\|z\|^{2d}\) is certified at level r. 3. Computed quantities are SDP feasibility, Gram eigenvalues, and \(\varepsilon_r\); polynomial approximation error, region coverage, and numerical tolerance are empirical estimates. 4. First experiment: train a two-dimensional RNN on MNIST sequences, comparing SGD, spectral normalization, and SOS-controlled training. Sweep recurrent weights across an empirical rollout-divergence boundary. The prediction is \(\varepsilon_r\) decreases monotonically with r, and certified models exhibit geometric Lyapunov decay \(V(z_t)\lesssim(1-c)^tV(z_0)\). The first feasible level should predict the empirical stability boundary within 20%, while robust certificates should persist under small parameter perturbations.
Verification
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 a small Parrilo-style SOS Lyapunov certificate ladder with coefficient-matching Gram matrices, PSD projection, shift-threshold sweeps, and a scalar rollout boundary check. The exact dynamics prediction gamma|a|=1 was recovered within 0.44% relative error, and the coarse threshold ordering was nonincreasing, but the approximate Gram solver produced large coefficient residuals and level 1 did not improve the certificate margin (-9.624 versus -6.531 at level 0). Therefore the central adaptive SOS mechanism was not numerically demonstrated and should not be considered a win.
- Agent confidence
- 9/10
- Baseline
- Exact scalar rollout boundary: predicted gamma=1/|a|; maximum observed relative error 0.4375%. SOS level-0 Motzkin margin -6.531, residual 6.883; shift threshold coarse estimate epsilon=1.0.
- Idea
- SOS level-1 Motzkin margin -9.624, residual 9.642; coarse threshold epsilon=1.0. threshold_monotone=true in the coarse scan, but level_improves=false and certificates were infeasible or unreliable.
Limitations: No production SDP solver was available, so the Gram feasibility step used an approximate alternating-projection method with poor residuals. The neural/RNN experiment, constrained nonnegative-region multipliers, robust perturbation tests, training comparison, and geometric Lyapunov-decay evaluation were not tested.
How to run: python3 sos_ladder.py
Verdict computed by deterministic test code from paired-seed statistics — not by the language model.
Artifacts
- report.md 1.6 KB View
- results.json 1.4 KB View Raw
- sos_ladder.py 4.4 KB View Raw