Breaking the Safety Paradox Without Real Crashes: Boundary-Focused Simulator Grounding

A safe learning agent stops visiting dangerous states. That sounds like success, but it slowly blinds the agent. Its internal estimate of where danger begins, called a feasibility critic (a learned function that predicts whether a state can still be kept safe), is trained on examples of failure. As failures become rare, the critic's picture of the boundary drifts, and the agent eventually has a late-training "cost spike" in which it violates constraints again. Breaking Safety Paradox with Feasible Dual Policy Iteration names this the safety paradox. It fixes the problem by running a second policy that crosses the boundary on purpose to keep failure examples in the replay buffer. That works in simulation. On a physical robot, crossing the boundary on purpose means breaking the robot.

We propose to get the failure examples from a simulator instead of from the robot, after correcting the simulator using real data gathered only near the boundary, where the correction matters. The real robot carries out "approach-and-retreat" probes: it moves toward the edge of its predicted safe region and always stays where a backup controller can still recover it. A learned correction to the simulator, an action transformer of the kind introduced by Reinforced Grounded Action Transformation, is fitted mainly to these near-boundary transitions. The corrected ("grounded") simulator then produces the deliberate violations the feasibility critic needs, and a disagreement check across an ensemble of corrections discards synthetic failures that lie too far from any real data to be trusted. Put in two sentences: the robot gathers boundary data safely, and the simulator crashes on its behalf. If the correction is accurate near the boundary, the critic stays sharp and the robot never fails for real.

Core Claim

Safety-critical simulator correction should be judged by how accurately it reproduces dynamics in a thin band around the safety boundary, not by average accuracy over the state space. That band can be explored on real hardware without violations, because recovery is still possible inside it. Our central prediction is a combination of results. With zero real violations, the method should remove the late-training cost spikes that FDPI documents for safe-only data. It should also reach higher real return than the obvious conservative fix, which is to shrink the allowed region by a fixed safety margin.

Each of the three research directions plays a different role here. Safe exploration supplies the problem, which is the paradox, and the hard constraint that real violations are forbidden. The sim-to-real gap supplies the mechanism, which is grounding the simulator. Constrained exploration efficiency supplies the targeting principle: real samples go only to the boundary band, much as Feasible Reachable Policy Iteration prunes exploration to task-relevant regions and Provably Safe Sim-to-Real Transfer shows that real sample cost should scale with the region where simulation and reality disagree, not with the whole space.

Relation to Prior Work

Two papers come closest. Provably Safe Sim-to-Real Transfer estimates a "mismatch region" in which the simulator is wrong and explores it safely by mixing in a known-safe baseline policy. Its real-sample complexity scales with the size of that region. The work is tabular, and it assumes the mismatch is either zero or above a detectable threshold. We borrow its logic of spending real samples only where the simulator is wrong and safety-relevant, and we carry it to continuous control with smoothly drifting dynamics. We also use the grounded model for something that paper does not attempt, which is generating counterfactual violations.

Sim-to-Lab-to-Real shields real fine-tuning with a reachability critic trained in simulation and certifies generalization. In that pipeline the simulator prior stays fixed, so any error in the critic near the boundary is never corrected by the real data. We do correct it.

The method draws on four sources. RGAT supplies the action transformer, though RGAT collects its real data without any safety mechanism and fits it uniformly. FDPI supplies the dual violation policy, which we run only inside the grounded simulator. A recovery shield in the style of A2C-GP-Shield provides the backup trigger during real probing. SOOPER provides the fall-back-to-prior logic.

Some prior work motivates the design. Learning Active Task-Oriented Exploration Policies shows that probing aimed at a specific goal beats task-agnostic system identification (14g against 22g pouring error). Its probing is unconstrained and aimed at task regret. Ours is constrained, and it is aimed at the accuracy of the safety boundary.

Some prior work constrains the design. SOOPER and the recovery-shield line treat sim-to-real discrepancy as generic statistical uncertainty, which pushes them toward conservatism. This motivates our gating step, but it also warns that ensemble uncertainty may be poorly calibrated away from the data. That is exactly the regime of synthetic violations, so calibration is one of our decisive checks rather than an assumption.

Research Program

The system has four stages. First, in the nominal simulator we train a task policy, a feasibility critic, and a backup policy, with the backup certified to recover from the critic's predicted safe set.

Second, on the "real" system, a probe policy searches for states where the critic's margin is small, meaning the predicted distance to infeasibility falls below a threshold. A shield passes probe actions only while the backup's predicted recovery holds under the current ensemble of corrections. Otherwise it hands control to the backup.

Third, an ensemble of RGAT-style action transformers is fitted to the real transitions. Each transition is weighted by how close it lies to the predicted boundary, and boundary-adjacent probes are oversampled.

Fourth, inside the grounded simulator, an FDPI dual policy deliberately crosses the boundary. A synthetic violation is added to the critic's training data only if the transformer ensemble agrees on the transition into the violating state, with disagreement below a threshold $\tau$. The critic and task policy are updated, the shield is recomputed, and the loop repeats.

The one analytical question we want to answer is when synthetic violations are trustworthy. Suppose the correction error grows smoothly with distance from real data. A violation that is $k$ steps past the last real-observed state then inherits error that compounds over $k$ steps. This suggests that only violations within a short horizon beyond the probed band are usable. We will measure that horizon empirically rather than assume it.

Baselines

The naive reference point is the policy and critic trained in the nominal simulator, deployed on the real system behind the same shield, with no correction and no fine-tuning. It shows how large the reality gap is near the boundary. A second naive point is PPO-Lagrangian fine-tuned directly on the real system. For calibration, Safety Gymnasium reports that PPO-Lag cuts violations by 98% relative to PPO at a 45% reward cost on velocity tasks. That figure comes from training in simulation, where violations are permitted, so it describes PPO-Lag's tradeoff rather than real-world training safety.

The strongest existing competitor is a SOOPER-style learner run on the real system. It uses the simulator-trained policy as its safe prior, a learned ensemble world model, and fallback when predicted cost risks exceeding the budget. It is the strongest competitor because it already achieves zero training violations on hardware: Safe Exploration via Policy Priors reports a policy "twice as good as the initial safe prior" on a physical race car with no collisions. For our benchmarks, no reported result was found on Lacuna for SOOPER on Safety-Gymnasium or perturbed-MuJoCo tasks, so we will run it ourselves.

The second strong competitor is a version of Sim-to-Lab-to-Real adapted to our tasks: shielded real fine-tuning with a fixed critic trained in simulation. Its reported numbers come from 3D-FRONT navigation and hardware (76.7% success, 86.7% safety rate on a quadruped), which is a different benchmark, so we will not compare to them directly.

As an upper reference we run SAC-FDPI directly on the "real" system with violations allowed. FDPI reports near-zero violations at convergence across 14 environments while matching top baselines' return. This variant shows how much return a boundary-accurate critic can buy if one pays in real crashes.

All methods share the same simulator pretraining, the same real-interaction budget (a fixed number of environment steps), the same network sizes, and an equal hyperparameter search of 20 configurations per method on a held-out task variant.

Three ablations isolate the key ingredients. Uniform grounding replaces boundary-weighted probing and fitting with RGAT-style uniform data. Ungated synthesis drops the disagreement filter. Raw-simulator violations train the critic on uncorrected-simulator failures.

We count our method as having beaten the field if three things hold together. It must incur zero real violations. Its cost spikes in the final 10% of training must be no larger than real-FDPI's. Its real return must be statistically higher than SOOPER's and higher than the best fixed-margin variant at matched zero violations.

Why not just…?

Why not just train the critic on violations from the uncorrected simulator? This is the cheapest version of the idea. If the gap near the boundary is small, it might be enough. Sim-to-Lab-to-Real notes that simulated failures misrepresent real boundaries when contact and friction differ. The raw-simulator ablation tests this directly. If it matches our method on a task, that tells us the task's gap does not touch the boundary, and we will report it as such.

Why not just shrink the safe set by a fixed margin? This is the real threat. A large enough margin removes cost spikes and needs no real probing. Its price is return: the agent cannot use states near the edge, which is the same "safe but useless" failure mode described by Quanyi Li et al.. We will sweep the margin and plot real return against real violations for every margin. Our method has to sit above that curve. If it does not, the proposal fails on that task.

Why not just use domain randomization over the boundary? Randomizing dynamics in simulation produces a critic that is robust to the whole randomization range. In effect this is a learned margin, and it inherits the conservatism that RGAT and the task-oriented probing work report for contact-rich tasks. We include a domain-randomized critic as a variant of the margin baseline and judge it on the same return-versus-violations plot.

Why not just let SOOPER's uncertainty handle it? SOOPER never needs the paradox fix if its fallback is conservative enough. The worry is the same as with margins: generic uncertainty stays high near the unvisited boundary, so the agent stays away from it. Our comparison at matched zero violations shows whether the targeted probing converts into extra return.

Proposed Experiments

The primary testbed uses "surrogate real" systems, following RGAT's protocol. These are Safety-Gymnasium tasks (PointGoal, CarPush, and velocity-constrained locomotion) and the Hopper and obstacle tasks from the A2C-GP-Shield suite, with the "real" copies given altered friction, actuator delay, and mass. The surrogate allows a measurement hardware cannot: the ground-truth feasibility of any state.

This yields our most diagnostic metric. We compute the critic's false-safe rate on held-out states in the boundary band, meaning the fraction of truly infeasible states that the critic calls safe, tracked across training. The paradox predicts that this rate rises for safe-only learners, and our claim is that grounded synthesis keeps it flat. We also measure the real violation count during training, real cost in the final 10% of training, final real return, and the number of real samples needed to reach 90% of real-FDPI's return.

We will check correctness on the 5x5 mismatch gridworld. There, Provably Safe Sim-to-Real Transfer reports 0% unsafe iterations, against 68.5% for an unconstrained baseline, and 77,958 against 296,910 real samples relative to no-simulator learning. Our method should match its 0% and stay within a small factor of its sample count without being given the tabular mismatch structure.

Two further checks are decisive. The first is the horizon study: we measure how the error of synthetic violations grows with distance past the probed band. This decides whether the disagreement gate is principled or cosmetic. The second is a stress test. We introduce a mismatch that exists only beyond the boundary, such as a friction change that appears only at high speed, which near-boundary probing cannot observe. This shows the method's failure mode honestly, and we expect the gate to block those synthetic violations and fall back to conservatism.

A small physical validation on a low-cost manipulator or wheeled robot is a stretch goal, contingent on surrogate results.