Paper commentary
Prioritized Experience Replay
- Problem Uniform replay gives every stored transition the same chance of being replayed, whatever it could teach the agent. So surprising transitions get no more attention than redundant ones.
- Method Prioritized experience replay samples transitions with probability rising with their TD error magnitude, instead of uniformly. It uses stochastic rank-based or proportional priorities and corrects the induced bias with importance-sampling weights.
- Results Double DQN with proportional prioritization reached a median normalized score of 128% over 57 games. The tuned Double DQN baseline reached 111%.
Why replay order matters
Online reinforcement learning agents usually discard each transition after one update, which produces strongly correlated updates and loses rare experience that could be useful later. Experience replay addresses both problems by storing transitions and sampling them again, and DQN used a large sliding-window memory sampled uniformly at random.
Uniform sampling replays each transition about as often as it was experienced, so a surprising or rarely visited transition gets no more attention than a redundant one. The underlying idea is that an agent learns more from some transitions than from others, and some transitions only become useful once the agent is more competent.
Using TD error as a priority
The ideal ranking would be the expected learning progress from a transition in the agent's current state, but that quantity is not directly accessible. The magnitude of the TD error serves as a proxy, since a large error means the value estimate is far from its bootstrapped target.
The greedy variant stores the latest TD error with each transition, always replays the one with the largest absolute error, and gives new transitions maximal priority so that each is seen at least once.
Greedy prioritization only refreshes the errors of transitions that are replayed, so a transition with a low error on its first visit may not return for a long time. It is also sensitive to noise spikes, which bootstrapping can amplify, and it concentrates on a small subset of experience, which reduces diversity and can encourage over-fitting.
Stochastic sampling and its two priority rules
Stochastic prioritization sits between greedy selection and uniform sampling, so that the sampling probability of a transition increases monotonically with its priority while the lowest-priority transition keeps a non-zero probability. The probability is defined as \[ P(i) = \frac{p_i^{\alpha}}{\sum_k p_k^{\alpha}} \] where the priority p_i is positive and the exponent alpha sets how strongly prioritization is used, with alpha equal to 0 giving uniform sampling.
The proportional variant sets the priority to the absolute TD error plus a small constant epsilon, which keeps zero-error transitions revisitable. The rank-based variant sets the priority to the inverse of the transition's rank when the memory is sorted by absolute TD error, which gives a power-law distribution and is insensitive to outliers.
Because k is set to the minibatch size, every minibatch contains one high-error, one medium-error and so on, which acts as stratified sampling. The proportional variant instead uses a sum-tree, in which each node stores the sum of its children and the leaves hold the priorities, so sampling and updates stay efficient.
Correcting the sampling bias
Non-uniform sampling changes the distribution the updates follow, so the estimates converge to a different solution even when policy and state distribution are fixed. Importance-sampling weights \( w_i = \left(\frac{1}{N} \cdot \frac{1}{P(i)}\right)^{\beta} \) compensate fully for the non-uniform probabilities when beta equals 1, and multiply the TD error in the update.
The weights are normalized by the maximum weight so that they only scale updates downward.
Raising alpha and beta together prioritizes more aggressively while also correcting more strongly, so the two hyperparameters interact.
The authors also argue that, with neural networks, the correction shrinks gradient magnitudes and so the effective step size, which they expect to help when the first-order gradient approximation is only reliable locally.
Combining prioritization with Double DQN
The full agent keeps Double DQN and replaces its uniform minibatch sampling with the stochastic prioritization and importance-sampling correction. Each new transition enters the memory with the maximal priority seen so far, and every K steps k transitions are sampled according to the priorities. For each sampled transition, the TD error and importance-sampling weight are computed, the priority is overwritten with the absolute TD error, and the weighted TD-error gradients are accumulated into one network update.
Baselines are DQN and the tuned Double DQN, both using a sliding-window memory and minibatches of 32 transitions sampled uniformly. One minibatch update is done for every 4 new transitions, so each transition is replayed 8 times on average, and rewards and TD errors are clipped to the range from -1 to 1. The network architecture, learning algorithm, replay memory and evaluation setup are kept identical, so the sampling mechanism is the only difference.
Prioritized replay picks high-error transitions more often, so larger gradients follow, and the step-size eta was reduced by a factor of 4 relative to the Double DQN setup. The alpha and beta0 values were chosen by a coarse grid search on a subset of 8 games, giving alpha 0.7 and beta0 0.5 for the rank-based variant and alpha 0.6 and beta0 0.4 for the proportional variant.
A single hyperparameter setting was used for each variant across all games, and the authors note that reducing alpha or raising beta moves the behaviour back toward the baseline.
Controlled evidence on the Blind Cliffwalk
The Blind Cliffwalk has n states, and a random action sequence reaches the single reward with probability 2^-n, while most transitions are redundant failures. Two agents learn from the same replay memory, one sampling uniformly and the other using an oracle that picks the transition most reducing the global loss after the update, which the authors call unrealistic.
With the oracle, the number of learning steps grows far more slowly than under uniform replay, which the authors describe as an exponential speed-up across memory sizes. The curves are medians over 10 independent runs, with min and max shown as faint lines.
In the tabular setting, greedy TD-error prioritization substantially reduces the effort needed to solve the task. With linear function approximation, both stochastic variants give large speed-ups over uniform replay, with medians over 10 random initializations and differences of several orders of magnitude.
Atari results against uniform replay
The comparison covers 49 games for DQN and 57 games for Double DQN.
Adding prioritized replay to DQN improved the score substantially on 41 of 49 games. The median normalized score across the 49 games rose from 48% for uniform DQN to 106% with rank-based prioritization.
On top of tuned Double DQN, the median over 57 games rose from 111% to 128% with proportional prioritization. The mean rose from 418% to 551% with proportional prioritization, and River Raid, Seaquest and Surround reached human level for the first time. The authors describe the prioritized gain as complementary to the gain from Double Q-learning.
In the median learning curves, the rank-based and proportional variants reached the Double DQN equivalence point at 47% and 38% of total training time. Using the mean instead, the equivalence points came at 41% and 43% of training time for rank-based and proportional prioritization. In aggregate, learning was about twice as fast with prioritization.
The two variants usually give similar learning curves, but some games favour one variant strongly, such as Double Dunk and Surround for rank-based and Alien, Asterix and Space Invaders for proportional. Prioritization also shortens the delay before learning takes off in games such as Battlezone, Zaxxon and Frostbite.
Why the two variants behave alike
The authors expected the rank-based variant to be more robust, since it ignores outliers and error magnitudes and keeps minibatch gradients at a stable size. In practice both variants performed similarly, which the authors suspect is due to the heavy clipping of rewards and TD errors in DQN.
The distribution of TD errors becomes close to heavy-tailed as learning progresses, while still differing across games, which the authors take as support for the form of the sampling distribution. The authors also note that uniform sampling is biased toward out-of-date transitions, and that prioritization corrects for transitions never replayed before they leave the sliding window.
The authors hypothesize that transitions whose representation is already good lose their error quickly and are replayed less, which shifts learning toward poorly represented states.
Extensions beyond Atari
The analogous supervised method samples data non-uniformly, with each sample priority based on its last-seen error, which the authors suggest could resemble boosting or hard negative mining.
In the uninformed setting, prioritized sampling with alpha 1 and beta 0 outperforms uniform sampling and approaches the informed uniform baseline on the test set. Prioritized training is also faster in learning speed, and the results are medians over 3 random initializations.
The authors describe links between the approach and off-policy correction through rejection sampling and importance-sampling ratios, but these are presented as possibilities. The authors also suggest that the number of times a transition is replayed could guide exploration choices and that priorities could decide which memories to erase.
Limitations
The mean normalized score is dominated by one game, Video Pinball, so it is not a reliable summary on its own. The median also depends on the 8-game subset used for tuning alpha and beta0, and a single hyperparameter setting was applied to all games.
The oracle used in the Blind Cliffwalk is not realistic, so it shows the size of the potential gain rather than an achievable method. Greedy prioritization has the stale-error, noise and diversity problems described above, which is why the stochastic variants were introduced.
The supervised MNIST result is a preliminary experiment, and the off-policy and exploration ideas are not tested in this text.
Paper info
- Authors
- Tom Schaul, John Quan, Ioannis Antonoglou, David Silver
- Venue
- arXiv · Preprint
- First published
- 2015-11-18
- Added
- 2026-11-6
- Updated
- 2016-2-25
- Version
- v4
- arXiv
- 1511.05952
- Category
- cs.LG
- Original paper terms
- arXiv non-exclusive 1.0
- What we show
- Paper info and commentary
AI commentary is a separate explanation from the original paper and may contain errors. The original paper and figures follow each source's terms of use and any rights noted separately.
Quote from the paper
Tom Schaul, John Quan, Ioannis Antonoglou, David Silver (2015). Prioritized Experience Replay. arXiv:1511.05952v4. https://arxiv.org/abs/1511.05952v4
BibTeX
@misc{schaul2015prioritized,
title = {{Prioritized Experience Replay}},
author = {Tom Schaul and John Quan and Ioannis Antonoglou and David Silver},
year = {2015},
eprint = {1511.05952},
archivePrefix = {arXiv},
url = {https://arxiv.org/abs/1511.05952v4}
}