A robot planner that samples many candidate futures and picks the best one can be made to avoid obstacles by pushing every imagined trajectory away from danger before it is scored. This is how the strongest recent safe planners work. They assume they know the robot's physics exactly. When a robot is moved from simulation to hardware, it does not know its friction, payload, or motor gains. The usual fix, randomizing those quantities in simulation, forces a safety rule to protect against the worst physics in the whole range. The robot is then safe but sluggish on the ordinary hardware it actually runs on. We propose a safety rule that depends on the physical parameters. It is trained once across randomized simulation. At run time it is checked only against the parameters the robot currently finds plausible, based on how it has actually moved. The margin starts wide and narrows as the robot learns what it is. If reality turns out to lie outside everything simulated, the rule falls back to its most cautious setting.
To define the terms: sampling-based model predictive control (MPC) repeatedly samples action sequences, simulates them forward, scores them, and executes the first action of the best. Model predictive path integral control (MPPI) is its most common variant. Domain randomization trains across many randomized simulators so that behavior transfers zero-shot to hardware. The opportunity is that two literatures each hold half of a solution. Safe samplers never model parameter uncertainty. Ensemble samplers that adapt to uncertain parameters have no safety mechanism. Neither half, extended by itself, fixes the tradeoff between being safe and being conservative.
Core Claim
We claim that a single learned barrier function can serve as the shield inside MPPI rollouts. A barrier function is a scalar $h(x;\theta)$ that is nonnegative on states $x$ from which the robot can still remain safe under physical parameters $\theta$. Taking $\theta$ as an input, rather than fixing it, lets the shield track an online posterior over physics. The result keeps the zero-crash behavior of worst-case robust shields while recovering most of the speed of a shield that knows the true parameters.
Concretely, let $b_t(\theta)$ be the posterior over parameters at time $t$. It is maintained by likelihood reweighting of simulator hypotheses. Let $\Theta_t^{\alpha}$ be the smallest set of hypotheses holding probability mass $1-\alpha$. Each sampled rollout is corrected during simulation so that the discrete-time barrier condition holds for every hypothesis in that set:
$$ \min_{\theta \in \Theta_t^{\alpha}} \Big[ h(x_{k+1};\theta) - (1-\gamma)\, h(x_k;\theta) \Big] \ge 0 . $$
Here $x_k$ is the rollout state at step $k$, and $\gamma \in (0,1]$ sets how quickly the rollout may approach the boundary. When the posterior is broad, $\Theta_t^{\alpha}$ is the whole randomization range and the shield is the worst-case shield. As transitions arrive, the set shrinks and the admissible region grows.
The rule also has a gate for physics the simulator never covered. If no hypothesis explains recent transitions, meaning the maximum likelihood falls below a threshold calibrated in simulation, the planner reverts to the worst-case shield plus a braking backup. This mirrors the out-of-distribution detection of UARL, but on the planner's model rather than a critic.
The claim is falsifiable in a specific way. If a shield trained for the worst case over the full randomization range is not measurably slower than ours on nominal hardware, belief conditioning is unnecessary and the idea is wrong.
Relation to Prior Work
Three safe-sampling papers supply the mechanism we reuse, and all three assume the forward model is correct:
- SC-MPPI adds a barrier state to the dynamics and uses local feedback to nudge each sample away from obstacles. It raises forest success from 4.32% to 68.84%.
- DualGuard MPPI filters each sample and the final averaged command using a precomputed reachability tube. That tube is limited to low-dimensional systems with known dynamics.
- NS-VIMPC learns a neural barrier function that guarantees safety beyond the planning horizon. It resamples diverging particles and runs above 70 Hz on a laptop CPU.
We borrow NS-VIMPC's learned barrier and DualGuard's output filter. We change what the barrier is conditioned on and which parameters it is checked against. SA-RMPPI handles uncertainty only as additive noise in one nominal simulator. Its safety rate drops from 87% at variance 10 to 49% at variance 100. We read this as evidence that treating structured parameter error as noise is costly, which motivates modeling the parameters explicitly.
EMPPI supplies the belief machinery. It rolls out across an ensemble of simulators and reweights them online by Bayesian likelihood, identifying Shadow Hand actuator gains within 4 seconds. It takes no safety precaution while the ensemble is still unresolved, and that window is exactly where our shield acts.
Several papers motivate the problem without solving it for continuous sampling-based planners:
- Provably Safe Sim-to-Real Transfer proves that real-world exploration cost scales with the region where simulator and reality differ. Its results are confined to a 5×5 tabular gridworld, and it names function approximation as the missing step.
- Sim-to-Lab-to-Real shields a randomization-trained policy with a reachability critic and certifies it with PAC-Bayes bounds. Everything is model-free, and the shield does not adapt to identified physics.
- UARL documents that broad randomization makes policies overly conservative.
- Breaking Safety Paradox shows that safety critics degrade when safe behavior stops producing violations. We sidestep this by training the barrier only in simulation, where violations are free and plentiful across the whole parameter range.
Hierarchical decoupling plays a secondary role here. IQL-TD-MPC, HiRT, and CoRL-MPPI all pass guidance downward from a slow planner to a fast executor. None passes feasibility back upward. Our barrier, evaluated under the current belief, gives a cheap reachability signal that a slow waypoint planner can query. On low-friction hardware, for example, it can reject a sharp turn that the executor cannot safely follow.
Research Program
Training the barrier. We train a barrier network $h(x;\theta)$ with the discrete-time neural barrier objective of NS-VIMPC. Simulation episodes are drawn from a randomization range over friction, mass, center of mass, actuator gain, and latency. We deliberately include states that violate the constraint and states near the boundary for every $\theta$. Training uses a backup braking policy per parameter setting, as the NS-VIMPC construction requires.
Validating the barrier. We check how well the learned barrier separates safe from unsafe states on held-out parameter settings, and in particular how conservative it is as a function of $\theta$. This matters because the whole method depends on the barrier being tight for benign parameters and cautious for harsh ones.
Plugging into the planner. We insert the shield into MPPI in two places. The first is a per-sample correction during rollouts, which minimally adjusts each sampled control so the condition in the Core Claim holds. The minimum over the hypothesis set is evaluated in parallel on the GPU as a batch over ensemble members. The second is an output filter on the averaged command. The posterior $b_t$ comes from EMPPI-style likelihood reweighting over the same ensemble, so one set of simulators serves both planning and safety.
Analysis. We will bound the probability of a violation in terms of $\alpha$ and the barrier's error on held-out parameters. We state no guarantee beyond what that calibration supports.
The hierarchical extension. A slow waypoint planner runs at a few hertz and discards any waypoint whose barrier value along a coarse reference path, under the current belief, falls below zero. We test whether this feedback reduces the stalls and tracking failures that the file identifies as the main failure mode of decoupled systems.
Baselines
Naive reference points. The first is vanilla MPPI with a collision penalty, run on the randomized benchmark with a nominal model. This is the number any shield must beat. The second is the same planner with EMPPI's ensemble reweighting added but no shield. This separates the gain from belief tracking alone from the gain from safety.
Strongest competitor: worst-case robust shield. This is NS-VIMPC with its barrier trained over the full randomization range and not conditioned on $\theta$, equivalently our method with the hypothesis set frozen at the full range. It is the strongest competitor because it already achieves near-zero crashes: NS-VIMPC reports a 0% drone-corridor crash rate and 15 m/s AutoRally speeds under known dynamics. Robustness to randomized parameters is the obvious extension a reviewer would expect. No reported result was found on Lacuna for NS-VIMPC or any safe MPPI variant evaluated across randomized physical parameters, so we will produce this number ourselves.
Nominal-model shield. This is the same shield trained with $\theta$ fixed to nominal values. It shows what ignoring the reality gap costs.
Reachability-based shield. This is DualGuard MPPI, run on the planar car where its grid-based tube is computable. It reports a 75% quadrotor success rate against 69% for Shield-MPPI, 0% simulated failure, and 2.5 ms per cycle on a 1/10-scale car. We will compute its tube under both nominal and worst-case parameters.
Fairness controls. All planners share the ensemble, the horizon, and the sample budgets (60, 250, and 1000 samples, following DualGuard). Each receives the same hyperparameter search of about 50 configurations on training parameters. All are timed on the same GPU and on a laptop CPU.
What counts as beating the strongest competitor. Our method must match its crash rate within statistical error while being faster on the nominal-to-benign parameter range. Faster means higher average speed or lower time to goal. The advantage must also persist on hardware.
Key ablations. The first freezes the posterior after the first second, which isolates the value of continued shrinking. The second varies $\alpha$ to trace the curve between safety and speed. The third removes the out-of-range gate and tests on parameters placed outside the randomization range.
Why not just…?
Why not just use a worst-case shield trained under domain randomization? This is the real threat. UARL reports that broad randomization produces overly conservative policies. It does not show that this cost is large for barrier-shielded MPPI in particular, and it may not be. The experiments settle the question directly. If the robust shield's speed deficit on nominal parameters stays under a few percent across all benchmarks, we will report belief conditioning as unnecessary. We would then narrow the contribution to the out-of-range gate and the upward feasibility signal.
Why not just run EMPPI and add a one-step safety filter on the executed action? One-step filters act only when danger is imminent and can leave too little braking margin. NS-VIMPC and DualGuard MPPI both identify this recursive-infeasibility problem. There is a second problem specific to this setting. The filter still needs a dynamics model, and it gives no guidance to the samples. We include "EMPPI plus output filter only" as a baseline. We expect its crashes to concentrate in the first seconds, before the posterior sharpens, and we will report crash timing to test that prediction.
Why not just treat parameter error as disturbance noise in a robust sampler? SA-RMPPI is this approach, and its safety rate falls to 49% under heavy noise. Parameter error is also persistent and correlated across time, not independent from step to step. We run SA-RMPPI with its noise level fitted to match the spread of trajectories under randomization.
Why not just train a shielded randomization policy end to end, as in Sim-to-Lab-to-Real? That pipeline reaches 76.7% success and 86.7% safety on a quadruped, as reported in Sim-to-Lab-to-Real. Its shield is fixed after training and does not improve with identified physics. We compare against a PPO-Lagrangian policy with the same randomization and a reachability shield on the navigation tasks.
Proposed Experiments
Simulation benchmarks. We extend three benchmarks from the file with parameter randomization:
- the dense 2D forest Dubins-car task from SC-MPPI, randomizing tire friction and steering latency;
- the 3D quadrotor obstacle field, randomizing mass and thrust gain;
- the AutoRally-style racing task, randomizing surface friction.
Metrics are crash rate, success rate, time to goal or average speed, and planning latency. Each is reported separately for three test regions: parameters inside the randomization range, benign parameters near nominal, and parameters placed outside the range. A Safety-Gymnasium velocity-constrained task with randomized body mass gives a comparison to the constrained-RL baselines of Safety Gymnasium, where PPO-Lagrangian achieves a 98% reduction in violations at a 45% cost in reward.
Hardware. We use a 1/10-scale car on three floor surfaces, with and without added payload. It is a platform comparable to DualGuard's. Every planner is deployed zero-shot, and we log collisions, speed, and how the posterior entropy evolves over time.
Decisive check 1: the speed gap. On benign parameters, our shield must be clearly faster than the worst-case shield, and this gap must close as the randomization range narrows. If there is no gap, the premise is false.
Decisive check 2: crash timing. Our crash rate during the first seconds, before the posterior has sharpened, must be no higher than the worst-case shield's.
Decisive check 3: the out-of-range gate. On parameters outside the randomization range, the gate must trigger and keep the crash rate near the worst-case shield's. Without the gate, the ablation should show degradation.
Hierarchical test. We use long-horizon maze navigation, with waypoints from a slow planner, run on low-friction settings. We count stalls, fallbacks to the backup policy, and collisions with and without feasibility feedback from the barrier.
References
- Safe Importance Sampling in Model Predictive Path Integral Control
- DualGuard MPPI: Safe and Performant Optimal Control by Combining Sampling-Based MPC and Hamilton-Jacobi Reachability
- Safe Beyond the Horizon: Efficient Sampling-based MPC with Neural Control Barrier Functions
- Safety in Augmented Importance Sampling: Performance Bounds for Robust MPPI
- Model-Based Generalization Under Parameter Uncertainty Using Path Integral Control
- Provably Safe Sim-to-Real Transfer
- Sim-to-Lab-to-Real: Safe RL with Shielding and Generalization Guarantees
- Safe Domain Randomization via Uncertainty-Aware Out-of-Distribution Detection and Policy Adaptation
- Breaking Safety Paradox with Feasible Dual Policy Iteration
- IQL-TD-MPC: Implicit Q-Learning for Hierarchical Model Predictive Control
- HiRT: Enhancing Robotic Control with Hierarchical Robot Transformers
- CoRL-MPPI: Enhancing MPPI With Learnable Behaviours For Efficent And Provably-Safe Multi-Robot Collision Avoidance
- Safety Gymnasium: A Unified Safe Reinforcement Learning Benchmark