Source-linked AI summary

Surrogate Gradient Learning in Spiking Neural Networks

Emre O. Neftci, Hesham Mostafa, Friedemann Zenke

arXiv:1901.09948v2cs.NEq-bio.NC

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–2
  • Method

    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. 21
  • Results

    Surrogate-gradient approaches can train SNNs to unprecedented performance levels across a range of real-world problems.

    Source: §VI · pp. 21–22
  • Takeaways & 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 · show

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.

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.

Backward method

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

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.

Soft nonlinearity models

Probabilistic models

Rate-based models

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.

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

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
Loading 1901.09948v2…