Stochastic Variance Reduction for Deep Q-learning

Wei-Ye Zhao, Xiya Guan, Yang Liu, Xiaoming Zhao, Jian PengAAMAS 2019

Introduction

Deep reinforcement learning (RL) has achieved remarkable success in complex environments, yet it remains notoriously difficult to train. Two primary hurdles are unstable learning trajectories and poor sample efficiency. These issues are often rooted in the high variance of gradient estimation during the optimization process. This paper introduces SVR-DQN, a novel optimization strategy that integrates Stochastic Variance Reduced Gradient (SVRG) techniques with the Adam optimizer to stabilize and accelerate Deep Q-learning.

The Challenge of Gradient Variance

In Deep Q-learning (DQN), agents minimize the Bellman error using Approximate Gradient Estimation (AGE) by sampling mini-batches from a replay buffer. However, AGE is prone to massive variance due to limited sample sizes and the inherent noise of stochastic environments. When this variance is high, network parameters can be pushed away from the optimal path, leading to sub-optimal local minima or catastrophic divergence.

Figure 1: Comparison of scores and gradient variance across three Atari games. SVR-DQN (orange) maintains significantly lower gradient variance and higher scores than standard Adam (blue).

As shown in the figure above, standard Adam (blue) frequently experiences large spikes in gradient values, which correlate with performance plateaus or drops. By contrast, SVR-DQN (orange) suppresses these spikes, keeping the learning process stable and the scores consistently higher.

The SVR-DQN Methodology

SVR-DQN adapts the SVRG algorithm for the reinforcement learning loop through a three-step process:

  1. Anchor Calculation: The algorithm periodically samples a large batch of experiences from the replay buffer to compute a highly accurate "anchor" gradient.
  2. Variance Reduction (Inner Loop): During training steps, it uses smaller mini-batches and updates parameters by comparing the current mini-batch gradient to the gradient evaluated at the anchor point. This mathematically cancels out much of the noise inherent in small-batch sampling.
  3. Adam Integration: The stabilized, variance-reduced gradient is then fed into the Adam optimizer, leveraging its adaptive learning rates for the final weight update.

This approach provides the aggressive variance reduction of SVRG without the prohibitive computational cost of calculating gradients over the entire dataset, as it utilizes a subsampling strategy for the anchor.

Experimental Results

The authors evaluated SVR-DQN on 20 games from the Atari 2600 benchmark, restricting training to 10 million frames to emphasize sample efficiency.

Figure 5: Normalized performance of SVR-DQN compared to Double-DQN across 20 Atari games. SVR-DQN outperforms the baseline in 18 out of 20 environments.

Key Findings:

  • Broad Superiority: SVR-DQN outperformed the standard Double DQN baseline on 18 out of 20 games.
  • Significant Score Gains: The mean normalized score across all games jumped from 92.48% to 139.75%, while the median score nearly doubled from 63.13% to 118.02%.
  • Efficiency: SVR-DQN reaches the baseline's final performance in roughly half the time. In games like Seaquest and Gopher, scores improved by over 200% and 90% respectively within the same frame budget.
  • Low Overhead: Because the bottleneck in RL is often environment simulation rather than backpropagation, the additional forward/backward passes required for SVR-DQN result in negligible wall-clock time increases.

Conclusion

SVR-DQN demonstrates that gradient variance is a primary bottleneck in Deep Q-learning. By effectively reducing this variance, the proposed method significantly improves both the stability and sample efficiency of RL agents. While hyperparameter sensitivity remains a consideration for future work, SVR-DQN represents a robust, essentially "free" upgrade for standard DQN architectures.

Summary updated

BibTeX
@inproceedings{zhao2019stochastic,
  author = {Wei-Ye Zhao and Xiya Guan and Yang Liu and Xiaoming Zhao and Jian Peng},
  title = {{Stochastic Variance Reduction for Deep Q-learning}},
  booktitle = {AAMAS},
  year = {2019},
}
Figure