Is Q-Learning Minimax Optimal? A Tight Sample Complexity Analysis

Gen Li, Changxiao Cai, Yuxin Chen, Yuting Wei, Yuejie Chi · DOI · OpenReview

TL;DR

This paper provides the first sharp characterization of the sample complexity for Q-learning in tabular Markov Decision Processes (MDPs) under a synchronous setting. It proves that Q-learning is minimax optimal for the simplest case (single action) but strictly sub-optimal when multiple actions are available, revealing a fundamental limitation of the algorithm.

What Problem Does This Paper Address?

Reinforcement learning (RL) algorithms aim to learn optimal policies by interacting with an environment. Q-learning is a cornerstone of model-free RL, but understanding its sample efficiency – how much data it needs to learn effectively – has been a long-standing challenge. While previous work established upper bounds on Q-learning's sample complexity, these bounds were often loose, particularly concerning the "effective horizon" (related to the discount factor $\gamma$). This left open questions about whether Q-learning was truly minimax optimal (i.e., achieving the best possible sample complexity) and whether its performance could be improved. This paper tackles these questions by providing tight sample complexity analyses for both synchronous and asynchronous Q-learning, revealing its limitations in multi-action settings.

Methods

The paper employs a combination of theoretical analysis techniques, including:

  • Crucial Error Decompositions: The authors develop novel ways to break down the estimation error of Q-learning into manageable components. This is a key technical contribution that allows for tighter analysis than previous methods.
  • Variance Control: Techniques from high-dimensional statistics, such as Freedman's inequality, are used to bound the variance of the learning process.
  • Constructing Hard MDP Instances: To establish lower bounds and demonstrate sub-optimality, the authors design specific MDP environments that are challenging for Q-learning. These instances are carefully crafted to expose the algorithm's weaknesses, particularly the "over-estimation" bias inherent in Q-learning.
  • Recursive Analysis: The analysis often involves recursive arguments to track the error accumulation over many iterations.

The paper distinguishes between the synchronous setting (where all state-action pairs are updated simultaneously using independent samples) and the asynchronous setting (where samples are drawn from a Markovian trajectory, and updates are performed one state-action pair at a time).

Datasets

Not discussed in the paper. The paper focuses on theoretical analysis within the framework of tabular MDPs, not empirical evaluation on specific datasets.

Key Insights and Ideas

  • Q-learning is NOT always minimax optimal: The most striking finding is that Q-learning is strictly sub-optimal when there are multiple actions available ($|A| \ge 2$). This is a fundamental limitation that cannot be overcome by simply increasing the number of samples.
  • The "over-estimation" bias is a bottleneck: The paper rigorously demonstrates how the inherent "over-estimation" bias in Q-learning (due to the $\max$ operator) leads to a worse dependency on the effective horizon compared to the theoretical minimax lower bound.
  • TD learning is optimal (for $|A|=1$): In the simplified case where there's only one action (effectively Temporal Difference learning), Q-learning (or TD learning) is minimax optimal. This highlights that the issue arises specifically with the need to select the best action among multiple options.
  • Asynchronous Q-learning benefits from sharper analysis: The paper also provides a tighter analysis for asynchronous Q-learning, improving the dependency on the effective horizon.

Key Results

  • Synchronous Q-learning (TD learning, $|A|=1$): Achieves minimax optimal sample complexity of $\tilde{O}\left(\frac{|S|}{(1-\gamma)^3 \varepsilon^2}\right)$.
  • Synchronous Q-learning ($|A| \ge 2$): Achieves an upper bound sample complexity of $\tilde{O}\left(\frac{|S||A|}{(1-\gamma)^4 \varepsilon^2}\right)$.
  • Lower bound for Synchronous Q-learning ($|A| \ge 2$): A matching lower bound of $\tilde{\Omega}\left(\frac{|S||A|}{(1-\gamma)^4 \varepsilon^2}\right)$ is established, confirming the sub-optimality of Q-learning in this setting.
  • Asynchronous Q-learning: The sample complexity is shown to be $\tilde{O}\left(\frac{1}{\mu_{\min}(1-\gamma)^4 \varepsilon^2} + \frac{t_{\text{mix}}}{\mu_{\min}(1-\gamma)}\right)$, which is a significant improvement in the dependency on the effective horizon.

Limitations and Future Work

  • Tabular MDPs: The analysis is primarily for tabular MDPs (where state and action spaces are finite and small). Extending these results to function approximation (e.g., deep neural networks) remains a significant open challenge.
  • Learning Rate Schedules: While the paper analyzes common learning rate schedules (rescaled linear and constant), generalizing to arbitrary learning rates is left for future work.
  • Algorithmic Improvements: The paper suggests that to achieve minimax optimality in the multi-action case, algorithmic modifications (like variance reduction) are necessary, pointing towards future research directions in designing more efficient RL algorithms.

Summary updated

BibTeX
@inproceedings{li2021is,
  author = {Gen Li and Changxiao Cai and Yuxin Chen and Yuting Wei and Yuejie Chi},
  title = {{Is Q-Learning Minimax Optimal? A Tight Sample Complexity Analysis}},
  booktitle = {International Conference on Machine Learning},
  year = {2021},
  url = {https://openreview.net/forum?id=FKOBOhRkE6},
}
Figure