A$^2$SG: Adaptive and Asymmetric Surrogate Gradients for Training Deep Spiking Neural Networks

Yechan Kang, Yongjin Kweon, Mingyeong Seo, Sohee Park, Yeonguk jeon, Jongkil Park, Hyun Jae Jang, Jaewook Kim, YeonJoo Jeong, Suyoun Lee, Seongsik Park

TL;DR

This paper introduces A$^2$SG, a novel framework for training deep Spiking Neural Networks (SNNs) that tackles the challenges of sharp loss landscapes and temporal gradient inconsistencies. By adaptively adjusting surrogate gradients and incorporating neuron-specific dynamics, A$^2$SG significantly improves accuracy, energy efficiency, and generalization across various SNN architectures and tasks.

What Problem Does This Paper Address?

Training deep Spiking Neural Networks (SNNs) has been a significant hurdle due to the non-differentiable nature of neuron firing. This necessitates the use of "surrogate gradients" to approximate the true gradient during backpropagation. However, existing surrogate gradient methods often lead to:

  • Sharp Loss Landscapes: The optimization process can get stuck in sharp minima, hindering generalization.
  • Temporal Inconsistency: Gradients can fluctuate across timesteps, making learning unstable.
  • Performance Gap: SNNs often lag behind their traditional Deep Neural Network (DNN) counterparts in performance.

This paper aims to bridge this gap by proposing a more sophisticated surrogate gradient approach that addresses these fundamental issues.

Methods

The core innovation is the A$^2$SG (Adaptive and Asymmetric Surrogate Gradients) framework, which combines two key components:

  • Adaptive Component: This part dynamically adjusts the "effective window" (a parameter controlling the surrogate gradient's shape and influence) during training.
  • Spatial Adaptation: Minimizes spatial gradient variation at the last timestep to encourage convergence to flatter minima.
  • Temporal Adaptation: Maximizes temporal gradient consistency across timesteps to align local gradients and mitigate temporal confusion. This adaptation is guided by metrics like Spatial Gradient Variation (SGV) and Temporal Gradient Consistency (TGC), optimized using a Bayesian search strategy.

  • Asymmetric Component: Instead of symmetric surrogate functions (like boxcar or triangle), A$^2$SG uses an asymmetric function. This function assigns larger gradients to neurons with higher membrane potentials, reflecting their proximity to firing. This asymmetry is theoretically shown to yield lower gradient variation and promote flatter minima compared to symmetric surrogates.

The authors also provide theoretical analysis linking local gradient variation to loss landscape curvature and demonstrate that their asymmetric surrogate leads to lower curvature.

Datasets

The paper evaluates A$^2$SG on a variety of datasets:

  • Static Image Datasets: CIFAR10, CIFAR100, and ImageNet.
  • Neuromorphic Datasets: CIFAR10-DVS.
  • Segmentation Dataset: ADE20K.

Key Insights and Ideas

  • Gradient Variation is Key: The paper establishes a strong theoretical link between the variation of local gradients and the curvature of the loss landscape. Lower gradient variation directly translates to flatter minima and better generalization.
  • Asymmetry Matters: The asymmetric surrogate gradient is not just a heuristic; it's theoretically proven to offer lower gradient variation than symmetric counterparts, leading to more stable training.
  • Spatio-Temporal Cohesion: Simply adapting gradients spatially or temporally isn't enough. A$^2$SG's strength lies in combining these adaptations to achieve robust learning across both space and time.
  • Beyond Smoothness: The research suggests that while smooth surrogate functions can help, the asymmetric nature of the gradient is a more decisive factor for achieving flat minima and improved generalization.

Key Results

A$^2$SG consistently demonstrates significant improvements across various benchmarks:

  • Accuracy: Achieves state-of-the-art or competitive accuracy on CIFAR10, CIFAR100, and ImageNet. For example, on ResNet19 with CIFAR10, A$^2$SG reaches 96.74% accuracy, outperforming other adaptive methods.
  • Energy Efficiency: Significantly reduces spike counts, leading to lower power consumption. For instance, on VGG16 with CIFAR10, A$^2$SG achieves 95.29% accuracy with 84.9k spikes, compared to 94.84% accuracy with 94.6k spikes for the BOX baseline.
  • Generalization: Visualizations (t-SNE) show that A$^2$SG leads to more class-separable features, indicating better generalization.
  • Robustness: A$^2$SG shows improved robustness to noise (e.g., spike deletion) and achieves better performance with fewer timesteps.
  • Efficiency: While introducing some overhead for adaptation, A$^2$SG remains efficient, especially at longer timesteps.

Limitations and Future Work

  • Formal Convergence Proofs: The authors acknowledge that formal convergence proofs for surrogate gradients, particularly rigorous error bounds for the asymmetric surrogate, remain an open problem.
  • Hyperparameter Sensitivity: While A$^2$SG is shown to be robust to some hyperparameters (like Bayesian search settings), the gradient-bias parameter 'h' requires careful tuning within a moderate range.
  • Computational Overhead: Although efficient, the adaptive search strategy introduces some computational overhead compared to static surrogate gradients.

Future work could focus on developing formal convergence guarantees and exploring more efficient adaptive search strategies. The compatibility of A$^2$SG with various neuron models and training methods suggests broad applicability.

Summary updated

BibTeX
@inproceedings{kang2026sg,
  author = {Yechan Kang and Yongjin Kweon and Mingyeong Seo and Sohee Park and Yeonguk jeon and Jongkil Park and Hyun Jae Jang and Jaewook Kim and YeonJoo Jeong and Suyoun Lee and Seongsik Park},
  title = {{A$^2$SG: Adaptive and Asymmetric Surrogate Gradients for Training Deep Spiking Neural Networks}},
  booktitle = {International Conference on Machine Learning},
  year = {2026},
  url = {https://openreview.net/forum?id=4fX2DEypNL},
}
Figure