Introduction
Reinforcement Learning (RL) has shown remarkable success in complex tasks, but its application in safety-critical domains like autonomous driving or medical treatment remains limited. The primary hurdle is the "exploration-exploitation" trade-off: to find the best policy, an agent must explore unknown actions, some of which might be catastrophic. Traditional Safe RL often focuses on Constrained MDPs (CMDPs) where safety is measured as an average cost over time. However, in many real-world scenarios, even a single violation is unacceptable. This paper introduces a framework for RL with linear function approximation that guarantees zero safety violations throughout the learning process.
Problem Formulation: Linear MDPs and Hard Constraints
The authors consider Linear MDPs, where the transition probability, reward function, and safety cost function are linear in a $d$-dimensional feature space. Unlike standard CMDPs, the safety requirement here is a "hard" per-step constraint: the agent must ensure that the cost of every action taken is below a threshold with high probability.
To navigate this, the agent is assumed to have access to a "seed" safe action $a_0(s)$ for every state. This provides a safe starting point from which the agent can cautiously expand its knowledge of the environment.
The SLUCB-QVI Algorithm
The proposed algorithm, SLUCB-QVI (Safe Linear UCB Q/V Iteration), combines optimism for rewards with pessimism for safety.
As shown in Algorithm 1, the agent maintains confidence sets for both the reward and safety parameters. In each episode, it performs a backward value iteration (steps 3-5). Crucially, it computes a "Safe Set" $\mathcal{A}_h^k(s)$ (step 4) using a pessimistic estimate of the safety costs. It only considers actions that are guaranteed to be safe under the worst-case scenario within its current confidence interval. Within this safe subset, it then acts optimistically to maximize the Q-value (step 7).
Key Theoretical Insights
- Zero Violations: The primary theoretical contribution is the proof that SLUCB-QVI (and its randomized counterpart RSLUCB-QVI) achieves zero safety violations with high probability.
- Regret Bounds: The authors derive a regret bound of $\tilde{O}(\kappa \sqrt{d^3 H^3 T})$. Here, $\kappa$ is a constant representing the "safety cost"—essentially how much the safety constraints restrict the agent's ability to explore. This bound shows that the cost of absolute safety is a constant factor in the regret, maintaining the same order of magnitude as standard, unsafe linear RL algorithms.
- Star-Convexity: For the deterministic policy version (SLUCB-QVI), the authors assume the action space is "star-convex" relative to the safe seed action. This ensures that the agent can safely interpolate between known safe actions and potentially better ones, allowing for continuous exploration without crossing the safety boundary.
Experimental Results
The algorithms were tested in synthetic linear MDPs and a modified "Frozen Lake" environment from OpenAI Gym.
- Safety Performance: In all tests, SLUCB-QVI and RSLUCB-QVI maintained a 100% safety record. In contrast, baseline methods that treat safety as a penalty in the reward function (Lagrangian methods) frequently violated constraints during the early stages of learning.
- Efficiency: RSLUCB-QVI demonstrated faster convergence to an optimal safe policy compared to existing safe RL baselines like CISR, which often require external teacher interventions.
Conclusion
This work provides a rigorous theoretical foundation for safe RL in high-dimensional spaces using linear function approximation. By flipping the "optimism" principle to "pessimism" for safety, the authors demonstrate that it is possible to learn optimal policies without ever risking a catastrophic failure. Future work involves extending these guarantees to non-linear function approximators like deep neural networks and relaxing the requirement for a pre-known safe seed action.
Summary updated