Introduction
Reinforcement Learning (RL) has shown remarkable success in complex tasks, yet its application in safety-critical domains remains limited. The primary hurdle is the "un-safe" nature of exploration: to find an optimal policy, an agent must experiment with actions that may lead to catastrophic failures. Traditional approaches often rely on penalty-based rewards, which do not strictly prevent unsafe states, or rigid safety layers that hinder learning and generalization.
This paper introduces SAC-RCBF, a framework that integrates Robust Control Barrier Functions (RCBFs) into the RL loop. By making the safety layer differentiable and proposing a modular learning approach, SAC-RCBF ensures safety during both training and deployment while maintaining high sample efficiency and transferability.
The Challenge of Safe Exploration
Existing safety layers typically project unsafe RL actions onto a safe set. However, they suffer from three critical limitations:
- Gradient Incompatibility: Standard safety filters are often non-differentiable or treated as part of the environment dynamics. This prevents the RL agent from understanding how its actions are being modified, leading to unstable training.
- Model Uncertainty: Control Barrier Functions (CBFs) usually assume a perfect model of the system. In reality, external disturbances can easily violate safety boundaries.
- Constraint Entanglement: When an agent learns a task alongside specific obstacles, the safety behavior becomes "baked into" the policy. Moving the obstacles often causes the agent to fail the core task because it cannot decouple the goal from the specific training constraints.
Architecture and Methods
The SAC-RCBF framework addresses these issues through a modular, differentiable architecture that filters potentially unsafe actions before they reach the environment.
Robust Control Barrier Functions (RCBFs)
To handle real-world noise, the authors employ RCBFs. They use Gaussian Processes (GPs) to learn and estimate unknown disturbances in the system dynamics. These estimates provide a safety margin, ensuring the agent remains within the safe set even under uncertainty.
Differentiable Safety Layer
The safety layer is formulated as a differentiable Quadratic Program (QP). This allows the Soft Actor-Critic (SAC) agent to backpropagate gradients through the filter. By "seeing" the safety layer, the agent learns to navigate the boundaries of the safe action space more effectively, resulting in smoother convergence.
Modular Task Learning
A key innovation is the modification of the Bellman update. The agent’s value function is updated such that it ignores the safety layer's modifications for future steps. This decouples the "how to reach the goal" logic from the "how to avoid these specific obstacles" logic, enabling the agent to learn a pure task representation that is robust for zero-shot transfer.
Key Results
The SAC-RCBF framework demonstrates superior performance in both learning speed and robustness across environments like Unicycle navigation, Car Following, and PVTOL quadcopter tasks.
Sample Efficiency and Safety
As shown in the performance plots, the model-based variant (SAC-RCBF MB) reaches optimal performance significantly faster than baselines that treat the safety layer as a black box. Crucially, the integration of GPs and RCBFs resulted in zero safety violations throughout the entire training process, even in the presence of unmodeled disturbances.
Zero-Shot Transfer
The modular approach proved highly effective for generalization. In the Unicycle environment, the Modular SAC-RCBF achieved a 63% completion rate when moved to 200 entirely new obstacle configurations. In contrast, standard safe RL baselines dropped to success rates between 17% and 21% because their learned policies were too entangled with the training obstacles.
Conclusion and Future Work
SAC-RCBF provides a robust path forward for deploying RL in safety-critical robotics. By treating safety as a differentiable, modular constraint rather than a simple penalty, the framework achieves a rare balance of safety, efficiency, and generalizability. Future work will focus on reducing the computational overhead of solving QPs in the inner loop and extending the theory to systems with higher-order constraints.
Summary updated