Backpropagation With Sparsity Regularization for Spiking Neural Network Learning

Yulong Yan, Haoming Chu, Yi Jin, Yuxiang Huan, Zhuo Zou, Li‐Rong ZhengFrontiers in Neuroscience 2022

Abstract

The spiking neural network (SNN) is a possible pathway for low-power and energy-efficient processing and computing exploiting spiking-driven and sparsity features of biological systems. This article proposes a sparsity-driven SNN learning algorithm, namely backpropagation with sparsity regularization (BPSR), aiming to achieve improved spiking and synaptic sparsity. Backpropagation incorporating spiking regularization is utilized to minimize the spiking firing rate with guaranteed accuracy. Backpropagation realizes the temporal information capture and extends to the spiking recurrent layer to support brain-like structure learning. The rewiring mechanism with synaptic regularization is suggested to further mitigate the redundancy of the network structure. Rewiring based on weight and gradient regulates the pruning and growth of synapses. Experimental results demonstrate that the network learned by BPSR has synaptic sparsity and is highly similar to the biological system. It not only balances the accuracy and firing rate, but also facilitates SNN learning by suppressing the information redundancy. We evaluate the proposed BPSR on the visual dataset MNIST, N-MNIST, and CIFAR10, and further test it on the sensor dataset MIT-BIH and gas sensor. Results bespeak that our algorithm achieves comparable or superior accuracy compared to related works, with sparse spikes and synapses.

Introduction: The Quest for Energy-Efficient AI

Modern artificial intelligence is increasingly constrained by its massive energy consumption. While the human brain operates on a mere 20W, state-of-the-art AI models often require thousands of watts to perform similar tasks. Spiking Neural Networks (SNNs) are widely regarded as the "third generation" of neural networks, offering a potential solution by mimicking the brain's event-driven nature. However, simply utilizing spikes is insufficient for true biological efficiency; networks must also be sparse in both their activity and their physical connectivity.

Researchers from Fudan University have introduced Backpropagation with Sparsity Regularization (BPSR), a learning algorithm designed to create SNNs that are both highly accurate and exceptionally lean. By treating sparsity as a primary optimization goal, BPSR produces networks that are sparse in how they fire and how they are wired.

The Sparsity Challenge: Spikes and Synapses

The primary challenge in SNN training is that most methods focus exclusively on accuracy, often resulting in "dense" networks that fire excessively or maintain redundant connections. This negates the inherent energy benefits of the spiking architecture. To achieve true efficiency, a network must optimize for dual sparsity: spiking sparsity (minimizing firing rates) and synaptic sparsity (minimizing active connections).

Efficiency through dual sparsity: increasing both spiking and synaptic sparsity reduces the total number of operations.

As illustrated above, increasing sparsity directly correlates with a reduction in computational operations. BPSR addresses this by integrating sparsity-driven loss functions with a dynamic rewiring mechanism, ensuring that the network remains efficient without sacrificing performance.

The BPSR Framework

The BPSR algorithm is built upon three core pillars designed to enforce efficiency throughout the learning process:

1. Dual Regularization

The loss function in BPSR includes two critical penalty terms:

  • Spiking Regularization ($L_2$ norm): This term penalizes high firing rates, ensuring that neurons only generate spikes when they carry essential information.
  • Synaptic Regularization ($L_1$ norm): This term penalizes the magnitude of synaptic weights, effectively pushing unnecessary or redundant connections toward zero.

2. Heterogeneous LIF Model

Unlike standard SNNs that use uniform neurons, BPSR employs a Leaky Integrate-and-Fire (LIF) model where the "leakage" (time constant) is a learnable parameter. This allows individual neurons to specialize in different temporal scales, which is particularly effective for processing complex time-series data like heartbeats or chemical sensor readings.

3. Dynamic Rewiring and Backpropagation

BPSR utilizes a bio-inspired "prune and growth" strategy. If a synaptic weight falls below a certain threshold due to the $L_1$ penalty, the connection is pruned. Conversely, pruned synapses can be "re-grown" if their gradient momentum indicates they could contribute to the network's performance. This allows the network to dynamically explore and settle into the most efficient topology during training.

Computational graph of the BPSR algorithm, showing the flow of variables and gradients for spatio-temporal backpropagation.

The backpropagation mechanism, detailed in the computational graph above, captures temporal information and extends to recurrent layers (rSNNs), enabling the network to learn brain-like structures that excel at temporal feature extraction.

Experimental Validation: From Vision to Sensors

The BPSR algorithm was rigorously tested across diverse benchmarks, demonstrating its versatility and efficiency:

  • Visual Recognition: On the MNIST dataset, BPSR achieved 98.33% accuracy with a 30x inference overhead advantage over competing SNN models. On CIFAR10, it reached 90.74% accuracy using an 11-layer ResNet, matching the performance of dense models while using significantly fewer spikes.
  • Neuromorphic Data: Using the N-MNIST dataset, a recurrent BPSR architecture achieved 99.21% accuracy, proving the importance of temporal connections in neuromorphic processing.
  • Temporal Sensors: In ECG arrhythmia detection (MIT-BIH), the model achieved 98.41% accuracy, outperforming specialized models. In gas sensor tasks, the recurrent SNN maintained high accuracy with only 762 spikes per sample.

Key Insights and Bio-Similarity

A striking finding of the research is that the resulting SNN structures, after the rewiring process, show a "significance profile" remarkably similar to the nervous system of the nematode C. elegans. This suggests that the BPSR algorithm naturally converges toward the same efficient motifs found in biological systems. Furthermore, the researchers found that sparsity actually facilitates learning by suppressing redundant information and preventing overfitting.

Conclusion and Future Directions

BPSR represents a significant step toward truly energy-efficient AI by balancing accuracy with dual sparsity. While the algorithm excels at inference efficiency, the authors note that the training phase remains computationally intensive due to the reliance on spatio-temporal backpropagation.

Future work will focus on integrating BPSR with local learning rules (such as STDP) to reduce training overhead and scaling the rewiring mechanism to deeper architectures like Transformers. Ultimately, deploying these sparse models on dedicated neuromorphic hardware like Loihi or Tianjic will be the next step in realizing real-world power savings for edge AI applications.

Summary updated

BibTeX
@inproceedings{yan2022backpropagation,
  author = {Yulong Yan and Haoming Chu and Yi Jin and Yuxiang Huan and Zhuo Zou and Li‐Rong Zheng},
  title = {{Backpropagation With Sparsity Regularization for Spiking Neural Network Learning}},
  booktitle = {Frontiers in Neuroscience},
  year = {2022},
  doi = {10.3389/fnins.2022.760298},
}
Figure