Introduction
Deploying Reinforcement Learning (RL) in high-stakes, real-world applications such as autonomous driving or robotics requires strict adherence to safety constraints. While traditional Constrained Markov Decision Processes (CMDPs) focus on cumulative costs (e.g., maintaining an average speed), real-world safety often demands state-wise constraints (e.g., never colliding with an obstacle). This paper introduces POCE (Primal Policy Optimization with Conservative Estimation), a framework designed to handle both long-term and immediate safety requirements in an offline setting, where learning occurs from a fixed dataset without further environment interaction.
Problem Formulation: Beyond Cumulative Costs
Standard safety-focused RL typically optimizes for cumulative costs. However, a policy that is safe on average might still encounter catastrophic individual states. The authors identify two primary challenges in offline multi-constraint RL:
- Extrapolation Error: Offline agents often overestimate rewards or underestimate risks for out-of-distribution (OOD) actions not present in the training data.
- Optimization Instability: Traditional Lagrangian methods, which use multipliers to balance reward and cost, are notoriously sensitive to hyperparameters and often fail to converge in complex multi-constraint scenarios.
The POCE Framework
POCE addresses these challenges through three core innovations:
1. Maximum Markov Decision Process (MMDP)
To incorporate state-wise constraints into a standard RL framework, the authors reframe the problem as a Maximum MDP. By tracking the maximum cost encountered along a trajectory rather than just the sum, immediate safety violations are mathematically integrated into the optimization objective as "cost increments."
2. Primal Policy Optimization
Unlike Lagrangian dual-optimization, which can lead to unstable "oscillations" between reward-seeking and cost-minimizing behaviors, POCE employs a primal approach. The algorithm prioritizes safety: if the current policy violates constraints, the objective switches entirely to cost minimization. Once the policy is within the safety budget, it shifts to reward maximization. This "if-safe-then-maximize" logic provides significantly more stable convergence.
3. Conditional Bellman Operator for Conservative Estimation
To mitigate extrapolation errors, POCE introduces a Conditional Bellman Operator. For actions present in the offline dataset, it performs standard updates. For OOD actions, it applies a "pseudo-target" that ensures the agent does not underestimate potential risks. This conservative estimation prevents the agent from selecting unknown actions that might appear "dangerously optimistic."
Experimental Evaluation
The authors evaluated POCE on modified versions of Safety-gym (PointGoal and CarGoal) and Mujoco (AntVelocity). Since standard multi-constraint offline datasets were unavailable, they curated datasets with continuous cost values in the [0, 1] range and varying "safety factors" ($\phi$) to simulate different levels of risky behavior in the training data.
Key Results and Insights
POCE demonstrated superior performance across all benchmarks compared to strong baselines like BCQ-Lag, CCRR, and CPQ-Lag.
- Superior Safety: In the PointGoal task, POCE achieved a remarkably low cost violation rate of approximately 0.09%, significantly outperforming the best baseline, which hovered around 0.20%.
- Performance Gains: POCE consistently achieved higher rewards while strictly adhering to safety budgets. In the CarGoal environment, POCE reached a reward of 13.58, surpassing BCQ-Lag's 12.63.
- Robustness to Data Quality: The framework remained stable even when trained on datasets containing a high frequency of risky behaviors, proving its ability to learn safe policies from suboptimal demonstrations.
Conclusion and Future Work
POCE represents a significant step forward for safe offline reinforcement learning. By combining a primal optimization strategy with conservative cost estimation, it effectively manages the trade-off between performance and safety in multi-constraint environments. While the method relies on hyperparameter tuning for its conservative components and is bound by the quality of the offline dataset, its stability and safety record make it a promising candidate for real-world deployment in safety-critical systems. Future research will focus on scaling POCE to higher-dimensional tasks and exploring theoretical bounds for the conditional Bellman operator in non-linear environments.
Summary updated