NeurIPS 2026Coming to NeurIPS?Explore papers, orals & directions

Understanding the Convergence of Direct Training of SNNs with Surrogate Gradients

Zelin Wei, Tianxing Man, Wanli Shi, Bin GuNeurIPS 2026

TL;DR

Training brain-inspired Spiking Neural Networks (SNNs) relies on a mathematical sleight-of-hand: running binary spikes forward, while propagating smooth "fake" derivatives backward. For years, this worked remarkably well in practice despite having no guarantee that it actually optimizes the discrete network you deploy. This paper cracks open that black box, proving why and when direct SNN training converges—and turns the theory into a simple, practical diagnostic tool.

What Problem Does This Paper Address?

Spiking Neural Networks (SNNs) are the darlings of low-power edge AI because, like biological brains, they only consume energy when neurons emit discrete spikes. However, a neuron firing is governed by a hard threshold (a step function): its derivative is zero almost everywhere and infinite right at the firing threshold. Standard backpropagation breaks completely.

To get around this, practitioners use Surrogate Gradients (SG) or Local Zeroth-Order (LocalZO) perturbations. Both keep the true, discrete hard spikes in the forward pass, but swap in a smooth approximation during the backward pass.

Here is the catch: because the forward and backward passes use different math, the resulting update isn't the true gradient of the discrete network—nor is it even the exact gradient of a smoothed network! Local errors accumulate across layers and time steps into a systematic bias. Until now, we lacked a network-level proof showing that these biased updates actually converge for the original, discrete-spike objective used at inference.

Methods

Instead of changing how SNNs are trained, the authors build a unified theoretical convergence framework that covers both deterministic SG and stochastic LocalZO.

First, they show that SG and normalized LocalZO share the exact same expected update direction—LocalZO just injects extra perturbation variance. Next, to bridge the gap to standard smooth optimization, they introduce a purely analytical "smoothed objective" ($F_\delta$), where every hard spike in the forward pass is hypothetically replaced by a smooth curve.

Figure 1: Convergence roadmap for hard-forward direct SNN training. The mean update and matched smoothed reference define the trajectory-induced bias. The threshold-tail functional bounds this bias and the discrete–smooth consistency gap. Biased-SGD descent and the restricted PL conversion then yield the reference-point guarantee for F, including the smoothing residual at ¯W.

Using this analytical bridge, they model SNN training as biased Stochastic Gradient Descent (SGD) and split the forward–backward mismatch into two distinct errors:

  1. Trajectory-induced gradient bias: The difference between backpropagating along the actual hard-spike forward path versus the hypothetical smoothed forward path.
  2. Objective consistency gap: The difference in actual loss values between the discrete network and the smoothed analytical network.

Crucially, the authors prove both errors are governed by a new metric they call the threshold-tail functional, $\mathcal{T}_\delta(k)$, which measures how often neuron membrane potentials hover dangerously close to the firing threshold. Using a restricted Polyak–Łojasiewicz (PL) condition (a standard geometric assumption that ensures gradients don't vanish away from minima), they translate stationarity on the smooth bridge directly into a non-asymptotic convergence guarantee for the true discrete SNN.

Datasets

The authors validate their theory and test their new diagnostic across six existing vision and audio SNN benchmarks (no new datasets are introduced):

  • Neuromorphic / Event-driven: DVSGesture, CIFAR10-DVS, and Spiking Heidelberg Digits (SHD—an audio spike dataset).
  • Static / Sequential Vision: Sequential CIFAR-10, Sequential CIFAR-100, and TinyImageNet.

Key Insights and Ideas

  • SG and LocalZO are two sides of the same coin: In expectation, perturbing thresholds locally (LocalZO) marches in the exact same direction as deterministic surrogate gradients—just with extra variance that shrinks as you average more perturbation samples ($m$).
  • Danger lives near the threshold: Forward–backward mismatch only causes trouble when membrane potentials sit right next to the firing threshold, where a tiny smoothing perturbation flips a spike's behavior. If potentials stay clear of the threshold, both gradient bias and objective mismatch shrink dramatically.
  • Theory yields a free training diagnostic: By simply tracking the per-node near-threshold activity during standard hard-forward passes—a metric called $D(k)$—engineers get an interpretable, zero-overhead health monitor for training mismatch.
  • The $\delta$ Catch-22: Making the surrogate width $\delta$ narrower makes the surrogate look more like a true spike, shrinking approximation residuals. However, it also makes derivatives steeper, limiting your maximum safe learning rate and amplifying how violently errors echo through deep layers.

Key Results

The experiments cleanly mirror the math:

  • SG–LocalZO Alignment: Training a Spiking CNN (SCNN) on CIFAR-10, LocalZO's cosine similarity with SG stays above $0.99$ throughout 300 epochs when using $m=40$ perturbations, closely matching SG's loss curve while $m=5$ lags behind due to variance.
Figure 2: SG-LocalZO alignment and training loss on CIFAR-10 with an SCNN.
  • Tracking the Gap: Empirically measured gaps between hard and smoothed losses remain consistently nonzero during training, and their trajectory is tightly tracked by the square root of the threshold-tail statistic. At a frozen checkpoint, shrinking $\delta$ drives the reference smoothing error smoothly toward zero.
  • Cross-Model Diagnostic ($D(k)$): Across three random seeds on all six benchmarks, checkpoints with higher test accuracy consistently exhibit lower near-threshold mass $D(k)$. For example, on SHD (100 time steps), the best seed reached 84.18% accuracy with $D(k) = 0.1146$, whereas the lowest reached 83.22% with $D(k) = 0.1233$. Similar inverse relationships held on DVSGesture (~95% accuracy) and TinyImageNet (~61.8% accuracy).

Limitations and Future Work

The theoretical guarantees rely on smoothness, bounded variance, Lipschitz graph regularity, and restricted PL conditions (including assuming the biased iterates stay within a well-behaved parameter region). Notably, the authors point out that their trajectory amplification constants can grow conservatively large for very deep recurrent networks or long time horizons.

For future work, they suggest relaxing these regularity assumptions, designing "tail-aware" surrogate functions or regularizers that actively push membrane potentials away from the noisy threshold zone, and extending the math to online and event-driven learning rules.

Summary updated

BibTeX
@inproceedings{wei2026understanding,
  author = {Zelin Wei and Tianxing Man and Wanli Shi and Bin Gu},
  title = {{Understanding the Convergence of Direct Training of SNNs with Surrogate Gradients}},
  booktitle = {Advances in Neural Information Processing Systems},
  year = {2026},
  url = {https://openreview.net/forum?id=QNkfQ8wsii},
}
Figure