[Paper Review] Training Deep Spiking Neural Networks
This paper proposes a direct backpropagation training method for deep spiking neural networks (SNNs) using surrogate gradients and batch normalization on input currents, enabling training of ResNet50 on CIFAR100 and Imagenette with significantly fewer inference time steps (as low as 10) than converted SNNs (typically ~1000), while achieving competitive accuracy despite a performance gap compared to equivalent ANNs.
Computation using brain-inspired spiking neural networks (SNNs) with neuromorphic hardware may offer orders of magnitude higher energy efficiency compared to the current analog neural networks (ANNs). Unfortunately, training SNNs with the same number of layers as state of the art ANNs remains a challenge. To our knowledge the only method which is successful in this regard is supervised training of ANN and then converting it to SNN. In this work we directly train deep SNNs using backpropagation with surrogate gradient and find that due to implicitly recurrent nature of feed forward SNN's the exploding or vanishing gradient problem severely hinders their training. We show that this problem can be solved by tuning the surrogate gradient function. We also propose using batch normalization from ANN literature on input currents of SNN neurons. Using these improvements we show that is is possible to train SNN with ResNet50 architecture on CIFAR100 and Imagenette object recognition datasets. The trained SNN falls behind in accuracy compared to analogous ANN but requires several orders of magnitude less inference time steps (as low as 10) to reach good accuracy compared to SNNs obtained by conversion from ANN which require on the order of 1000 time steps.
Motivation & Objective
- To overcome the challenge of training very deep SNNs directly using backpropagation, which is hindered by exploding or vanishing gradients due to the implicitly recurrent nature of SNNs.
- To improve training stability and performance of deep SNNs by tuning the surrogate gradient function and applying batch normalization to neuron input currents.
- To demonstrate that end-to-end training of deep SNNs is feasible without relying on ANN-to-SNN conversion, enabling faster inference and compatibility with online learning.
- To investigate whether SNNs trained from scratch can achieve better efficiency and performance than converted SNNs, especially in terms of time steps and energy efficiency.
Proposed method
- Use surrogate gradients—specifically a piecewise linear form with tunable width parameter γ—to approximate the non-differentiable spiking activation function during backpropagation.
- Apply batch normalization to the input currents of SNN neurons, similar to its use in ANNs, to stabilize and accelerate training.
- Train deep SNNs with architectures like ResNet50 directly via backpropagation through time, treating the SNN as a recurrent network due to membrane potential accumulation.
- Fine-tune the surrogate gradient width parameter γ to mitigate exploding or vanishing gradient problems in deeper SNNs.
- Use a standard backpropagation algorithm with custom gradient computation for spiking neurons, enabling integration with existing deep learning frameworks.
- Train on CIFAR100 and Imagenette datasets using end-to-end backpropagation with the proposed modifications, evaluating inference performance across varying time steps.
Experimental results
Research questions
- RQ1Can deep SNNs be successfully trained using backpropagation with surrogate gradients, overcoming the vanishing/exploding gradient problem inherent in deep SNNs?
- RQ2Does tuning the surrogate gradient width parameter γ significantly improve training stability and performance in deep SNNs?
- RQ3Can batch normalization of input currents improve training convergence and accuracy in deep SNNs, similar to its effect in ANNs?
- RQ4How does the number of inference time steps required for good performance in directly trained SNNs compare to that of SNNs obtained via ANN conversion?
- RQ5Does direct training of SNNs from scratch allow for better inference efficiency and compatibility with online learning compared to conversion-based methods?
Key findings
- The exploding and vanishing gradient problem in deep SNNs can be effectively mitigated by tuning the width parameter γ of the surrogate gradient function.
- Applying batch normalization to the input currents of SNN neurons improves training stability and performance, analogous to its role in ANNs.
- SNNs trained directly from scratch achieve good test accuracy on CIFAR100 and Imagenette with as few as 10 inference time steps, compared to ~1000 required by converted SNNs.
- The performance of directly trained SNNs grows more slowly with increasing depth than that of ANNs, and eventually starts to diminish, even when gradients do not explode or vanish.
- SNNs trained from scratch can sometimes outperform their analogous ANNs, particularly in shallow architectures, suggesting potential advantages in temporal encoding and efficiency.
- The maximum test accuracy of SNNs decreases with increasing number of time steps during training, indicating a scaling issue similar to that in RNNs trained with backpropagation through time.
Read this paper
Open the full text in the Nubint reader and ask about any passage as you read.
Read this paper on NubintThis review was generated by AI from the original paper. Please check the paper before citing it.