NeurIPS 2026Coming to NeurIPS?Explore papers, orals & directions

Revisiting Fundamentals of Experience Replay

William Fedus, Prajit Ramachandran, Rishabh Agarwal, Yoshua Bengio, Hugo Larochelle, Mark Rowland, Will Dabney

TL;DR

This paper systematically deconstructs experience replay in deep reinforcement learning (RL), revealing that simply increasing buffer size isn't enough to improve performance. The authors discover that $n$-step returns are the "secret sauce" allowing agents to benefit from larger memories by mitigating variance—even though they are theoretically ungrounded in off-policy settings.

The Problem: Beyond the 1-Million Transition Default

Experience replay (ER) is a cornerstone of off-policy RL, allowing agents to store and reuse past transitions to improve sample efficiency and stability. However, since the seminal DQN papers in 2013 and 2015, the community has largely stuck to a "default" buffer size of 1 million transitions without fully understanding how it interacts with other algorithmic components.

The authors identify a critical gap in our understanding of how replay capacity (how much data we store) and replay ratio (how many updates we perform per new transition) affect learning. They aim to disentangle these factors and determine which modern RL "bells and whistles" actually enable an agent to leverage more data effectively.

Methodology

The researchers conducted a massive empirical study using the Dopamine Rainbow agent and DQN on the Atari 2600 benchmark (using the Arcade Learning Environment). Their approach involved:

  1. Disentangling Factors: They formally defined and independently controlled three properties:
  2. Replay Capacity: The total number of transitions stored.
  3. Age of the Oldest Policy: A proxy for how "off-policy" the data is.
  4. Replay Ratio: The number of gradient updates per environment transition.
  5. Additive and Ablative Studies: To find the "enabling" component, they started with a basic DQN and added components (Prioritized Experience Replay, $n$-step returns, Adam optimizer, C51) one by one. Conversely, they took the full Rainbow agent and removed components to see which removal broke the ability to scale with memory.
  6. Offline RL Analysis: They tested their hypotheses in extreme "massive replay" scenarios where the agent learns from a fixed dataset of 200 million frames.

Key Insights and Ideas

  • The $n$-step Necessity: The most surprising finding is that standard DQN does not improve with larger replay buffers. Only when $n$-step returns are added does the agent show significant gains from increased capacity.
  • The "Unprincipled" Hero: Theoretically, uncorrected $n$-step returns are "wrong" for off-policy learning because they don't account for the difference between the old policy that collected the data and the current policy. Yet, they are the primary driver of performance gains in large buffers.
  • Variance vs. Bias: The authors hypothesize that $n$-step returns help by reducing variance. In a large, diverse buffer, the learning signal can become noisy. $n$-step returns provide a more stable target that helps the agent navigate this "sea of data."
  • The Sparse Reward Exception: While "fresher" data is generally better for learning, the authors found a notable exception. In sparse-reward games, older data is actually beneficial. A larger, older buffer prevents the agent from "forgetting" rare successful trajectories that would otherwise be overwritten in a smaller circular buffer.
Effect of the oldest policy's age on performance across different Atari games. While standard games like Asterix and Seaquest benefit from fresher data, sparse-reward games like PrivateEye thrive on older data.

Key Results

  • Rainbow Scaling: Increasing Rainbow's replay capacity from 1M to 10M transitions resulted in a median performance improvement of ~20-30% across Atari games.
  • DQN Stagnation: Standard DQN showed a negligible +0.1% improvement when capacity was increased 10x.
  • The $n$-step Boost: Adding $n$-step returns to DQN led to a +24.8% median improvement with larger capacity. Conversely, removing $n$-step from Rainbow caused a performance decrease of 2.3% when increasing buffer size.
  • Replay Ratio: The authors found that the replay ratio is a critical hyperparameter that contextualizes many previous observations in RL literature regarding sample efficiency.

Limitations and Future Work

The study focuses primarily on value-based methods (Q-learning). The authors note that the interaction between experience replay and Actor-Critic methods or continuous control environments remains an open area for similar systematic study.

Furthermore, while they provide strong evidence for the "variance reduction" hypothesis of $n$-step returns, they suggest that more theoretical work is needed to reconcile why this "unprincipled" method works so much better than theoretically "correct" off-policy corrections (like Importance Sampling) in deep RL settings.

Summary updated

BibTeX
@inproceedings{fedus2020revisiting,
  author = {William Fedus and Prajit Ramachandran and Rishabh Agarwal and Yoshua Bengio and Hugo Larochelle and Mark Rowland and Will Dabney},
  title = {{Revisiting Fundamentals of Experience Replay}},
  booktitle = {International Conference on Machine Learning},
  year = {2020},
  url = {https://openreview.net/forum?id=s6hLWO5x_Nx},
}

Loading related content...

Figure