A robot policy trained in simulation has to trade off doing its task well against staying safe, and it has to make that trade-off before it knows how the real robot's physics differ from the simulator's. The most direct current recipe handles this in two steps. First, train across many randomized simulators. Second, add a penalty wherever those simulators disagree about what happens next, so the policy avoids physics it cannot predict. That recipe works on hardware. It also has two costs. A single hand-set weight decides how much disagreement matters, and setting it too high produces a robot that will not move. And by steering away from uncertain regions, it may stop the safety model from ever seeing the boundary between safe and unsafe.
We propose a different kind of pessimism. Instead of penalizing any disagreement about the next state, we estimate the probability of a safety violation separately under each randomized simulator. The constraint is then placed on a high quantile of those probabilities, so the policy is cautious only where some plausible physics would actually lead to harm. The safety estimates stay accurate near the boundary because an exploratory "violator" policy deliberately visits unsafe states, and it runs only in simulation, where crashing is free. The task–safety trade-off stops being a penalty weight and becomes a violation budget the policy is conditioned on. An operator can then move along the trade-off curve at deployment time without retraining.
Core Claim
The main method this work builds on and competes with is SPiDR. SPiDR augments the safety cost with $\lambda$ times the variance of predicted next states across a domain-randomized ensemble. With this it reports 100% constraint satisfaction zero-shot on a Unitree Go1 and a 1/10-scale RaceCar, and it shows that plain domain randomization incurs 26.1x and 6.2x more violations on those platforms. Its penalty measures disagreement in every state dimension, whether or not that disagreement is relevant to safety. It also needs a hand-tuned $\lambda$, and over-penalizing produces frozen behavior.
Our claim is that safety-relevant pessimism gives a strictly better trade-off curve. By trade-off curve we mean task return plotted against real or held-out violation rate. The pessimism we have in mind is an upper quantile, over randomized dynamics, of per-dynamics violation probability. The safety critic behind it is trained on boundary data that only simulation can provide safely.
Concretely, let $\xi$ denote a vector of simulator parameters (friction, mass, latency) drawn from the randomization prior $\Xi$. Let $Q_C(s,a,\xi) \in [0,1]$ be a learned critic estimating the probability that the current policy violates a constraint within the episode when starting from state $s$ and action $a$ under dynamics $\xi$. The robust feasibility score is
$$Q_C^{(q)}(s,a) = \text{quantile}_q \big\{ Q_C(s,a,\xi_k) \big\}_{k=1}^{K},$$
where $\xi_1,\dots,\xi_K$ are sampled from $\Xi$ and $q$ is a pessimism level, for example 0.9. The policy $\pi(a \mid s, \epsilon)$ is conditioned on a violation budget $\epsilon$ sampled per training episode. It maximizes task return subject to $\mathbb{E}_{s_0}[Q_C^{(q)}(s_0, \pi)] \le \epsilon$.
Two dynamics can disagree wildly about, say, the yaw of a quadruped on flat ground and still agree that it will not fall. SPiDR pays for that disagreement; our constraint does not. Conversely, members may agree that an action is dangerous; SPiDR's variance term then adds nothing, but our quantile does not miss it.
Research Program
The system has three pieces, and each borrows its technique from existing work.
The first piece is the dynamics-conditioned safety critic. It is trained on rollouts from massively parallel randomized simulators, reusing the MJX setup that SPiDR reports scales cheaply to ensembles of 8 or more.
The second piece is a boundary-seeking violator. It reuses the dual-policy idea from Breaking Safety Paradox with Feasible Dual Policy Iteration. That paper identifies the "safety paradox": as a policy gets safer, its replay data stops containing violations, the feasibility critic degrades, and cost spikes follow late in training. Its fix is to train a second policy, kept close to the main one by a divergence penalty, that deliberately seeks violations, with importance weighting to correct the resulting data shift. FDPI evaluates this only in simulation and flags that the dual policy cannot run on hardware. We accept that restriction as the design: the violator lives only in the randomized simulators, and it is exactly what keeps $Q_C$ calibrated near the boundary for every $\xi$.
The third piece is budget conditioning. It replaces SPiDR's $\lambda$ and the hand-set switching threshold of Monolithic vs. hybrid controller for multi-objective Sim-to-Real learning with a single multiplier function $\lambda(\epsilon)$. That function is updated with the PID-damped rule shown to stabilize Lagrangian training in Safety-Gymnasium. The hybrid-controller paper is motivating evidence. On a real Franka Panda, an additively-rewarded monolithic policy reached 30% success with 70% collisions, while decoupled reaching and avoidance policies reached 90% success with 10% collisions. Its safety margin could also be changed at test time only because of the explicit threshold. We keep that test-time adjustability but get it from a smooth constraint budget instead of a discontinuous switch, which that paper notes causes chatter.
The composition of objectives also differs from nearby work. A Multiplicative Value Function for Safe and Efficient Reinforcement Learning also separates a clean task critic from a violation-probability critic, combining them as $Q_R \cdot (1-Q_C)$, and transfers zero-shot to a Jackal robot with 100% success and 0% violations. It uses a single nominal simulator, so it has no way to express uncertainty about the physics. Our violation critic is indexed by dynamics and aggregated pessimistically.
Provably Safe Sim-to-Real Transfer certifies where the simulator can be trusted and keeps real exploration safe, reporting 0% unsafe iterations versus 68.5% for an unconstrained baseline. Its method is tabular and reward-free. We give up its guarantees in exchange for continuous control and an explicit task objective. We do not claim formal certificates.
The main hypothesis at risk is that SPiDR's penalty actually starves boundary data. That idea comes from our synthesis of FDPI and SPiDR, not from a measurement in any paper, so the first analysis tests it directly. We track two quantities over training: the fraction of replay transitions within a small margin of the constraint, and the calibration error of the violation critic on held-out dynamics. If SPiDR shows no degradation relative to plain domain randomization, the violator component is unnecessary. The contribution would then reduce to the quantile constraint, and we would report it that way.
Baselines
The naive reference point is unconstrained PPO or SAC trained under standard domain randomization, with a fixed collision penalty added to the reward. It anchors how much any safety machinery buys. Safety-Gymnasium reports that PPO-Lagrangian cuts violations by 98% relative to plain PPO at a 45% reward cost.
The second reference is PPO-Lagrangian with PID multiplier updates under the same domain randomization but without any uncertainty term. This isolates what pessimism adds at all.
The strongest competitor is SPiDR itself. It is the only method in the file with zero-shot hardware constraint satisfaction under randomized dynamics: 100% on Go1 and RaceCar, with 26.1x and 6.2x violation reductions over domain randomization. No reported result found on Lacuna for SPiDR's numbers on the simulated RWRL suite. We run SPiDR with its reported Lagrangian solvers, the same randomization prior and ensemble size $K$, and the same environment-step and wall-clock budget as our method. We give it a sweep over $\lambda$ equal in size to our sweep over $q$. Since our method yields a whole curve from one training run, the fair comparison is our single budget-conditioned policy against the upper envelope of SPiDR's separately trained runs. Beating it means our curve is at or above SPiDR's envelope at every violation rate on held-out dynamics, and strictly above in the low-violation region where SPiDR is expected to freeze.
We also include the multiplicative value function method (SAC Mult Lagrange), trained under the same randomization. It is the closest decoupled-critic design, and it tests whether decoupling alone, without dynamics-indexed pessimism, suffices.
We also include SAC-FDPI under randomization. It tests whether boundary exploration alone, without the quantile, suffices. It reports near-zero violations across 14 Safety-Gymnasium environments, and its violation-sample ratio stays about 10x higher than a baseline whose ratio falls below 1%.
Three ablations isolate our ingredients: removing the violator, replacing the quantile with the ensemble mean, and replacing budget conditioning with separate fixed-budget policies.
Why not just…?
Why not just tune SPiDR's $\lambda$ carefully? This is the real threat. If a well-tuned $\lambda$ lands on the same trade-off curve, our method only saves tuning effort. The $\lambda$-sweep envelope in the baselines settles it directly. Our mechanistic prediction is sharpest in environments with safety-irrelevant uncertainty, such as randomized parameters that affect heading but not falling. There, SPiDR must sacrifice return to suppress harmless variance, and our constraint should not. If the envelopes coincide in those environments, we drop the quantile claim.
Why not just run FDPI in randomized simulation and deploy the primal policy? That removes the hardware-safety objection to FDPI and may already fix the safety paradox. It averages over dynamics, however, and averaging hides the tail of plausible physics under which a state becomes unsafe. The FDPI-plus-randomization baseline, compared on held-out and out-of-support dynamics, measures exactly how much the quantile adds. If the gap is small, the honest conclusion is that boundary data mattered and pessimism did not.
Why not just train on the worst-case randomized dynamics, or widen randomization? Training on the worst case over the whole prior, or widening it, produces the sluggish, conservative behavior the file attributes to wide randomization envelopes in contact-rich tasks. Pessimism is also applied globally, rather than only where a violation is plausible. Our quantile is taken per state–action pair, which is precisely the difference. The mean-versus-quantile ablation, together with a worst-member baseline, shows where on this spectrum performance peaks.
Why not just train one policy per budget? For a handful of budgets this is fine and may be slightly better at each point. The test-time adjustability shown valuable by the hybrid-controller study would then require retraining or storing many policies. We report the per-budget gap as the price of conditioning.
Proposed Experiments
The simulated study uses Safety-Gymnasium navigation and locomotion tasks, and the MJX port of Safety Gym and the RWRL Cartpole, Walker and Humanoid tasks used by SPiDR. Each gets a dynamics randomization prior. Held-out dynamics are drawn from the prior as an in-support "real" proxy, and from a shifted distribution as an out-of-support stress test. A Franka-style reach-with-obstacle task in simulation, mirroring the hybrid-controller setup, tests the multi-objective regime.
Metrics are episodic task return, violation rate, and cost on held-out dynamics. We also measure the area under the return-versus-violation curve, the calibration error of $Q_C^{(q)}$ against Monte Carlo violation frequencies, and boundary-sample fraction over training. Everything uses ten seeds.
The first decisive check is the starvation measurement described above. The second is the curve comparison against SPiDR's $\lambda$ envelope, split by whether randomized parameters are safety-relevant. The third is out-of-support shift. Both SPiDR and our method assume the real physics lies inside the randomization prior, so we expect both to degrade. We report whether the calibrated quantile critic degrades more gracefully, or not at all differently.
If a quadruped or small race car is available, a final zero-shot deployment compares our method at two budgets against SPiDR at its best $\lambda$, measuring violations and task completion. The target is to match SPiDR's 100% constraint satisfaction while completing the task faster, and to show that changing the budget moves real behavior in the predicted direction without retraining.
References
- SPiDR: A Simple Approach for Zero-Shot Safety in Sim-to-Real Transfer
- Breaking Safety Paradox with Feasible Dual Policy Iteration
- Monolithic vs. hybrid controller for multi-objective Sim-to-Real learning
- Safety Gymnasium: A Unified Safe Reinforcement Learning Benchmark
- A Multiplicative Value Function for Safe and Efficient Reinforcement Learning
- Provably Safe Sim-to-Real Transfer