Introduction
Cleanba is a new open-source distributed Reinforcement Learning (RL) platform designed to ensure experiments yield the exact same results regardless of whether they are run on a single GPU or a massive cluster. By introducing a deterministic synchronization architecture and leveraging JAX, Cleanba achieves up to a 6.8x speedup over standard baselines while maintaining rock-solid reproducibility.
The Problem: Hardware-Dependent Non-Determinism
In Deep Reinforcement Learning (DRL), "reproducibility" is a notorious headache. While researchers usually blame hyperparameters or random seeds, this paper identifies a more insidious culprit: hardware-dependent non-determinism.
In popular distributed frameworks like IMPALA, "actors" (which collect data) and "learners" (which optimize the model) run asynchronously. If you move your code from a small workstation to a powerful server, the learner might process updates faster, or the actors might provide data more frequently. This changes the "staleness" of the data—how many versions behind the current policy the training data actually is.
The authors demonstrate that in standard frameworks, simply changing the hardware configuration (or artificially introducing delays, as seen above) can lead to significantly different learning curves, even when every single hyperparameter is identical. This makes it nearly impossible to reliably compare results across different research labs.
Cleanba's Architecture and Methods
Cleanba addresses these issues through a more principled distributed architecture that prioritizes deterministic execution without sacrificing speed.
- Deterministic Synchronization: Unlike the "wild west" asynchrony of previous methods, Cleanba uses a specific synchronization mechanism. It ensures the learner always performs gradient updates using rollout data from the second latest policy. This creates a predictable, fixed relationship between data collection and model updates that doesn't change based on CPU/GPU speed.
- Decoupling Hardware from Hyperparameters: Standard tools often tie the number of actor threads (hardware) to the number of environments (hyperparameter). Cleanba uses EnvPool to decouple these, allowing researchers to scale the number of CPUs used for simulation without changing the actual amount of data the agent "sees" per update.
- High-Performance Stack: The platform is built using JAX (for fast, just-in-time compiled kernels) and CuPy, allowing it to run highly optimized distributed versions of PPO and IMPALA.
Experimental Setup and Key Results
The authors evaluated Cleanba using the Atari-57 benchmark, a gold standard in RL consisting of 57 different classic games. They followed a rigorous evaluation protocol (200M frames, sticky actions, no loss-of-life signals) to ensure their results were comparable to high-profile historical baselines.
- Superior Speed: On a single GPU/10 CPU setup, Cleanba’s IMPALA is 6.8x faster than the standard
monobeastimplementation. On a high-end workstation (8 GPUs), it is 5x faster thanmonobeast. - Competitive Performance: Cleanba variants achieved a median Human Normalized Score (HNS) of ~165% across Atari games, matching or exceeding strong baselines like
moolibandtorchbeast. - Proven Reproducibility: Cleanba produces nearly identical learning curves when switching between 1 GPU and 8 GPUs. In contrast, baseline frameworks often show wildly different performance levels on the same two hardware setups due to the implicit "timing noise" acting as an uncontrolled hyperparameter.
Limitations and Future Work
- The PPO Trade-off: The authors found that while parallelizing helps speed, it can slightly hurt the "data efficiency" of PPO (how much it learns per frame of experience). This is an inherent trade-off in the PPO algorithm that Cleanba makes visible but doesn't entirely eliminate.
- Framework Confounders: While Cleanba controls for architecture, it is difficult to perfectly control for lower-level differences between JAX (used by Cleanba) and PyTorch (used by many baselines), such as different default epsilon values in optimizers.
- Future Directions: The authors suggest that this reproducible architecture could be extended to even more complex algorithms like R2D2 or AlphaZero, where distributed scaling is even more critical.
Summary updated