Dynamic Sparse Training for Deep Reinforcement Learning

Ghada Sokar, Elena Mocanu, Decebal Constantin Mocanu, Mykola Pechenizkiy, Peter Stone

Abstract

Deep Reinforcement Learning (DRL) typically relies on training dense neural networks, which incurs significant computational and memory costs. This paper introduces Dynamic Sparse Training (DST) to the DRL domain, enabling agents to learn high-performing policies while training sparse networks from scratch. By dynamically evolving the network topology throughout the learning process, the proposed DS-TD3 algorithm achieves superior performance over dense models while reducing parameter counts and computational costs (FLOPs) by 50%.

Introduction

While DRL has achieved remarkable success in complex domains like strategic gaming and robotics, the "compute tax" remains a significant barrier. Training dense networks requires millions of environment interactions and extensive computational resources. Previous efficiency efforts have largely focused on inference-time acceleration. This work addresses the more challenging problem of accelerating the training phase itself.

The authors identify two primary bottlenecks in DRL training: the high cost of updating millions of parameters and the non-stationary nature of RL data distributions. To overcome these, they propose a method that maintains sparsity throughout the entire training lifecycle, rather than pruning a pre-trained dense model.

Methodology: DS-TD3

The core contribution is DS-TD3 (Dynamic Sparse Twin Delayed Deep Deterministic policy gradient). Unlike static sparse training, DS-TD3 allows the network's connectivity to evolve.

Key Components

  • Sparse Initialization: Networks begin with a sparse topology based on the Erdős–Rényi random graph model.
  • Topological Adaptation (Drop-and-Grow): Every $e$ steps, the algorithm removes the weakest weights (those with the smallest magnitudes) and randomly initializes new connections. This "search" allows the network to discover optimal architectures for the task at hand.
  • Delayed Adaptation Schedule: To account for the instability of DRL, a delay is introduced to ensure new connections mature and provide reliable gradients before being considered for removal.
  • Target Network Sparsity: A specific pruning step is implemented to prevent target networks from becoming dense during the moving-average update process.

Experimental Results

The approach was evaluated on five continuous control benchmarks from the MuJoCo physics engine (HalfCheetah, Hopper, Walker2d, Ant, and Humanoid).

Performance comparison of DS-TD3 against dense TD3, Static-TD3, and SAC across MuJoCo benchmarks.

As shown in the results, DS-TD3 consistently outperforms dense TD3. Notably, in the Hopper environment, performance improved by 64%. Furthermore, DS-TD3 reached the final performance levels of dense agents using 40–50% fewer training steps, demonstrating significant sample efficiency gains.

Key Insights and Sensitivity Analysis

The success of DS-TD3 suggests that sparsity may act as a regularizer. While dense networks might overfit to noisy early-stage data, sparse networks are forced to learn more robust, generalizable features.

Sensitivity analysis of DS-TD3 performance with respect to adaptation frequency (a) and sparsity levels (b).

The researchers found a "sweet spot" for sparsity. As seen in the figure above (right), 50% sparsity often yields the best results, whereas extreme sparsity (80%+) leads to performance degradation as the network loses the capacity to represent complex policies. Additionally, the adaptation frequency $e$ is a critical hyperparameter; re-wiring too frequently prevents stable learning, while re-wiring too slowly misses the benefits of dynamic topology.

Conclusion

Dynamic Sparse Training offers a promising path toward more efficient DRL. By reducing FLOPs and parameters by 50% without sacrificing—and often improving—performance, DS-TD3 challenges the necessity of dense training. Future work will focus on scaling to even higher sparsity levels and developing specialized hardware kernels to translate theoretical FLOP reductions into real-world wall-clock time savings.

Summary updated

BibTeX
@inproceedings{sokar2022dynamic,
  author = {Ghada Sokar and Elena Mocanu and Decebal Constantin Mocanu and Mykola Pechenizkiy and Peter Stone},
  title = {{Dynamic Sparse Training for Deep Reinforcement Learning}},
  booktitle = {International Joint Conference on Artificial Intelligence},
  year = {2022},
  doi = {10.24963/ijcai.2022/477},
}
Figure