Sharpness Aware Surrogate Training for Spiking Neural Networks
Organizations: University of Bath, United Kingdom
Abstract
Surrogate gradients are a standard tool for training spiking neural networks (SNNs), but conventional hard forward or surrogate backward training couples a nonsmooth forward model with a biased gradient estimator. We study sharpness aware Surrogate Training (SAST), which applies sharpness aware Minimization (SAM) to a surrogate forward SNN trained by backpropagation. In this formulation, the optimization target is an ordinary smooth empirical risk, so the training gradient is exact for the auxiliary model being optimized. Under explicit boundedness and contraction assumptions, we derive compact state stability and input Lipschitz bounds, establish smoothness of the surrogate objective, provide a first order SAM approximation bound, and prove a nonconvex convergence guarantee for stochastic SAST with an independent second minibatch. We also isolate a local mechanism proposition, stated separately from the unconditional guarantees, that links per sample parameter gradient control to smaller input gradient norms under local Jacobian conditioning. Empirically, we evaluate clean accuracy, hard spike transfer, corruption robustness, and training overhead on N-MNIST and DVS Gesture. The clearest practical effect is transfer gap reduction: on N-MNIST, hard spike accuracy rises from 65.7% to 94.7% (best at ) while surrogate forward accuracy remains high; on DVS Gesture, hard spike accuracy improves from 31.8% to 63.3% (best at ). We additionally specify the compute matched, calibration, and theory alignment controls required for a final practical assessment.
Figures & tables
| Setting | surrogate forward train | Smooth blocks | Covered by theory |
|---|---|---|---|
| Main N-MNIST / DVS runs | Yes | AvgPool / affine norm | Yes |
| MaxPool / BatchNorm extension | Yes | No | No (practical only) |
| hard forward / surrogate backward baseline | No | Mixed | No |
| hard spike inference only | Training unchanged | – | No new training guarantee |
| Dataset | Method | Surrogate forward | Hard spike | Transfer gap |
|---|---|---|---|---|
| N-MNIST | Baseline surrogate training | 0.9606 0.0033 | 0.6572 0.0974 | 0.3034 |
| N-MNIST | SAST ( ) | 0.9789 0.0033 | 0.7453 0.0251 | 0.2336 |
| N-MNIST | SAST ( ) | 0.9831 0.0007 | 0.7812 0.0847 | 0.2019 |
| N-MNIST | SAST ( ) | 0.9786 0.0009 | 0.8335 0.0894 | 0.1451 |
| N-MNIST | SAST ( ) | 0.9753 0.0013 | 0.9018 0.0496 | 0.0735 |
| N-MNIST | SAST ( ) | 0.9721 0.0012 | 0.9473 0.0462 | 0.0248 |
| Control experiment | Protocol | Why it matters |
|---|---|---|
| Compute matched baseline | Match the total number of forward and backward passes used by SAST, either by doubling baseline updates or by extending baseline training until pass counts are comparable. Report surrogate forward accuracy, hard spike accuracy, transfer gap, robustness summary metrics, and wall clock. | Separates the effect of sharpness aware updates from the effect of extra optimization compute. |
| Reused second minibatch | Replace the independent second minibatch by while keeping everything else fixed. | Tests the practical cost of violating the independence assumption used in the convergence theorem. |
| ASAM baseline | Replace SAM by ASAM with matched optimizer settings and matched compute. | Checks whether scale adaptive perturbations outperform or match vanilla SAM in this setting. |
| Post training threshold calibration | With network weights fixed, tune either a single global threshold multiplier or per-layer multipliers on a validation set to maximize hard spike accuracy. Report both the best calibration-only result and the combined result when calibration is applied to SAST trained models. | Tests whether a cheaper calibration heuristic can close the transfer gap without two-pass training. |
| Surrogate choice and slope | Compare arctan and fast-sigmoid surrogates over a small slope grid . For each run, report , , , and . | Determines whether the gains are specific to one surrogate family or one operating regime, and shows whether theorem aligned runs actually satisfy the contraction diagnostic. |
| Theory misaligned extension | Repeat the strongest setting with MaxPool and BatchNorm. Clearly label these as practical extensions not covered by the smoothness theory. | Separates theorem aligned evidence from broader engineering usefulness. |
| Dataset | Method | Time / epoch | Time factor | Peak memory | Mem. factor |
|---|---|---|---|---|---|
| N-MNIST | Baseline surrogate | s | GB | ||
| N-MNIST | SAST ( ) | s | GB | ||
| DVS Gesture | Baseline surrogate | s | GB | ||
| DVS Gesture | SAST ( ) | s | GB |
Spiking Neural Networks
Spiking neural networks process information through discrete, time-dependent neural events, aiming for efficient computation and biologically inspired learning.
See all 345 papers