Source-linked AI summary
Surrogate Gradient Learning in Spiking Neural Networks
Emre O. Neftci, Hesham Mostafa, Friedemann Zenke
TL;DR
SNN training faces extrinsic challenges including noise and non-stationarity, motivating brain-inspired approaches to signal processing. The article studies SNNs within an RNN framework and focuses on surrogate-gradient approaches, which can train SNNs to unprecedented performance levels on real-world problems.
Problem
Noise and non-stationarity make signal processing challenging, motivating brain-inspired approaches.
Source: §I · pp. 1–2Method
The article studies SNNs within an RNN framework and explains backpropagation through unrolled recurrent networks.
Source: §II · p. 2, A. Spatial credit assignment · p. 7, §VI · p. 21Results
Surrogate-gradient approaches can train SNNs to unprecedented performance levels across a range of real-world problems.
Source: §VI · pp. 21–22Takeaways & Limitations
Surrogate gradients provide a framework connecting machine learning, computational neuroscience, and successful approaches for training SNNs.
Source: §VI · pp. 21–22
Abstract
from arXiv · showhide
Spiking neural networks are nature's versatile solution to fault-tolerant and energy efficient signal processing. To translate these benefits into hardware, a growing number of neuromorphic spiking neural network processors attempt to emulate biological neural networks. These developments have created an imminent need for methods and tools to enable such systems to solve real-world signal processing problems. Like conventional neural networks, spiking neural networks can be trained on real, domain specific data. However, their training requires overcoming a number of challenges linked to their binary and dynamical nature. This article elucidates step-by-step the problems typically encountered when training spiking neural networks, and guides the reader through the key concepts of synaptic plasticity and data-driven learning in the spiking setting. To that end, it gives an overview of existing approaches and provides an introduction to surrogate gradient methods, specifically, as a particularly flexible and efficient method to overcome the aforementioned challenges.
I. INTRODUCTION
SNNs offer efficient, biologically inspired signal processing, but their binary, dynamical outputs make training—especially for deep networks with hidden layers—difficult. The article frames SNNs as RNNs and introduces learning strategies, including surrogate-gradient methods, to address these challenges.
- SNNs and binary RNNs inherit optimization difficulties from long-range temporal and spatial dependencies, compounded by nondifferentiable binary outputs.Source: §I · p. 2
- Training deep SNNs with hidden layers remains a major obstacle, although two-layer and recurrent SNNs have been trained successfully.Source: §I · p. 2
- SNNs and neuromorphic hardware avoid energetically costly floating-point multiplications, supporting their use in low-power applications.Source: §I · p. 2
- The article addresses hidden-layer training by discussing learning algorithms, strategies, and approximations for implementing specific functionalities.Source: §I · p. 2, §II · pp. 5–6
- The paper maps SNNs to RNNs by discretizing LIF dynamics, showing formal equivalence to RNNs with binary activation functions.Source: §II · pp. 2–3
- LIF dynamics combine decaying synaptic currents and membrane potentials with threshold-triggered spikes, resets, and optional recurrent or feedforward communication.Source: §II · pp. 3–4
III. METHODS FOR TRAINING RNNS
RNN training minimizes a loss by updating weights through gradient descent, while hidden-unit learning requires spatial and temporal credit assignment. The section reviews how backpropagation and related algorithms compute these updates across layers and time.
- RNNs support tasks ranging from time-series prediction to language translation and automatic speech recognition.Source: §III · p. 6
- Training combines a loss function measuring desired behavior with weight updates intended to minimize that loss.Source: §III · p. 6
- Gradient descent modifies network parameters opposite the loss gradient, providing a standard mechanism for learning.Source: §III · p. 6
- Hidden-unit updates require credit assignment through downstream activity and weights, computed efficiently using chain-rule gradients.Source: §III · p. 6
- The discussion distinguishes spatial credit assignment across layers from temporal credit assignment across recurrent time steps.Source: §III · p. 6
A. Spatial credit assignment
Spatial credit assignment distributes error information from network outputs to upstream neurons so hidden-layer weights can be updated by gradient descent. Backpropagation provides this mechanism, but requires backward communication and retained neuron states.
- Backpropagation assigns credit across layers by propagating errors backward from the output toward upstream neurons.Source: A. Spatial credit assignment · p. 6
- With a sufficiently small learning rate, hidden-layer updates are guaranteed to reduce the cost for the current training example.Source: A. Spatial credit assignment · p. 6
- Backpropagation requires gradients to travel backward through the network and neuron states to remain stored until errors are available.Source: A. Spatial credit assignment · p. 6
- Gradient descent modifies network parameters opposite the loss gradient, using neuron error and output sensitivity to parameter changes.Source: A. Spatial credit assignment · p. 7
- Standard backpropagation alternates forward activity evaluation with backward evaluation of error signals.Source: A. Spatial credit assignment · p. 7
B. Temporal credit assignment
Temporal credit assignment addresses dependencies across time in recurrent networks. BPTT solves it by unrolling recurrence and propagating errors backward, while forward methods move gradient information through time with different computational and memory trade-offs.
- Recurrent networks require temporal credit assignment because network activity has interdependencies across time.Source: B. Temporal credit assignment · p. 7
Backward method
- BPTT unrolls the recurrent network and back-propagates errors through the resulting network after a forward pass.Source: B. Temporal credit assignment · pp. 7–8
Forward method
- Forward methods preserve recurrent structure by propagating gradient information forward in time, with simplifications reducing space complexity from O(N3) to O(N2) or O(N).Source: B. Temporal credit assignment · p. 8
Backward method
- The backward method is generally more computationally efficient but requires retaining inputs and activations at every time step.Source: B. Temporal credit assignment · p. 8
- For each layer, the backward method has space complexity O(NT), where N is neurons per layer and T is the number of time steps.Source: B. Temporal credit assignment · p. 8
Forward method
- These simplifications can make forward algorithms computationally comparable or better than BPTT and compatible with synaptic-plasticity-style learning rules.Source: B. Temporal credit assignment · p. 8
IV. CREDIT ASSIGNMENT WITH SPIKING NEURONS: CHALLENGES AND SOLUTIONS
Training SNNs involves discontinuous spiking nonlinearities and hardware constraints that complicate gradient-based optimization. The article reviews smoothing and surrogate-gradient approaches as approximate solutions, focusing on supervised methods for functional SNNs.
Challenges
- The spiking nonlinearity is non-differentiable because its binary output has a derivative that is zero except at threshold.Source: §IV · pp. 8–9
- This all-or-nothing behavior prevents gradients from flowing and makes LIF neurons unsuitable for ordinary gradient-based optimization.Source: §IV · p. 9
Solutions
- Common surrogate derivatives include piece-wise linear, fast-sigmoid-derived, and exponential functions, with axes rescaled separately for illustration.Source: Figure 3 · p. 9
Challenges
- SNN training also faces computation, memory, communication, locality, and scaling constraints on computers, brains, and neuromorphic devices.Source: §IV · p. 9
Solutions
- The article identifies four response categories: local biological learning rules, rate-network translation, continuous smoothing, and surrogate gradients.Source: §IV · p. 9
- It focuses on smoothing and surrogate-gradient supervised approaches, reviewing smoothing before explaining how surrogate gradients can build functional SNNs.Source: §IV · p. 10
A. Smoothed spiking neural networks
Smoothed SNN models make gradients directly suitable for optimization by relaxing binary spiking behavior through soft, probabilistic, rate-based, or temporal formulations. These approaches trade biological or coding properties for differentiability and may incur efficiency, temporal-precision, or noise-related limitations.
- Smoothed SNN formulations ensure well-behaved gradients that are directly suitable for optimization.Source: A. Smoothed spiking neural networks · p. 10
- Smooth-model alternatives include probabilistic, rate, and single-spike temporal formulations, while injected noise can challenge optimization.Source: A. Smoothed spiking neural networks · p. 10, 2) Gradients in probabilistic models · p. 11
Soft nonlinearity models
- Soft nonlinearity models replace binary spiking with continuous-valued gating, enabling optimization with BPTT or RTRL but compromising binary behavior.Source: 1) Gradients in soft nonlinearity models · p. 10
Probabilistic models
- Probabilistic neurons smooth binary nonlinearities through stochasticity, making expected quantities such as spike-train log-likelihood differentiable.Source: 2) Gradients in probabilistic models · p. 10
Rate-based models
- Rate-based coding uses smoothly varying firing rates or f-I curves to derive gradients and has achieved competitive benchmark performance.Source: 3) Gradients in rate-coding networks · pp. 11–12
- Rate coding requires averaging across spikes, populations, or long intervals, and operating at the rate level sacrifices temporal precision.Source: 3) Gradients in rate-coding networks · pp. 11–12
4) Gradients in single-spike-timing-coding networks:
Single-spike timing codes represent outputs through firing times, allowing individual spikes to carry more information than rate codes. Their gradients can be computed analytically or approximately, but assumptions such as one spike per hidden unit constrain applicability.
- Temporal coding represents SNN outputs as firing times, so individual spikes can carry more information than rate-based spike counts.Source: 4) Gradients in… · p. 12
- SpikeProp linearized hidden-unit firing-time expressions to compute approximate hidden-layer gradients, while later work avoided that linearization.Source: 4) Gradients in… · p. 12
- Spike-timing formulations may require every hidden unit to emit exactly one spike because firing time is undefined for quiescent units.Source: 4) Gradients in… · p. 12
- The non-quiescence requirement can conflict with power efficiency, since tasks may benefit from activating only a subset of neurons.Source: 4) Gradients in… · p. 12
- Surrogate gradients replace derivatives of the discontinuous spiking nonlinearity with smooth approximations while retaining standard optimization procedures.Source: B. Surrogate gradients · p. 12
- Surrogate-gradient learning can address spatial and temporal credit assignment through BPTT or forward methods such as eligibility traces.Source: B. Surrogate gradients · p. 13
1) Surrogate derivatives for spiking nonlinearity:
Surrogate derivatives provide a flexible alternative for training SNNs with discontinuous spiking nonlinearities. The literature spans multiple surrogate functions and architectures, while open concerns include surrogate-induced bias, vanishing gradients, and scalability constraints.
- Surrogate-gradient methods replace each spiking derivative in standard algorithms such as BPTT with the derivative of a smooth function.Source: 1) Surrogate derivatives for spiking… · p. 14
- Different studies use surrogate functions including fast sigmoids, exponentials, piecewise-linear functions, and ReLU-like derivatives.Source: 1) Surrogate derivatives for spiking… · p. 14
- Surrogate-gradient networks have shown competitive performance on neuromorphic benchmarks, temporal datasets, and conventional benchmarks.Source: 1) Surrogate derivatives for spiking… · p. 14
- The surveyed surrogate nonlinearities are nonlinear and monotonically increasing toward the firing threshold, but systematic comparison remains pending.Source: 1) Surrogate derivatives for spiking… · p. 14
- Future challenges include vanishing gradients from sigmoidal surrogates, bias in learning dynamics, and additional difficulties in deeper architectures.Source: 2) Surrogate gradients affecting… · pp. 14–15
- Surrogate gradients can reduce learning complexity and computational cost, including through approaches that make larger deviations from true gradients.Source: 2) Surrogate gradients affecting… · p. 15
V. APPLICATIONS
Applications combine surrogate gradients with alternative error-propagation strategies to reduce nonlocality and hardware demands. Feedback-alignment methods use fixed random connections and can preserve useful error signals with limited performance loss.
- Surrogate-gradient applications exploit continuous-time neuronal dynamics and event-driven activity, allowing networks to remain quiescent until triggered by incoming spikes.Source: §V · p. 16
Feedback alignment and random error backpropagation
- Feedback alignment replaces transposed forward weights in backward propagation with fixed random matrices, making learning more local.Source: A. Feedback alignment and random error… · p. 16
- Direct random propagation replaces the entire backward pathway by propagating errors directly to each layer.Source: A. Feedback alignment and random error… · p. 16
- Random BP approaches can incur remarkably little loss in classification performance on some benchmark tasks.Source: A. Feedback alignment and random error… · p. 16
- During learning, feedforward weights partially align with random feedback weights, allowing them to convey useful error information.Source: A. Feedback alignment and random error… · p. 16
- A spike-driven random-BP adaptation using local synaptic plasticity can operate continuously and asynchronously without alternating forward and backward passes.Source: A. Feedback alignment and random error… · p. 16
- Random BP initially failed to account for neuronal and synaptic temporal dynamics, a limitation addressed by SuperSpike.Source: A. Feedback alignment and random error… · p. 16
B. Supervised learning with local three factor learning rules
SuperSpike applies surrogate gradients and three-factor learning to train spiking networks using local synaptic information while avoiding backpropagation through time. It combines forward temporal credit assignment with random-feedback spatial credit assignment, but its scalability is limited in large multilayer networks.
SuperSpike
- SuperSpike is a biologically plausible three-factor learning rule that uses surrogate gradients for supervised temporal learning.It replaces the non-differentiable spike derivative with a smooth surrogate derivative.Source: B. Supervised learning with local… · pp. 17–18
Hardware relevance
- SuperSpike avoids BPTT, making the rule potentially relevant for hardware implementations and synaptic plasticity studies.The method uses synaptic eligibility traces to address temporal credit assignment.Source: B. Supervised learning with local… · p. 17
Online learning
- The learning dynamics can be simulated online from initial conditions to produce the derivatives needed for weight updates.The resulting updates depend only on local quantities.Source: B. Supervised learning with local… · p. 18
Limitations
- SuperSpike does not scale favorably for large multilayer networks because additional hidden layers or recurrent connections make the update equations more complicated and non-local.The multilayer extension addresses this by directly propagating error signals to hidden units.Source: B. Supervised learning with local… · p. 18
Credit assignment
- SuperSpike computes temporal credit assignment by propagating relevant quantities forward in time and spatial credit assignment through random backpropagation.For multilayer networks, output errors are propagated directly to hidden units using fixed random projections.Source: B. Supervised learning with local… · p. 18
C. Learning using local errors
Local-error methods improve the scalability of surrogate-gradient learning by assigning layer-wise objectives through fixed random projections. DCLL retains spiking dynamics while achieving linear space complexity and performance comparable to standard backpropagation methods on DVS Gestures.
DCLL
- DCLL uses local rate-based cost functions formed from spike-based basis functions, enabling learning that scales linearly with neuron count.The method trains feed-forward weights in a three-layer convolutional SNN using local errors from fixed random projections.Source: Figure 6 · p. 19
Local-error formulation
- Local learning assigns each layer a loss using a pseudo-target and a fixed random projection to generate local errors.The auxiliary random layer is trained to match the pseudo-target, often chosen as the top-layer target.Source: C. Learning using local errors · p. 19
Local representations
- Each layer learns features that match the target after fixed random linear projection, with higher layers empirically producing higher-quality features.These features allow fixed auxiliary layers to better match the target.Source: C. Learning using local errors · pp. 19–20
Evaluation
- DCLL performs on par with standard BP or BPTT rules on the DVS Gestures dataset.The approach was benchmarked on the event-based DVS Gestures dataset.Source: C. Learning using local errors · p. 20
Temporal coding
- Temporal XOR classification uses the identity of the first-spiking output neuron to distinguish the two classes.Four early-or-late input patterns are mapped to two output classes through a hidden layer.Source: D. Learning using gradients of spike… · p. 21
VI. CONCLUSION
The paper presents surrogate-gradient methods as a framework for addressing the trainability problems of spiking neural networks. It connects machine learning, computational neuroscience, and neuromorphic hardware, while highlighting performance and implementation relevance.
Conclusion
- Surrogate-gradient approaches can train SNNs to unprecedented performance levels across a range of real-world problems.The conclusion frames this transition as making SNNs increasingly relevant to applications previously dominated by RNNs.Source: §VI · pp. 21–22
- Surrogate-gradient methods provide a framework connecting machine learning, computational neuroscience, and neuromorphic computing.Several presented methods are related to three-factor plasticity rules associated with synaptic plasticity.Source: §VI · p. 22
- The methods are relevant to low-power neuromorphic devices because they can learn under communication and storage constraints.The conclusion explicitly identifies this as a relevance for the neuromorphic community.Source: §VI · p. 22
- SNNs are less widely used than ANNs primarily because their trainability remains an algorithmic challenge.The conclusion identifies training issues as the central barrier to broader SNN use.Source: §VI · p. 22
- The paper surveys developments that address problems encountered when training SNNs and focuses specifically on surrogate-gradient approaches.It presents these approaches as a set of successful developments rather than a single definitive solution.Source: §VI · pp. 21–22
Related papers
This paper cites
Cited by
- Spiking Neural Networks Are Harder to Steal: A Benchmark Study of Model Stealing Attacks2026
- Characterizing Privacy Leakage in Spiking Neural Networks: A Systematic Analysis of Temporal Dynamics, Stochasticity, Neuronal Dynamics and Learning Mechanisms2026
- A spinal-inspired spiking neural network for continuous finger-joint kinematics estimation from high-density surface EMG2026
- PAFS: Perturbation-Aware Firing Scaffolds for Robust Event-Based SNNs2026
- A Resource-Efficient and Precision-Scalable FPGA Accelerator for Spiking Neural Networks Using Minifloat Arithmetic2026
- ENCL: Enabling Efficient Neuromorphic Continual Learning with Local Learning Rule and Sub-Network Freezing Strategy2026