Safety Filtering While Training: Improving the Performance and Sample Efficiency of Reinforcement Learning Agents

Federico Pizarro Bejarano, Lukas Brunke, Angela P. Schoellig
10/15/2024
cs.ROcs.LGeess.SY

No official code found. Best implementation: Federico-PizarroBejarano/safe-control-gym (26 stars, MIT, last commit 2025-12-19).

Abstract

Reinforcement learning (RL) controllers are flexible and performant but rarely guarantee safety. Safety filters impart hard safety guarantees to RL controllers while maintaining flexibility. However, safety filters can cause undesired behaviours due to the separation between the controller and the safety filter, often degrading performance and robustness. In this paper, we analyze several modifications to incorporating the safety filter in training RL controllers rather than solely applying it during evaluation. The modifications allow the RL controller to learn to account for the safety filter, improving performance. This paper presents a comprehensive analysis of training RL with safety filters, featuring simulated and real-world experiments with a Crazyflie 2.0 drone. We examine how various training modifications and hyperparameters impact performance, sample efficiency, safety, and chattering. Our findings serve as a guide for practitioners and researchers focused on safety filters and safe RL.

View on arXivView PDF

Code Implementations(1)

MIT

PyBullet CartPole and Quadrotor environments—with CasADi symbolic a priori dynamics—for learning-based control and RL

264PythonFeb 8, 202210 months agoMIT

Similar Papers

Cite this paper

@article{bejarano2024safety,
  title  = {Safety Filtering While Training: Improving the Performance and Sample Efficiency of Reinforcement Learning Agents},
  author = {Federico Pizarro Bejarano and Lukas Brunke and Angela P. Schoellig},
  year   = {2024},
  eprint = {2410.11671},
  archivePrefix = {arXiv},
  url    = {http://arxiv.org/abs/2410.11671v2}
}

Add a badge to your README

Shows whether official code is linked for this paper.

Code of Paper badge
[![Code of Paper](https://codeofpaper.com/badge/2410.11671.svg)](https://codeofpaper.com/paper/2410.11671)

Discussion