SURREAL-System: Fully-Integrated Stack for Distributed Deep Reinforcement Learning

Linxi Fan, Yuke Zhu, Jiren Zhu, Zihua Liu, Orien Zeng, Anchit Gupta, Joan Creus-Costa, Silvio Savarese, Li Fei-FeiarXiv 2019

Abstract

Distributed Deep Reinforcement Learning (RL) is essential for solving complex control tasks, yet its adoption is hindered by significant engineering challenges. Current implementations often lack reproducibility, flexibility, and the ability to scale efficiently across heterogeneous hardware. We introduce SURREAL-System, a four-layer software stack that abstracts away the complexities of cloud provisioning and inter-process communication. By decoupling algorithmic logic from the underlying infrastructure, SURREAL-System allows researchers to scale training to thousands of CPU cores and hundreds of GPUs seamlessly. Our results demonstrate near-linear scaling and state-of-the-art performance on high-dimensional robotics tasks, highlighting the importance of integrated system design in RL research.

Introduction: The Engineering Tax of Distributed RL

Scaling RL algorithms is notoriously difficult. Unlike the data-parallel patterns common in supervised learning, RL involves a complex interplay between heterogeneous components: actors that explore environments, replay buffers that store experience, and learners that update neural network weights.

Distributed RL components and their communication patterns

The authors identify three primary bottlenecks in the current landscape:

  1. Reproducibility: Results are often tied to specific hardware configurations, making validation difficult for other researchers.
  2. Flexibility: Implementing new algorithms often requires a total re-engineering of the underlying communication and orchestration code.
  3. Scalability: Moving from a single machine to a cluster usually introduces massive communication bottlenecks that prevent linear performance gains.

SURREAL-System aims to eliminate this "engineering tax" by providing a unified, scalable, and flexible framework that treats infrastructure as a first-class citizen.

The SURREAL-System Architecture

The proposed system is structured into four distinct layers, each addressing a specific challenge in the distributed RL pipeline. This modularity allows researchers to transition from a laptop to a massive cloud cluster without changing their algorithmic logic.

The four-layer SURREAL-System software stack

1. Cloudwise (Provisioner)

This layer abstracts away cloud-specific complexities (AWS, Google Cloud, Azure). It uses Python parameters to spin up a unified, Kubernetes-ready cluster, ensuring that the development environment remains consistent regardless of the underlying cloud provider.

2. Symphony (Orchestrator)

Symphony manages the deployment of experiments. It allows researchers to write logic once and deploy it via different backends: Tmux for local debugging, Docker-compose for local testing, or Kubernetes for full-scale cloud production.

3. Caraml (Protocol)

The performance "secret sauce," Caraml is a communication layer built on ZeroMQ and Apache Arrow. It features a "Data Fetcher" that offloads serialization and networking to separate processes, bypassing the Python Global Interpreter Lock (GIL) and providing a 7x to 10x increase in learner throughput compared to standard implementations.

4. Surreal (Algorithms)

The top layer contains high-level implementations of algorithms like PPO, DDPG, and ES. Because the lower layers handle the infrastructure and data passing, these algorithms remain "clean," modular, and easy to modify.

Experimental Evaluation and Key Insights

The system was evaluated on a Robotics Suite requiring learning from high-dimensional RGB pixel input and standard OpenAI Gym locomotion tasks.

  • Near-Linear Scaling: The system demonstrated nearly linear scaling in environment frames per second (FPS) as the number of actors increased up to 1024.
  • Qualitative Gains in Exploration: In complex tasks like "Bimanual Lifting," the authors found that using 1024 actors was not just faster—it was necessary. The agent solved tasks that were essentially unsolvable with fewer actors, suggesting that massive scale provides a qualitative leap in exploration capability.
  • State-of-the-Art Performance: SURREAL-PPO achieved SOTA results on the Robotics Suite. Furthermore, their ES implementation outperformed popular reference implementations like Ray RLlib in both final performance and wall-clock time across several Gym environments.

Conclusion and Future Work

SURREAL-System demonstrates that a fully-integrated stack can significantly lower the barrier to entry for large-scale RL research. By decoupling logic from deployment and optimizing the communication protocol, it provides a robust foundation for future developments. While the system currently excels in scalability, future work will focus on reducing debugging overhead and expanding support for a wider variety of off-policy and on-policy algorithms.

Summary updated

BibTeX
@misc{fan2019surreal,
  author = {Linxi Fan and Yuke Zhu and Jiren Zhu and Zihua Liu and Orien Zeng and Anchit Gupta and Joan Creus-Costa and Silvio Savarese and Li Fei-Fei},
  title = {{SURREAL-System: Fully-Integrated Stack for Distributed Deep Reinforcement Learning}},
  year = {2019},
  eprint = {1909.12989},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/1909.12989},
}
Figure