Introduction
In safety-critical robotics, ensuring "average" safety is often insufficient. Catastrophic failures typically occur in the "tail" of the distribution—the worst-case scenarios. This paper addresses the challenge of safe reinforcement learning (RL) by focusing on Conditional Value at Risk (CVaR), a risk measure that quantifies the expected cost in the worst $1-\alpha$ percent of outcomes.
While existing methods like Trust Region Constrained (TRC) policy optimization handle CVaR effectively, they are typically "on-policy," requiring vast amounts of new data for every update. This makes them impractical for many real-world applications. Conversely, off-policy methods are more sample-efficient but suffer from "distributional shift," where safety estimates based on historical data become unreliable for the current policy.
Methodology: Off-Policy TRC
The authors introduce Off-policy TRC, a sample-efficient algorithm designed to minimize worst-case safety violations using historical data. The method incorporates several key innovations:
- Novel Surrogate Functions: New mathematical approximations for cost and cost-squared values allow the agent to estimate CVaR using data from a replay buffer.
- Theoretical Bounds: The authors prove a bound on the CVaR estimation error, ensuring reliability as long as policy updates remain within a controlled range.
- Adaptive Trust-Region Constraint: A KL-divergence-based trust region keeps the policy close to the data distribution in the replay buffer, preventing the agent from entering regions where safety estimates are inaccurate.
- Retrace Estimators: These are used to provide stable, low-variance updates for value and cost networks.
The method assumes that cumulative safety signals follow a Gaussian distribution, which simplifies the CVaR calculation while remaining robust for complex tasks.
Experimental Evaluation
The algorithm was tested across three domains:
- MuJoCo Locomotion: HalfCheetah-v2 and Walker2d-v2 with penalties for dangerous torso angles.
- Safety Gym Navigation: PointGoal, CarGoal, and DoggoGoal tasks involving hazard avoidance.
- Real-World Robotics: A Jackal UGV trained in simulation and deployed on physical hardware.
Results and Discussion
Off-policy TRC demonstrates superior sample efficiency and safety compared to state-of-the-art baselines across all tested environments.
As shown in Figure 4, Off-policy TRC reaches high reward levels significantly faster than on-policy methods like CPO and TRC. Furthermore, it maintains stability where other off-policy methods like WCSAC often fail by producing "frozen" policies that avoid all movement to minimize risk.
In the Jackal UGV experiments (Figure 5), Off-policy TRC was the only method to achieve zero failures during real-world evaluation. The adaptive trust region effectively prevents the "over-optimism" typically seen in off-policy safe RL, ensuring the agent remains grounded in observed safety data.
Conclusion
Off-policy TRC bridges the gap between sample efficiency and rigorous safety constraints. While the Gaussian assumption for costs proved effective here, future work may explore non-Gaussian distributions for environments with multimodal risk profiles. Additionally, refining the adaptive trust region could further enhance performance across even more diverse robotic platforms.
Summary updated