Conservative Safety Critics for Exploration

Homanga Bharadhwaj, Aviral Kumar, Nicholas Rhinehart, Sergey Levine, Florian Shkurti, Animesh Garg

Introduction

Reinforcement Learning (RL) is fundamentally based on trial and error. While this paradigm thrives in simulation, "error" in the real world can be catastrophic—a quadruped robot falling and breaking its hardware cannot simply reset and continue its "trial."

The challenge of Safe Exploration is to allow an agent to learn complex skills while ensuring it stays within safe boundaries during the learning process. Most existing safe RL methods have significant limitations: they might require a pre-existing safe controller, a known dynamics model, or they might only guarantee safety after the policy has fully converged (meaning they still crash frequently during training).

To address this, researchers introduce Conservative Safety Critics (CSC), an RL framework that minimizes catastrophic failures during training by learning an over-estimated (conservative) model of risk. CSC assumes only a sparse, binary indicator of failure (e.g., "the robot fell") and provides safety guarantees throughout the entire training process.

Methods: The Conservative Safety Critic ($Q_C$)

The core innovation of this paper is the Conservative Safety Critic, denoted as $Q_C$. It operates on three main principles:

  1. Conservative Estimation: Drawing inspiration from Conservative Q-Learning (CQL)—a technique usually used to prevent overestimation in offline RL—the authors flip the objective. They train a critic to purposefully overestimate the probability of catastrophic failure. By erring on the side of caution, the agent treats "potentially dangerous" states as "definitely dangerous."
  2. Safe Rollouts via Rejection Sampling: During data collection, the agent doesn't just execute its current policy blindly. It queries the safety critic. If the critic predicts the failure probability of an action is above a certain threshold, the agent rejects that action and re-samples from its policy until a "safe" action is found.
  3. Constrained Policy Updates: The policy is updated using a primal-dual gradient descent approach. It maximizes rewards subject to the constraint that the expected failure probability (as estimated by the conservative critic) remains below a threshold $\chi$. A KL-divergence constraint is also included to ensure the policy doesn't change too drastically between steps, maintaining the validity of the safety estimates.
Overview of the Conservative Safety Critic (CSC) framework.

Evaluation Environments

The authors evaluated CSC on five simulated robotic control domains of increasing complexity:

  • 2D Point Navigation: Navigating a maze while avoiding violet "trap" regions.
  • Car Navigation: A car with complex dynamics avoiding traps.
  • Panda Push (Topple & Boundary): A 7-DoF robotic arm pushing a block without letting it tip over, or keeping it within a specific rectangular zone.
  • Laikago Walk: Training an 18-DoF quadruped robot to walk and trot without falling.
Simulated robotic control domains used for evaluation.

Key Insights and Results

  • Overestimation as a Safety Buffer: In standard RL, overestimation is a bug that leads to over-optimism. In safety, overestimation is a feature. By being "pessimistic" about safety, the agent creates a natural buffer against uncertainty.
  • Sublinear Failure Growth: A significant theoretical contribution of the paper is proving that the number of cumulative safety violations grows sublinearly ($O(\sqrt{T})$) over time. This means the agent effectively "learns how to not fail" much faster than it learns the task itself.
  • Significant Accident Reduction: Empirically, CSC reduced catastrophic failures by up to 50% compared to prior state-of-the-art methods like Constrained Policy Optimization (CPO).
  • Competitive Performance: Despite being more cautious, CSC achieved task rewards comparable to (and sometimes better than) unconstrained "Base" RL agents. It successfully balances the trade-off between safety and performance.

Limitations and Future Work

While highly effective, the framework has limitations. In the very early stages of training, the safety critic has high function approximation error. Consequently, some failures are still inevitable at the start before the critic "understands" what a failure looks like. Furthermore, the method relies on a binary failure signal; in extremely high-stakes environments, even a few initial failures to seed the critic might be unacceptable.

Future work could involve a "safety curriculum"—starting with simple tasks where safety is easier to learn and gradually moving to more complex, dangerous environments to further minimize early-stage risks.

Summary updated

BibTeX
@inproceedings{bharadhwaj2021conservative,
  author = {Homanga Bharadhwaj and Aviral Kumar and Nicholas Rhinehart and Sergey Levine and Florian Shkurti and Animesh Garg},
  title = {{Conservative Safety Critics for Exploration}},
  booktitle = {International Conference on Learning Representations},
  year = {2021},
}
Figure