Fiber: A Platform for Efficient Development and Distributed Training for Reinforcement Learning and Population-Based Methods

Jiale Zhi, Rui Wang, Jeff Clune, Kenneth O. StanleyarXiv 2020

Introduction

Distributed computing is essential for modern machine learning, yet standard frameworks often struggle with the unique demands of Reinforcement Learning (RL) and population-based methods. Unlike supervised learning, these workloads are characterized by high heterogeneity—requiring simultaneous heavy CPU usage for simulations and GPU usage for model updates—and dynamic scaling needs. Furthermore, the "systems engineering burden" of transitioning from a local prototype to a large-scale cluster often hinders research velocity.

Fiber is a distributed computing framework designed to bridge this gap. By mirroring the standard Python multiprocessing API, Fiber allows researchers to scale their applications from a single laptop to a massive cluster with minimal code changes, effectively treating a distributed cluster as a local machine.

Architecture and Design

The core innovation of Fiber lies in its "job-backed process" model and a flexible three-layer architecture. This design decouples the user-facing API from the underlying cluster management logic, ensuring portability and ease of use.

The three-layer architecture of Fiber: API Layer, Backend Layer, and Cluster Layer.

The architecture consists of:

  1. API Layer: Provides familiar interfaces such as Pool, Pipe, and Queue. This allows for "one-line" migrations where users simply change their import statements.
  2. Backend Layer: Manages the lifecycle of jobs (creation, termination, and monitoring) across different environments.
  3. Cluster Layer: Interfaces with existing cluster managers like Kubernetes or Peloton, making Fiber backend-agnostic.

To ensure consistency across environments, each Fiber process is encapsulated within a container. Reliability is maintained through a "pending table" mechanism that tracks remote tasks; if a worker fails, the system automatically re-queues the task and provisions a replacement worker.

Benchmarks and Results

Fiber's performance was evaluated against established frameworks like Spark and IPyParallel across three primary benchmarks: framework overhead, Evolution Strategies (ES), and Proximal Policy Optimization (PPO).

Performance comparison of Fiber against other frameworks across synthetic workloads, Evolution Strategies, and PPO.

Framework Overhead

In synthetic tests with short-duration tasks (1ms to 1s), Fiber demonstrated significantly lower overhead than its competitors. For 1ms tasks, Fiber performed nearly as well as local multiprocessing, whereas IPyParallel was 8x slower and Spark was 14x slower. This efficiency is critical for RL, where environment simulations are often extremely brief.

Scalability in RL and Population-Based Methods

Fiber showed superior scalability when running Evolution Strategies on the Bipedal Walker Hardcore environment. It scaled smoothly up to 1,024 workers, while IPyParallel's performance degraded after 256 workers and eventually failed due to communication errors at the 1,024-worker mark. In PPO experiments on Atari Breakout, Fiber successfully distributed environment workers across hundreds of nodes, significantly cutting total training time compared to single-machine runs.

Discussion and Future Work

While Fiber significantly simplifies distributed RL, it faces certain trade-offs. The lack of shared memory—a consequence of running processes on separate physical machines—requires the use of Managers and Proxy objects, which introduces some latency compared to local memory access. Additionally, while environment steps are easily distributed, the neural network optimization phase can still become a bottleneck in algorithms like PPO.

Future development may focus on optimizing the model update phase and mitigating network latencies in multi-cloud deployments. Nonetheless, Fiber provides a robust foundation for scaling complex AI research workloads without the traditional engineering overhead.

Summary updated

BibTeX
@misc{zhi2020fiber,
  author = {Jiale Zhi and Rui Wang and Jeff Clune and Kenneth O. Stanley},
  title = {{Fiber: A Platform for Efficient Development and Distributed Training for Reinforcement Learning and Population-Based Methods}},
  year = {2020},
  eprint = {2003.11164},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2003.11164},
}
Figure