Exterior Penalty Policy Optimization with Penalty Metric Network under Constraints

Shiqing Gao, Jiaxin Ding, Luoyi Fu, Xinbing Wang, Chenghu Zhou · DOI

Introduction

Reinforcement Learning (RL) has shown immense potential in complex decision-making tasks. However, deploying RL in real-world scenarios—such as robotics or autonomous driving—requires agents to maximize rewards while strictly adhering to safety constraints. This is formally modeled as a Constrained Markov Decision Process (CMDP).

Existing approaches to solving CMDPs often face significant trade-offs. Primal-Dual (Lagrangian) methods frequently suffer from training instability and high oscillations. Second-order methods, while mathematically robust, are computationally prohibitive due to the need for high-dimensional Hessian inversions. Meanwhile, traditional penalty methods often employ rigid functions that fail to provide useful gradient information near constraint boundaries or struggle when starting from unsafe initial policies.

Exterior Penalty Policy Optimization (EPO)

To address these challenges, we introduce Exterior Penalty Policy Optimization (EPO), a first-order constrained RL framework. The core of EPO is the Penalty Metric Network (PMN), which adaptively penalizes safety violations through a dual-stream architecture.

The Penalty Metric Network (PMN) architecture utilizes dual streams (linear and quadratic) to adaptively penalize constraint violations.

The PMN consists of two primary components:

  1. Linear Cost Critic ($V_N$): This stream provides consistent, incremental feedback for small violations, allowing for fine-tuned adjustments near the safety boundary.
  2. Quadratic Cost Critic ($V_F$): This stream imposes significantly harsher penalties for large violations, effectively "shoving" the policy back into the feasible region during major safety failures.

A filter layer ensures that penalties are only applied when constraints are violated, while a weighting layer dynamically balances the two streams based on the severity of the violation. Furthermore, EPO utilizes a smooth surrogate objective based on a log-sum-exp formulation. This prevents the "dead gradient" problem common in ReLU-based penalties, ensuring the optimizer always has a clear direction toward the feasible region.

Experimental Evaluation

We evaluated EPO against six state-of-the-art baselines, including CPO, PPO-Lagrangian, and IPO, across two major benchmarks: Safety Gymnasium (navigation tasks with Point and Car agents) and Safety MuJoCo (physics-based locomotion with velocity constraints).

Performance comparison across Safety Gymnasium tasks. EPO (red) consistently achieves higher returns while maintaining stable constraint satisfaction.

Key Results

  • Superior Performance and Stability: In Safety Gymnasium, EPO consistently achieved higher rewards than baselines while maintaining lower constraint violations. As shown in the training curves, EPO exhibits lower variance and fewer "spikes" in violations compared to Lagrangian methods.
  • Rapid Constraint Satisfaction: EPO excels in scenarios where the initial policy is highly unsafe, converging to the feasible region faster than competing methods.
  • Computational Efficiency: Despite achieving safety results comparable to second-order methods like CPO, EPO requires less than half the training time due to its first-order nature.

Conclusion

EPO offers a robust and efficient solution for constrained reinforcement learning. By combining a dual-stream penalty architecture with a smooth surrogate objective, it achieves a balance between high reward performance and strict safety adherence. Future work will explore extending EPO to off-policy RL and handling more complex, state-dependent constraints.

Summary updated

BibTeX
@inproceedings{gao2024exterior,
  author = {Shiqing Gao and Jiaxin Ding and Luoyi Fu and Xinbing Wang and Chenghu Zhou},
  title = {{Exterior Penalty Policy Optimization with Penalty Metric Network under Constraints}},
  booktitle = {International Joint Conference on Artificial Intelligence},
  year = {2024},
  url = {https://openreview.net/forum?id=p2t5t7HlPF},
}
Figure