Surrogates, Spikes, and Sparsity: Performance Analysis and Characterization of SNN Hyperparameters on Hardware
Organizations: Department of Electrical and Computer Engineering, The University of Arizona, Tucson, AZ, USA
Abstract
Spiking Neural Networks (SNNs) offer inherent advantages for low-power inference through sparse, event-driven computation. However, the theoretical energy benefits of SNNs are often decoupled from real hardware performance due to the opaque relationship between training-time choices and inference-time sparsity. While prior work has focused on weight pruning and compression, the role of training hyperparameters -- specifically surrogate gradient functions and neuron model configurations -- in shaping hardware-level activation sparsity remains underexplored. This paper presents a workload characterization study quantifying the sensitivity of hardware latency to SNN hyperparameters. We decouple the impact of surrogate gradient functions (e.g., Fast Sigmoid, Spike Rate Escape) and neuron models (LIF, Lapicque) on classification accuracy and inference efficiency across three event-based vision datasets: DVS128-Gesture, N-MNIST, and DVS-CIFAR10. Our analysis reveals that standard accuracy metrics are poor predictors of hardware efficiency. While Fast Sigmoid achieves the highest accuracy on DVS-CIFAR10, Spike Rate Escape reduces inference latency by up to 12.2% on DVS128-Gesture with minimal accuracy trade-offs. We also demonstrate that neuron model selection is as critical as parameter tuning; transitioning from LIF to Lapicque neurons yields up to 28% latency reduction. We validate on a custom cycle-accurate FPGA-based SNN instrumentation platform, showing that sparsity-aware hyperparameter selection can improve accuracy by 9.1% and latency by over 2x compared to baselines. These findings establish a methodology for predicting hardware behavior from training parameters. The RTL and reproducibility artifacts are at https://zenodo.org/records/18893738.
Figures & tables
| Surrogate Function | Backward Pass Formula | Key Characteristics |
|---|---|---|
| Fast Sigmoid (FS) | Default snnTorch surrogate; computationally cheap with a sharp peak at threshold and quadratic heavy-tail decay. Parameter (“slope”) controls sharpness (larger narrower peak). | |
| Arctangent (ATAN) | Smooth, symmetric gradient with Cauchy-like tails; tends to preserve gradient flow farther from threshold than FS. Parameter controls sharpness. | |
| Spike Rate Escape (SRE) | Escape-rate (Boltzmann-like) exponential surrogate as implemented in snnTorch: centered at . If (common default), this simplifies to . Parameters: sets peak scale; controls decay with distance from threshold. | |
| Stochastic Spike Operator (SSO) | Stochastic sub-threshold gradients: above threshold uses straight-through gradient 1; below threshold samples a uniform random value (shifted by mean ) scaled by variance term . Intended to mitigate “dead” neurons by injecting stochastic gradient signal when . |
| Dataset | Study | Net | Acc. | Latency | Power | EDP | |
|---|---|---|---|---|---|---|---|
| [%] | [ms] | [W] | [mJ ms] | [MHz] | |||
| NMNIST | ASIC [ 16 ] | net 1 | 97.8 | 3.8-12.5 | 0.011 | 0.16–1.72 | 400 |
| TW | net 3 | 96.4 | 5.9 | 0.31 | 10.8 | 100 | |
| DVS | ASIC [ 16 ] | net 1 | 92.4 | 7.1-23.2 | 0.011 | 0.55–5.92 | 400 |
| Gesture | FPGA [ 25 ] | net 2 | 86.3 | 0.46 | 0.42 | 0.09 | 100 |
| TW | net 3 | 95.4 | 11.2 | 1.35 | 169.3 | 100 |
Spiking Neural Networks
Spiking neural networks process information through discrete, time-dependent neural events, aiming for efficient computation and biologically inspired learning.
See all 351 papers