High-Throughput Synchronous Deep RL

Iou-Jen Liu, Raymond A. Yeh, Alexander G. Schwing

Introduction

Deep Reinforcement Learning (RL) is notoriously slow and computationally expensive. To speed it up, researchers usually choose between two paradigms:

  1. Synchronous methods (e.g., A2C): These are stable and deterministic but slow. They suffer from "idle time" because the system must wait for the slowest environment replica to finish its step before updating the model. This is especially painful in complex 3D environments where step times vary wildly.
  2. Asynchronous methods (e.g., IMPALA, GA3C): These are fast because they don't wait. However, they suffer from the "stale policy" issue: the data being used to update the model was collected by a version of the policy that is already many updates old. This leads to noisy gradients, training instability, and lower sample efficiency.

High-Throughput Synchronous Deep RL (HTS-RL) eliminates this traditional trade-off between training speed and stability. By using a novel system design that performs learning and data collection concurrently with a guaranteed "one-step" policy lag, it achieves the high throughput of asynchronous methods while maintaining the data efficiency and full determinism of synchronous ones.

Methods

HTS-RL introduces several architectural innovations to bridge the gap between synchronous and asynchronous RL:

  • Concurrent Rollout and Learning: Unlike standard synchronous RL where the system alternates between collecting data and training, HTS-RL does both at once. It uses a "double buffering" strategy with two data storages. While the Executors are filling "Storage A" with new experience, the Learner is training on "Storage B" collected in the previous cycle.
  • Guaranteed One-Step Lag: Because of this double-buffering, the "behavior policy" (used to collect data) is exactly one update behind the "target policy" (the one being updated). This fixed, minimal lag is much easier to handle than the unpredictable, large lags in asynchronous systems.
  • Batch Synchronization: Instead of synchronizing after every single environment step, HTS-RL synchronizes every $\alpha$ steps. This significantly reduces the time wasted waiting for "straggler" environment replicas.
  • Asynchronous Actor-Executor Interaction: To keep the GPU busy, Actors (which run the neural network) poll a buffer for observations from Executors (which run the environment). Crucially, they maintain full determinism by passing random seeds from the executors to the actors, ensuring that even if the timing of requests changes, the resulting actions remain the same.
Comparison of HTS-RL architecture with A3C, GA3C, IMPALA, and A2C.

Key Insights

  • The "Stale Policy" isn't binary: You don't need to eliminate lag entirely to be stable. A constant, minimal lag of one step is mathematically manageable and doesn't require the complex importance sampling corrections needed by highly asynchronous systems like IMPALA.
  • Variance is the Throughput Killer: In synchronous RL, the total time is dictated by the maximum step time across all parallel environments. By batching steps ($\alpha > 1$), the law of large numbers kicks in, and the average time per step becomes much more consistent, drastically reducing idle time.
  • Determinism is a Choice: Many researchers assume that high-throughput asynchronous interaction inherently breaks reproducibility. HTS-RL proves that by carefully managing where randomness is generated and passed, you can have high speed and bit-perfect reproducibility.

Results

The authors evaluated HTS-RL on Atari Games (a standard benchmark for RL throughput and sample efficiency) and Google Research Football (GFootball, a complex environment with significant variance in environment step times).

  • Speed: HTS-RL is 2–6× faster than standard synchronous baselines (A2C/PPO).
  • Performance: On Atari, HTS-RL achieved 3.7× higher average episode rewards than IMPALA when given the same training time, because it didn't suffer from the instability of highly stale policies.
  • Scalability: In the GFootball environment, HTS-RL's throughput scaled almost linearly with the number of environments, whereas standard PPO's throughput plateaued quickly due to synchronization overhead.
  • GFootball Success: HTS-RL achieved 43% higher game scores than IMPALA in GFootball scenarios. It also enabled the first successful training of multiple agents using only raw image input in this environment.
Speedup increases significantly as the variance in environment step time grows.

Limitations and Future Work

  • Single-Machine Focus: The current implementation of HTS-RL is optimized for parallel computing on a single machine (multi-core CPU + GPU).
  • Storage Switch Idle Time: While HTS-RL reduces idle time, there is still a brief synchronization point when the two data storages are swapped.
  • Future Directions: The authors suggest that HTS-RL could be combined with multi-machine distributed frameworks like DD-PPO to scale to even larger clusters while maintaining its stability benefits.

Summary updated

BibTeX
@inproceedings{liu2020high,
  author = {Iou-Jen Liu and Raymond A. Yeh and Alexander G. Schwing},
  title = {{High-Throughput Synchronous Deep RL}},
  booktitle = {Advances in Neural Information Processing Systems},
  year = {2020},
  url = {https://openreview.net/forum?id=5WMqZj7kH3z},
}
Figure