Introduction
In safety-critical domains such as robotics and autonomous driving, reinforcement learning (RL) agents must optimize performance while strictly adhering to safety constraints. This is typically formulated as Constrained RL (CRL), where the objective is to maximize a reward function $J_R$ subject to a cost constraint $J_C \leq d$. However, a significant bottleneck in CRL is the sensitivity to the cost budget $d$. A fixed, overly strict budget can lead to "safe traps"—sub-optimal local minima where the agent is safe but fails to explore high-reward regions. Conversely, a loose budget may fail to ensure safety.
The ACPO Framework
To address these challenges, we introduce Adversarial Constrained Policy Optimization (ACPO). ACPO moves away from static budgets by treating the reward-cost relationship as an adversarial game. The framework dynamically adapts the cost budget through an iterative two-stage process:
- Max-reward Stage: The agent maximizes reward given the current cost budget, pushing the boundaries of performance.
- Min-cost Stage: The agent minimizes cost while maintaining the reward level achieved in the previous stage, effectively "tightening" the safety profile without sacrificing performance.
To ensure convergence to the final desired safety target $d_{des}$, ACPO incorporates a Projection Stage. This stage adjusts the policy toward the feasible region if it becomes too conservative or too risky.
Technically, ACPO utilizes an interior-point method with logarithmic barrier functions. This approach transforms the constrained optimization problem into a sequence of unconstrained problems, allowing for efficient solving via standard methods like Proximal Policy Optimization (PPO) while providing theoretical guarantees for monotonic performance updates.
Experimental Evaluation
We evaluated ACPO against state-of-the-art baselines, including PPO-Lagrangian (PPO-Lag), Constrained Policy Optimization (CPO), and Interior Point Optimization (IPO). Testing was conducted across several benchmarks:
- Safety Gymnasium: Tasks involving "Point" and "Car" agents in
GoalandCircleenvironments. - Quadruped Locomotion: A high-dimensional task using a simulated Unitree Go1 robot, requiring the simultaneous management of eight distinct safety costs (e.g., torque limits, joint ranges).
Key Results
ACPO demonstrates superior performance across all tested environments. In the CarGoal1 task, ACPO achieved a reward of 26.50, significantly higher than PPO-Lag (20.68) and CPO (19.79). Crucially, ACPO manages to escape the conservative local minima that often plague traditional CRL methods.
In complex quadruped locomotion tasks, ACPO outperformed IPO by 9% and PPO-Lag by 15% in terms of reward. Furthermore, ACPO proved more effective than manual budget scheduling (IPO-C), outperforming human-tuned curricula by 8%. This highlights the advantage of an automated, generative budget adaptation strategy over manual expert tuning.
Conclusion
Adversarial Constrained Policy Optimization (ACPO) provides a robust framework for CRL by enabling dynamic budget adaptation. By allowing the agent to "breathe"—temporarily relaxing constraints to explore and then tightening them to ensure safety—ACPO effectively navigates the reward-cost trade-off. Future work will focus on generalizing this adversarial logic to other CRL frameworks and providing tighter theoretical bounds for the projection stage.
Summary updated