Q-Learning with Fine-Grained Gap-Dependent Regret

Haochen Zhang, Zhong Zheng, Lingzhou Xue

In the study of Reinforcement Learning (RL), there is frequently a disconnect between "worst-case" theoretical guarantees and "average-case" practical performance. While many algorithms are mathematically proven to achieve minimax worst-case regret in the toughest possible environments, they often perform much better in reality when there is a clear "gap" between the optimal action and suboptimal alternatives. This paper provides a crucial theoretical bridge for model-free RL in episodic tabular Markov Decision Processes (MDPs), offering the first rigorous, fine-grained analysis of how these suboptimality gaps accelerate learning.

The Challenge of Coarse Regret Bounds

In episodic tabular MDPs, an algorithm's performance is measured using regret—the difference between the total reward collected by an optimal policy and the reward actually obtained by the learning agent.

Standard minimax theory evaluates an agent's performance in the absolute worst-case scenario. However, practical environments typically feature suboptimality gaps ($\Delta$): specific margins by which the best action at a given state outperforms the others. When these gaps are large, an efficient agent should quickly identify the optimal action, cease exploring suboptimal ones, and accumulate significantly lower regret.

Historically, model-free algorithms—favored for their $O(SAH)$ memory efficiency compared to the $O(S^2AH)$ required by model-based methods—only possessed "coarse" gap-dependent bounds. These bounds relied pessimistically on the smallest possible gap in the entire environment ($\Delta_{min}$). Furthermore, the authors identified that the only existing attempt at a "fine-grained" bound for model-free RL, the Adaptive Multi-step Bootstrap (AMB) algorithm, contained fundamental flaws in its mathematical proof and algorithmic design, specifically regarding improper truncation and violations of the martingale difference condition.

Methodological Innovations

To resolve these limitations, the authors introduce a novel analytical framework alongside two algorithmic refinements, addressing both UCB-based and non-UCB-based settings.

1. A Novel Analytical Framework

The core theoretical innovation is a "separate analysis" technique. Previous proofs treated all state-action pairs uniformly, which allowed the estimation "noise" from optimal actions (visited infinitely) to drown out the signal from suboptimal actions (visited only a logarithmic number of times). By mathematically separating optimal and suboptimal state-action pairs and utilizing a state-action specific weight technique, the authors successfully isolated the estimation error. This yielded the first fine-grained regret upper bound for the classic UCB-Hoeffding algorithm.

2. Algorithmic Refinements

Beyond analyzing existing algorithms, the authors propose two refined methods:

  • ULCB-Hoeffding (UCB-based): This variant maintains both Upper and Lower Confidence Bounds to actively eliminate clearly suboptimal actions from a "candidate set," streamlining the exploration process. Applying their new analytical framework, the authors establish the same fine-grained regret bound for ULCB-Hoeffding as for UCB-Hoeffding.
  • Refined AMB (Non-UCB-based): The authors revisited the flawed AMB algorithm. They discovered that its original design used "improper truncation" (capping $Q$-values at $0$ and $H$ during updates), which broke the recursive structure of the Bellman equation and violated martingale properties necessary for concentration inequalities. They corrected this by moving the truncation to the value function ($V$) estimates, rigorously proving the unbiasedness of the multi-step bootstrapping process and deriving a sound fine-grained gap-dependent regret bound.

Empirical Validation and Key Results

The researchers evaluated their theoretical findings using synthetic episodic tabular MDPs across various scales, ranging from small ($H=2, S=3, A=3$) to larger environments ($H=10, S=15, A=10$). Rewards were sampled uniformly from $[0, 1]$, and transition kernels were drawn uniformly from a probability simplex. Regret was measured over millions of episodes ($K$ up to $2 \times 10^7$).

Key Findings: * First Fine-Grained Bound: The paper establishes a regret bound for UCB-Hoeffding that scales with $1/\Delta_h(s, a)$ for each individual action, rather than a global $1/\Delta_{min}$. * Theoretical Superiority: The newly derived bound for UCB-Hoeffding is $\tilde{O}(H^5 \sum \frac{1}{\Delta} + \dots)$, which is significantly tighter than the previous best coarse bound of $\tilde{O}(H^6 SA / \Delta_{min})$. * Empirical Performance: In simulations, UCB-Hoeffding achieved the best overall performance. Furthermore, both Refined AMB and ULCB-Hoeffding consistently and significantly outperformed the original AMB algorithm. * Logarithmic Growth: Experiments confirmed that for all refined algorithms, regret curves flatten out logarithmically as episodes increase, empirically validating that the agents successfully "solve" the gaps.

Limitations and Future Directions

While this work successfully bridges a major gap in RL theory, several challenges remain:

  • Horizon Dependence: The new bounds still exhibit a high polynomial dependence on the episode horizon $H$ (e.g., $H^5$). Model-based methods currently achieve better scaling with respect to $H$.
  • Variance-Aware Methods: The current framework applies to Hoeffding-style concentration. Extending this fine-grained gap analysis to variance-aware algorithms like UCB-Bernstein or UCB-Advantage could yield even tighter minimax regret bounds.
  • Function Approximation: The scope of this paper is limited to tabular RL. Extending these fine-grained guarantees to environments requiring linear or neural function approximation remains a significant open challenge for future research.

Summary updated

BibTeX
@inproceedings{zhang2026q,
  author = {Haochen Zhang and Zhong Zheng and Lingzhou Xue},
  title = {{Q-Learning with Fine-Grained Gap-Dependent Regret}},
  booktitle = {International Conference on Learning Representations},
  year = {2026},
  url = {https://openreview.net/forum?id=fE0RJto3Na},
}
Figure