The Reactor: A fast and sample-efficient Actor-Critic agent for Reinforcement Learning

Audrunas Gruslys, Will Dabney, Mohammad Gheshlaghi Azar, Bilal Piot, Marc Bellemare, Remi MunosICLR 2018

TL;DR

The Reactor (Retrace-Actor) is a high-performance reinforcement learning agent that bridges the gap between sample-efficient value-based methods and fast, parallelized actor-critic methods. By combining a new distributional version of the Retrace algorithm with a novel policy gradient estimator ($\beta$-LOO), Reactor achieves state-of-the-art performance on Atari benchmarks in less than 24 hours of training.

What Problem Does This Paper Address?

In deep reinforcement learning (RL), there has historically been a trade-off between two styles of agents:

  1. Value-based agents (like DQN): These use an "experience replay" buffer to store and revisit past transitions. They are sample-efficient (learning a lot from a few frames) but often have very long runtimes—sometimes taking over a week to train on a single game.
  2. Actor-critic agents (like A3C): These run many copies of the agent in parallel. They are time-efficient (fast wall-clock time) but sample-inefficient because they typically throw away data after one use.

The authors of "The Reactor" sought to create a "best of both worlds" architecture: an agent that is as sample-efficient as the best DQN variants while remaining as fast as distributed actor-critic methods.

Methods

Reactor introduces four primary innovations to achieve its goals:

  • Distributional Retrace: The authors extend the Retrace($\lambda$) algorithm—which allows for safe, multi-step updates from off-policy data—to the Distributional RL setting. Instead of just predicting the average reward, the agent predicts the entire distribution of possible future rewards. This allows the agent to use much longer sequences (up to 33 steps) for updates compared to previous state-of-the-art agents.
Distributional Retrace mechanism showing the shifting and shrinking of reward distributions
  • $\beta$-Leave-One-Out ($\beta$-LOO): This is a new policy gradient algorithm. Standard policy gradients often suffer from high variance (noisy updates). $\beta$-LOO uses action-value estimates (the "critic") as a baseline for every action except the one taken, effectively reducing variance without introducing the heavy bias seen in other techniques.
  • Prioritized Sequence Replay (Lazy Initialization): Prioritizing which experiences to re-learn is crucial for efficiency. However, calculating priorities for new data is computationally expensive. Reactor uses a "lazy" approach: it assumes that if a sequence of events was important, the sequences immediately following it are likely important too. It uses a "Contextual Priority Tree" to manage these estimates efficiently.
  • Decoupled Architecture: The agent separates "acting" (collecting data) from "learning" (updating parameters). It uses a recurrent neural network (LSTM) to help the agent remember past frames, which is more efficient than the traditional method of stacking the last four frames as input.

Key Insights and Ideas

  • The Power of Distributional Off-Policy Updates: The most significant insight is that Retrace and Distributional RL are highly complementary. By combining them, the agent can learn from off-policy data (data collected by older versions of itself) using very long time horizons, which drastically speeds up convergence.
  • Temporal Locality in Priority: The authors realized that TD-errors (the measure of how "surprising" an experience is) are temporally correlated. You don't need to calculate the priority of every new transition immediately; you can infer it from its neighbors.
  • Blocking Gradients for Stability: In their hybrid architecture, they found that "blocking" gradients from the policy head from flowing back into the shared convolutional features prevented unstable feedback loops—a small but vital engineering detail for training complex actor-critic models.

Key Results

  • Speed: Reactor reached state-of-the-art performance on the Atari 57-game suite in less than 24 hours using a distributed CPU setup. For comparison, standard DQN takes about 8 days on a single GPU, and the powerful Rainbow agent takes about 10 days.
Comparison of agent architectures and training times, highlighting Reactor's sub-24-hour performance
  • Sample Efficiency: At the 200-million-frame mark, Reactor achieved a higher median human-normalized score (1.65) than Rainbow (1.53) and A3C (1.13).
  • Robustness: When tested with "random human starts" (starting a game from a state a human player reached), Reactor showed much better generalization than Rainbow, suggesting it overfits less to specific trajectories.

Limitations and Future Work

  • Hardware Requirements: While fast in "wall-clock" time, Reactor relies on a distributed setup (using 10 to 20 worker machines). It is not designed for a single-GPU desktop setup.
  • Complexity: The architecture is a "heavyweight" combination of several complex algorithms (LSTMs, Distributional RL, Retrace, and $\beta$-LOO). This makes it more difficult to implement and tune than simpler agents.
  • Future Directions: The authors suggest that the $\beta$-LOO estimator and Distributional Retrace could be applied to continuous control tasks (like robotics), which were not explored in this paper.

Summary updated

Abstract

In this work we present a new agent architecture, called Reactor, which combines multiple algorithmic and architectural contributions to produce an agent with higher sample-efficiency than Prioritized Dueling DQN (Wang et al., 2016) and Categorical DQN (Bellemare et al., 2017), while giving better run-time performance than A3C (Mnih et al., 2016). Our first contribution is a new policy evaluation algorithm called Distributional Retrace, which brings multi-step off-policy updates to the distributional reinforcement learning setting. The same approach can be used to convert several classes of multi-step policy evaluation algorithms designed for expected value evaluation into distributional ones. Next, we introduce the β-leaveone-out policy gradient algorithm which improves the trade-off between variance and bias by using action values as a baseline. Our final algorithmic contribution is a new prioritized replay algorithm for sequences, which exploits the temporal locality of neighboring observations for more efficient replay prioritization. Using the Atari 2600 benchmarks, we show that each of these innovations contribute to both the sample efficiency and final agent performance. Finally, we demonstrate that Reactor reaches state-of-the-art performance after 200 million frames and less than a day of training.
BibTeX
@inproceedings{gruslys2018reactor,
  author = {Audrunas Gruslys and Will Dabney and Mohammad Gheshlaghi Azar and Bilal Piot and Marc Bellemare and Remi Munos},
  title = {{The Reactor: A fast and sample-efficient Actor-Critic agent for Reinforcement Learning}},
  booktitle = {International Conference on Learning Representations},
  year = {2018},
  url = {https://openreview.net/forum?id=rkHVZWZAZ},
}
Figure