On the Convergence and Sample Complexity Analysis of Deep Q-Networks with $\epsilon$-Greedy Exploration

Shuai Zhang, Hongkang Li, Meng Wang, Miao Liu, Pin-Yu Chen, Songtao Lu, Sijia Liu, Keerthiram Murugesan, Subhajit Chaudhury

Abstract

Deep Q-Networks (DQN) have demonstrated remarkable empirical success across a wide range of complex tasks, yet a rigorous theoretical understanding of their convergence under practical exploration strategies has remained elusive. This paper provides the first comprehensive theoretical convergence and sample complexity analysis for DQN using the classic $\epsilon$-greedy exploration strategy. We demonstrate that a DQN utilizing a decaying exploration rate converges geometrically to the optimal Q-value function. By analyzing the optimization landscape through a Population Risk Function, this work establishes a mathematical foundation for one of deep reinforcement learning's most successful empirical tools, quantifying the trade-offs between exploration, convergence speed, and sample complexity.

Introduction

Since its introduction by Mnih et al. in 2013, the Deep Q-Network (DQN) has been a cornerstone of reinforcement learning (RL). Despite its massive empirical success in mastering Atari games and beyond, its theoretical properties have remained largely uncharacterized. Most existing RL theory focuses on tabular methods or linear function approximations. When neural networks are considered, researchers often rely on the "over-parameterized" Neural Tangent Kernel (NTK) regime, which does not always reflect the practical implementation of these models.

Two major gaps have persisted in the literature: the lack of convergence proofs for the widely used $\epsilon$-greedy exploration strategy in non-linear settings, and the mathematical difficulty of analyzing the "moving target" problem created by target networks and experience replay. This paper bridges these gaps by providing a rigorous analysis of DQN in its most practical form.

Methodology

The authors analyze the DQN algorithm using a Deep Neural Network (DNN) to approximate Q-values, incorporating an experience replay buffer and a target network. To prove convergence, they utilize a Population Risk Function (PRF) to characterize the optimization landscape. Their analysis centers on the Hessian matrix (the second-order derivatives) of the loss function.

They demonstrate that as long as the neural network's initial weights are within a certain "local convex region" of the optimal weights, gradient descent steps will move the model toward the optimal solution. Crucially, the authors model the $\epsilon$-greedy policy not merely as a heuristic, but as a mechanism that dictates the distribution shift of the data. By analyzing how $\epsilon$ affects the samples entering the replay buffer, they quantify the noise and bias introduced into the learning process at each step.

Theoretical Insights: The ε Trade-off

A central contribution of this work is the revelation of a mathematical duality for the exploration rate $\epsilon$:

  • Higher $\epsilon$ (Increased Exploration): This enlarges the "region of convergence," making the algorithm more robust to poor initial weight settings. However, it simultaneously slows the speed of convergence.
  • Lower $\epsilon$ (Increased Exploitation): This leads to faster convergence but requires a much more precise initialization (a smaller "landing zone").

This analysis proves that the common practice of starting with high exploration and decaying it over time is mathematically optimal, balancing the need for a large convergence region early in training with the need for precision and speed in later stages.

Convergence and Sample Complexity

The authors prove that with a properly decaying $\epsilon$, the DQN converges to the optimal Q-value function geometrically. The learned model weights $W^{(t)}$ converge linearly to the optimal weights $W^\star$ up to a characterizable estimation error. The convergence rate is upper-bounded by $\gamma + c_\epsilon(1 - \gamma)$, where $\gamma$ is the discount factor and $c_\epsilon$ is a constant related to the exploration level.

Furthermore, the study quantifies the sample complexity ($N_s$), showing that the estimation error scales at a rate of $1/\sqrt{N_s}$. This aligns with standard statistical learning theory but provides the first formal proof for the complex, non-linear dynamics of DQNs.

Empirical Validation

The theoretical findings were validated using the Atari 2600 suite, specifically the games Pong and Breakout. Using Double DQN (DDQN) as the backbone, the authors tested estimation errors against sample complexity. In the Pong experiments, the "test error" (the gap between the agent's score and the maximum possible score) was shown to be almost perfectly linear in $1/\sqrt{N}$, providing empirical confirmation of the $1/\sqrt{N_s}$ sample complexity proof.

Conclusion and Future Work

This paper provides a landmark proof for the convergence of DQN, yet the authors acknowledge several avenues for future research. The current proof assumes the network begins within a local convex region; future work is needed to explain how DQNs might recover from highly suboptimal random initializations. Additionally, while this analysis is specific to $\epsilon$-greedy exploration, extending this rigor to more sophisticated strategies like Thompson sampling or policy gradient-based methods (e.g., PPO or SAC) remains a necessary next step for the field.

Summary updated

BibTeX
@inproceedings{zhang2023convergence,
  author = {Shuai Zhang and Hongkang Li and Meng Wang and Miao Liu and Pin-Yu Chen and Songtao Lu and Sijia Liu and Keerthiram Murugesan and Subhajit Chaudhury},
  title = {{On the Convergence and Sample Complexity Analysis of Deep Q-Networks with $\textbackslash\{\}epsilon$-Greedy Exploration}},
  booktitle = {Advances in Neural Information Processing Systems},
  year = {2023},
  url = {https://openreview.net/forum?id=HWGWeaN76q},
}
Figure