Spiking Neural Networks (SNNs) represent a bio-inspired, energy-efficient alternative to traditional artificial neural networks. By communicating via discrete electrical pulses or "spikes," they offer the potential for massive power savings on specialized neuromorphic hardware. However, training deep SNNs has historically been challenging because the spike function is non-differentiable, preventing the direct application of standard gradient-based optimization.
In a study presented at IJCAI-23, researchers from Zhejiang University and the National University of Singapore proposed Learnable Surrogate Gradients (LSG) to overcome this "gradient bottleneck."
The Challenge: The Surrogate Gradient Dilemma
To enable backpropagation in SNNs, researchers typically use Surrogate Gradients (SG). Since the true derivative of a spike function is zero almost everywhere, SG replaces it with a smooth, differentiable approximation during the backward pass.
The performance of an SNN is highly sensitive to the width ($\alpha$) of this surrogate function. This sensitivity creates a difficult trade-off:
- Gradient Vanishing: If the width is too narrow, most neurons fall outside the "active" zone where gradients are non-zero. In deep networks, this causes the learning signal to disappear before reaching early layers.
- Gradient Mismatch: If the width is too wide, the approximation becomes poor, leading to inaccurate weight updates and unstable training.
Historically, this width was a fixed hyperparameter determined through trial and error.
The LSG Method: Dynamic Optimization
The core contribution of the LSG method is making the surrogate gradient width a learnable parameter that adapts during training. The researchers established a theoretical link between a neuron's decay factor ($\beta$) and the optimal gradient width.
By making the decay factor trainable for each layer, the network can optimize its own temporal dynamics. LSG then dynamically modulates the gradient width $\alpha$ as a function of this decay: $\alpha = 2 \cdot v_{th} \sqrt{1 + \beta^2}$. This coupling ensures that the gradient "window" is always appropriately sized to maintain a healthy flow of information throughout the network, even in very deep architectures.
Experimental Results
The LSG method was rigorously tested on both standard image benchmarks and neuromorphic datasets:
- CIFAR-10: Achieved a state-of-the-art accuracy of 95.52% with 6 timesteps. Even with ultra-low latency (2 timesteps), it reached 94.41%.
- CIFAR-100: Reached 77.13% accuracy, significantly outperforming existing direct-training methods.
- CIFAR-DVS: On this event-based dataset, LSG set a new benchmark with 83.70% accuracy.
Beyond final accuracy, LSG also demonstrated faster convergence, helping networks learn more efficiently from fewer training epochs.
Conclusion
The Learnable Surrogate Gradient method provides a robust solution to the long-standing gradient vanishing and mismatch problems in SNNs. By linking gradient approximation to neuronal dynamics, LSG enables the stable training of deep, high-performance spiking networks, bringing us closer to realizing the full potential of energy-efficient neuromorphic computing.
Summary updated