NeurIPS 2026Coming to NeurIPS?Explore papers, orals & directions

Proactive Constrained Policy Optimization with Preemptive Penalty

Ning Yang, Pengyu Wang, Guoqing Liu, Haifeng Zhang, Pin Lv, Jun WangarXiv 2025 · DOI

Introduction

In Reinforcement Learning (RL), agents typically learn through a process of trial and error. In "Safe RL," the challenge is to maximize rewards while strictly adhering to safety constraints—such as a robot avoiding obstacles or a vehicle maintaining speed limits. Traditional approaches often rely on the Lagrangian method, which is fundamentally reactive. These methods only apply penalties after a constraint has been violated, leading to unstable "sawtooth" training patterns where the agent oscillates between rule-breaking and overcorrection. Furthermore, near safety boundaries, the gradient signal is often insufficient to prevent violations before they occur.

Methodology: Proactive Safety

To address these instabilities, researchers have developed Proactive Constrained Policy Optimization (PCPO). This framework shifts from reactive penalties to a proactive barrier mechanism.

Preemptive Penalty (Extended Log-Barrier)

Instead of a simple post-violation penalty, PCPO integrates an extended log-barrier function directly into the objective. This acts as a "repulsive force" field: as the agent's policy approaches a constraint boundary, the penalty grows exponentially, pushing the agent back into the feasible region before a violation occurs.

Comparison of reactive Lagrange multipliers (a) and the proactive Log-barrier extension (b).

Constraint-Aware Intrinsic Reward

To further guide exploration near boundaries without crossing them, PCPO employs a constraint-aware internal reward. This bonus activates specifically near safety limits, guiding the agent toward safe behaviors and turning the boundary into a useful signal for learning rather than a point of failure.

Experimental Evaluation

The framework was evaluated using the Safety-gymnasium benchmark and the MuJoCo physics engine across several tasks:

  • Safe Velocity: Robotic agents (Hopper, Walker2d, Ant, HalfCheetah) must run at maximum speed without exceeding a defined limit.
  • Safe Navigation: "Point" and "Car" agents navigate circular paths while remaining within strict perimeters.

Results and Discussion

PCPO was compared against state-of-the-art baselines, including CUP, EPO, FOCOPS, and TRPOLag.

Performance and cost curves across various Safety-gymnasium tasks. PCPO (purple) shows higher rewards and significantly more stable cost adherence.

Performance and Stability

PCPO consistently achieved higher rewards while maintaining strict constraint adherence. For instance, in the Hopper-v1 task, PCPO reached a return of 1342.09, surpassing TRPOLag (1306.79). Crucially, PCPO's cost curves are remarkably smooth compared to the jagged oscillations of Lagrangian methods. Once PCPO identifies the safety boundary, it maintains a stable trajectory just within the limit.

Generalization

The method demonstrated superior performance across different random seeds, suggesting that the agent learns a fundamental concept of safety rather than just memorizing specific environment configurations.

Conclusion

PCPO offers a robust solution for safe RL by replacing reactive penalties with proactive barriers. While it introduces new hyperparameters like the penalty factor ($\tau$) and intrinsic reward weight ($\omega$), sensitivity analyses show the method remains stable across various settings. Future work may extend this proactive approach to multi-agent systems and high-stakes real-world robotics where training violations carry significant physical or financial costs.

Summary updated

BibTeX
@misc{yang2025proactive,
  author = {Ning Yang and Pengyu Wang and Guoqing Liu and Haifeng Zhang and Pin Lv and Jun Wang},
  title = {{Proactive Constrained Policy Optimization with Preemptive Penalty}},
  year = {2025},
  eprint = {2508.01883},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2508.01883},
}
Figure