Enhancing Efficiency of Safe Reinforcement Learning via Sample Manipulation

Shangding Gu, Laixi Shi, Yuhao Ding, Alois Knoll, Costas Spanos +2 more
5/31/2024
cs.LG

No official code found. Best implementation: PKU-Alignment/omnisafe (1,145 stars, Apache-2.0, PyTorch, last commit 2025-03-17).

Abstract

Safe reinforcement learning (RL) is crucial for deploying RL agents in real-world applications, as it aims to maximize long-term rewards while satisfying safety constraints. However, safe RL often suffers from sample inefficiency, requiring extensive interactions with the environment to learn a safe policy. We propose Efficient Safe Policy Optimization (ESPO), a novel approach that enhances the efficiency of safe RL through sample manipulation. ESPO employs an optimization framework with three modes: maximizing rewards, minimizing costs, and balancing the trade-off between the two. By dynamically adjusting the sampling process based on the observed conflict between reward and safety gradients, ESPO theoretically guarantees convergence, optimization stability, and improved sample complexity bounds. Experiments on the Safety-MuJoCo and Omnisafe benchmarks demonstrate that ESPO significantly outperforms existing primal-based and primal-dual-based baselines in terms of reward maximization and constraint satisfaction. Moreover, ESPO achieves substantial gains in sample efficiency, requiring 25--29% fewer samples than baselines, and reduces training time by 21--38%.

View on arXivView PDF

Code Implementations(1)

PyTorchApache-2.0

JMLR: OmniSafe is an infrastructural framework for accelerating SafeRL research.

1,145161Python, MakefileNov 19, 20221 years agoApache-2.0
benchmarkconstraint-rlconstraint-satisfaction-problemdeep-learningdeep-reinforcement-learning+9 more

Similar Papers

Cite this paper

@article{gu2024enhancing,
  title  = {Enhancing Efficiency of Safe Reinforcement Learning via Sample Manipulation},
  author = {Shangding Gu and Laixi Shi and Yuhao Ding and Alois Knoll and Costas Spanos and Adam Wierman and Ming Jin},
  year   = {2024},
  eprint = {2405.20860},
  archivePrefix = {arXiv},
  doi    = {10.48550/arXiv.2405.20860},
  url    = {http://arxiv.org/abs/2405.20860v1},
  journal = {NEURIPS 2024 2024}
}

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/2405.20860.svg)](https://codeofpaper.com/paper/2405.20860)

Discussion