Direct Training for Spiking Neural Networks: Faster, Larger, Better

Yujie Wu, Lei Deng, Guoqi Li, Jun Zhu, Yuan Xie, Luping Shi

Abstract

Spiking Neural Networks (SNNs) are biologically inspired models that offer significant energy efficiency on neuromorphic hardware. However, training deep SNNs has historically been hampered by the non-differentiable nature of spikes and a lack of high-performance deep learning frameworks. This paper presents a comprehensive solution to these challenges by reformulating the Leaky Integrate-and-Fire (LIF) neuron into an explicitly iterative form compatible with modern auto-differentiation tools and introducing a novel normalization technique called NeuNorm. Our approach achieves state-of-the-art accuracy on neuromorphic datasets and competitive performance on CIFAR-10, while reducing training time by orders of magnitude.

Introduction

SNNs communicate via discrete binary "spikes," mimicking the sparse communication of biological brains. Despite their potential for low-power edge computing, they have lagged behind traditional Artificial Neural Networks (ANNs) due to two primary bottlenecks: training complexity and the absence of optimized software frameworks. Standard backpropagation is difficult to apply directly to discrete spikes, and SNNs exhibit complex spatio-temporal dynamics that are computationally expensive to simulate.

Methodology

Explicitly Iterative LIF Model

To bridge the gap between biological simulation and deep learning, we employ the Euler method to discretize the continuous differential equations of the Leaky Integrate-and-Fire (LIF) neuron. This transformation results in an iterative model where the membrane potential $u(t)$ and output spikes $o(t)$ are updated at each time step.

Iterative LIF neuron model dynamics and update rules.

By reformulating the LIF neuron as a specialized type of Recurrent Neural Network (RNN), we can leverage PyTorch’s automatic differentiation and GPU acceleration. This allows for direct training via backpropagation through time (BPTT) using surrogate gradients for the non-differentiable firing function.

Neuron Normalization (NeuNorm)

Deep SNNs often suffer from "activity vanishing" or "activity explosion." Traditional Batch Normalization is ill-suited for the binary, temporal nature of spikes. We introduce NeuNorm, which utilizes "auxiliary neurons" to regulate firing rates.

Architecture of the NeuNorm layer using auxiliary neurons for normalization.

NeuNorm calculates the average response of feature maps at specific spatial locations, acting as a regulator to ensure stable activity across deep layers. This bio-plausible normalization mimics biological visual pathways and is significantly more effective for direct SNN training than standard ANN-based methods.

Optimized Encoding and Decoding

To minimize the simulation time window—a common source of latency in SNNs—we implement a population-based voting strategy at the output layer. Instead of a single neuron per class, multiple neurons contribute to the final classification. This allows the network to achieve high accuracy in as few as 4–8 time steps.

Experimental Results

We evaluated our framework on both neuromorphic (N-MNIST, DVS-CIFAR10) and static (CIFAR-10) datasets.

Performance and Scalability

Our PyTorch-based implementation achieved a speedup of tens of times compared to traditional Matlab-based SNN simulations. This efficiency enabled the training of deeper architectures, such as an 8-layer "CIFARNet."

  • N-MNIST: Achieved 99.53% accuracy, a new state-of-the-art.
  • DVS-CIFAR10: Reached 60.5% accuracy.
  • CIFAR-10: Achieved 90.53% accuracy, demonstrating that directly trained SNNs can compete with standard ANNs on static image data.

Conclusion

This work demonstrates that SNNs can be scaled to deep, high-performance architectures through proper discretization and normalization. By treating SNNs as iterative models within modern deep learning frameworks, we significantly reduce the barrier to training efficient, biologically inspired networks. Future work will explore temporal coding strategies to further enhance energy efficiency and deployment on specialized neuromorphic hardware.

Summary updated

BibTeX
@inproceedings{wu2019direct,
  author = {Yujie Wu and Lei Deng and Guoqi Li and Jun Zhu and Yuan Xie and Luping Shi},
  title = {{Direct Training for Spiking Neural Networks: Faster, Larger, Better}},
  booktitle = {AAAI Conference on Artificial Intelligence},
  year = {2019},
  doi = {10.1609/aaai.v33i01.33011311},
}
Figure