In Reinforcement Learning (RL), maximizing rewards is often insufficient for real-world engineering applications like autonomous driving or robotics. These domains require agents to satisfy strict safety constraints. A recent study from Politecnico di Milano, "Last-Iterate Global Convergence of Policy Gradients for Constrained Reinforcement Learning" (NeurIPS 2024), addresses a critical gap in Constrained RL (CRL): ensuring the final trained policy is both optimal and safe.
The Challenge: Average vs. Last-Iterate Convergence
Most CRL algorithms utilize primal-dual methods, which frame the problem as a game between a "Primal" player (maximizing rewards) and a "Dual" player (enforcing constraints via Lagrange multipliers). However, this optimization process is notoriously unstable and prone to oscillations.
Standard theoretical guarantees in CRL often only prove average-iterate convergence. This means that while the average of all policies encountered during training might be safe, the last policy—the one actually intended for deployment—could be unsafe or perform poorly. Furthermore, many existing theories are dimension-dependent, making them difficult to scale to high-dimensional state and action spaces.
The C-PG Framework
The researchers introduced C-PG (Constrained Policy Gradient), a framework designed to provide dimension-free, last-iterate global convergence guarantees. The core innovation is the application of Ridge Regularization to the dual variables. By adding a penalty term ($-\frac{\omega}{2}\|\lambda\|_2^2$) to the Lagrange multipliers, the objective becomes strongly concave with respect to the constraints. This dampens oscillations and allows the training process to settle on a global optimum for the final iterate.
C-PG is designed to be exploration-agnostic, supporting two major paradigms:
- C-PGAE (Action-based): Directly learning stochastic policy parameters (e.g., REINFORCE).
- C-PGPE (Parameter-based): Learning a "hyperpolicy" that samples policy parameters, which is particularly effective in noisy environments.
Theoretical Guarantees and Risk Management
A key strength of the C-PG framework is its ability to handle a variety of risk measures beyond simple expected cost. This is vital for safety-critical systems where the "worst-case" outcomes (the tail of the distribution) are more important than the average.
The framework's theoretical foundation rests on weak $\psi$-gradient domination, a more realistic assumption for neural network-based policies than standard convexity. Under this assumption, the authors derived explicit sample complexity rates for both exact and estimated gradients.
As shown in the table above, under the Polyak-Łojasiewicz (PL) condition ($\psi=2$), the algorithm achieves a convergence rate of $O(\omega^{-1} \log \epsilon^{-1})$ with exact gradients. These rates are dimension-free, ensuring the theory remains applicable as problem complexity grows.
Experimental Validation
The researchers validated C-PG across several benchmarks, including Discrete Grid World with Walls (DGWW), CostLQR, and high-dimensional MuJoCo tasks (Swimmer-v4 and Hopper-v4).
Key findings include:
- Efficiency: C-PGAE reached optimal feasible policies with significantly fewer trajectories than state-of-the-art baselines like NPG-PD.
- Robustness: In MuJoCo tasks, risk-aware versions of the algorithm successfully minimized the Conditional Value at Risk (CVaR), demonstrating the ability to build agents robust to rare but dangerous failures.
Conclusion
By providing a theoretical bridge between training stability and final-policy safety, this work offers a new standard for deploying RL in the real world. While future work may seek to close the remaining gap between these upper bounds and theoretical lower bounds, C-PG represents a significant step toward reliable, safety-constrained autonomous systems.
Summary updated