# Lyapunov-Budgeted Neural MPPI

- ID: 253
- Canonical URL: https://synthcore.org/idea/253/lyapunov-budgeted-neural-mppi
- API JSON: https://synthcore.org/api/idea/253.json
- API Markdown: https://synthcore.org/api/idea/253.md
- Verification status: mech_ok_no_baseline
- Source: [arXiv:2607.04006](https://arxiv.org/abs/2607.04006)
- Category: dynamics
- Solves: stability, sample-efficiency, accuracy
- ML areas: rl, world-model, optimizer, training-dynamics
- Math tags: control-theory, dynamical-systems, probability
- Ratings: usefulness 6/10; difficulty 5/10; novelty 6/10

## Idea description

Wrap a learned residual policy or neural world-model controller around a stabilizing LQR feedback law, and permit sampling-based action refinement only when its estimated Monte Carlo and temperature errors fit inside a Lyapunov perturbation budget. Increase the rollout sample count, reduce temperature, or fall back to the baseline LQR action when the budget is violated. The controller should therefore trade computation for a measurable reduction in unstable or unsafe rollouts.

## Mathematical statement

The paper treats finite-sample MPPI as a perturbation of LQR with magnitude consisting of a Monte Carlo term of order O(M^{-1/2}) and an infinite-sample temperature-bias term represented by kappa_lambda, where kappa_lambda tends to zero as lambda tends to zero. Here M is the number of sampled control trajectories and lambda is the MPPI temperature. For the discrete LTI system x_{t+1}=A x_t+B u_t+w_t, let P solve the discrete algebraic Riccati equation, K be the LQR gain, and A_cl=A-BK be the closed-loop matrix. The extracted Corollary 1 gives the sample scaling M_star=O((||P||^2 ||B||^2 ||A_cl||^2/alpha_P^2) log(m/eta)), where alpha_P is the LQR Lyapunov stability margin, m is the relevant system dimension, and 1-eta is the confidence level. Use this as a conservative runtime budget. Require the estimated action-induced perturbation e_hat_t to satisfy ||B e_hat_t|| <= c alpha_P ||x_t|| for a chosen c<1. If it fails, use the baseline LQR action. The Lyapunov perturbation argument predicts exponential decay up to separate floors from process noise, controller approximation, and sampling-confidence failure.

## Key formulas

- $$M^{*}=O\!\left(\frac{\|P\|^{2}\|B\|^{2}\|A_{\mathrm{cl}}\|^{2}}{\alpha_{P}^{2}}\log\frac{m}{\eta}\right)$$
- $$\|u_{\mathrm{NN/MPPI}}(x)-u_{\mathrm{LQR}}(x)\|=O(M^{-1/2})+\kappa_{\lambda},\qquad \kappa_{\lambda}\to 0\ \text{as}\ \lambda\to 0$$
- $$\widehat u_t=\frac{\sum_{i=1}^{M}\exp(-S_i/\lambda)\,(u^{(i)}_0+\epsilon^{(i)}_0)}{\sum_{i=1}^{M}\exp(-S_i/\lambda)}$$
- $$\|B\widehat e_t\|\le c\alpha_P\|x_t\|\ \Longrightarrow\ u_t=\widehat u_t;\qquad \|B\widehat e_t\|>c\alpha_P\|x_t\|\ \Longrightarrow\ u_t=-Kx_t$$

## Implementation notes

(1) Integration point: implement this as an inference-time wrapper around a learned residual policy or neural world-model MPPI controller. For a measured state x_t, compute the stabilizing action u_lqr=-K x_t. Let a neural residual r_theta(x_t) define the MPPI nominal action u_nom=-K x_t+r_theta(x_t). Sample M_t control-noise sequences epsilon[i,0:H-1] from a fixed Gaussian covariance, roll them through the learned dynamics model, and compute trajectory costs S_i. (2) Pseudocode: precompute or estimate P, K, A_cl, and alpha_P; at each step sample candidate sequences; calculate w_i=exp(-S_i/lambda); calculate u_hat=sum_i w_i*(u_i0+epsilon[i,0])/sum_i w_i; estimate the sampling uncertainty as se=sqrt(weighted_variance(u_i0+epsilon[i,0])/(effective_sample_size+epsilon)); define effective_sample_size=(sum_i w_i)^2/(sum_i w_i^2); set e_hat=se+abs(u_hat-u_nom)*q(lambda), where q is a calibrated temperature-bias coefficient; accept u_hat only when norm(B*e_hat)<=c*alpha_P*norm(x_t), otherwise execute -K*x_t. (3) Use the paper's sample scaling to initialize M_t, with eta_t selected so that the sum of per-step failure probabilities is below the desired episode failure probability. Estimate alpha_P from the minimum eigenvalue of P-A_cl^T P A_cl. The constants c and q are empirical calibration parameters. (4) First experiment: begin with a 2D or 4D LTI system with additive Gaussian noise, then test a nonlinear pendulum with a learned residual policy. Compare fixed-sample MPPI, the residual policy alone, and this adaptive wrapper at equal average rollout FLOPs. Record mean cost, unstable-escape rate, fallback frequency, average M_t, and performance versus temperature. The expected signal is a reduction in failures near the predicted sample threshold and an approximately M_t^{-1/2} decrease in action uncertainty.

## Verification

- Status: mech_ok_no_baseline
- Mechanism evidence: yes
- Mechanism confirmed: yes
- Practical verdict: no_effect
- Verdict: Built a Lyapunov-budgeted MPPI wrapper around a discrete LQR controller and verified the closed-loop Lyapunov geometry numerically: A_cl has spectral radius 0.844 < 1 and alpha_P=0.342. Follow-up checks at a nonsaturated state showed MPPI action RMS error scaling with log-log slopes approximately -0.51, -0.54, -0.49, and -0.47 for temperatures 0.35, 1, 3, and 10, consistent with the claimed M^{-1/2} behavior. In the noisy LTI experiment, the budgeted controller achieved similar cost to fixed M=64 MPPI while using 32.2 versus 64 samples per step and falling back 6.85% of steps; however, no unstable escapes occurred for any method, so unsafe-rollout reduction was not demonstrated.

### Mechanism check

- Verdict: Built a Lyapunov-budgeted MPPI wrapper around a discrete LQR controller and verified the closed-loop Lyapunov geometry numerically: A_cl has spectral radius 0.844 < 1 and alpha_P=0.342. Follow-up checks at a nonsaturated state showed MPPI action RMS error scaling with log-log slopes approximately -0.51, -0.54, -0.49, and -0.47 for temperatures 0.35, 1, 3, and 10, consistent with the claimed M^{-1/2} behavior. In the noisy LTI experiment, the budgeted controller achieved similar cost to fixed M=64 MPPI while using 32.2 versus 64 samples per step and falling back 6.85% of steps; however, no unstable escapes occurred for any method, so unsafe-rollout reduction was not demonstrated.
- Confidence: 7/10
- Limitations: Only a small 2D linear system with a hand-designed residual was tested; no learned neural world model, nonlinear pendulum, GPU execution, FLOP-normalized training comparison, or genuinely unsafe/escaping regime was evaluated. The saved primary scaling check has a noisy slope of -0.377, while the additional follow-up state/regime check produced the near -0.5 slopes reported above. The corollary sample scale is reported without its hidden constant and is used diagnostically rather than as a strict guarantee.

### Practical benchmark

- Paired seeds: 8
- Baseline mean: 0
- Idea mean: 0
- p-value: 0.7761
- Paired wins: 4/8
- Benchmark verdict: no measurable effect

## Artifacts

- [bench_report.json](https://synthcore.org/code/1243/bench_report.json)
- [lyapunov_mppi_experiment.py](https://synthcore.org/code/1243/lyapunov_mppi_experiment.py)
- [report.md](https://synthcore.org/code/1243/report.md)
- [report_bench_2026-09-03T220034.md](https://synthcore.org/code/1243/report_bench_2026-09-03T220034.md)
- [results.json](https://synthcore.org/code/1243/results.json)
- [stage2_bench.py](https://synthcore.org/code/1243/stage2_bench.py)
- [Download all files as ZIP](https://synthcore.org/download/1243)

## Disclaimer

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