# Finite-horizon Lyapunov regularization for neural updates

- ID: 56
- Canonical URL: https://synthcore.org/idea/56/finite-horizon-lyapunov-regularization-for-neural-updates
- API JSON: https://synthcore.org/api/idea/56.json
- API Markdown: https://synthcore.org/api/idea/56.md
- Verification status: failed_benchmark
- Source: [arXiv:2608.22382](https://arxiv.org/abs/2608.22382)
- Category: dynamics
- Solves: stability, generalization
- ML areas: optimizer, training-dynamics, ssm, regularization
- Math tags: dynamical-systems, control-theory, optimization
- Ratings: usefulness 6/10; difficulty 4/10; novelty 7/10

## Idea description

Add a loss term requiring a neural optimizer or recurrent module to decrease a nonnegative Lyapunov-like energy over M update steps, rather than forcing monotonic one-step decrease. The term includes an empirically estimated mismatch allowance, so stochastic or delayed updates are tolerated while persistent instability remains penalized.

## Mathematical statement

The paper’s central construction is a finite-step Lyapunov condition for a discrete-time state update z_{k+1}=G(z_k): instead of requiring V(z_{k+1})-V(z_k)<0, require a finite-horizon decrease V(z_{k+M})-V(z_k)\leq -\alpha V(z_k)+\varepsilon_k. Here z_k is the state of the iterative process, V:\mathbb{R}^d    o\mathbb{R}_{\geq 0} is a positive-definite certificate, M\in\mathbb{N} is the finite step horizon, \alpha\in(0,1] is the desired contraction fraction, and \varepsilon_k\geq0 is a mismatch or disturbance bound. For interconnected states z=(z_1,\ldots,z_\ell), the paper motivates finite-step small-gain inequalities of the form V_i(z_i(k+M))\leq\max\{\rho_iV_i(z_i(k)),\max_{j\in\mathcal N_i}\gamma_{ij}(V_j(z_j(k)))\}+\varepsilon_i(k), where V_i is a local certificate, \rho_i<1 is local contraction, and \gamma_{ij} measures neighbor influence. The neural adaptation uses the global scalar inequality as a soft training constraint. A concrete certificate is V_k=\frac{1}{2}\|q_k\|_2^2, where q_k is either the optimizer gradient or the recurrent hidden-state error relative to a detached target; the mismatch is estimated from repeated stochastic evaluations as \widehat\varepsilon_k=\operatorname{EMA}(|V_{k+M}-V_k+\alpha V_k|).

## Key formulas

- $$V(z_{k+M})-V(z_k)\leq-\alpha V(z_k)+\varepsilon_k,$$
- $$V_i(z_i(k+M))\leq\max\left\{\rho_iV_i(z_i(k)),\max_{j\in\mathcal N_i}\gamma_{ij}\bigl(V_j(z_j(k))\bigr)\right\}+\varepsilon_i(k),$$
- $$V_k=\frac{1}{2}\|q_k\|_2^2,\qquad r_k=V_{k+M}-V_k+\alpha V_k-\widehat\varepsilon_k,$$
- $$\mathcal L_{\mathrm{total}}=\mathcal L_{\mathrm{task}}+\lambda\,[r_k]_+^2,\qquad \widehat\varepsilon_k=\operatorname{EMA}\left(\left|V_{k+M}-V_k+\alpha V_k\right|\right).$$

## Implementation notes

(1) Integrate at the optimizer-update or recurrent-state-update level. Start with AdamW training a small MLP or Transformer encoder. Maintain a detached snapshot q_k of the current optimization state: for the optimizer experiment use q_k=g_k, the minibatch gradient after global-norm clipping; for an SSM experiment use q_k=h_k-h^\star, where h^\star is a stop-gradient exponential moving average of hidden states. Do not backpropagate through the first V_k term or through the EMA mismatch estimate. (2) Pseudocode: choose M in {2,4,8}, alpha in {0.05,0.1}; at step k compute V_k=0.5*||q_k||^2; save q_k in a FIFO queue; after M updates obtain q_{k+M} and V_{k+M}=0.5*||q_{k+M}||^2; update eps_hat = beta*eps_hat + (1-beta)*abs(V_{k+M}-V_k+alpha*V_k); form r=V_{k+M}-V_k+alpha*V_k-eps_hat.detach(); add lambda*relu(r)^2 to the ordinary task loss or, for an optimizer test, add the penalty to a meta-loss over a short unrolled trajectory. (3) The paper supplies the finite-step decrease structure; estimate V directly from gradients or hidden states and estimate epsilon empirically from recent violations. Clip r and normalize V by its batch mean to avoid scale domination. Log the violation rate, V_{k+M}/V_k, gradient norm, and task loss. (4) First experiment: train a 2-layer 256-unit MLP on CIFAR-10 with SGD or AdamW, comparing the baseline against M=4 and M=8 at equal batch size, FLOPs, and learning-rate search budget. Run three random seeds. The primary success signal is a lower fraction of exploding or highly oscillatory loss windows and a smaller variance of gradient norms at equal final accuracy; a secondary target is improved validation accuracy under a 20-30% larger learning rate. For an SSM follow-up, compare hidden-state norm stability and perplexity on a small character-level language-model task.

## Verification

- Status: failed_benchmark
- Mechanism evidence: yes
- Mechanism confirmed: no
- Practical verdict: inconclusive
- Verdict: Built a finite-horizon Lyapunov toy verifier and an online gradient-based MLP proxy. The mechanism manifested: predicted contraction boundaries for M=2,4,8 matched grid observations within 0.001; stochastic mismatch scaled quadratically with noise; and EMA violations transitioned from 0% for a=0.98 to 100% at a>=1.0, consistent with instability. The tiny MLP comparison did not show a practical win: the regularized run reached 26.7% accuracy versus 83.1% baseline and had higher tail loss and gradient variance, so the claim is supported only as a toy mechanism, not as an effective training method here.

### Mechanism check

- Verdict: Built a finite-horizon Lyapunov toy verifier and an online gradient-based MLP proxy. The mechanism manifested: predicted contraction boundaries for M=2,4,8 matched grid observations within 0.001; stochastic mismatch scaled quadratically with noise; and EMA violations transitioned from 0% for a=0.98 to 100% at a>=1.0, consistent with instability. The tiny MLP comparison did not show a practical win: the regularized run reached 26.7% accuracy versus 83.1% baseline and had higher tail loss and gradient variance, so the claim is supported only as a toy mechanism, not as an effective training method here.
- Confidence: 8/10
- Limitations: Only one fixed seed and a tiny sklearn digits MLP were used. CIFAR-10, multi-seed evaluation, optimizer meta-loss, recurrent modules, FLOP-matched hyperparameter search, and systematic lambda/M tuning were not tested. The gradient certificate is a practical delayed-minibatch-gradient proxy rather than a full unrolled optimizer-state Lyapunov implementation.

### Practical benchmark

- Paired seeds: 8
- Baseline mean: 0
- Idea mean: 0
- p-value: 0.46705
- Paired wins: 5/8
- Benchmark verdict: no significant win

## Artifacts

- [bench_report.json](https://synthcore.org/code/696/bench_report.json)
- [bench_stage2.py](https://synthcore.org/code/696/bench_stage2.py)
- [experiment.py](https://synthcore.org/code/696/experiment.py)
- [report.md](https://synthcore.org/code/696/report.md)
- [report_bench_2026-08-31T222855.md](https://synthcore.org/code/696/report_bench_2026-08-31T222855.md)
- [results.json](https://synthcore.org/code/696/results.json)
- [Download all files as ZIP](https://synthcore.org/download/696)

## Disclaimer

AI-generated research hypothesis, automatically tested. Not peer-reviewed.
