{
 "artifacts": [
  {
   "name": "report.md",
   "url": "https://synthcore.org/code/1061/report.md"
  },
  {
   "name": "results.json",
   "url": "https://synthcore.org/code/1061/results.json"
  },
  {
   "name": "sos_ladder.py",
   "url": "https://synthcore.org/code/1061/sos_ladder.py"
  }
 ],
 "category": "dynamics",
 "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.",
 "download_zip": "https://synthcore.org/download/1061",
 "formulas_latex": [
  "$$\\mathcal{K}^{(r)}_n=\\left\\{A\\in\\mathcal{S}^n:\\left(\\sum_{i=1}^n x_i^2\\right)^r (x^{\\circ 2})^T A(x^{\\circ 2})\\ \\text{is SOS}\\right\\},\\qquad \\mathcal{K}^{(r-1)}_n\\subseteq\\mathcal{K}^{(r)}_n.$$",
  "$$\\varepsilon_r(M)=\\inf\\left\\{\\varepsilon\\geq 0:M+\\varepsilon D\\in\\mathcal{K}^{(r)}_n\\right\\},\\qquad \\varepsilon_r(M)\\geq\\varepsilon_{r+1}(M).$$",
  "$$q_\\theta(z)=V(z)-V(F_\\theta(z))-\\alpha\\|z\\|^{2d},\\qquad \\left(\\sum_{i=1}^n z_i^2\\right)^r q_\\theta(z)=m(z)^TQ_rm(z),\\quad Q_r\\succeq0.$$",
  "$$V(F_\\theta(z))-V(z)\\leq-\\alpha\\|z\\|^{2d}\\quad\\Longrightarrow\\quad V(z_t)\\text{ decreases along certified trajectories}.$$"
 ],
 "id": 2769,
 "implementation": "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.",
 "math_summary": "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\u003e0\\). 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.",
 "math_tags": [
  "optimization",
  "convex-analysis",
  "linear-algebra",
  "dynamical-systems",
  "control-theory"
 ],
 "ml_areas": [
  "optimizer",
  "training-dynamics",
  "regularization",
  "rnn",
  "ssm"
 ],
 "paper": {
  "arxiv_id": "2608.27743",
  "arxiv_url": "https://arxiv.org/abs/2608.27743",
  "summary_what_math_gives_to_ml": "The paper provides a constructive hierarchy of increasingly powerful sum-of-squares certificates for nonnegativity on the nonnegative orthant, together with an exact threshold method for finding robust separators between consecutive levels. Its transferable mechanism is the use of nested certificates, dual witnesses, and a monotone shift threshold to detect when a Lyapunov inequality becomes certifiable. A neural-network implementation can use low-order SOS certificates as adaptive stability monitors or regularizers, increasing the certificate level only when a weaker level fails.",
  "title": "Explicit Separators for Consecutive Levels of Parrilo's Sum-of-Squares Hierarchy over the Copositive Cone",
  "year": "2026"
 },
 "ratings": {
  "difficulty": 7,
  "novelty": 7,
  "usefulness": 8
 },
 "solves": [
  "stability",
  "generalization"
 ],
 "title": "Adaptive SOS Lyapunov Certificate Ladder",
 "url": "https://synthcore.org/idea/2769/adaptive-sos-lyapunov-certificate-ladder",
 "verification": {
  "peer_reviewed": false,
  "stage1_mechanism_check": {
   "worked": false,
   "confidence": 9,
   "verdict": "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.",
   "metrics": {
    "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."
   },
   "how_to_run": "python3 sos_ladder.py",
   "files": [
    "sos_ladder.py",
    "results.json"
   ],
   "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."
  },
  "status": "mechanism_failed",
  "status_label": "Mechanism failed",
  "updated_at": "2026-09-01T23:24:45",
  "verdict_source": "deterministic test code (paired-seed permutation statistics)"
 }
}
