Sample Efficient Actor-Critic with Experience Replay

Ziyu Wang, Victor Bapst, Nicolas Heess, Volodymyr Mnih, Remi Munos, Koray Kavukcuoglu, Nando de Freitas

TL;DR

ACER is a high-performance reinforcement learning agent that bridges the gap between stable actor-critic methods and sample-efficient experience replay. By combining truncated importance sampling, a novel "stochastic dueling" architecture, and a computationally efficient trust region optimization, it achieves state-of-the-art results across both discrete Atari games and complex continuous control tasks.

What Problem Does This Paper Address?

Reinforcement Learning (RL) agents generally fall into two camps: on-policy and off-policy.

  • On-policy agents (like A3C) learn only from the data they are currently collecting. This approach is stable but "sample inefficient" because data is discarded after a single gradient update.
  • Off-policy agents (like DQN) use an "experience replay" buffer to store and reuse past data. This is much more efficient but often unstable, especially when combined with neural networks and policy gradients.

The challenge the authors tackle is creating an architecture that is both stable (like an actor-critic) and sample-efficient (using replay), while remaining flexible enough to handle both discrete actions (e.g., pressing buttons) and continuous actions (e.g., controlling joint torques in a robot).

Methods

The authors introduce ACER (Actor-Critic with Experience Replay), which relies on three primary technical innovations:

  1. Truncated Importance Sampling with Bias Correction: When learning from old data (off-policy), we must adjust for the fact that the "old" policy that collected the data is different from our "current" policy. This is usually done via importance weights. However, these weights can explode, causing massive, unstable updates. ACER truncates these weights to a maximum value and adds a clever "bias correction" term to ensure the math remains theoretically sound without the volatility.
  2. Efficient Trust Region Policy Optimization: Standard Trust Region Policy Optimization (TRPO) is great for stability but requires expensive second-order derivative calculations. ACER simplifies this by maintaining a "running average" of the policy network. It ensures that any new update doesn't deviate too far from this average, providing TRPO-like stability at a fraction of the computational cost.
  3. Stochastic Dueling Networks (SDN): Building on the "Dueling" architecture (which separates the value of a state from the advantage of a specific action), the authors propose SDNs for continuous domains. This allows the agent to estimate both the state-value ($V$) and state-action value ($Q$) consistently, which is notoriously difficult when the action space is infinite.
Stochastic Dueling Network Architecture

Datasets

The authors evaluated ACER on two major benchmarks:

  • Atari 57 (Arcade Learning Environment): A suite of 57 classic games. This tests the agent's ability to handle discrete actions and diverse visual inputs.
  • MuJoCo (Multi-Joint dynamics with Contact): A physics engine used for continuous control tasks. The authors tested on 6 tasks: Cartpole swingup, Reacher3, Cheetah, Fish, Walker, and Humanoid. The "Humanoid" task is particularly difficult due to its high dimensionality (21 actuators).

Key Insights and Ideas

  • Replay is for Actor-Critics too: Historically, experience replay was the domain of Q-learning. ACER proves that with the right variance reduction (Retrace algorithm) and weight truncation, actor-critics can benefit immensely from data reuse.
  • The "Aha" of Bias Correction: Most researchers simply clip importance weights to stop gradients from exploding, which introduces bias. ACER’s "bias correction" term allows the agent to learn from the "tail" of the distribution that clipping usually ignores, leading to more accurate updates.
  • Stability via Anchoring: The idea of using a running average of the policy as a "trust region" anchor is a powerful alternative to the complex mathematical constraints used in previous state-of-the-art methods. It suggests that "consistency with the recent past" is a sufficient proxy for stability.

Key Results

ACER Performance on Atari: Sample Efficiency (left) and Wall-Clock Time (right)
  • Atari: ACER matched the performance of the then-state-of-the-art "Prioritized Double DQN" while being significantly more sample-efficient than A3C. With a "replay ratio" of 4 (meaning it performs 4 off-policy updates for every 1 on-policy update), it achieved a median human-normalized score of nearly 2.0 across all 57 games.
  • Continuous Control: In the MuJoCo environments, ACER significantly outperformed A3C and other importance-sampling baselines. On the most complex "Humanoid" task, ACER was the only method among those tested that enabled the agent to stand up and walk reliably.
  • Wall-Clock Efficiency: Because ACER avoids the expensive Fisher-vector products of TRPO, it runs nearly as fast as A3C while using far fewer environment steps to reach the same performance level.

Limitations and Future Work

  • Hyperparameter Complexity: While the authors show ACER is relatively robust, the algorithm introduces several new hyperparameters (the truncation constant $c$, the trust region constraint $\delta$, and the replay ratio). Finding the optimal balance for a new task might require significant tuning.
  • Implementation Overhead: ACER is significantly more complex to implement than standard DQN or A3C due to the multi-step Retrace targets and the trust-region logic.
  • Generalization: The authors suggest that the efficient trust region method could be applied to other deep learning domains beyond RL where training stability is an issue, though this wasn't explored in the paper.

Summary updated

BibTeX
@inproceedings{wang2017sample,
  author = {Ziyu Wang and Victor Bapst and Nicolas Heess and Volodymyr Mnih and Remi Munos and Koray Kavukcuoglu and Nando de Freitas},
  title = {{Sample Efficient Actor-Critic with Experience Replay}},
  booktitle = {International Conference on Learning Representations},
  year = {2017},
  url = {https://openreview.net/forum?id=HyM25Mqel},
}
Figure