Abstract
This paper studies the safe reinforcement learning problem formulated as an episodic finite-horizon tabular constrained Markov decision process with an unknown transition kernel and stochastic reward and cost functions. We propose a model-based algorithm based on novel cost and reward function estimators that provide tighter cost pessimism and reward optimism. While guaranteeing no constraint violation in every episode, our algorithm achieves a regret upper bound of $\widetilde{\mathcal{O}}((\bar C - \bar C_b)^{-1}H^{2.5} S\sqrt{AK})$ where $\bar C$ is the cost budget for an episode, $\bar C_b$ is the expected cost under a safe baseline policy over an episode, $H$ is the horizon, and $S$, $A$ and $K$ are the number of states, actions, and episodes, respectively. This improves upon the best-known regret upper bound, and when $\bar C- \bar C_b=\Omega(H)$, it nearly matches the regret lower bound of $\Omega(H^{1.5}\sqrt{SAK})$. We deduce our cost and reward function estimators via a Bellman-type law of total variance to obtain tight bounds on the expected sum of the variances of value function estimates. This leads to a tighter dependence on the horizon in the function estimators. We also present numerical results to demonstrate the computational effectiveness of our proposed framework.
Introduction
In standard Reinforcement Learning (RL), an agent learns by trial and error to maximize rewards. However, in real-world applications like autonomous driving or healthcare, "errors" can be catastrophic. Safe RL attempts to solve this by modeling the environment as a Constrained Markov Decision Process (CMDP), where the agent must maximize rewards while keeping expected costs below a certain budget.
Most existing algorithms focus on cumulative constraint violation or hard constraint violation (minimizing the sum of positive violations). This paper tackles the most stringent requirement: zero constraint violation. This means the agent must satisfy safety requirements in every single episode of learning. The challenge lies in balancing "pessimism" about costs with "optimism" about rewards while the environment's transition rules are initially unknown.
Methodology: The DOPE+ Algorithm
The authors propose DOPE+ (Doubly Optimistic Pessimistic Exploration with Tighter Function Estimators). It builds on the previous DOPE algorithm but introduces a more refined mathematical analysis to tighten the bounds.
Key components include:
- Safe Baseline Policy: The algorithm assumes access to a known "safe baseline" policy ($\pi_b$) that is strictly within the cost budget. The agent follows this for an initial period ($K_0$ episodes) to safely gather data.
- Tighter Estimators: The core innovation lies in how the agent estimates rewards and costs. Previous methods used a "naive" upper bound of the horizon $H$ for value functions. This paper applies a Bellman-type law of total variance to bound the expected sum of variances of value function estimates. This allows for a tighter "extra pessimism" term in the cost function.
- Optimistic/Pessimistic LP: In each episode, the agent solves an optimization problem (formulated as an extended linear program) to find a policy that is optimistic about rewards but pessimistic enough about costs to guarantee safety even with model uncertainty.
Theoretical Comparison and Regret Bounds
The primary result is the theoretical improvement in the regret bound. By moving from a simple $H$-based bound to a variance-aware bound, the authors reduce the regret's dependence on the horizon from $H^3$ to $H^{2.5}$.
As shown in the table above, DOPE+ achieves a tighter bound than all previous "zero violation" algorithms. When the safety budget is sufficiently large ($\bar{C} - \bar{C}_b = \Omega(H)$), the regret bound of DOPE+ nearly matches the lower bound for unconstrained RL, suggesting that with enough safety margin, learning safely does not have to be significantly slower than learning without constraints.
Empirical Evaluation
The researchers evaluated DOPE+ on a three-state CMDP instance, a standard benchmark in theoretical RL literature. In these numerical experiments, DOPE+ consistently outperformed the original DOPE algorithm, achieving lower cumulative regret while maintaining a perfect safety record (zero violations) across all test runs.
Conclusion and Future Work
DOPE+ represents a significant step forward in safe RL by providing tighter theoretical guarantees for zero-violation learning. However, several challenges remain:
- Tabular Setting: The current work is limited to tabular MDPs. Scaling to continuous or high-dimensional state spaces would require integrating function approximation (e.g., Deep RL).
- Baseline Requirement: The algorithm relies on a known safe baseline policy, which may not be available in all environments.
- State Dependence: There is still a gap of $\sqrt{S}$ between the upper bound of DOPE+ and the theoretical lower bound, leaving room for even tighter analysis in future research.
Summary updated