Lyapunov-Certified Policy Training
Implementation & benchmark of arXiv:2608.29303 — Learning neural controllers for nonlinear systems from data
Source paper: Learning neural controllers for nonlinear systems from data arXiv:2608.29303 ⓘ · analyzed Sep 1, 2026
AI-generated research hypothesis, automatically tested. Not peer-reviewed.
Idea description
Train a neural policy together with a positive neural Lyapunov function so that the learned closed-loop transition decreases the function at every sampled state in a prescribed operating region. This converts policy learning from an unconstrained reward problem into a constrained dissipativity problem and provides an inference-time monitor that can reject or damp actions when the certificate is violated.
Formulas
Mathematical statement
Let $x\in\mathbb{R}^{n}$ be the state, $u=\pi_{\theta}(x)$ the neural controller with parameters $\theta$, and $\hat f_{\phi}(x,u)$ the identified one-step dynamics model with parameters $\phi$. Let $V_{\psi}(x)$ be a neural Lyapunov candidate with parameters $\psi$, equilibrium $x^{\star}$, and region $\mathcal{X}$. Enforce $V_{\psi}(x^{\star})=0$, $V_{\psi}(x)\geq c_{1}\|x-x^{\star}\|_{2}^{2}$, and $V_{\psi}(\hat f_{\phi}(x,\pi_{\theta}(x))) - V_{\psi}(x)\leq -c_{2}\|x-x^{\star}\|_{2}^{2}$ for all $x\in\mathcal{X}$, where $c_{1},c_{2}>0$. The decrease inequality implies geometric decay of the sampled closed-loop energy when the dynamics are discrete-time. In practice, optimize hinge penalties for violations and periodically verify the inequalities over boxes or a sampled state set; the certified subset is the set on which all inequalities hold.
Implementation notes
1. Integration point: use this in model-based RL, recurrent world-model rollout training, or any neural state-transition module where stability of generated trajectories matters. Maintain three networks: a dynamics model $\hat f_{\phi}$, policy $\pi_{\theta}$, and Lyapunov network $V_{\psi}$. Parameterize $V_{\psi}(x)=\|g_{\psi}(x)-g_{\psi}(x^{\star})\|_{2}^{2}+\epsilon\|x-x^{\star}\|_{2}^{2}$ with $\epsilon>0$ to make positivity automatic. 2. Pseudocode: sample states $x$ from replay data and perturbations around the equilibrium; compute $u=\pi_{\theta}(x)$, $x^{+}=\hat f_{\phi}(x,u)$, and $dV=V_{\psi}(x^{+})-V_{\psi}(x)$; add the two hinge terms in the displayed loss; update $\theta,\psi$ jointly and update $\phi$ using the transition prediction loss. Every $K$ steps, freeze the networks and test $V(x)>0$ and $dV+c_{2}\|x-x^{\star}\|^{2}\leq0$ on a dense grid or interval boxes. 3. Computed quantities are the one-step model prediction, Lyapunov values, and violation margins. Model error and the largest verified region must be estimated from held-out transitions or interval bounds. 4. First cheap experiment: train a two-layer policy and Lyapunov network on a two-dimensional nonlinear benchmark such as $x_{t+1}=x_t+0.05[-x_{1}^{3}+u,\ x_{2}+0.2x_{1}]$, comparing PPO or supervised control against the certificate-regularized version. Sweep $\lambda_{\Delta}$ and estimate the largest radius $r$ for which the decrease condition holds. The quantitative prediction is that certified trajectories satisfy $V_t/V_0\leq(1-c_{2}/c_{1})^t$ up to model error, and empirical divergence begins near the radius or parameter value where the measured minimum decrease margin crosses zero.
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 PyTorch MVP with an equilibrium-preserving policy, positive Lyapunov network, hinge certificate loss, grid verification, radius sweep, and rollout monitoring in experiment.py. The algebraic recurrence V_{t+1}<=qV_t was verified synthetically, and increasing certificate weight reduced sampled violation from 0.934 (lambda=0) to 0.00030 (lambda=4), but the claimed contraction factor q=0.6875 was not observed: certified one-step V ratios were roughly 0.90-0.99. This exposes a limitation in the stated math: V>=c1||x||^2 alone cannot convert decrease proportional to ||x||^2 into geometric decay in V; an upper bound V<=c3||x||^2 is also required. Therefore the practical penalty effect appeared, but the authoritative Lyapunov contraction claim was not confirmed.
- Agent confidence
- 9/10
- Baseline
- lambda_delta=0: task MSE 7.49e-06, mean hinge violation 0.9340, certified fraction 72.9%, certified radius 0.0, rollout V30/V0=1.208
- Idea
- lambda_delta=4: task MSE 4.32e-03, mean hinge violation 2.96e-04, certified fraction 99.57%, certified radius 0.35 in the main grid, certified one-step ratio median 0.897 and max 0.978; rollout V30/V0=0.00071
Limitations: Only a tiny 2D deterministic benchmark was tested; no learned dynamics model, transition-model error, held-out generalization, interval certification, PPO/RL training, action rejection monitor, or multiple random seeds was evaluated. The radius sweep has grid-resolution and near-equilibrium numerical sensitivity.
How to run: python3 experiment.py
Verdict computed by deterministic test code from paired-seed statistics — not by the language model.
Artifacts
- experiment.py 5.7 KB View Raw
- report.md 1.7 KB View
- results.json 4.1 KB View Raw