Abstract
Safe exploration presents a major challenge in reinforcement learning (RL): when active data collection requires deploying partially trained policies, we must ensure that these policies avoid catastrophically unsafe regions, while still enabling trial and error learning. In this paper, we target the problem of safe exploration in RL by learning a conservative safety estimate of environment states through a critic, and provably upper bound the likelihood of catastrophic failures at every training iteration. We theoretically characterize the tradeoff between safety and policy improvement, show that the safety constraints are likely to be satisfied with high probability during training, derive provable convergence guarantees for our approach, which is no worse asymptotically than standard RL, and demonstrate the efficacy of the proposed approach on a suite of challenging navigation, manipulation, and locomotion tasks. Empirically, we show that the proposed approach can achieve competitive task performance while incurring significantly lower catastrophic failure rates during training than prior methods.
Introduction
In Reinforcement Learning (RL), the "trial and error" process is the engine of progress. However, in real-world applications, an "error" can have severe consequences, such as damaging a robot or crashing a vehicle. This work introduces Conservative Safety Critics (CSC), a method designed to maintain the benefits of exploration while drastically reducing catastrophic errors during the training phase.
Standard RL agents are inherently curious, exploring unknown states to maximize rewards. When deploying partially trained policies on physical hardware, this curiosity can lead to states from which recovery is impossible or where physical damage occurs. CSC addresses this challenge of safe exploration without requiring pre-defined safe zones or human-designed recovery controllers, relying instead on a sparse, binary failure signal (0 for alive, 1 for failure).
Methods
The core innovation is the Conservative Safety Critic ($Q_C$). While a standard critic tries to predict the expected reward, the safety critic predicts the probability of an impending catastrophic failure.
Key components of the CSC framework include:
- Conservative Estimation: Borrowing tools from Conservative Q-Learning (CQL), the safety critic is trained to overestimate the likelihood of failure. This creates a "safety buffer"—if the agent is even slightly unsure about an action, the critic flags it as dangerous.
- Rejection Sampling Rollouts: During data collection, the agent samples an action from its current policy and asks the safety critic if it is safe. If the predicted failure probability exceeds a threshold ($\epsilon$), the action is rejected, and the agent tries another.
- Constrained Policy Updates: The policy is updated using a Lagrangian formulation that balances maximizing rewards with keeping the predicted failure probability below a user-defined threshold ($\chi$). A KL-divergence constraint ensures the policy doesn't change too drastically, maintaining safety guarantees.
Experimental Evaluation
The researchers evaluated CSC across five diverse simulated robotic benchmarks, ranging from simple navigation to complex locomotion:
- 2D Point & Car Navigation: Navigating a maze while avoiding "traps" that deplete a health counter.
- Panda Push (Topple & Boundary): A robotic arm must push a block without knocking it over or moving it outside a specific rectangular zone.
- Laikago Walk: A quadruped robot must learn to walk or trot without falling over.
Key Insights and Results
Empirical results demonstrate that CSC significantly reduces catastrophic failures during training—often by as much as 50% compared to baselines like Constrained Policy Optimization (CPO)—while achieving task performance comparable to unconstrained RL methods.
- Pessimism as a Virtue: In safety, it is better to overestimate risk than to occasionally underestimate a fatal cliff. By using CQL to create an upper bound on failure probability, the agent behaves cautiously in the face of uncertainty. The authors provide theoretical proof that cumulative safety violations grow sub-linearly ($O(\sqrt{T})$), meaning the agent eventually stops failing entirely.
- Safety-Performance Trade-off: There is an inherent trade-off between safety and speed. A stricter safety threshold leads to fewer failures but slower convergence to the optimal reward. CSC allows practitioners to tune this trade-off explicitly.
- Early-Stage Safety: Unlike methods that only become safe after convergence, CSC maintains lower failure rates from the very beginning of the training process.
Limitations and Future Work
The method still experiences some failures early in training because the safety critic must be learned from data. If the critic hasn't seen a failure yet, it might initially underestimate the risk of a new state. Future directions include developing a "curriculum of tasks" to further reduce these initial learning failures by starting with simpler, safer versions of a problem.
Summary updated