NeurIPS 2026Coming to NeurIPS?Explore papers, orals & directions

Sampling-Based Safe Reinforcement Learning

Luca Vignola, Bruce D. Lee, Manish Prajapat, Manuel Wendl, Melanie Zeilinger, Andreas Krause, Yarden AsarXiv 2026

TL;DR

Sampling-Based Safe Reinforcement Learning (SBSRL) is a novel model-based algorithm that guarantees safety during training by enforcing constraints jointly across a finite set of dynamics samples. By treating exploration as a constraint rather than a reward bonus, SBSRL eliminates tedious hyperparameter tuning and avoids the excessive conservatism of traditional robust optimization methods, proving its efficacy on both complex simulations and real robotic hardware.

What Problem Does This Paper Address?

Deploying reinforcement learning (RL) agents in the real world—such as in robotics or autonomous driving—requires strict safety guarantees during the training phase itself. A single catastrophic failure during exploration can damage hardware or environments.

To prevent this, model-based safe RL typically relies on constrained Markov decision processes (CMDPs) and tries to optimize for the worst-case scenario given the agent's current uncertainty about the world (epistemic uncertainty). However, solving this worst-case optimization over an infinite or continuous set of plausible dynamics models is computationally intractable. Existing methods resort to heuristics that either introduce excessive conservatism (preventing the agent from learning effectively) or fail to provide true safety guarantees during training.

Methods

The authors introduce Sampling-Based Safe Reinforcement Learning (SBSRL) to bridge the gap between theoretical safety guarantees and practical tractability.

The core methodology consists of three main pillars:

  1. Safety via Joint Sampling: Instead of optimizing over an intractable continuous uncertainty set, SBSRL draws a finite number ($M$) of dynamics samples (using Gaussian Processes or neural network ensembles). It then enforces tightened safety constraints jointly across all model-generated rollouts.
  2. Online Truncation: To prevent the algorithm from being overly conservative, the sampled dynamics models are truncated (or clipped) online at each episode to lie within the intersection of all previously established confidence intervals. As more data is collected, the uncertainty shrinks, and the approximation becomes progressively less conservative.
  3. Exploration as a Constraint: Traditional safe RL relies on carefully tuned "exploration bonuses" added to the reward function. SBSRL flips this paradigm by encoding exploration as a constraint: the policy must choose actions where the predicted epistemic uncertainty exceeds a certain threshold. Crucially, this constraint automatically deactivates when the greedy policy is already sufficiently informative, preventing over-exploration.
An illustration of the safe exploration task where a car avoids obstacles by simulating trajectories across multiple dynamics samples.

Datasets

The algorithm was evaluated across several standard continuous control simulation benchmarks and a real-world hardware setup:

  • Deepmind Control Suite: PENDULUMSWINGUP and CARTPOLESWINGUP.
  • SafetyGym: GOTOGOAL.
  • Real-World Reinforcement Learning (RWRL) Benchmark: RACECAR, HUMANOIDWALK, and QUADRUPEDRUN.
  • Physical Hardware: A highly dynamic, remote-controlled race car operating at 60 Hz with a 45-dimensional state-action representation.

Key Insights and Ideas

  • Sample-Wise Safety Suffices: The paper mathematically proves that enforcing safety on a carefully chosen, finite number of dynamics samples is enough to guarantee high-probability safety under the true system dynamics. This turns an intractable robust optimization problem into a highly parallelizable, tractable one.
  • Decoupling Reward and Exploration: By treating exploration as a constraint rather than a reward bonus, the agent remains purely greedy when it is certain enough, leading to much faster convergence and eliminating the fragile hyperparameter tuning typically associated with intrinsic rewards.
The truncation procedure at the initial episode, showing how samples are clipped to preserve a close approximation to the true dynamics.

Key Results

  • Zero Training Violations: In simulated tasks like PENDULUMSWINGUP and CARTPOLESWINGUP, SBSRL achieved near-optimal performance while strictly satisfying safety constraints at every single iteration. In contrast, baselines that only optimized for the mean dynamics frequently violated safety boundaries.
Figure 4: Evaluation of safety on PENDULUMSWINGUP and CARTPOLESWINGUP. We report mean and standard deviation of the normalized cumulative returns and maximum cost violations over five seeds. SBSRL maintains safety throughout training while achieving near-optimal performance.
  • Scalability to Deep Ensembles: When paired with neural network ensembles, SBSRL scaled effectively to high-dimensional tasks (HumanoidWalk, QuadrupedRun), outperforming state-of-the-art safe RL baselines like SOOPER and MBPO in balancing reward maximization and constraint satisfaction.
  • Real-World Deployment: On physical RC car hardware, SBSRL successfully minimized high-energy collisions with obstacles during online learning while steadily improving the car's lap times, whereas the mean-estimate baseline incurred significantly higher safety costs.

Limitations and Future Work

Despite its strong theoretical and empirical performance, the authors note a few limitations:

  • Episodic Reset Requirement: The framework operates in a finite-horizon episodic setting, meaning it implicitly relies on manual environment resets, which can be difficult to automate in some real-world applications.
  • Expected vs. State-Wise Constraints: The current formulation optimizes for the expected accumulated cost over a trajectory. Extending this approach to guarantee state-wise, high-probability safety at every single discrete time step for non-linear systems remains an open challenge for future work.

Summary updated

BibTeX
@misc{vignola2026sampling,
  author = {Luca Vignola and Bruce D. Lee and Manish Prajapat and Manuel Wendl and Melanie Zeilinger and Andreas Krause and Yarden As},
  title = {{Sampling-Based Safe Reinforcement Learning}},
  year = {2026},
  eprint = {2605.19469},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2605.19469},
}
Figure