TL;DR
Spiking Neural Networks (SNNs) offer incredible energy efficiency but suffer from training instability and poor generalization due to the non-differentiable nature of discrete spikes. This paper introduces $A^2SG$, a unified framework that dynamically adjusts surrogate gradients to be both adaptive across space/time and asymmetric based on internal neuron states. This approach flattens the loss landscape and resolves temporal gradient conflicts, yielding state-of-the-art accuracy and energy efficiency across both CNN and Transformer-based SNN architectures.
What Problem Does This Paper Address?
SNNs mimic biological brains by communicating via discrete "spikes," making them highly attractive for low-power edge computing. However, because the spiking function is a non-differentiable step function, standard backpropagation cannot be directly applied. Researchers typically bypass this using "surrogate gradients" (SGs) to approximate the derivative during the backward pass.
Unfortunately, standard SGs introduce two major bottlenecks:
- Sharp Loss Landscapes: Narrow surrogate windows amplify the magnitude of the Hessian matrix, driving optimization toward sharp minima that generalize poorly to unseen data.
- Temporal Gradient Confusion: SNNs process data over multiple timesteps. Standard backpropagation aggregates gradients across time, but if gradients from different timesteps point in conflicting directions, they partially cancel each other out, destabilizing training.
Methods
The authors propose $A^2SG$ (Adaptive and Asymmetric Surrogate Gradients), which replaces static, symmetric surrogate functions with a two-pronged dynamic strategy:
- Spatio-Temporal Adaptation (ST-ASG): Instead of using a fixed window width ($\beta$) for the surrogate function, $A^2SG$ employs a Bayesian search strategy (Gaussian Process optimization) to dynamically tune $\beta$ during training. Spatial adaptation minimizes spatial gradient variation (SGV) at the final timestep to promote flatter minima. Temporal adaptation aligns gradients across preceding timesteps to maximize temporal gradient consistency (TGC), preventing conflicting updates.
- Asymmetric Surrogate Gradients (ASY): Traditional SGs are symmetric around the firing threshold. $A^2SG$ introduces an asymmetric function that allocates larger gradients to neurons with higher accumulated membrane potentials (i.e., those closer to firing). The authors mathematically prove that this asymmetry inherently reduces local gradient variance compared to symmetric alternatives like Boxcar or Triangle functions.
Datasets
The framework was evaluated across a diverse set of tasks and architectures:
- Static Image Classification: CIFAR-10, CIFAR-100, and ImageNet.
- Neuromorphic (Event-based) Classification: CIFAR10-DVS.
- Semantic Segmentation: ADE20K (using SNN backbones like E-SpikeFormer).
Key Insights and Ideas
- Curvature vs. Smoothness: A key finding is that simply making a surrogate gradient function "smooth" (such as using an Arctan function) reduces the irregularity of the loss landscape but does not reduce its overall sharpness (curvature). Asymmetry, rather than smoothness, is the decisive factor for flat-minima convergence.
- Gradient Variance Dictates Flatness: The authors establish a direct mathematical link showing that the largest eigenvalue of the Fisher Information Matrix (a proxy for loss landscape curvature) grows linearly with the coefficient of variation of local gradients. Lowering gradient variance directly flattens the landscape.
- Neuron Behavior-Aware Design: Treating all neurons identically regardless of their internal state wastes gradient updates. Prioritizing neurons that are closer to firing focuses gradient allocation, reducing unnecessary variability and stabilizing optimization.
Key Results
- Flatter Landscapes: Visualizations and Fisher Information Matrix (FIM) eigenvalue measurements confirm that $A^2SG$ leads to significantly flatter loss landscapes compared to standard Boxcar or Triangle surrogates.
- State-of-the-Art Performance: On CIFAR-100 with ResNet19, $A^2SG$ achieved 81.05% accuracy, outperforming previous adaptive methods like LSG (76.85%) and state-of-the-art methods like MPD-AGL (80.49%). On ImageNet, it boosted E-SpikeFormer performance to 85.43%.
- Energy Efficiency: $A^2SG$ consistently reduced total spike counts (e.g., from 94.6k to 84.9k on CIFAR-10 using VGG16), which directly translates to lower power consumption on neuromorphic hardware.
- Task Versatility: Beyond classification, the method achieved a higher mIoU (40.94%) on the ADE20K semantic segmentation dataset while reducing energy consumption compared to baseline models.
Limitations and Future Work
- Theoretical Open Problems: While the empirical and statistical evidence is strong, providing a formal, rigorous convergence proof for surrogate gradients under this framework remains an open theoretical challenge.
- Hyperparameter Formalization: The exact error bound for the asymmetric surrogate as a function of its gradient-bias hyperparameter ($h$) requires deeper mathematical formalization in future work.
Summary updated