Q-learning with UCB Exploration is Sample Efficient for Infinite-Horizon MDP

Yuanhao Wang, Kefan Dong, Xiaoyu Chen, Liwei Wang

Introduction

In reinforcement learning (RL), a core challenge is the "exploration-exploitation" dilemma: should an agent stick to what it knows works (exploit) or try new things to find potentially better strategies (explore)? While researchers have made massive strides in finite-horizon settings (where tasks have a fixed end), the infinite-horizon setting—where an agent interacts with an environment indefinitely with discounted rewards—remains notoriously tricky.

This paper introduces a Q-learning algorithm with Upper Confidence Bound (UCB) exploration bonuses specifically designed for infinite-horizon discounted Markov Decision Processes (MDPs). The authors prove that their algorithm achieves a sample complexity of $\tilde{O}(\frac{SA}{\epsilon^2(1-\gamma)^7})$, significantly improving upon the previous state-of-the-art for model-free methods and closing a long-standing quadratic gap in the dependence on the precision parameter $\epsilon$.

The Challenge of Infinite-Horizon Exploration

The authors focus on model-free algorithms, which learn optimal behavior without trying to build a full internal map (or generative model) of the environment's transition dynamics.

Prior to this work, the best model-free algorithm for the infinite-horizon setting was "Delayed Q-learning." However, its sample complexity—the number of "mistakes" or sub-optimal steps taken before learning a near-optimal policy—was quite high. Specifically, it suffered from a steep dependence on the desired precision $\epsilon$, scaling as $1/\epsilon^4$. This left a known theoretical gap between what Delayed Q-learning could achieve and the established theoretical lower bounds.

Infinite Q-learning with UCB

To bridge this gap, the authors propose Infinite Q-learning with UCB. The key innovation is adapting the UCB exploration strategy—highly popular in multi-armed bandits and finite-horizon RL—to the infinite-horizon Q-learning framework.

Key components of the algorithm include:

  • UCB Exploration Bonus: Instead of merely updating the Q-value with the observed reward, the algorithm adds a bonus term $b_k$ proportional to the uncertainty of a given state-action pair. This actively encourages the agent to explore less-visited states.
  • Historical Minimum ($\hat{Q}$): The algorithm maintains an optimistic estimate $Q$ and its historical minimum $\hat{Q}$. This ensures that the value estimates remain "optimistic" (higher than the true value) with high probability, a strict requirement for efficient UCB-based exploration.
  • Learning Rate Schedule: The authors employ a specific learning rate $\alpha_k = \frac{H+1}{H+k}$ designed to handle the error propagation inherent in discounted, infinite-horizon settings.

Key Insights and Theoretical Results

Closing the $\epsilon$ Gap

The most significant breakthrough in this paper is demonstrating that UCB-style exploration can reduce the sample complexity's dependence on $\epsilon$ from $1/\epsilon^4$ (as seen in Delayed Q-learning) to $1/\epsilon^2$. This improvement perfectly matches the theoretical lower bound's dependence on $\epsilon$, as well as the state ($S$) and action ($A$) space sizes, up to logarithmic factors.

Infinite $\neq$ Finite

The authors highlight that one cannot simply "reduce" an infinite-horizon problem to a finite-horizon one. In infinite-horizon settings, the agent can enter under-explored regions at any time, and policies must remain time-invariant. This required the development of a novel analysis technique for counting "mistakes" along a single, endless trajectory.

Efficiency vs. Memory

While some model-based algorithms (which store the entire transition matrix) exhibit slightly better sample complexity regarding the discount factor, they require $O(S^2A)$ memory. In contrast, this model-free Q-learning approach only requires $O(SA)$ memory, making it vastly more scalable for environments with large state spaces.

Provable Superiority via Hard Instances

To solidify their claims, the authors construct a specific, small synthetic MDP (3 states, 2 actions) designed as a "hard instance." Through mathematical proofs, they demonstrate that the older Delayed Q-learning algorithm must perform poorly on this MDP (taking at least $\Omega(1/\epsilon^3)$ mistakes), thereby proving that their new UCB-based approach is strictly superior.

Limitations and Future Work

While this paper marks a major theoretical milestone, several open challenges remain:

  • The $(1-\gamma)$ Factor: Although the algorithm is optimal in $S, A,$ and $\epsilon$, there is still a gap in the dependence on the discount factor $(1-\gamma)$. The current upper bound has a power of 7, while the theoretical lower bound sits at a power of 3. Closing this specific gap remains an open challenge for model-free RL.
  • Deterministic Rewards: The current analysis assumes deterministic rewards $r(s, a)$. While common in theoretical RL, extending these tight bounds to stochastic reward settings is a natural next step.
  • Function Approximation: Like most fundamental RL theory, this work assumes a "tabular" setting (a discrete table of states and actions). Extending these UCB guarantees to deep RL, where neural networks approximate Q-values for continuous or massive state spaces, remains the "holy grail" for practical applications.

Summary updated

BibTeX
@inproceedings{wang2020q,
  author = {Yuanhao Wang and Kefan Dong and Xiaoyu Chen and Liwei Wang},
  title = {{Q-learning with UCB Exploration is Sample Efficient for Infinite-Horizon MDP}},
  booktitle = {International Conference on Learning Representations},
  year = {2020},
  url = {https://openreview.net/forum?id=pHK_Ivtx63h},
}
Figure