Safe Policy Learning for Continuous Control

Yinlam Chow, Ofir Nachum, Aleksandra Faust, Edgar A. Duéñez-Guzmán, Mohammad Ghavamzadeh

Abstract

Standard reinforcement learning (RL) algorithms often explore unsafe behaviors during training, posing significant risks in real-world applications like robotics. This paper presents two Lyapunov-based policy gradient algorithms designed to enforce safety constraints throughout the training process for continuous control tasks. By projecting policy parameters or actions into a mathematically guaranteed "safe set," these methods enable agents to maximize rewards while strictly adhering to safety thresholds. The approach is validated on MuJoCo benchmarks and a real-world 150kg Fetch robot navigating a dynamic office environment.

Introduction

In reinforcement learning, agents typically learn through trial and error. While acceptable in simulation, this "fail-fast" approach is catastrophic in physical environments where collisions can damage hardware or harm humans. Constrained Markov Decision Processes (CMDPs) offer a framework for balancing reward maximization with safety costs. However, traditional CMDP solvers like Lagrangian relaxation often fail to guarantee safety during training, only achieving it asymptotically. This work addresses the need for scalable, continuous control algorithms that maintain safety throughout the learning process.

Methodology

The core of the proposed approach is the use of Lyapunov functions from control theory to decompose long-term trajectory constraints into step-by-step, state-dependent constraints. Two primary integration methods are introduced:

  1. $θ$-projection (Policy Parameter Projection): This method modifies the policy gradient update by projecting the neural network's parameter changes onto a feasible set that satisfies Lyapunov safety constraints.
  2. $a$-projection (Action Projection): A differentiable "safety layer" is appended to the policy network. It projects the network's unconstrained action to the nearest action in Euclidean space that satisfies the safety constraint, allowing for end-to-end backpropagation.

The authors demonstrate that Constrained Policy Optimization (CPO) is a specific on-policy instance of the $θ$-projection method.

Experimental Evaluation and Results

The algorithms were tested on safety-augmented MuJoCo tasks including HalfCheetah-Safe (speed limits) and Point-Gather (hazard avoidance).

Training performance and constraint satisfaction in MuJoCo environments. The proposed Lyapunov-based methods maintain safety costs below the threshold (dashed line) while baselines often violate them.

In simulation, both $θ$-projection and $a$-projection methods successfully stabilized constraint costs below safety thresholds early in training. In contrast, standard unconstrained algorithms and Lagrangian methods exhibited significant and often oscillatory constraint violations. The $a$-projection method proved particularly effective, offering smoother gradient updates and faster learning by correcting actions directly at the end of the pipeline.

On a physical 150kg Fetch robot, the SDDPG-$a$ algorithm enabled over 500 meters of safe travel in a dynamic office. Notably, the agent developed conservative emergent behaviors, such as stopping entirely when no safe path was available, rather than attempting risky maneuvers.

Conclusion

This work provides a robust framework for safe reinforcement learning in continuous action spaces. By leveraging Lyapunov functions, the proposed algorithms bridge the gap between theoretical safety guarantees and practical, scalable deep RL. Future work aims to extend these methods to fully stochastic policies and model-based RL for even more efficient safe exploration.

Summary updated

BibTeX
@inproceedings{chow2020safe,
  author = {Yinlam Chow and Ofir Nachum and Aleksandra Faust and Edgar A. Duéñez-Guzmán and Mohammad Ghavamzadeh},
  title = {{Safe Policy Learning for Continuous Control}},
  booktitle = {Conference on Robot Learning},
  year = {2020},
}
Figure