Lyapunov-Budgeted Neural MPPI
Implementation & benchmark of arXiv:2607.04006 — Finite-Sample Closed-Loop Stability of Model Predictive Path Integral Control for Linear Time-Invariant Systems
Source paper: Finite-Sample Closed-Loop Stability of Model Predictive Path Integral Control for Linear Time-Invariant Systems arXiv:2607.04006 ⓘ · analyzed Aug 29, 2026
AI-generated research hypothesis, automatically tested. Not peer-reviewed.
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.
Formulas
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.
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
Stage 1 · Toy mechanism gate: Passed ✓
Stage 2 · Mechanism transferred to benchmark: Confirmed ✓
Stage 2 · Practical benchmark result: No measurable effect
Methodology: 8 paired seeds, permutation test (p<0.05) against a learning-rate-tuned baseline. How verification works
Stage 1 — Mechanism check agent confidence 7/10
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.
- Agent confidence
- 7/10
- Baseline
- Fixed MPPI: mean cost 121.97, escape rate 0.0, 64.0 rollout samples/step, mean action SE 0.0942.
- Idea
- Budgeted MPPI: mean cost 122.92, escape rate 0.0, 32.16 rollout samples/step, fallback rate 6.85%, mean action SE 0.1225. Follow-up scaling slopes were -0.51, -0.54, -0.49, and -0.47 for lambda values 0.35, 1.0, 3.0, and 10.0.
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.
How to run: python3 lyapunov_mppi_experiment.py
Stage 2 — Benchmark vs. tuned baseline (arXiv:2607.04006)
No significant difference vs. the tuned baseline (+0.2%, p=0.7761, wins 4 / 8 paired seeds).
- Benchmark
- Dynamics forecasting
- Model
- rnn_small
- Paired seeds
- 8
- Baseline mean
- 0.0004
- Idea mean
- 0.0004
- Effect (Δ)
- 0 (+0.2%; negative = idea better)
- Wins
- 4 / 8 paired seeds
- p-value
- 0.7761 (permutation test, 20 000 shuffles)
- Smallest detectable effect
- n/a
- Mechanism
- Confirmed ✓
- Practical effect
- No effect
- Baseline tuning
- swept over 9 configs
The fixed dynamics benchmark tests a Lyapunov-inspired training penalty on supervised next-angle prediction, not full inference-time neural MPPI with adaptive rollout sampling. Unsafe closed-loop escape rate, adaptive sample count, temperature sweeps, and a learned world-model MPPI controller were not evaluated. The mechanism signature uses a simple rho=0.94 contraction proxy rather than a learned Lyapunov certificate.
How to run: python3 stage2_bench.py
Verdict computed by deterministic test code from paired-seed statistics — not by the language model.
Stage 2 — Benchmark latest Failed ✗
Agent confidence: 9/10
Implemented the Stage-2 dynamics benchmark using identical rnn_small models, paired seeds, official baseline sweeping, an idea sweep, and the official permutation test. The Lyapunov penalty reduced the observed contraction-violation rate from 0.8133 to 0.8096, but test MSE was slightly worse: 0.00039220 versus 0.00039139, with p=0.7761. The mechanism signal is promising but there was no significant task-metric win.
- Baseline
- Best standard MSE baseline, lr=0.006: test MSE mean 0.0003913901, std 0.0001403232.
- Idea
- Best Lyapunov setting, lr=0.006 and penalty=0.01: test MSE mean 0.0003922019, std 0.0001420064; paired delta +8.118e-7; p=0.7761; 4/8 paired wins.
- Mechanism signature
- Trained-model contraction-violation rate: baseline 0.8133334, idea 0.8095834; mean absolute prediction/last-angle ratio: baseline 1.12015, idea 1.10206; confirmed=true.
Benchmark result
No significant difference vs. the tuned baseline (+0.2%, p=0.7761, wins 4 / 8 paired seeds).
- Benchmark
- Dynamics forecasting
- Model
- rnn_small
- Paired seeds
- 8
- Baseline mean
- 0.0004
- Idea mean
- 0.0004
- Effect (Δ)
- 0 (+0.2%; negative = idea better)
- Wins
- 4 / 8 paired seeds
- p-value
- 0.7761 (permutation test, 20 000 shuffles)
- Smallest detectable effect
- n/a
- Mechanism
- Confirmed ✓
- Practical effect
- No effect
- Baseline tuning
- swept over 9 configs
The fixed dynamics benchmark tests a Lyapunov-inspired training penalty on supervised next-angle prediction, not full inference-time neural MPPI with adaptive rollout sampling. Unsafe closed-loop escape rate, adaptive sample count, temperature sweeps, and a learned world-model MPPI controller were not evaluated. The mechanism signature uses a simple rho=0.94 contraction proxy rather than a learned Lyapunov certificate.
How to run: python3 stage2_bench.py
Artifacts
- bench_report.json 4.8 KB View Raw
- lyapunov_mppi_experiment.py 6.0 KB View Raw
- report.md 1.8 KB View
- report_bench_2026-09-03T220034.md 5.1 KB View
- results.json 2.5 KB View Raw
- stage2_bench.py 5.1 KB View Raw