# Lyapunov-Margin Noise Scaling

- ID: 616
- Canonical URL: https://synthcore.org/idea/616/lyapunov-margin-noise-scaling
- API JSON: https://synthcore.org/api/idea/616.json
- API Markdown: https://synthcore.org/api/idea/616.md
- Verification status: mechanism_failed
- Source: [arXiv:2607.09127](https://arxiv.org/abs/2607.09127)
- Category: dynamics
- Solves: stability, generalization
- ML areas: optimizer, training-dynamics, regularization
- Math tags: control-theory, dynamical-systems, stochastic-processes, optimization
- Ratings: usefulness 8/10; difficulty 5/10; novelty 7/10

## Idea description

Treat stochastic optimization as a perturbed stochastic dynamical system and adapt the magnitude of gradient noise, minibatch error, or parameter perturbations using an estimated Lyapunov decay margin. Perturbations may remain larger far from a solution, but their allowed magnitude is reduced when the local stability margin becomes small, implementing the paper's state-dependent robustness and stochastic input-to-state stability mechanism.

## Mathematical statement

For the stochastic differential equation d x = f(t,x) d t + g(t,x) d w, where x is the state, f is the drift, g is the diffusion matrix, and w is Brownian motion, the infinitesimal generator of a twice differentiable Lyapunov function V is L V = grad(V)^T f + one-half times trace(g g^T Hessian(V)). Assume the nominal dynamics satisfy L V <= -c V, where c is a positive decay rate. Add a perturbation B(x)u to the drift and suppose abs(grad(V)^T B(x)u) <= k(x)V. The perturbed system retains a negative Lyapunov drift whenever k(x) < c; uniformly bounded k(x) <= k_bar < c preserves exponential decay. For neural optimization, use V(theta) = one-half times ||theta - theta_star|| squared, where theta is the parameter vector and theta_star is a moving reference checkpoint. Estimate the nominal decay c and perturbation-induced growth q online, then constrain the noise scale so that q times the noise scale remains below a safety fraction of c.

## Key formulas

- $$\mathrm{d}x=f(t,x)\,\mathrm{d}t+g(t,x)\,\mathrm{d}w,\qquad \mathcal{L}V(x)=\nabla V(x)^{\top}f(t,x)+\frac{1}{2}\operatorname{tr}\!\left(g(t,x)g(t,x)^{\top}\nabla^{2}V(x)\right).$$
- $$\mathcal{L}V(x)\leq -cV(x),\qquad \left|\nabla V(x)^{\top}B(x)u\right|\leq k(x)V(x),\qquad k(x)<c.$$
- $$\sigma_t=\min\!\left(\sigma_{\max},\frac{\rho\,\widehat{c}_tV_t}{\widehat{q}_t+\varepsilon}\right),\qquad \widehat{\mathbb{E}}[V_{t+1}-V_t\mid\theta_t]\approx-\widehat{c}_tV_t+\widehat{q}_t\sigma_t,$$

## Implementation notes

Integrate the mechanism at the optimizer step. Use SGD or Adam as the nominal update and inject Gaussian parameter noise according to the estimated Lyapunov margin. First maintain a reference checkpoint theta_star, refreshed only after a validation improvement or every fixed number of successful epochs. Compute V_t = 0.5 times the squared Euclidean distance between theta_t and theta_star, preferably normalized per layer to prevent large layers from dominating. During a warm-up interval without added noise, fit a rolling regression of delta V_t on V_t; the negative slope estimates the nominal decay rate c_hat_t. Estimate q_hat_t with matched minibatch probes: apply the same gradient update twice, once without noise and once with a unit-scale Gaussian perturbation, and divide the resulting excess increase in V by the probe scale. Then update theta using theta_{t+1} = theta_t - eta_t times g_hat_t + sigma_t times xi_t, where xi_t is standard Gaussian noise, and set sigma_t using the displayed rule with safety factor rho = 0.5. Smooth c_hat and q_hat with exponential moving averages and clip sigma. The paper provides the Lyapunov and ISS argument; the checkpoint-centered V, decay estimate, and perturbation estimate are empirical approximations. The first cheap experiment should use a two-layer MLP on MNIST, comparing no noise, fixed noise, and adaptive noise. Sweep fixed noise amplitudes and define divergence as a nonnegative long-run slope of V. Prediction: the fixed-noise stability boundary occurs near q_hat times sigma = c_hat times V, while the adaptive method should keep the fitted slope of delta V negative and close to minus (1 minus rho) times c_hat.

## Verification

- Status: mechanism_failed
- Mechanism evidence: yes
- Mechanism confirmed: no
- Verdict: Built a reproducible Lyapunov-margin noise controller prototype, an analytic scalar stability sweep, and a small digits MLP comparison. The toy sweep confirmed the predicted fixed-noise boundary sigma=lambda with mean absolute grid error 0.005, but the adaptive rule did not satisfy its quantitative prediction: its mean sigma error versus 0.5*lambda was 0.171 and it became unstable at lambda=0.8. In the MLP test, adaptive noise matched baseline accuracy and nearly matched log loss, but showed no meaningful win, so the mechanism is not validated overall.

### Mechanism check

- Verdict: Built a reproducible Lyapunov-margin noise controller prototype, an analytic scalar stability sweep, and a small digits MLP comparison. The toy sweep confirmed the predicted fixed-noise boundary sigma=lambda with mean absolute grid error 0.005, but the adaptive rule did not satisfy its quantitative prediction: its mean sigma error versus 0.5*lambda was 0.171 and it became unstable at lambda=0.8. In the MLP test, adaptive noise matched baseline accuracy and nearly matched log loss, but showed no meaningful win, so the mechanism is not validated overall.
- Confidence: 9/10
- Limitations: Only one deterministic seed and one small digits MLP were tested; no MNIST, Adam, repeated-seed confidence intervals, validation-based checkpoint policy, minibatch probe implementation, GPU run, or hyperparameter optimization was evaluated.

## Artifacts

- [experiment.py](https://synthcore.org/code/120/experiment.py)
- [report.md](https://synthcore.org/code/120/report.md)
- [results.json](https://synthcore.org/code/120/results.json)
- [Download all files as ZIP](https://synthcore.org/download/120)

## Disclaimer

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