Neural Network Optimization for Reinforcement Learning Tasks Using Sparse Computations

Dmitry Ivanov, Mikhail Kiselev, Denis A. LarionovarXiv 2022

Introduction

Deep Reinforcement Learning (RL) has demonstrated remarkable success in mastering complex environments, yet it remains computationally expensive. Training and deploying agents in environments like Atari games typically requires millions of Multiply and Accumulate (MAC) operations per second. However, much of this computation is inherently redundant. In a standard RL task, the input consists of a sequence of video frames where consecutive frames often share significant pixel-level similarities. Standard neural networks fail to exploit this temporal redundancy, re-calculating the entire state of every neuron for every frame.

This research addresses this inefficiency by introducing a dual-optimization approach that combines structural weight pruning with temporal "delta" updates. By mimicking the asynchronous, event-driven nature of the human brain, the proposed method achieves a 20-150x reduction in the number of multiplications required for RL agents without compromising performance.

Methodology: Achieving Double Sparsity

The researchers implemented two distinct strategies to maximize computational efficiency within the Deep Q-Network (DQN) framework.

Architecture of the Deep Q-Network (DQN) used as the baseline for sparse optimization.

1. Structural Sparsity (Pruning)

Following the "Lottery Ticket Hypothesis," the team utilized iterative magnitude pruning. This process involves training a network, removing weights with the smallest magnitudes (those closest to zero), resetting the remaining weights to their initial values, and retraining. This results in a "sparse" network where a vast majority of connections are eliminated, reducing the total parameter count that requires computation.

2. Temporal Sparsity (DeltaNetworks)

To exploit temporal redundancy, the researchers implemented "DeltaNetworks" using a Hysteresis Quantizer. Instead of the standard calculation $y = f(Wx)$, the network calculates the change in input ($\Delta x$). A neuron only updates its state and transmits a signal to the subsequent layer if the change in its activation exceeds a predefined threshold ($T$). If the change is negligible, the neuron remains "silent," effectively bypassing the cost of multiplication for that frame.

By integrating these methods, the algorithm only performs multiplications for non-zero weights connected to neurons that have undergone significant state changes.

Experimental Setup and Datasets

The proposed method was evaluated using the Atari 2600 suite via the OpenAI Gym. The selection of games provided a diverse range of visual complexities and temporal correlations to test the scalability of the "delta" approach.

The Atari 2600 benchmark suite used to evaluate the efficiency of sparse computations.

The agents were tested on the following environments:

  • Breakout: Characterized by a static background and minimal moving parts (ball and paddle).
  • SpaceInvaders: A more dynamic environment with multiple moving projectiles and enemies.
  • BattleZone, Robotank, Enduro, and Freeway: Environments offering varying degrees of motion and visual noise.

Key Insights and Results

The efficiency gains were found to be highly environment-dependent. In Breakout, where the visual field is largely static, temporal sparsity reached 0.987, leading to a 124x reduction in significant multiplications. The total number of non-zero multiplications plummeted from over 9.3 million to just 75,012. Even in more complex environments like SpaceInvaders, the method achieved a 22.9x reduction.

Interestingly, the combination of pruning and delta-updates did not merely maintain performance; in several instances, it improved it. Sparse networks can act as a form of regularization, stripping away "noise" from unimportant weights and potentially enhancing the agent's ability to generalize. Across the entire test suite, the researchers consistently observed a 20-150x reduction in computational load.

Limitations and Future Outlook

Despite these theoretical gains, current hardware remains a significant bottleneck. Modern GPUs are designed for dense matrix operations and are not yet optimized for the scattered, asynchronous mathematics required by DeltaNetworks. While newer architectures like Nvidia's Ampere have introduced support for structured sparsity, they cannot yet fully leverage the 90%+ sparsity levels achieved in this study.

The authors suggest that the future of these algorithms lies in Neuromorphic processors, such as Intel’s Loihi 2 or GrAIMatterLabs’ GrAIOne. These chips are specifically engineered for asynchronous, event-driven computation. Future research will also investigate the "training floor" phenomenon, where certain extreme levels of pruning render agents impossible to train, a boundary that remains poorly understood.

Summary updated

BibTeX
@misc{ivanov2022neural,
  author = {Dmitry Ivanov and Mikhail Kiselev and Denis A. Larionov},
  title = {{Neural Network Optimization for Reinforcement Learning Tasks Using Sparse Computations}},
  year = {2022},
  eprint = {2201.02571},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2201.02571},
}
Figure