[Paper Review] Learning to be Safe: Deep RL with a Safety Critic
This paper proposes Safe Q-Learning (SQRL), a deep reinforcement learning framework that pre-trains a safety critic to estimate failure probabilities, enabling safer and more efficient learning of new tasks. By constraining policy updates with the learned safety critic, SQRL reduces safety incidents by up to 3x and accelerates stable learning in navigation, locomotion, and manipulation tasks compared to standard RL.
Safety is an essential component for deploying reinforcement learning (RL) algorithms in real-world scenarios, and is critical during the learning process itself. A natural first approach toward safe RL is to manually specify constraints on the policy's behavior. However, just as learning has enabled progress in large-scale development of AI systems, learning safety specifications may also be necessary to ensure safety in messy open-world environments where manual safety specifications cannot scale. Akin to how humans learn incrementally starting in child-safe environments, we propose to learn how to be safe in one set of tasks and environments, and then use that learned intuition to constrain future behaviors when learning new, modified tasks. We empirically study this form of safety-constrained transfer learning in three challenging domains: simulated navigation, quadruped locomotion, and dexterous in-hand manipulation. In comparison to standard deep RL techniques and prior approaches to safe RL, we find that our method enables the learning of new tasks and in new environments with both substantially fewer safety incidents, such as falling or dropping an object, and faster, more stable learning. This suggests a path forward not only for safer RL systems, but also for more effective RL systems.
Motivation & Objective
- To address the challenge of deploying RL in real-world environments where safety is critical but manually specifying constraints is impractical.
- To enable agents to learn safe behaviors incrementally, transferring safety intuition from prior experiences to new tasks.
- To develop a method that ensures safe exploration during learning without relying on handcrafted safety rules.
- To improve learning efficiency and stability by constraining policies using a learned safety critic.
Proposed method
- Pre-train a safety critic $Q_{\text{safe}}^{\bar{\pi}}$ using dynamic programming to estimate the probability of future failure from a state-action pair.
- Use the pre-trained safety critic to constrain policy updates during fine-tuning, ensuring that only actions with low failure probability are selected.
- Train the safety critic and policy in two phases: pre-training in a safety-critical environment and fine-tuning on new tasks with safety constraints.
- Impose a safety threshold $\epsilon_{\text{safe}}$ to control the maximum acceptable failure probability, enabling risk-level tuning.
- Integrate the safety critic into standard deep RL algorithms like SAC, allowing compatibility with modern deep RL frameworks.
- Leverage offline data or simulated experiences to pre-train the safety critic on failure cases, such as falls or object drops.
Experimental results
Research questions
- RQ1Can a learned safety critic reduce the number of safety incidents during deep RL training on new tasks?
- RQ2Does incorporating a safety critic lead to faster and more stable learning compared to unconstrained RL?
- RQ3Can the safety threshold $\epsilon_{\text{safe}}$ be used to control the trade-off between risk and performance?
- RQ4Can a task-agnostic safety critic generalize to new, more complex tasks, such as dexterous manipulation?
Key findings
- In the 2D navigation task, SQRL reduced falling incidents by approximately 67% compared to SAC, with only 5% of episodes resulting in falls.
- On the Minitaur locomotion task, SQRL achieved faster convergence and reduced failure rates, with significantly more stable learning curves than standard SAC.
- In the dexterous cube rotation task, SQRL dropped the cube less frequently than all compared methods, despite a slight performance trade-off due to cautious behavior.
- The safety threshold $\epsilon_{\text{safe}}$ effectively controlled risk: at $\epsilon_{\text{safe}} = 0.05$, the agent avoided lava pits entirely, while at $\epsilon_{\text{safe}} = 0.2$, it took a riskier path through the pits.
- Learning curves showed that SQRL's constrained exploration led to more stable and efficient learning, avoiding the large performance drops seen in SAC due to unsafe exploration.
- The safety critic enabled safe learning even when fine-tuning on a more difficult version of the original task, demonstrating transferability of safety knowledge.
Read this paper
Open the full text in the Nubint reader and ask about any passage as you read.
Read this paper on NubintThis review was generated by AI from the original paper. Please check the paper before citing it.