Accurate and efficient time-domain classification with adaptive spiking recurrent neural networks

Bojian Yin, Federico Corradi, Sander M. Bohté · DOI

Abstract

Inspired by more detailed modeling of biological neurons, Spiking neural networks (SNNs) have been investigated both as more biologically plausible and potentially more powerful models of neural computation, and also with the aim of extracting biological neurons' energy efficiency; the performance of such networks however has remained lacking compared to classical artificial neural networks (ANNs). Here, we demonstrate how a novel surrogate gradient combined with recurrent networks of tunable and adaptive spiking neurons yields state-of-the-art for SNNs on challenging benchmarks in the time-domain, like speech and gesture recognition. This also exceeds the performance of standard classical recurrent neural networks (RNNs) and approaches that of the best modern ANNs. As these SNNs exhibit sparse spiking, we show that they theoretically are one to three orders of magnitude more computationally efficient compared to RNNs with comparable performance. Together, this positions SNNs as an attractive solution for AI hardware implementations.

Introduction

Spiking Neural Networks (SNNs) represent a promising frontier in neuromorphic computing, aiming to replicate the event-based, energy-efficient communication of biological brains. Despite their potential, SNNs have historically faced two significant hurdles: the "dead neuron" problem and a persistent performance gap compared to traditional Artificial Neural Networks (ANNs). The "dead neuron" problem arises because spikes are discrete, non-differentiable events, making standard backpropagation difficult. While surrogate gradients offer a workaround, they often fail to prevent neurons from becoming inactive during training. Furthermore, SNNs have struggled to match the accuracy of Recurrent Neural Networks (RNNs) or LSTMs on complex temporal datasets. This work addresses these challenges by introducing Adaptive Spiking Recurrent Neural Networks (SRNNs) that leverage novel surrogate gradients and learnable temporal dynamics.

Methods: Architecture and Learning

The proposed SRNN architecture integrates several key innovations to enhance temporal processing and training stability.

Adaptive Spiking Neurons (ALIF)

Central to the architecture is the Adaptive Leaky Integrate-and-Fire (ALIF) neuron. Unlike standard LIF neurons, ALIF neurons feature a dynamic threshold that increases upon firing and subsequently decays. This mechanism allows the network to maintain a "memory" of its activity over extended periods, effectively capturing long-range temporal dependencies in a manner analogous to gated units in LSTMs.

SRNN architecture and comparison between LIF and ALIF neuron models.

Multi-Gaussian Surrogate Gradient

To overcome the non-differentiability of the spiking function, the authors developed a Multi-Gaussian (MG) surrogate gradient. Inspired by activation functions like Leaky ReLU, the MG gradient incorporates negative slopes. This design is crucial for "reviving" neurons whose membrane potential resides far below the firing threshold, ensuring they continue to participate in the learning process and preventing the network from stagnating.

Comparison of surrogate gradient functions, highlighting the Multi-Gaussian (MG) approach.

Co-trained Time Constants

A significant departure from traditional SNN design is the treatment of internal time constants ($\tau_m$ and $\tau_{adp}$) as learnable parameters. By optimizing these constants alongside synaptic weights using Backpropagation-Through-Time (BPTT), the network can automatically tune its temporal resolution to match the specific dynamics of the input data, whether it be the rapid fluctuations of speech or the slower rhythms of an ECG.

Results and Discussion

The SRNN model was rigorously evaluated across a variety of temporal benchmarks, including speech recognition (Google Speech Commands, TIMIT), gesture recognition (SoLi radar dataset), and sequential MNIST.

Performance and Accuracy

The SRNNs achieved state-of-the-art results for spiking networks across all tasks. Notably, they outperformed classical LSTMs in several instances. For example, on the SoLi gesture recognition task, the SRNN achieved 91.9% accuracy, surpassing the 87.2% reached by a CNN+LSTM baseline. The networks also demonstrated "any-time" decision-making capabilities, often identifying patterns before the input sequence was complete.

Computational Efficiency

The primary advantage of SRNNs lies in their extreme sparsity and the nature of their operations. By communicating via binary spikes, the network replaces energy-intensive Multiply-Accumulate (MAC) operations with simpler Accumulate (AC) operations. Given that a MAC is approximately 31x more energy-intensive than an AC on 45nm CMOS hardware, and that SRNNs fire sparingly (often once every 3 to 30 timesteps), the theoretical efficiency gains are substantial. On the SHD audio task, the SRNN was calculated to be roughly 1000x more efficient than a Bi-LSTM while maintaining superior accuracy.

Conclusion

This research demonstrates that SRNNs can bridge the performance gap with traditional RNNs while offering orders-of-magnitude improvements in theoretical energy efficiency. While these gains are currently theoretical—requiring specialized neuromorphic hardware like Intel's Loihi to be fully realized—the results position SNNs as a highly attractive solution for future AI hardware. Future work will focus on scaling these networks using more efficient learning rules and applying further optimizations like weight pruning and quantization.

Summary updated

BibTeX
@article{yin2021accurate,
  author = {Bojian Yin and Federico Corradi and Sander M. Bohté},
  title = {{Accurate and efficient time-domain classification with adaptive spiking recurrent neural networks}},
  journal = {Nat. Mach. Intell.},
  year = {2021},
  doi = {10.1038/s42256-021-00397-w},
}
Figure