NeurIPS 2026Coming to NeurIPS?Explore papers, orals & directions

The Regret of Exploration and the Control of Bad Episodes in Reinforcement Learning

Victor Boone, Bruno GaujalICML 2023

TL;DR

This paper introduces the Regret of Exploration, a new metric that exposes how traditional Reinforcement Learning (RL) algorithms can get "stuck" in suboptimal behavior for arbitrarily long periods. To fix this, the authors propose UCRL-PT, an algorithm that uses a novel Performance Test (PT) to terminate episodes based on policy quality rather than just visit counts. This approach achieves logarithmic exploration regret in deterministic environments without sacrificing standard performance.

The Problem: The "Bad Episode" Trap

In Reinforcement Learning, "regret" is the standard way to measure performance—it represents the difference between the reward an optimal agent would get and what the learning agent actually received. However, standard regret can be overly forgiving of severe, localized failures.

Most modern RL algorithms are episodic: they pick a policy, stick with it for an "episode," and then update their model. To ensure eventual convergence, these algorithms often use a "doubling trick," where an episode only ends when the number of visits to a state-action pair doubles.

Regret accumulation in standard UCRL2 showing long periods of suboptimal behavior.

The problem with this approach is that as time goes on, episodes become infinitely long. If the algorithm picks a "bad" (suboptimal) policy for an exploration episode late in the learning process, it will stay stuck in that bad behavior for a massive amount of time. The figure above illustrates this instability in classical algorithms like UCRL2: the shaded regions show extended periods where the agent is trapped in a bad episode, accumulating regret linearly. While the average regret over infinite time still looks mathematically acceptable (sublinear), the instantaneous experience for a real-world user—such as a patient in a medical trial receiving an inferior treatment—would be disastrous.

Methods: Regret of Exploration and UCRL-PT

To address this, the authors propose two major contributions:

  1. Regret of Exploration ($RegExp$): A new metric that measures the asymptotic cost of a single exploration episode. While standard regret is $O(\sqrt{T})$, the authors show that almost all existing episodic algorithms have a linear ($O(T)$) regret of exploration. This means the duration of bad episodes grows as fast as the total time horizon.
  2. UCRL-PT (Performance Test): A new algorithm that modifies the classic UCRL2. Instead of relying solely on the doubling trick to end an episode, it introduces a Performance Test (PT).

The Rule: The algorithm constantly monitors the "optimistic value" of the current policy. If the current policy’s predicted performance falls too far below the best possible policy found in the current confidence set, the episode is terminated immediately.

The Logic: If a policy is clearly underperforming based on new incoming data, there is no reason to wait for visit counts to double. The algorithm kills the episode and updates the strategy immediately. To make this computationally feasible, the authors introduce "Memorization" and "Sparse PT" (checking only at power-of-two intervals).

Key Results

Comparison of regret between UCRL2 and UCRL-PT, demonstrating shorter bad episodes.
  • Exploration Efficiency: As shown in the comparison above, UCRL-PT significantly shortens the duration of "bad" episodes compared to standard UCRL2. The regret steps are cut short before they can grow out of control.
  • Standard Regret Preservation: UCRL-PT maintains the optimal $O(\sqrt{T})$ standard regret. Adding the performance test doesn't hurt long-term learning efficiency.
  • Logarithmic Stability: For non-degenerate deterministic MDPs, the authors prove that UCRL-PT reduces the Regret of Exploration from linear ($O(T)$) to logarithmic ($O(\log T)$). This means the "pain" of a bad exploration phase becomes negligible over time.
  • Computational Feasibility: With the proposed acceleration tricks, the algorithm's runtime becomes comparable to original episodic algorithms, making it practical for real-world use.

Limitations and Future Work

  • Deterministic Focus: The strongest theoretical result ($O(\log T)$ exploration regret) is currently limited to deterministic MDPs. While the algorithm works empirically in stochastic settings, the same theoretical bound isn't yet proven there.
  • Computational Overhead: Even with optimizations, UCRL-PT requires running Extended Value Iteration (EVI) more frequently than standard algorithms, which could be a bottleneck in very large state spaces.
  • Hyperparameter Sensitivity: The algorithm introduces a parameter $\alpha$ that tunes the sensitivity of the performance test. If $\alpha$ is too small, the algorithm might switch policies too often, risking instability; if too large, it reverts to the slow-switching behavior of the doubling trick.

Summary updated

BibTeX
@inproceedings{boone2023regret,
  author = {Victor Boone and Bruno Gaujal},
  title = {{The Regret of Exploration and the Control of Bad Episodes in Reinforcement Learning}},
  booktitle = {International Conference on Machine Learning},
  year = {2023},
  url = {https://openreview.net/forum?id=vxyaYltes2},
}
Figure