Efficient recurrent architectures through activity sparsity and sparse back-propagation through time

Anand Subramoney, Khaleelulla Khan Nazeer, Mark Schöne, Christian Mayr, David Kappel

Introduction

Recurrent Neural Networks (RNNs) are foundational for processing sequential data, but they suffer from a major efficiency bottleneck: dense communication. In a standard RNN, every neuron communicates its activation to every connected neuron at every single time step. This continuous exchange is computationally expensive and memory-intensive, particularly during the training phase using Back-propagation Through Time (BPTT).

Drawing inspiration from the biological brain—which is highly recurrent yet incredibly sparse, communicating via discrete "spikes" only when necessary—researchers have developed the Event-based Gated Recurrent Unit (EGRU). The EGRU is a novel architecture that mimics this biological efficiency. By making both the forward pass and the training process "event-driven," the model achieves up to an 85% reduction in computation while maintaining state-of-the-art performance on tasks ranging from gesture recognition to language modeling.

The Problem: Dense vs. Sparse Communication

While biological neural networks are remarkably energy-efficient due to their sparse activity, previous attempts to bring this "activity sparsity" to artificial intelligence (such as traditional Spiking Neural Networks) have often struggled to match the performance of standard deep learning models on complex, real-world tasks.

The authors aim to bridge this gap. Their goal is to create a model that is as computationally lean as a biological system but as powerful and easy to train as a modern Gated Recurrent Unit (GRU).

Methodology: The Event-based GRU (EGRU)

To achieve this, the authors introduce the EGRU, which modifies the standard GRU with two key innovations:

  1. Threshold-based Event Generation: The EGRU introduces an internal state ($c$) and a threshold ($\vartheta$). A unit only produces an output (an "event") if its internal state crosses that threshold. If it does not cross, the unit stays silent, and no information is transmitted to the rest of the network. To prevent a neuron from firing indefinitely once it hits the threshold, the EGRU "clears" its state immediately after an event, encouraging efficient, burst-like communication patterns.
  2. Sparse BPTT with Surrogate Gradients: Because the threshold function is a sharp "step" and therefore non-differentiable, standard back-propagation fails. The authors solve this by using a "surrogate gradient"—a smooth approximation used exclusively during the backward pass. Crucially, the mathematics are formulated so that gradients only flow back through units that were either active or very close to the threshold.
Overview of the EGRU architecture, surrogate gradients, and sparse forward/backward passes.

This makes the training process itself computationally sparse. The paper provides a rigorous mathematical proof using a continuous-time Ordinary Differential Equation (ODE) formulation, demonstrating that the complexity of calculating weight updates scales linearly with the number of events, rather than the total number of neurons and time steps.

Experimental Setup and Key Results

The EGRU was evaluated across several diverse benchmarks to prove its versatility, including the DVS128 Gesture Dataset (neuromorphic vision), Sequential MNIST (sMNIST), and large-scale language modeling tasks like PennTreebank (PTB) and WikiText-2.

  • Competitive with Dense Models: The most surprising insight is that accuracy does not have to be traded for efficiency. The EGRU matched or outperformed standard GRUs and LSTMs on complex cognitive tasks like language modeling.
  • Gesture Recognition: On the DVS Gesture task, the EGRU achieved 97.8% accuracy, outperforming many dense models while maintaining 76.4% activity sparsity and 72.3% backward sparsity.
  • Language Modeling: On the PennTreebank dataset, the EGRU achieved a perplexity of 57.2 (lower is better), competitive with standard AWD-LSTM models, but accomplished with ~80% activity sparsity.
  • Computational Speedup: In several tests, the "effective MACs" (multiply-accumulate operations) were reduced by an order of magnitude. For example, on sMNIST, the EGRU used only 226K MACs compared to the 1M MACs required by a standard GRU.

Limitations and Future Work

While the EGRU is highly efficient, the authors note a few areas for future development:

  • Hardware Realization: To realize true energy savings (measured in Joules), these models need to run on specialized neuromorphic hardware like Intel’s Loihi or SpiNNaker 2. On standard GPUs, the overhead of managing sparse matrices can sometimes negate theoretical speedups.
  • Long-Range Dependencies: Because the EGRU is based on the GRU architecture, it inherently struggles with very long sequences compared to modern Transformer models. It is more efficient, but not necessarily "smarter" at remembering distant past events than a standard GRU.
  • Combining Sparsities: Future work will look to combine this activity sparsity with parameter sparsity (weight pruning) to create even leaner, more efficient models.

Summary updated

BibTeX
@inproceedings{subramoney2023efficient,
  author = {Anand Subramoney and Khaleelulla Khan Nazeer and Mark Schöne and Christian Mayr and David Kappel},
  title = {{Efficient recurrent architectures through activity sparsity and sparse back-propagation through time}},
  booktitle = {International Conference on Learning Representations},
  year = {2023},
}
Figure