Abstract
Deep reinforcement learning has achieved significant milestones, however, the computational demands of reinforcement learning training and inference remain substantial. Quantization is an effective method to reduce the computational overheads of neural networks, though in the context of reinforcement learning, it is unknown whether quantization's computational benefits outweigh the accuracy costs introduced by the corresponding quantization error. To quantify this tradeoff we perform a broad study applying quantization to reinforcement learning. We apply standard quantization techniques such as post-training quantization (PTQ) and quantization aware training (QAT) to a comprehensive set of reinforcement learning tasks (Atari, Gym), algorithms (A2C, DDPG, DQN, D4PG, PPO), and models (MLPs, CNNs) and show that policies may be quantized to 8-bits without degrading reward, enabling significant inference speedups on resource-constrained edge devices. Motivated by the effectiveness of standard quantization techniques on reinforcement learning policies, we introduce a novel quantization algorithm, ActorQ, for quantized actor-learner distributed reinforcement learning training. By leveraging full precision optimization on the learner and quantized execution on the actors, ActorQ enables 8-bit inference while maintaining convergence. We develop a system for quantized reinforcement learning training around ActorQ and demonstrate end to end speedups of > 1.5x - 2.5x over full precision training on a range of tasks (Deepmind Control Suite). Finally, we break down the various runtime costs of distributed reinforcement learning training (such as communication time, inference time, model load time, etc) and evaluate the effects of quantization on these system attributes.
Introduction
Deep Reinforcement Learning (RL) has achieved stunning successes, from mastering Atari games to controlling complex robotic systems. However, these milestones come at a massive cost: training often requires thousands of CPU/GPU hours, leading to high energy consumption and significant carbon footprints.
In a typical distributed RL setup, "actors" interact with the environment to collect data, while a "learner" updates the neural network policy based on that data. The bottleneck is often the actors: they spend most of their time performing "inference" (deciding which action to take). While the industry has used quantization—reducing the precision of neural network weights (e.g., from 32-bit floats to 8-bit integers)—to speed up standard AI models, it hasn't been widely applied to RL training. There was a lingering fear that the "feedback loop" in RL would cause small quantization errors to snowball, leading to unstable training or poor performance.
Methods: The ActorQ Framework
The authors propose ActorQ, a system designed to prove that quantization is not only viable for RL but essential for sustainability.
The core innovation of ActorQ lies in its split-precision architecture:
- The Actor-Learner Split: The Learner remains in full precision (FP32) to ensure that gradient calculations and weight updates are accurate.
- Quantized Actors: Before the Learner broadcasts the updated policy to the Actors, the weights are quantized to 8-bit integers (INT8). The actors then use these compressed models to run their simulations.
- Quantized Communication: By sending 8-bit weights instead of 32-bit weights, the system also slashes the communication overhead between the learner and the actors.
- Benchmarking Resilience: Before building ActorQ, the authors performed an extensive study using Post-Training Quantization (PTQ) and Quantization Aware Training (QAT) across various RL algorithms to see how much precision a policy actually needs.
Key Results and Insights
The authors evaluated ActorQ across standard RL benchmarks including the DeepMind Control Suite, OpenAI Gym (Atari), and PyBullet. A significant finding is that RL policies are incredibly resilient to quantization; 8-bit quantization results in almost zero loss in reward. In some cases, the small errors introduced by quantization act as beneficial "noise," encouraging exploration and sometimes leading to faster convergence than full-precision models.
- End-to-End Speedups: ActorQ demonstrated speedups between 1.5x and 5.41x compared to standard FP32 training. For example, the Acrobot task saw a 5.4x improvement in time-to-convergence.
- Environmental Impact: Using the
experiment-impact-tracker, the authors measured a reduction in carbon emissions (Kgs of CO2) between 1.9x and 3.76x. - Convergence: Across all tasks in the DeepMind Control Suite, the 8-bit agents reached the same (or better) final reward levels as their 32-bit counterparts, proving that the "error propagation" fear was largely unfounded.
Limitations and Future Work
While ActorQ is a major step forward, the authors note a few areas for improvement. To see the full speedup, the underlying hardware must natively support fast INT8 operations. Currently, the Learner still operates in FP32; future work could explore quantizing the learner’s gradient updates as well, which could unlock even further efficiency. Finally, testing ActorQ on large-scale networked clusters would further reveal the benefits of reduced communication costs beyond the single-machine distributed setups studied here.
By showing that we can trade off precision for speed and sustainability without losing performance, QuaRL provides a blueprint for the next generation of green AI.
Summary updated