Introduction
Reinforcement Learning (RL) has demonstrated remarkable success in complex decision-making tasks. However, its fundamental reliance on trial-and-error exploration poses significant risks in safety-critical, real-world applications such as autonomous driving or industrial robotics. A single exploratory failure can lead to catastrophic hardware damage. Traditional "Safe RL" approaches often provide only approximate safety guarantees after training or exhibit extreme conservatism that hinders learning efficiency. This paper introduces RL-CBF, a framework designed to ensure provable safety throughout the entire learning process without compromising performance.
The RL-CBF Framework
The RL-CBF architecture integrates model-free RL with model-based control theory to create a "safety shield" for the agent. The system consists of three primary components:
- Model-Free RL: Standard algorithms like TRPO or DDPG serve as the "brain," learning high-performance control policies.
- Control Barrier Functions (CBFs): These act as a filter. If the RL agent proposes an action that would lead to a safety violation, the CBF minimally modifies it to the nearest safe action via a Quadratic Program (QP).
- Gaussian Processes (GPs): To account for model uncertainty (e.g., unknown friction), GPs model environment dynamics online, ensuring the CBF remains safety-aware even with an imperfect initial model.
Guiding Control and Policy Projection
A key innovation of this work is the Guiding Control mechanism. In typical shielded RL, the agent is unaware of the modifications made by the safety filter, which can lead to a mismatch between the agent's internal state and the environment. RL-CBF addresses this by training the RL agent on the actual safe actions deployed in the environment. This effectively projects the RL policy onto the set of safe policies, narrowing the search space and guiding the agent toward high-performance, safe regions of the state space.
Experimental Results
The framework was evaluated on two benchmarks: an Inverted Pendulum with angular constraints and a Simulated Car Following task requiring collision avoidance.
- Zero Violations: Unlike standard TRPO and DDPG, which frequently crashed during training, RL-CBF maintained 100% safety throughout the learning process.
- Sample Efficiency: By preventing exploration of unsafe states, RL-CBF converged to optimal policies significantly faster than baselines. In car-following, it successfully learned fuel-efficient behavior while maintaining a hard 2-meter headway constraint.
- Robustness: The system demonstrated graceful degradation; even when a perfectly safe action was physically impossible, the CBF provided the "least unsafe" action to minimize risk.
Conclusion
RL-CBF represents a significant step toward deploying RL in real-world safety-critical systems. By treating safety as a hard mathematical constraint rather than a reward penalty, the framework ensures zero violations during training while simultaneously improving learning speed. Future work will explore methods to learn the safe set boundaries directly from data, reducing the reliance on pre-defined safety functions.
Summary updated