Introduction
As Reinforcement Learning (RL) enters the era of "Large RL Models," architectures such as Gato and Multi-Agent Transformers (MAT) are pushing the boundaries of computational and storage requirements. These models, often featuring billions of parameters, rely heavily on Experience Replay (ER) systems to store and sample past interactions for training. However, traditional ER systems like DeepMind’s Reverb were designed for smaller-scale models and are increasingly becoming the primary bottleneck in the training pipeline.
GEAR (GPU-centric Experience Replay) is a distributed system designed specifically to address these scaling challenges. By shifting the architecture from a CPU-centric to a GPU-centric model, GEAR achieves significant performance gains, offering up to 6x the throughput of current industry standards.
The Bottlenecks of Traditional Experience Replay
Existing ER systems face three critical challenges when scaled to large-model training:
- Storage Costs: Large-scale RL requires hundreds of terabytes of trajectory data. Storing this on dedicated CPU-based servers is economically and logistically prohibitive.
- Computational Overhead: As batch sizes and dataset sizes grow, complex sampling strategies (such as prioritized replay) become computationally expensive for CPUs, leading to idle GPUs waiting for data.
- Communication Latency: Standard network protocols like gRPC involve excessive data copying and serialization. This "data copy tax" chokes the training pipeline, especially when moving massive trajectories over a network.
The GEAR Architecture
GEAR re-imagines the ER system by leveraging the high-performance hardware already present in modern training nodes. Its core innovations focus on proximity, parallelism, and zero-copy data movement.
Training Server Integration and Sharding
Instead of relying on separate storage clusters, GEAR utilizes the massive host memory (RAM) and GPUs available on the training nodes themselves. It employs a pipeline-aware sharding strategy, ensuring that trajectories are stored in the host memory nearest to the specific GPUs that will eventually process them.
Decentralized GPU Selection
GEAR moves the logic for trajectory selection—such as Top-K or weighted sampling—from the CPU to optimized GPU kernels. By treating sampling as a large-scale parallel search and sort problem, GEAR performs selection across the cluster in parallel. This approach circumvents the CPU bottleneck entirely, achieving selection speeds 100–1000x faster than traditional CPU implementations.
Zero-Copy and RDMA Communication
To eliminate the latency associated with data movement, GEAR utilizes NVIDIA’s zero-copy access, allowing GPUs to read directly from host memory without CPU intervention. For inter-node transfers, GEAR implements Remote Direct Memory Access (RDMA) over InfiniBand. This allows the system to bypass the operating system's network stack, significantly reducing CPU usage and minimizing latency.
Column-Based Storage
Trajectories are stored in a column-based format within shared memory. This allows clients to perform selective reads, fetching only the specific fields (e.g., rewards or observations) required for a specific training step, further reducing unnecessary data transfer.
Experimental Evaluation
Researchers evaluated GEAR across several demanding RL benchmarks to test its performance and scalability:
- D4RL (MuJoCo): Used to train a 1-billion parameter version of the Gato model.
- StarCraft II (SC2): Evaluated using the Multi-Agent Transformer (MAT) across various complex tasks (e.g., 27m_vs_30m).
- Large-Scale Simulation: The system was tested against datasets mirroring state-of-the-art production environments, involving up to 100 TB of trajectory data.
Key Results and Insights
Performance and Throughput
In a 24-GPU cluster, GEAR achieved a trajectory collection throughput of 35 GB/s. In comparison, Reverb reached only 6 GB/s, representing a nearly 6x performance increase. This efficiency is largely attributed to the elimination of the "data copy tax"; GEAR’s GPU kernels for direct host memory access reached 17 GB/s, outperforming standard CPU-orchestrated movements (2 GB/s) by a factor of 8.5.
Linear Scalability
GEAR demonstrates linear scalability with respect to batch size. While traditional systems often see performance degradation at high batch sizes (e.g., 1024), GEAR maintains peak efficiency, making it ideal for the massive batch sizes required by transformer-based RL models.
Algorithmic Correctness
Crucially, the authors successfully reproduced the training convergence of both Gato and MAT. This confirms that GEAR’s architectural optimizations and decentralized selection strategies do not sacrifice the mathematical integrity or the final performance of the RL algorithms.
Conclusion and Future Work
GEAR demonstrates that the most efficient way to manage experience replay for large models is to exploit hardware symmetry—storing data as close to the accelerator as possible and using that same accelerator for data management tasks.
While GEAR significantly advances the state of the art, future work remains. The authors aim to explore how GEAR integrates with live environment simulation and inference segments of the RL pipeline. Additionally, as models move toward the multi-trillion parameter range, further research into even more aggressive distributed storage strategies will be necessary to keep pace with the evolving demands of artificial intelligence.
Summary updated