Visitation-Weighted Adaptive MPPI for Neural Policies
Implementation & benchmark of arXiv:2607.08942 — Adaptive MPPI with Online Disturbance Covariance Estimation: Provable Stability Tightening via Spatial Smoothing
Source paper: Adaptive MPPI with Online Disturbance Covariance Estimation: Provable Stability Tightening via Spatial Smoothing arXiv:2607.08942 ⓘ · analyzed Aug 30, 2026
AI-generated research hypothesis, automatically tested. Not peer-reviewed.
Idea description
Equip a neural policy or learned world model with an MPPI-style rollout planner whose perturbation covariance is conditioned on a discretized latent-state cell and updated from observed transition residuals. Apply spatial diffusion to neighboring covariance estimates using a kernel matched to the empirical visitation distribution, so covariance adaptation is smoothing rather than an unstable independent estimate at every state.
Formulas
Mathematical statement
The system is x_(k+1) = f(x_k,u_k) + w_k, with w_k conditioned on x_k = x distributed as a Gaussian with covariance Sigma_w^(k)(x). Partition state or latent space into cells C_s and maintain a positive-definite covariance estimate Sigma_hat_(s,k). For the visited cell s_k, update with stochastic approximation: Sigma_bar_(s,k+1) = (1-alpha_k) Sigma_hat_(s,k) + alpha_k z_k z_k transpose, where z_k = x_(k+1) - f_hat_theta(x_k,u_k). Then diffuse by Sigma_hat_(s,k+1) = sum_t K_st Sigma_bar_(t,k+1), where K is row stochastic. Choose K to satisfy detailed balance pi_s K_st = pi_t K_ts using empirical visitation probabilities pi_s. This makes diffusion non-expansive in the weighted Frobenius norm ||E||_pi squared = sum_s pi_s ||E_s||_F squared. The covariance error is predicted to contain an O(N^(-1/2)) estimation term, a smoothing bias B_smooth, and a temporal drift allowance D_drift.
Implementation notes
1. Exact integration point: use a recurrent policy or latent world model in a continuous-control RL agent. At each real-environment step, collect (x_k,u_k,x_(k+1)), assign x_k or its latent representation to a cell, and estimate the covariance of the learned-model residual. In MPPI, maintain a mean action sequence mu and sample M perturbation sequences with covariance C_s determined by the current cell. 2. Pseudocode: initialize every Sigma_hat_s to sigma_0 squared times the identity. After observing a transition, compute z = x_next - f_hat_theta(x,u). Update the visited cell with Sigma_bar_s = (1-alpha) Sigma_hat_s + alpha z z transpose. Diffuse all cells with Sigma_hat_s = sum_t K_st Sigma_bar_t. Project each result onto the positive-definite cone by clipping eigenvalues below epsilon. Draw perturbations epsilon_i from a Gaussian with covariance C_s = L_s Sigma_hat_s L_s transpose plus epsilon times the identity. Evaluate rollout costs J_i, set weights proportional to exp(-(J_i-J_min)/lambda), and update mu by adding the weighted perturbations. 3. Computed from the paper: the covariance EMA, diffusion, visitation-weighted kernel, and three-term error decomposition. Estimated empirically: visitation probabilities, residuals, local smoothing bias from neighbor disagreement, drift from sliding-window covariance changes, and closed-loop cost. 4. First cheap experiment: use a small neural MPC policy and learned model on a pendulum or cart-pole with a four-cell, state-dependent Gaussian disturbance field. Compare fixed identity covariance, unsmoothed EMA covariance, uniform smoothing, and visitation-weighted smoothing. Plot covariance error and return versus transition count. The prediction is error approximately follows c divided by square root of N plus B_smooth plus D_drift, and the adaptive controller crosses the fixed-covariance baseline only when the mismatch exceeds the residual bound. Measured crossover sample count should scale inversely with the square of the excess mismatch.
Verification
Stage 1 · Toy mechanism gate: Passed ✓
Stage 2 · Mechanism transferred to benchmark: Confirmed ✓
Stage 2 · Practical benchmark result: Significantly worse ✗
Methodology: 8 paired seeds, permutation test (p<0.05) against a learning-rate-tuned baseline. How verification works
Stage 1 — Mechanism check agent confidence 8/10
Built a compact visitation-weighted covariance adaptation and MPPI toy benchmark in experiment.py. The mechanism checks passed: detailed-balance error was 0, weighted diffusion never expanded error energy (maximum observed ratio 1.0), and covariance estimation followed the predicted N^-1/2 law with slope -0.493 versus -0.5. The adaptive weighted controller did not improve closed-loop cost over the fixed baseline in this noisy toy setup, although it substantially reduced covariance estimation error; thus the mathematical mechanism manifested, but a control-performance win was not demonstrated.
- Agent confidence
- 8/10
- Baseline
- Fixed covariance: mean cost 36.29 +/- 66.77; mean covariance error 0.0617.
- Idea
- Visitation-weighted diffusion: mean cost 37.82 +/- 67.67; mean covariance error 0.0200. EMA without diffusion had cost 30.32 +/- 47.25 and covariance error 0.0141.
Limitations: This is a scalar-state toy nonlinear-dynamics experiment, not a real Pendulum/CartPole environment or learned neural world model. MPPI rollouts use hand-coded dynamics, covariance adaptation uses scalar residuals, and no rigorous crossover-sample scaling or statistically powered control comparison was tested.
How to run: python3 experiment.py
Stage 2 — Benchmark vs. tuned baseline (arXiv:2607.08942)
Significantly WORSE than the tuned baseline (+57.5%, p=0.0081, wins 0 / 8 paired seeds).
- Benchmark
- Dynamics forecasting
- Model
- rnn_small
- Paired seeds
- 8
- Baseline mean
- 0.0005
- Idea mean
- 0.0008
- Effect (Δ)
- 0.0003 (+57.5%; negative = idea better)
- Wins
- 0 / 8 paired seeds
- p-value
- 0.0081 (permutation test, 20 000 shuffles)
- Smallest detectable effect
- ±31.1%
- Mechanism
- Confirmed ✓
- Practical effect
- Hurts
- Baseline tuning
- swept over 3 configs
Only the built-in supervised actuated-pendulum rollout-prediction dynamics track was tested; no online environment control return, true MPPI action-sequence planning, learned world-model training, larger models, longer horizons, or additional datasets were evaluated. The mechanism signature used one representative seed and is not a statistical validation of covariance calibration across all paired seeds.
How to run: python3 bench_experiment.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 visitation-conditioned residual covariance adaptation with visitation-weighted reversible diffusion as a training intervention on the structurally matched actuated-pendulum dynamics track, using the shared rnn_small architecture. The mechanism signature was confirmed: relative residual-variance error was 0.268 and weighted diffusion energy ratio was 0.116. However, the idea significantly worsened test MSE: 0.000836 versus baseline 0.000531, paired delta +0.000305, permutation p=0.0081; therefore this is not a benchmark win.
- Baseline
- Best lr=0.006, 16 epochs; full 8-seed test MSE mean 0.0005307422, std 0.0001488389.
- Idea
- Best tested setting lr=0.003, alpha=0.25, beta=1.0, 16 epochs; full 8-seed test MSE mean 0.0008359740, std 0.0002010. Paired delta +0.0003052318, p=0.0081, 0/8 idea wins.
- Mechanism signature
- map[confirmed:true relative_variance_error:0.2676025422 weighted_energy_ratio:0.1162507495]
Benchmark result
Significantly WORSE than the tuned baseline (+57.5%, p=0.0081, wins 0 / 8 paired seeds).
- Benchmark
- Dynamics forecasting
- Model
- rnn_small
- Paired seeds
- 8
- Baseline mean
- 0.0005
- Idea mean
- 0.0008
- Effect (Δ)
- 0.0003 (+57.5%; negative = idea better)
- Wins
- 0 / 8 paired seeds
- p-value
- 0.0081 (permutation test, 20 000 shuffles)
- Smallest detectable effect
- ±31.1%
- Mechanism
- Confirmed ✓
- Practical effect
- Hurts
- Baseline tuning
- swept over 3 configs
Only the built-in supervised actuated-pendulum rollout-prediction dynamics track was tested; no online environment control return, true MPPI action-sequence planning, learned world-model training, larger models, longer horizons, or additional datasets were evaluated. The mechanism signature used one representative seed and is not a statistical validation of covariance calibration across all paired seeds.
How to run: python3 bench_experiment.py
Artifacts
- bench_experiment.py 7.6 KB View Raw
- bench_report.json 3.1 KB View Raw
- experiment.py 5.9 KB View Raw
- report.md 1.5 KB View
- report_bench_2026-08-30T235444.md 5.2 KB View
- results.json 2.2 KB View Raw