Penalized Proximal Policy Optimization for Safe Reinforcement Learning

Linrui Zhang, Li Shen, Long Yang, Shixiang Chen, Xueqian Wang, Bo Yuan, Dacheng Tao

Introduction

In real-world reinforcement learning (RL) applications, such as autonomous driving or robotics, agents must maximize rewards while strictly adhering to safety constraints. This challenge is formally defined as a Constrained Markov Decision Process (CMDP). Traditional approaches often struggle with high computational costs, approximation errors, or difficulties in maintaining safety throughout the learning process.

Penalized Proximal Policy Optimization (P3O) is introduced as a first-order safe RL algorithm that addresses these issues. By transforming complex constrained optimization problems into a single unconstrained objective using exact penalty functions, P3O achieves state-of-the-art performance and safety without the need for second-order optimization methods like Hessian inversions.

Methodology

P3O's effectiveness stems from two key innovations:

  1. Exact Penalty Functions: Unlike log-barrier methods that require a feasible starting point or squared penalties that require coefficients to approach infinity, P3O utilizes a ReLU-based penalty. The authors provide theoretical proof that a finite penalty factor ($\kappa$) is sufficient to recover the exact optimal solution of the original constrained problem, provided $\kappa$ exceeds the Lagrange multiplier of the optimal solution.
  2. Dual-Clipped Surrogate Objective: Building on the Proximal Policy Optimization (PPO) framework, P3O extends the clipping mechanism to both reward and cost objectives. This dual clipping ensures the policy remains within a "trust region" for both performance and safety, preventing large, unsafe updates and eliminating the need for explicit second-order constraints.

This approach allows P3O to handle multiple constraints and multi-agent scenarios naturally by simply adding penalty terms to the loss function, maintaining scalability and implementation simplicity.

Experimental Evaluation

The researchers evaluated P3O across a diverse set of benchmarks designed to test single-constraint, multi-constraint, and multi-agent capabilities.

The benchmark environments used for evaluation: (a) AntCircle, (b) PointGather, (c) Navigation, and (d) Simple Spread.

The tasks included:

  • AntCircle: A locomotive task requiring an agent to move in a circle while staying within a specific boundary.
  • PointGather: An environment where the agent must collect items while avoiding hazardous bombs.
  • Navigation: A complex multi-constraint task where an agent reaches a target while avoiding virtual hazards and impassable pillars, each with distinct safety limits.
  • Simple Spread: A multi-agent collaborative task where agents must reach destinations without colliding with one another.

Results and Discussion

P3O demonstrated superior performance and robustness compared to established baselines like Constrained Policy Optimization (CPO) and PPO-Lagrangian.

Training curves showing (a) episode return and (b) convergence of cost to the safety limit (dashed red line) across different penalty configurations.

In the AntCircle task, P3O achieved 15% to 24% higher rewards than baselines while maintaining an average cost of 46.18, safely below the limit of 50. In contrast, CPO failed to satisfy the hard constraints in this environment. Furthermore, P3O showed remarkable precision in converging to safety limits across various thresholds (from $d=25$ to $d=100$), avoiding both over-conservatism and significant limit violations.

In multi-agent scenarios (MAP3O), the algorithm successfully maximized collective rewards while strictly enforcing mutual collision constraints, outperforming standard multi-agent PPO (MAPPO).

Conclusion

P3O represents a significant advancement in safe RL by providing a computationally efficient, first-order optimization framework that guarantees safety through exact penalty functions and dual clipping. While future work may explore its application to end-to-end visual tasks and further refine hyperparameter sensitivity, P3O currently offers a scalable and robust solution for complex constrained RL problems.

Summary updated

BibTeX
@inproceedings{zhang2022penalized,
  author = {Linrui Zhang and Li Shen and Long Yang and Shixiang Chen and Xueqian Wang and Bo Yuan and Dacheng Tao},
  title = {{Penalized Proximal Policy Optimization for Safe Reinforcement Learning}},
  booktitle = {International Joint Conference on Artificial Intelligence},
  year = {2022},
  doi = {10.24963/ijcai.2022/520},
}
Figure