TL;DR
This paper introduces DOPE+, an algorithm for tabular safe reinforcement learning that strictly guarantees zero safety constraint violations in every single episode. By leveraging a Bellman-type law of total variance to derive tighter per-episode estimation bonuses, DOPE+ achieves an improved regret bound of $\widetilde{\mathcal{O}}((\bar{C} - \bar{C}_b)^{-1} H^{2.5} S \sqrt{AK})$, shaving a factor of $\widetilde{\mathcal{O}}(\sqrt{H})$ off the previous state-of-the-art and matching the optimal horizon dependence when the baseline safety margin is $\Omega(H)$.
What Problem Does This Paper Address?
In many real-world reinforcement learning (RL) applications—such as robotics, autonomous driving, and medical treatments—violating safety constraints even once during training can lead to catastrophic failures. Such problems are typically framed as Constrained Markov Decision Processes (CMDPs), where an agent seeks to maximize cumulative reward subject to expected cumulative costs remaining below a budget $\bar{C}$.
Most online CMDP algorithms only control soft (cumulative) constraint violations, where negative violations in some episodes cancel out positive violations in others, or hard violations that still allow occasional violations. Only a few algorithms target zero constraint violation (satisfying constraints in every episode).
Prior state-of-the-art zero-violation methods (such as DOPE) rely on a known safe baseline policy $\pi_b$ (with expected cost $\bar{C}_b < \bar{C}$), but their regret bound scaled with $H^3$ in episode horizon length $H$. In contrast, the unconstrained lower bound scales with $H^{1.5}$. This paper investigates whether it is possible to guarantee zero violations while closing the gap in horizon dependence.
Methods
The authors propose DOPE+ (Doubly Optimistic Pessimistic Exploration with Tighter Function Estimators), a model-based algorithm operating over finite-horizon tabular CMDPs:
- Initial Safe Phase: The algorithm executes the safe baseline policy $\pi_b$ for an initial $K_0 = \widetilde{\mathcal{O}}\left(\frac{H^3 S^2 A}{(\bar{C} - \bar{C}_b)^2}\right)$ episodes to gather sufficient transition observations, ensuring the downstream optimization problem becomes strictly feasible.
- Occupancy Measure LP: For subsequent episodes, DOPE+ solves an extended linear program over occupancy measures within a Bernstein-based transition confidence set $\mathcal{P}_k$.
- Tighter Pessimistic Cost Estimator ($\widehat{g}_k$): Standard methods penalize uncertainty using a conservative transition error bonus $U_k$ scaling as $2H \varepsilon_k$. DOPE+ refines this using a Bellman-type law of total variance, reducing the leading factor from $2H$ to $8\sqrt{H}$.
- Balanced Optimistic Reward Estimator ($\widehat{f}_k$): Because conservative cost estimators can restrict exploration, DOPE+ incorporates a calibrated bonus proportional to $\frac{H}{\bar{C} - \bar{C}_b}(3R_k + U_k)$ truncated to a valid bound $B$.
Datasets
- Synthetic CMDP Benchmark: As a foundational theoretical paper, experiments are conducted in a modified synthetic 3-state, 2-action finite-horizon CMDP originally adapted from Zheng & Ratliff (2020), Simão et al. (2021), and Bura et al. (2022). No static machine learning datasets are used.
Key Insights and Ideas
- Less Cost Pessimism Yields Better Reward Regret: In CMDPs, conservative cost estimators shrink the feasible policy set. By bounding estimation error more tightly, the feasible set expands, giving the agent freedom to pursue more reward-optimistic policies without violating safety.
- Per-Episode Model-Dependent Variance Bounds: Earlier variance-reduction techniques (e.g., Chen & Luo, 2021) only bounded cumulative errors across all episodes as a function of the unknown true transition kernel $P$. DOPE+ proves an analytical per-episode bound expressed directly as a function of the algorithm's chosen transition model $P_k$, making the variance reduction operationally useful inside the algorithm's planning step.
- Law of Total Variance on Finite MDPs: By decomposing the value difference $V_1^{\pi}(g, P) - V_1^{\pi}(g, P_k)$ and bounding the expected sum of variances $\mathbb{E}[\sum_h \text{Var}(V_{h+1})]$ by $2H^2$ rather than the naive $H^3$, the leading horizon dependence drops by $\sqrt{H}$.
Key Results
-
Theoretical Regret Bound: DOPE+ attains a cumulative regret of: $$\widetilde{\mathcal{O}}\left(\frac{H}{\bar{C} - \bar{C}_b}\left(H^{1.5} S \sqrt{AK} + \frac{H^4 S^3 A}{\bar{C} - \bar{C}_b}\right)\right)$$ improving upon DOPE's $\widetilde{\mathcal{O}}\left((\bar{C} - \bar{C}_b)^{-1} H^3 S \sqrt{AK}\right)$ by a factor of $\widetilde{\mathcal{O}}(\sqrt{H})$.
-
Horizon Optimality: When the baseline safety gap $\bar{C} - \bar{C}_b = \Omega(H)$, the bound becomes $\widetilde{\mathcal{O}}(H^{1.5} S \sqrt{AK})$, matching the optimal $H^{1.5}$ scaling of unconstrained episodic MDPs.
- Strict Safety: With probability at least $1 - 14\delta$, $\text{Violation}(\vec{\pi}) = 0$ holds across all episodes.
- Numerical Validation: In empirical runs over $K = 200{,}000$ episodes and horizon $H = 30$, DOPE+ consistently attained lower cumulative reward regret than DOPE while strictly maintaining zero constraint violations.
Limitations and Future Work
- Model-Based Computational Burden: The algorithm solves an extended linear program with $\mathcal{O}(S^2 A H)$ variables and constraints, which becomes impractical for large state spaces.
- Tabular Restriction: The occupancy-measure LP formulation cannot be directly extended to function approximation (e.g., linear or low-rank MDPs).
- Reliance on a Safe Baseline Policy: The agent must be provided with a strictly feasible safe baseline policy $\pi_b$ and its cost $\bar{C}_b$ in advance.
- Remaining $\widetilde{\mathcal{O}}(\sqrt{S})$ Gap: Compared to the unconstrained lower bound $\Omega(H^{1.5}\sqrt{SAK})$, DOPE+ has an extra $\sqrt{S}$ factor. The authors highlight that existing unconstrained techniques bypass this factor by exploiting policy-specific optimism (e.g., Azar et al., 2017), whereas zero-violation safety requires uniform error control over all candidate policies.
Summary updated