Paper commentary
Asynchronous Methods for Deep Reinforcement Learning
- Problem Online deep reinforcement learning was long considered unstable, and the experience replay used to stabilize it ties methods to off-policy learning while adding memory and computation cost.
- Method Runs several actor-learners as CPU threads on one machine, each with its own environment copy and exploration rate, and lets their decorrelated updates replace a replay memory for four RL algorithms.
- Results The LSTM variant of A3C reached a 623.0% mean human-normalized score on 57 Atari games after four days on 16 CPU cores.
Why online deep RL relied on experience replay
Online deep RL was long regarded as unstable, because the data an agent sees is non-stationary and consecutive updates are strongly correlated. Experience replay addresses this by storing past transitions and sampling them at random, which decorrelates updates, but it confines the method to off-policy learning.
The authors therefore look for a source of decorrelated data that does not need a buffer.
Parallel actor-learners instead of replay
Several actor-learners run as CPU threads on a single machine, each acting in its own copy of the environment and updating one shared model. Because the threads explore different parts of the environment, their parameter changes arrive less correlated in time than those of one agent learning online, so no replay memory is needed. Each thread also uses its own exploration policy, and the authors sample the \(\epsilon\) of its epsilon-greedy policy periodically from a distribution.
Without replay, on-policy methods such as Sarsa and actor-critic can be trained stably alongside Q-learning. Gradients are accumulated over several steps before they are applied, which lowers the chance that threads overwrite each other's updates. Keeping all learners on one machine avoids sending gradients and parameters over a network and allows Hogwild!
style updates.
Q-learning, n-step and actor-critic targets
One-step Q-learning fits \(Q(s,a;\theta)\) by minimizing the squared gap between a target and the current estimate, where the target is the reward plus \(\gamma\) times the maximum of \(Q\) at the next state under the parameters from the previous iteration. \[ L_i(\theta_i) = \mathbb{E}\left[\left(r + \gamma \max_{a'} Q(s',a';\theta_{i-1}) - Q(s,a;\theta_i)\right)^2\right] \] A one-step target moves a reward's effect only onto the pair that produced it, so propagating a reward back takes many updates.
An n-step target adds n discounted rewards and then bootstraps from the maximum of \(Q\) at step \(t+n\), so one reward directly affects n preceding state-action pairs. \[ r_t + \gamma r_{t+1} + \cdots + \gamma^{n-1} r_{t+n-1} + \max_a \gamma^{n} Q(s_{t+n},a) \]
Actor-critic follows a policy gradient in which a learned value estimate serves as the baseline, so the gradient is scaled by an advantage estimate instead of the raw return. In A3C the advantage is a sum of up to \(t_{max}\) discounted rewards plus a bootstrapped value, minus the value of the starting state, and the number of rewards \(k\) can vary from state to state.
\[ A(s_t,a_t;\theta,\theta_v) = \sum_{i=0}^{k-1}\gamma^{i} r_{t+i} + \gamma^{k} V(s_{t+k};\theta_v) - V(s_t;\theta_v) \] The network has a softmax output for the policy and a linear output for the value, with all non-output layers shared, and the policy and value are updated every \(t_{max}\) actions or at a terminal state.
Entropy of the policy is added to the objective to discourage premature convergence to deterministic policies, with coefficient \(\beta\). \[ \nabla_{\theta'} \log \pi(a_t|s_t;\theta')(R_t - V(s_t;\theta_v)) + \beta \nabla_{\theta'} H(\pi(s_t;\theta')) \]
Choosing the optimizer
Three optimizers were compared in the asynchronous framework: SGD with momentum, RMSProp without shared statistics, and RMSProp with statistics shared across threads. In a comparison on a subset of Atari games, the variant with statistics shared across threads was considerably more robust than the other two.
The non-centered RMSProp keeps a running average \(g\) of squared gradients and scales each update elementwise by that average. \[ g = \alpha g + (1-\alpha)\Delta\theta^2 \]
Learning speed against a GPU-trained DQN
DQN trained on a single Nvidia K40 GPU is compared with the four asynchronous methods trained on 16 CPU cores, on five Atari 2600 games.
All four asynchronous methods train working controllers on Atari, and on some games they learn much faster than DQN. The n-step methods learn faster than the one-step methods on some games. Over these five games, the policy-based A3C is ahead of the three value-based asynchronous methods overall.
Atari results across 57 games
Hyperparameters, namely learning rate and gradient norm clipping, were tuned on six games (Beamrider, Breakout, Pong, Q*bert, Seaquest and Space Invaders) and then fixed for all 57 games.
Table 1 reports mean and median human-normalized scores under the human starts metric. The A3C LSTM, trained for 4 days on 16 CPU cores, reaches a mean of 623.0% and a median of 112.6%. Prioritized DQN, trained for 8 days on a GPU, reaches a mean of 463.6% and a median of 127.6%. The feedforward A3C reaches a mean of 344.1% after 1 day on CPU, close to the 343.8% that Dueling D-DQN reaches after 8 days on a GPU.
The median is an exception: Prioritized DQN's 127.6% is higher than the 116.6% of the feedforward A3C trained for 4 days and the 112.6% of the LSTM A3C. The authors note that Double DQN and Dueling Double DQN improvements could be added to the one-step and n-step Q methods, which they did not test.
TORCS, MuJoCo and Labyrinth
On TORCS the agent sees only RGB frames and receives a reward proportional to its velocity along the track centre. A3C was run with a slow and a fast car, each with and without opponent bots, and reached roughly 75% to 90% of a human tester's score in all four configurations after about 12 hours of training.
On MuJoCo continuous control tasks only A3C was evaluated, since the value-based methods do not extend easily to continuous actions.
In Labyrinth each episode places the agent in a new random maze of rooms and corridors, where apples give a reward of 1 and entering a portal gives 10 and respawns the agent. An episode ends after 60 seconds. The A3C LSTM agent, using 84×84 RGB images as input, reaches a final average score of around 50, which the authors read as a reasonable exploration strategy learned from visual input alone.
Scaling with threads and data efficiency
Training speedup for n threads is the time one thread needs to reach a fixed reference score divided by the time n threads need, averaged over seven Atari games. At 16 threads the speedups are 24.1 for 1-step Q, 22.1 for 1-step SARSA, 17.2 for n-step Q and 12.5 for A3C. The authors take the at least order-of-magnitude speedup at 16 threads for all four methods as evidence that the framework scales well with the number of workers.
One-step Q-learning and one-step Sarsa often reach a given score with less data as more actor-learners are added, giving speedups beyond the linear level. The authors attribute this to multiple threads reducing the bias of one-step methods, but the score-per-frame curves show this only as an observation.
Figure 4 plots the same thread counts against training time in hours. All asynchronous methods show significant speedups from more actor-learners in that plot.
Sensitivity to learning rate and initialization
A3C was trained on five games (Breakout, Beamrider, Pong, Q*bert, Space Invaders) with 50 different learning rates and random initializations per game. Each game shows a wide band of learning rates in which all initializations reach good scores.
Supplementary Figure S11 shows the same analysis for the other three methods, and the authors report a range of good learning rates for each.
Limitations
Experience replay was not combined with the asynchronous framework, so whether it would improve data efficiency is untested in this work. The authors expect that reusing old data through replay could substantially improve data efficiency, and that this would matter most in domains like TORCS.
The Atari comparison fixed hyperparameters tuned on six games for all 57 games. The other agents in the comparison were trained for 8 to 10 days on Nvidia K40 GPUs, whereas A3C was trained for four days on 16 CPU cores.
The TORCS, MuJoCo and Labyrinth experiments evaluate only the A3C algorithm. Labyrinth experiments use only the A3C LSTM agent on 84×84 RGB images.
Paper info
- Authors
- Volodymyr Mnih, Adrià Puigdomènech Badia, Mehdi Mirza, Alex Graves, Timothy P. Lillicrap, Tim Harley, David Silver, Koray Kavukcuoglu
- Venue
- arXiv · Preprint
- First published
- 2016-2-4
- Added
- 2026-10-20
- Updated
- 2016-6-16
- Version
- v2
- arXiv
- 1602.01783
- 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
Volodymyr Mnih, Adrià Puigdomènech Badia, Mehdi Mirza, Alex Graves, Timothy P. Lillicrap, Tim Harley, David Silver, Koray Kavukcuoglu (2016). Asynchronous Methods for Deep Reinforcement Learning. arXiv:1602.01783v2. https://arxiv.org/abs/1602.01783v2
BibTeX
@misc{mnih2016asynchronous,
title = {{Asynchronous Methods for Deep Reinforcement Learning}},
author = {Volodymyr Mnih and Adrià Puigdomènech Badia and Mehdi Mirza and Alex Graves and Timothy P. Lillicrap and Tim Harley and David Silver and Koray Kavukcuoglu},
year = {2016},
eprint = {1602.01783},
archivePrefix = {arXiv},
url = {https://arxiv.org/abs/1602.01783v2}
}