Sparse Spiking Gradient Descent
Authors: Nicolas Perez-Nieves
Dan F. M. Goodman
Venue: NeurIPS 2021 Poster (2021)
Keywords: spiking neural networks
neuromorphic
neuromorphic computing
surrogate gradient descent
sparse

Abstract: There is an increasing interest in emulating Spiking Neural Networks (SNNs) on neuromorphic computing devices due to their low energy consumption. Recent advances have allowed training SNNs to a point where they start to compete with traditional Artificial Neural Networks (ANNs) in terms of accuracy, while at the same time being energy efficient when run on neuromorphic hardware. However, the process of training SNNs is still based on dense tensor operations originally developed for ANNs which do not leverage the spatiotemporally sparse nature of SNNs. We present here the first sparse SNN backpropagation algorithm which achieves the same or better accuracy as current state of the art methods while being significantly faster and more memory efficient. We show the effectiveness of our method on real datasets of varying complexity (Fashion-MNIST, Neuromophic-MNIST and Spiking Heidelberg Digits) achieving a speedup in the backward pass of up to $150$x, and $85\%$ more memory efficient, without losing accuracy. 

Sparse Spiking Gradient Descent
Nicolas Perez-Nieves Electrical and Electronic Engineering Imperial College London
Dan F.M. Goodman
Electrical and Electronic Engineering
Imperial College London London, United Kingdom
London, United Kingdom
ni nicolas, a ac.uk
d. goodman@imperial. ac. uk
Abstract
There an increasing interest in emulating Spiking Neural Networks (SNNs) on neuromorphic computing devices due to their low energy consumption. Recent advances have allowed training SNNs to a point where they start to compete with traditional Artificial Neural Networks (ANNs) in terms of accuracy, while at the same time being energy efficient when run on neuromorphic hardware. However, the process of training SNNs is still based on dense tensor operations originally developed for ANNs which do not leverage the spatiotemporally sparse nature of SNNs. We present here the first sparse SNN backpropagation algorithm which achieves the same or better accuracy as current state of the art methods while being significantly faster and more memory efficient. We show the effectiveness our method on real datasets of varying complexity (Fashion-MNIST, Neuromophic- MNIST and Spiking Heidelberg Digits) achieving speedup the backward pass of up to 150x, and 85% more memory efficient, without losing accuracy.
Introduction
In recent years, deep artificial neural networks (ANNs) have matched and occasionally surpassed human-level performance on increasingly difficult auditory and visual recognition problems [1 3) natural language processing tasks 5 and games [6] 7 g). As these tasks become more challenging the neural networks required to solve them grow larger and consequently their power efficiency becomes more important [9] [O]. At the same time, the increasing interest in deploying these models into embedded applications calls for faster, more efficient and less memory intensive networks
The human brain manages perform similar and even complicated tasks while only consuming about 20W 133 which contrasts with the hundreds of watts required for running ANNs [9] Unlike ANNs, biological neurons in the brain communicate through discrete events called spikes. A biological neuron integrates incoming spikes from other neurons in its membrane potential and after reaching threshold emits a spike and resets its potential [14]. The spiking neuron, combined with the sparse connectivity of the brain, results in a highly spatio-temporally sparse activity 15) which is fundamental achieve this level of energy efficiency.
Inspired by the extraordinary performance of the brain, neuromorphic computing aims to obtain the same level of energy efficiency preferably while maintaining an accuracy standard on par with ANNs by emulating spiking neural networks (SNNs) on specialised hardware [16]
17
18] 19] These
efforts go in two directions: emulating the SNNs and training the SNNs. While there is growing
number successful neuromorphic implementations for the former 20 21 22
23
24 17 25 26),,
the latter has proven be more challenging. Some neuromorphic chips implement local learning rules 126 27 28 and recent advances have achieved to approximate backpropagation on-chip [29]. However, full end-to-end supervised learning via error backpropagation requires off-chip training
22 23 18 This is usually achieved by simulating and training the entire SNN on a GPU and more
35th Conference on Neural Information Processing Systems (NcurIPS 2021).

---

S(1>
S(2
v(3)
p(0)
pC
V(3)
5
loss()
(.5(
Vi
vA(3)
VW
PWO
Figure 1: Spiking Neural Network diagram highlighting the forward and backward passes
recently, emulating the forward pass of the SNN on neuromorphic hardware and then performing the backward pass on a GPU 3T]. The great flexibility provided by GPUs allows the development of complex training pipelines without being constrained by neuromorphic hardware specifications. However, as GPUs do not leverage the event-driven nature of spiking computations this results in effective but slower and less energy efficient training. An alternative directly training an SNN consists on training an ANN and converting it to an SNN. However, this approach has been recently shown to not be more energy efficient than using the original ANN the first place [32
Training SNNs has been a challenge itself even without considering a power budget due to the all-or-none nature of spikes which hinders traditional gradient descent methods [33 34]. Since the functional form of a spike is a unit impulse, it has a zero derivative for all membrane potentials except the threshold where it infinity. Recently developed methods based on surrogate gradients have been shown to be capable of solving complex tasks to near state-of of-the-ar art accuracies [35] 18, 36) 37 (3 39 3T). The problem of -ofddffferettiability solved by adopting a well-behaved surrogate gradient when backpropagating the error [33]. This method, while effective for training very accurate models, is still constrained to working on dense tensors, thus, not profiting from the sparse nature of spiking, and limits the training speed and power efficiency when training SNNs.
In this work we introduce sparse backpropagation method for SNNs. Recent work ANNs has shown that adaptive dropout [40] and adaptive sparsity [41] can be used to achieve state-of-the- performance at a fraction of the computational cost 42 43). We show that by redefining the surrogate gradient functional form, a sparse learning rule for SNNS arises naturally as three-factor Hebbian- like learning rule. We empirically show an improved backpropagation time up 70x faster than current implementations and up to 40% more memory efficient in real datasets (Fashion- MNIST) 44) Neuromorphic-MNN MNNIST (N-MNIST) [45 and Spiking Heidelberg Dataset (SHD) (66) thus reducing the computational gap between the forward and backward passes. This improvement will not only impact training for neuromorphic computing applications but also for computational neuroscience research involving training on SNNs (39..
(F-
2 Sparse Spike Backpropagation
2.1 Forward Model
We begin by introducing the spiking networks we are going to work with (Figs. and For simplicity
we have omitted the batch dimension the derivations but it later used on the complexity analysis
and experiments. We have total of L fully connected spiking layers. Each layer / consisting of
N() spiking neurons which are fully connected to the next layer 1+1 through synaptic weights W() N xx(4)) Each neuron has an internal state variable, the membrane potential, v, [t] E TR. that updates every discrete time step & E {O,.... .0..... T 1} for some finite simulation time T E N. Neurons emit spikes according to a spiking function f: R + {0, 1} such that
s!0) | - ((v [t]
The membrane potential varies according to a simplified Leaky Integrate and Fire (LIF) neuron model in which input spikes are directly integrated into the membrane [14. After neuron spikes, its potential reset to V,. We will work with a discretised version of this model (see Appendix [E] for a continuous time version). The membrane potential of neuron j in layer [+ evolves according the following difference equation
[+11 = a(v Vrest) + Vrest + Σs
5 (4 -VV, V.)s/41111)
(2)

---

Forward
Backward
810]
S
[
[
[((4
ST
[P
[|4]
aver?
914
5,10]
S(LL]
[S:B]]
5:191
Salo
SD
[
V1101
Layer
[
S
V//o1
RE
%
Forward connection between
10101
Inactive
layers
Active
within neuron
Figure 2:
Illustration of the gradient backpropagating only through active neurons.
The first terms account for the leaky part of the model where define exp( (ttt-(At)) with T E R being the time resolution of the simulation and the membrane time constant of the neurons respectively. The second term deals with the integration spikes. The last term models the resetting mechanism by subtracting the distance from the threshold to the reset potential. For simplicity and
without loss of generality, consider Vrest 0, VnA = V, 0 and V [0] = i, from now
We can unroll to obtain
(1+1)
++
SK W
k=
Inpat trace
Resetting term
Weighted input
Thus, a spiking neural network can be viewed as a special type of recurrent neural network where the activation function of each neuron is the spiking function f()). The spiking function, is commonly defined as the unit step function centered at a particular threshold ViA
11, 0, otherwise
<> Vih
((v)
(4)
Note that while this function is easy to compute in the forward pass, its derivative, the unit impulse function, is problematic for backpropagation which has resulted in adopting surrogate derivatives
to allow the gradient to flow. Interestingly, it has been shown that surrogate gradient descent performs robustly for wide range of surrogate functional forms 38
33
After the final layer, loss function (oss(-) computes how far the network activity is with respect to some target value for the given input. The loss function can be defined as function of the network spikes, membrane potentials both. It may also be evaluated at every single time step or every several steps. We deliberately leave the particular definition of this function open as it does not directly affect the sparse gradient descent method we introduce.
2.2 Backward Model
The SNN is updated by computing the gradient of the loss function with respect the weights in each layer. This can be achieved using backpropagation through time (BPTT) on the unrolled network. Following (T) and (3) we can derive weight gradients to be
Spike derivative
ds
VW = Σ (1+1)
Σ aa a s( [pc)
REt
Gradient from next layer
Input trace

---

This gradient consists of a sum over all time steps of the product of three terms. The first term, modulates the spatio-temporal credit assignment of the weights by propagating the gradient from the next layer. The second term, is the derivative of /(-) evaluated at given Vj [4]. The last term is filtered version the input spikes. Notice that is not necessary to compute this last term as this
is already computed in the forward pass (3). We have chosen not make the spike resetting term in (3) differentiable as has been shown that doing so can result worse testing accuracy (38) and increases the computational cost.
For typical loss function defined the output layer activity, the value of (( (i.e. in the last layer) is the gradient of the loss with respect to the output layer (see Fig. [ For all other layers we (4) have that Ej V
[t). that is, the gradient of the loss function with respect to the output spikes
of layer I. We can obtain expression for V [t] as function of the gradient of the next layer:
Spike dorivative
Gradient from next layer
ds 1 dv dv (v
-
Σ We
V [K]]
k 1-1
W Wojohf Σ
(0.....
All hidden layers need to compute equations (5) and (6. The first one to update their input synaptic weights and the second one to backpropagate the loss to the previous layer. The first layer (1= only
needs to compute (5) and the last layer (l= will compute different E) (L-1) depending on the loss function.
We introduce the following definitions which result in the sparse backpropagation learning rule.
Definition 1. Given buckpropagation threshold B R we say neuron j is active time iff
[V - Via < Bih
(7)
Definition 2.
The spike gradient is defined as
d 1 dv 0,
(VV](t),,
V is active otherwise
(8)
This means that neurons are only active when their potential is close to the threshold. Applying these gradients only backpropagating through active neurons at each time step shown in Fig, 2 The consequences of this readily available for the weight
two definitions to (5) and (6) results
gradient in (5) as the only terms in the sum that will need to be computed are those in which the postsynaptic neuron j was active at time t. Resulting in the following gradient update:
u+0
ashe-1
(++)
[t] is active,
v
d
(9)
0,
otherwise
Σ 14
(10)
For the spike gradient in (6) we have two consequences, firstly, we will only need to compute V
for active neurons since V 1 [t] is always multiplied by . in and (6). Secondly, we can use
ds(
a recurrent relation to save time and memory when computing 5, (6) as shown in the following proposition.

---

Proposition 1. We can use a recurrent relation to compute 6y [t] given by
a² amd + n
if ds, [k]
0, for ++15kš1+1
6,14 =
( ds [+1
+
(ttt)
45
0, fortticksttt
45, [++
#0
Vy[++]
(11)
This means that we only need compute
0/(+1(11) at those time steps in which either
[v +
d8 [++1]]
or [1) is active (see Appendix C for a visualisation of this computation). Thus, we end up with the following sparse expression for computing the spike gradient.
S
Σ, 0,
Wey W 1 [t]
( [t] active v otherwise
(12)
2.3 Complexity analysis
We define E [0, 1] to be the probability that a neuron active in layer at a given time. Table ] summarises the computational complexity of the gradient computation in terms of number of sums and products. We use here N to refer to the number of neurons in either the input or output layer and B to refer the batch size. In slight abuse of notation complexity expressions. Details of how these expression were obtained can be found in Appendix B and are based reasonable efficient algorithm that uses memoisation for computing 8 [t].
include the constants (i part of the
Table I: Computational complexity
Original
Sparse
Sums VW())
(BBN22)
Opt BT
Products VW(!)
(
(p BT
Sums (
(
(P:BTN2)
Products (
Opt O(BTN²)
In order for the sparse gradients to work better than their dense counterpart we need to have a balance between having few enough active neurons as make the sparse backpropagation efficient while the same time keeping enough neurons active to allow the gradient to backpropagate. We later show in section 3 that this is the when testing it real world datasets.
2.4 Sparse learning rule interpretation
The surrogate derivative we propose, while not having a constrained functional form for active neurons, imposes zero gradient for the inactive ones. Looking back into equation (5) we can identify now as three-factor Hebbian learning rule [47]. With our surrogate derivative definition, the second term (spike derivative) measures whether the postsynaptic neuron is close to spiking (i.e. its membrane potential is close the threshold). The third term (input trace) measures the presynaptic neuron activity in the most recent timesteps. Finally the first term (gradient from next layer) decides whether the synaptic activity improves or hinders performance with respect some loss function. We note that this is not exactly Hebbian learning rule neurons that get close to spike but do not spike can influence the synaptic weight update and as such, the second term simply surrogate of the postsynaptic spike activity.
Previous surrogate gradient descent methods have used similar approach implement backpropaga- tion on SNNs [8] 36 48 39] 338, often using surrogate gradient descent definitions that are maximal when the membrane is the threshold and decay as the potential moves away from it. In fact, in Esser et al. [8 the surrogate gradient definition given implies that neurons backpropagate a zero gradient 32% of the time. However, as shown in the next section, neurons can be active lot less often when presented with spikes generated from real world data and still give the same test accuracy, This is only possible because surrogate gradient approximations to threshold function yield much larger values when the potential is closer to spike thus concentrating most of the gradient on active neurons. This fact makes possible to fully profit from our sparse learning rule for much reduced computational and memory cost.
5

---

Experiments
We evaluated the correctness and improved efficiency of the proposed sparse backpropagation algorithm on real data varying difficulty and increasing spatio-tempone SathionnMNIST dataset (F-MNIST) [44] is an image dataset that has been previously used SNNs by converting each pixel analogue value to spike latencies such that a higher intensity results in an earlier spike [39 38 Importantly, each input neuron only spike at most once thus resulting in simple spatio-tempora complexity and very sparse coding. Secondly, we used the Neuromorphic- 45] dataset where spikes generated by presenting images of the MNIST dataset to a neuromorphic vision sensor. This dataset presents a higher temporal complexity and lower sparsity than the F-MNIST each neuron can spike several times and there is noise from the recording device. Finally, we worked on the Spiking Heidelberg Dataset (SHD) 46 ). This is a highly complex dataset that was generated by converting spoken digits into spike times by using detailed model of auditory bushy cells in the cochlear nucleus. This results in a very high spatio-temporg complexity and lowest input sparsity. A visualisation of samples of each dataset can be found in the supplementary materials. These datasets cover the most relevant applications of neuromorphic systems. Namely, artificially encoding a dataset into spikes (Fashion- -NNIST),, reading spikes from a neuromorphic sensor such as a DVS camera (N-MNIST) and encoding complex temporally-vary data into spikes (SHD).
complexity. Firstly, the
MNIST (N-MNIST)
We run all experiments on three-layer fully connected network as in Fig. where the last layer (readout) has infinite threshold. Both spiking layers in the middle have the same number of neurons. We used g(V)= == 1/(3[V ( - Vaa + 1) for the surrogate gradient as in [38]. See Appendix for all training details. We implemented the sparse gradient computation as Pytorch CUDA extension [49].
3.1 Spiking neurons are inactive most of the time resulting in higher energy efficiency
One of the most determining factors of the success of our sparse gradient descent resides on the level of sparsity that we can expect and, consequently, the proportion of active neurons we have in each layer. We measure the percentage of active neurons on each batch as training progresses for each dataset. This can computed as
# of active neurons
Activity 100
(13)
BTN
where B is the batch size T' is the total number of time steps and N the number of neurons in the layer and the number of active neurons is obtained according to This is an empirical way of measuring the coefficient Pt introduced earlier.
Figure A shows the activity on each dataset. As expected, the level of activity correlated with the sparseness of the inputs with the lowest being the F-MNIST and the larger in the SHD dataset. Remarkably however, the activity on average is never above 2% on average in any dataset and it low 1. 1.06% in the F-MNIST dataset. This means that on average we will never have compute more than 2% of the factors in VW and 2% of the values of VS. This can be visualised in the bottom row of Fig. B
These coefficients give us a theoretical upper bound the amount of energy that can be saved if this sparse backpropagation rule was implemented in specialised hardware which only performed the required sums and products. This is summarised in Table
Table Theoretical upper bound energy saved in hidden layers.
Mean activity layer 1 (%)
Mean activity layer (%)
Energy saved in VW (%)
Energy saved
in VS (%)
F-MNIST
1.06
0.87
99.13
98.94
N-MNIST
1.12
0.77
99.23
98.88
SHD
1.70
1.09
98.91
98.30

---

A.
F-MNIST
N- N-MNIST
SHD
Active neurons (%)
1.0
0.5
2
First Nideen layer Sccond hideen
0.0
0.0
5.0
10.0
15.0
20.0
0.0
5.0
10.0
15.0
20.0
0.0
2.0
4.0
6.0
gr updates (x10*)
gradient updates (x10*)
updates (x10")
B.
Original tW
Sparse VW
Loss SHD
Original
Sparse SHD
2
10
15-
0.0
2.0
4.0
6.0
Original Willl
Sparse 12!!!!
D.
110
Test Accuracy
Accuracy 190
10
000
15
Orignal
20
-28
Sparse
10
15
20
10 15
20
F-MNIST
N-MNIST
SHD
Input Neuron Index
Input Neuron index
Figure 3: Sparse backpropagation learns at high levels of sparsity. All figures except B are a sample average. Standard error in the mean is displayed (although too small to be easily visualised). A. Percentage of active neurons during training as a fraction of total tensor size (B x T x N) with N = 200 neurons for each dataset. B. Visualisation of the weight and spike gradients on the SHD) dataset. We show zero value in hatched grey. Note how both VW are nearly identical in despite being computed using small fraction of the values of ( in the sparse case. C. Loss evolution on the SHD dataset using both algorithms. D. Final test accuracy on all datasets using both methods.
Importantly, in dense backpropagation methods the temporal dimension of datasets and models is necessarily limited to maximum of 2000 since gradients must be computed all steps [46] 39) This means that lot of negligible gradients are computed. However, our method adapts to the level of activity of the network and only computes negligiiee gradients. This cost-prohibitive reality was evidenced when we attempted to run these experiments in smaller GPUs leading to running out of memory when using dense methods but not on ours (see F.8). Thus, sparse spiking backpropagation allows to train data that runs for longer periods of time without requiring a more powerful hardware.
3.2 Sparse backpropagation training approximates the gradient very well
We test that sparse learning rule performs par with the standard surrogate gradient descent. Figure 3 shows visualisation of the weight (first row) and spike gradients (second row). Note how most of the values of ( were not computed and yet (I) is nearly identical to the original gradient. This is further confirmed in Figures 3C and 3P where the loss the SHD dataset is practically identical with both methods (the loss for the other datasets can be found in Appendix Fb and the test accuracy is practically identical (albeit slightly better) in the sparse case (F-MNIST: 82.2%, N-MNIST: 72, SHD: 77.5%). These accuracies are on par to those obtained with similar networks these datasets (F-MNIST: 80.1%, N-MNIST: 97.4%. SHD: 71.7%) [46] 38 39). These results show that sparse spiking backpropagation gives practically identical results to the original backpropagation but much lower computational cost.
3.3 Sparse training is faster and less memory intensive
now measure the time takes the forward and the backward propagation of the second layer of the network during training as well as the peak GPU memory used. We choose this layer because

---

A.
B.
Backward Speedup
Memory Saved
Beckward time SHD
100X
100
F-ANNIST N-MNIST
0.6
Memon savea
SHD
Time (5)
0.4
Orighnal
50
Spame
0.2
0
20
40
60
80
100
20
40
60
80
100
20
60
80
100
Gradient upditees (% total)
Gradient updates (% of total)
Gradient updates of total)
C.
Backward Speedup
Overall Speedup
Backward memory saved
100x
F-MMST N.MNST
Momony (5)
30
10x
20
10
1x
800
Number neurons in hidden layers
Number neurons in hidden layers
Number neurons in hidden layers
Figure 4: Speedup and memory improvement when using sparse gradient backpropagation. All figures are a 5 sample average and its standard eπrоr in the mean is also displayed. A. Backward speedup and memory saved in the second hidden layer for all three datasets when using sparse gradient descent with 200 hidden neurons. B. Time spent in computing the backward pass in the second hidden layer consisting gradient descent. C. Backward speed and memory saved in the second hidden layer as we increase the number of hidden neurons all hidden layers. We included the overall speedup which takes into consideration both the forward and backward times spent in the second layer.
200 neurons when using regular gradient descent and sparse
needs to compute both (W()) and V (note that the first layer only needs to compute VW (9)). A performance improvement in this layer translates to an improvement in all subsequent layers inn a deeper network. We compute the backward speedup the ratio of the original backpropagation time and the sparse backpropagation time. We compute the memory saved as
Memory saved 100 x memory_origeee _originorlnnlll weemmmemmmeeeeeeeeeeee
(14)
memory_originge
Figure I shows the speedup and memory saved on 200 neuron hidden layer (both hidden layers). Backpropagation time is faster by 40x and GPU memory is reduced by 35%. To put this speedup into perspective Figure 4 shows the time taken for backpropagating the second layer in the original case (about 640ms) and the sparse case (about 17ms). also shows that the time taken for backpropagating is nearly constant during training it could be expected after studying the network activity in Fig. BA.
We also tested how robust is this implementation for varying number of hidden neurons (in both layers). We increase the number of neurons up 1000 which similar the maximum number of hidden units used in previous work [46) and it is also the point at which the original backpropagation method starts run out of memory. Here we also show the overall speedup defined as the ratio between the sum of forward and backward times of the original over the sparse backpropagation. The results shown in Fig. 4C show that the backward speedup and memory saved remain constant as we increase the number of hidden neurons but the overall speedup increases substantially. Given that the forward time the same for both methods (see Appendix F) this shows that as we increase the number of neurons, the backward time takes most of the computation and thus the sparse backpropagation becomes more important.
We also note that these results vary depending on the GPU used, Figure was obtained from running on an RTX6000 GPU. We also run this on smaller GPUs (GTX1060 and GTX 1080Ti) and found that the improvement is even better reaching up to a 70x faster backward pass on N-MNIST and SHD. These results can found Appendix F Our results show that our method speeds up backward execution between one and two orders of magnitude, meaning that to first approximation we would expect reduce energy usage by the same factor since GPUs continue to use 30-50% of their peak power even when idle [50].
8

---

A.
SHD Test Accuracy
SHD Hidden Activiyy
100
2.0
Gr gind
Learning intect
Leominn Intsct
Leaming corrupted
Accuracy
60
No Leamiing
Learinng comupttdd
Activity (h0)
1.5
No Learning
1,0
20
0.85
0.90
3600 0090200.399000
0.0
B.
SHD Backward Speedup
By 0.99999
Byy 0.999
1000x
Sparte
Speedup
100x
10x
1.-
0.95
SHD Backwaard Memory Saved
100
Memory Save
80
2-
20
250 500 750
1000
250
500
750
1000
0.35
Gradient updales
Gradient updates
Bg
Figure 5: Impact of varying the backpropagation threshold B₁ on the SHD dataset. A. Final test accuracy on the SHD dataset Br increases. B. Loss evolution on the SHD dataset for different Bis- C. Hidden activity, backward speedup and backward memory saved as Bt,. increases.
3.4 Training deeper and more complex architectures
We show that our gradient approximation can successfully train deeper networks by training 6- layer fully connected network (5 hidden plus readout all with 300 neurons) Fashion-MNIST. We measured the performance of the hidden layers and achieve 15x backward speedup when using 1080-Ti GPU (better than the 10x speedup under these conditions with only hidden layers as shown in Appendix F and 25% memory saved while achieving a 82.7% testing accuracy (slightly better than with 2 layers 81.5%). The results consistent with previous findings and show that the gradient is not loss in deeper architectures.
We also run experiment with convolutional and pooling layers the Fashion- MNIIST dataset obtaining a test accuracy of 86.7% 7% when using our spike gradient approximation and 86.9% with original gradients. We do not report speedup or memory improvements in this network developing a sparse convolutional CUDA kernel out of the scope of our work but we simply ran a dense implementation with clamped gradients. This proves that gradient approximation is able train on more complex architectures although still remains to be shown whether efficient sparse operators can be implemented for this purpose. See Appendix
B for training details.
3.5 Sparsity-Accuracy trade-off
We trained the SHD dataset on the original 2-layer fully connected network with 400 neurons in each hidden layer and varied the backpropagation threshold B We found that the training is very robust to even extreme values of Bu. The loss and accuracy remains unchanged even when setting B., = 0.95 (see 5A and achieving nearly 150x speedup and 85% memory improvement as shown in 5 We also inspected the levels of activity while varying Bi, and we found that there are enough active neuron to propagate the gradient effectively. As B., gets closer to the number of active neurons decreases rapidly until there gradients to propagate.

---

4 Discussion
Recent interest in neuromorphic computing has lead to energy efficient emulation of SNNs in specialised hardware. Most of these systems only support working with fixed network parameters thus requiring an external processor to train. Efforts to include training within the neuromorphic system usually rely on local learning rules which do not guarantee state-of-the performance. Thus, training on these systems requires error backpropagation on von-Neumann processors instead of taking advantage of the physics of the neuromorphic substrate [5] 52).
We have developed a sparse backpropagation algorithm for SNNs that achieves the same performance as standard dense backpropagation at a much reduced computational and memory cost. To the best of our knowledge this is the first backpropagation method that leverages the sparse nature of spikes in training and tackles the main performance bottleneck in neuromorphic training. Moreover, while we have used dense all-to-all connectivity between layers, our algorithm is compatible with other SNNs techniques that aim for sparser connectivity such as synaptic pruning (53)
By constraining backpropagation to active neurons exclusively, edges in the backward computation graph to a point where over 98% of the operations required to compute the gradients can be skipped. This results in much faster backpropagation time, lower memory requirement and less energy consumption on GPU hardware while not affecting the testing accuracy. This is possible because the surrogate gradient used to approximate the derivative of the spiking function is larger when the membrane potential is closer to the threshold resulting in most of the gradient being concentrated on active neurons. Previous work has used, to a lesser extent, similar ideas. Esser et al. [18] used a surrogate gradient function which effectively resulted in about one third the neurons backpropagating zero gradient. Later, Pozzi, et al. [54] developed learning rule where only the weights of neurons directly affecting the activity of the selected output class are updated, however, the trial and error nature of the learning procedure resulted in up to 3.5x slower training.
reduce the number of nodes and
However, due to the lack of efficient sparse operators in most auto-differentiation platforms, every layer type requires to develop its own sparse CUDA kernel in order be competitive with current heavily optimised libraries. In our work, we concentrated on implementing and testing this in spiking fully connected layers and we managed show that sparse backpropagation is lot faster and uses less memory. Developing these sparse kernels is not trivial and we are aware that having to do so for each layer is an important limitation of our work. This is no surprise since for now there is few reasons to believe that sparse tensor operations will significantly accelerate neural network performance. Our work aims to challenge this view and motivate the adoption of efficient sparse routines by showing for the first time that sparse BPTT can be faster without losing accuracy.
We implemented and tested our method on real data fully connected SNNs and simulated it in convolutional SNNs. The same method can be extended to any SNN topology as long as the neurons use a threshold activation function and the input is spiking data. However, due to the lack of efficient sparse operators in most auto-differentiation platforms, every layer type requires to develop its own sparse CUDA kernel in order to be competitive with current heavily optimised librarics. Developing these sparse kernels is not trivial and we are aware that having to do so for each layer is an important limitation of our work. This is no surprise since for now there is few reasons to believe that sparse tensor operations will significantly accelerate neural network performance. Our work aims to challenge this view and motivate the adoption of efficient sparse routines by showing for the first time that sparse spiking BPTT can be faster while achieving the same accuracy as its dense counterpart. Nevertheless, ideally, a dynamic backward graph should be generated each time the backward pass needs to be computed and consequently GPU may not be the best processing unit for this task. A specialised neuromorphic implementation or an FPGA may be more suited to carry out the gradient computation task as this graph changes every batch update. Additionally, while we have reduced the number of operations required for training several times, we have only achieved up to 85% memory reduction thus, memory requirements remains an important bottleneck.
In summary, our sparse backpropagation algorithm for spiking neural networks tackles the main bottleneck in training SNNs and opens the possibility of a fast, energy and memory efficient end-to- end training on spiking neural networks which will benefit neuromorphic training and computational neuroscience research. Sparse spike backpropagation is necessary step towards a fully efficient on-chip training which will be ultimately required to achieve the full potential of neuromorphic computing.
10

---

Acknowledgments and Disclosure of Funding
We thank Friedemann Zenke, Thomas Nowotny and James Knight for their feedback and support. This work was supported by the EPSRC Centre for Doctoral Training in High Performance Embedded and DistributedSystems (HiPEDS, Grant Reference EP/L011796/1)
References
[1] Yann LeCun, Yoshua Bengio, and Geoffrey Hinton. Deep learning. nature, 52107553):436-444, 2015.
[2] Geoffrey Hinton, Li Deng, Dong Yu, George E Dahl, Abdel-rahman Mohamed, Navdeep Jaitly, Andrew Senior, Vincent Vanhoucke, Patrick Nguyen, Tara N Sainath, al. Deep neural networks for acoustic modeling in speech recognition: The shared views of four research groups. IEEE Signal processing magazine, 29(6):82-97) 97, 2012.
[3] Alex Krizhevsky, Ilya Sutskever, and Geoffrey E Hinton. Imagenet classification with deep convolutional neural networks. Advances in neural information processing systems, 25:1097- 1 1105, 2012.
[4] Zhengyan Zhang, Xu Han, Zhiyuan Liu, Xin Jiang, Maosong Sun, and Qun Liu. ERNIE: Enhanced language representation with informative entities. In Proceedings of the 57th Annual Meeting of the Association for Computational Linguistics, pages 1441-1451, Florence, Italy, July 2019, Association for Computational Linguistics.
[5] Tom B Brown, Benjamin Mann, Nick Ryder, Melanie Subbiah, Jared Kaplan, Prafulla Dhariwal, Arvind Neelakantan, Pranav Shyam, Girish Sastry, Amanda Askell, et al. Language models are few-shot learners. arXiv preprint arXiv:2005. 14165, 2020.
[6] Volodymyr Mnih, Koray Kavukeuoglu, David Silver, Andrei A Rusu, Joel Veness, Marc G Bellemare, Alex Graves, Martin Riedmiller, Andreas K Fidjeland, Georg Ostrovski, et al. Human-level control through deep reinforcement learning. nature, 518(7540):529-55 553,, 2015.
[7] David Silver, Julian Schrittwieser, Karen Simonyan, Ioannis Antonoglou, Aja Huang, Arthur Guez, Thomas Hubert, Lucas Baker, Matthew Lai, Adrian Bolton, al. Mastering the game of go without human knowledge. nature, 550(7676):354- 339, 2017.
[8] Oriol Vinyals, Igor Babuschkin, Wojeiech M Czarnecki, Michaël Mathieu, Andrew Dudzik, Jun- young Chung, David H Choi, Richard Powell, Timo Ewalds, Petko Georgiev, et al. Grandmaster level in starcraft using multi-agent reinforcement learning. Nature, 575(7782):300-354, 2019.
[9] Emma Strubell, Ananya Ganesh, and Andrew McCallum. Energy and policy considerations for deep learning in nlp. arXiv preprint arXiv:1906.000 2019.
[10] Roy Schwartz, Jesse Dodge, Noah A. Smith, and Oren Etzioni. Green ai. Commun. ACM, 63(12):54 63, November 2020.
[11] Jacob Hochstetler, Rahul Padidela, Qi Chen, Qing Yang, and Song Fu. Embedded deep learning for vehicular edge computing. In 2018 JEEE/ACM Symposium on Edge Computing (SEC), pages 341-343. IEEE, 2018.
[12] Nicholas D Lane, Sourav Bhattacharya, Akhil Mathur, Petko Georgiev, Claudio Forlivesi, and Fahim Kawsar, Squeezing deep learning into mobile and embedded devices. IEEE Pervasive Computing, 16(3):82-8)) 88, 2017.
[13] Jonathan W Mink, Robert J Blumenschine, and David B Adams. Ratio of central nervous system to body metabolism in vertebrates: its constancy and functional basis. American Journal of SenniiologyRRggllttoo Integrative and Comparative Physiology, 241(3): 1981.
[14] Wulfram Gerstner, Werner M Kistler, Richard Naud, and Liam Paninski. Neuronal dynamics: From single neurons networks and models of cognition. Cambridge University Press, 2014,
11

---

[15] David Daniel Cox and Thomas Dean. Neural networks and neuroscience-inspree computer vision. Current Biology, 24(18))R921- 2014.
[16] Thomas Pfeil, Andreas Grübl, Sebastian Jeltsch, Eric Müller, Paul Müller, Mihai A Petrovici, Michael Schmuker, Daniel Brüderle, Johannes Schemmel, and Karlheinz Meier. Six networks on a universal neuromorphic computing substrate. Frontiers in neuroscience, 7:1 7:11, 2013.
[17] Paul A Merolla, John V Arthur, Rodrigo Alvarez-Icaza, Andrew S Cassidy, Jun Sawada, Filipp Akopyan, Bryan Jackson, Nabil Imam, Chen Guo, Yutaka Nakamura, al. A million spiking-neuron integrated circuit with scalable communication network and interface. Science, 345(6197)668--6) 673, 2014.
[18] Steven K Esser, Paul A Merolla, John V Arthur, Andrew Cassidy, Rathinakumar Appuswamy, Alexander Andreopoulos, David J Berg, Jeffrey L McKinstry, Timothy Melano, Davis R Barch, et al. Convolutional networks for fast, energy-efficient neuromorphic computing. Proceedings of the national academy of sciences, 113(41):1141111144 2016.
[19] Peter U Diehl, Guido Zarrella, Andrew Cassidy, Bruno U Pedroni, and Emre Nefici. Conversion of artificial recurrent neural networks to spiking neural networks for low-power neuromorphic hardware. In 2016 IEEE International Conference on Rebooting Computing (ICRC), pages 1-8. IEEE, 2016.
[20] Misha Mahowald and Rodney Douglas, A silicon neuron. Nature, 354(6354):515-518, 1991.
[21] Johannes Schemmel, Daniel Brüderle, Andreas Grübl, Matthias Hock, Karlheinz Meier, and Sebastian Millner. A wafer-scale neuromorphic hardware system for large-scale neural modeling. In 2010 IEEE International Symposium on Circuits and Systems (ISCAS), pages 1947-1950. IEEE, 2010.
[22] Paul Merolla, John Arthur, Filipp Akopyan, Nabil Imam, Rajit Manohar, and Dharmendra S Modha. A digital neurosynaptic core using embedded crossbar memory with 45pj per spike in 45nm. In 201 / IEEE custom integrated circuits conference (CICC), pages 1-4. IEEE, 2011.
[23] Saber Moradi and Giacomo Indiveri. An event-based neural network architecture with an asynchronous programmable synaptic memory. IEEE transactions on biomedical circuits and systems, 8(1):98-100) 2013.
[24] Elisabetta Chicca, Fabio Stefanini. Chiara Bartolozzi, and Giacomo Indiveri. Neuromorphic electronic circuits for building autonomous cognitive systems. Proceedings of the IEEE, 102(9):1367-1388, 2014.
2014.
[25] Ben Varkey Benjamin, Peiran Gao, Emmett McQuinn, Swadesh Choudhary, Anand R Chan- drasekaran, Maan- Bussat, Rodrigo Alvarez-Icaze John V Arthur, Paul A Merolla, and Kwabena Boahen. Neurogrid: A soxed-analog-diiiee multichip system for large-scale neural simulations. Proceedings of the IEEE, 102(5):699-716, 2014.
(26) Mike Davies, Narayan Srinivasa, Tsung-Han Lin, Gautham Chinya, Yongqiang Cao, Sri Harsha Choday. Georgios Dimou, Prasad Joshi, Nabil Imam. Shweta Jain, et al. Loihi: A neuromorphic manycore processor with on-chip learning. Ieee Micro, 38(1):22-99, 2018
[27] G Pedretti, V Milo, Ambrogio, R Carboni, Bianchi, Calderoni, Ramaswamy, AS Spinelli, and D lelmini. Memristive neural network for on-line learning and tracking with iraiininsspire spike timing dependent plasticity. Scientific reports, 7(1):1110, 2017.
[28) Chul-Heung Kim, Soochang Lee, Sung Yun Woo, Won-Mook Kang, Suhwan Lim, Jong-Ho Bae, Jaeha Kim, and Jong-Ho Lee. Demonstration of unsupervised learning with spike-timing- dependent plasticity using a tft-type nor flash memory array. IEEE Transactions on Electron Devices, 6575)11770-1780, 2018.
[29] Dongseok Kwon, Suhwan Lim, Jong-Ho Bae, Sung-Tae Lee, Hyeongsu Kim, Young-Tak Seo, Seongbin Oh, Jangsaeng Kim, Kyuho Yeom, Byung-Gook Park, et al. On-chip training spiking neural networks using approximated backpropagation with analog synaptic devices. Frontiers in neuroscience, 14:423, 2020.
12

---

[30] Sebastian Schmitt, Johann Klähn, Guillaume Bellec, Andreas Grübl, Maurice Guettler, Andreas Hartel, Stephan Hartmann, Dan Husmann, Kai Husmann, Sebastian Jeltsch, et Neuromorphic hardware in the loop: Training deep spiking network on the brainscales wafer-scale system. In 2017 international joint conference on neural networks (ICNN). pages 2227-2234. IEEE, 2017.
[31] Benjamin Cramer, Sehastian Billaudelle, Simeon Kanya, Aron Leibfried, Andreas Grübl, Vitali Karasenko, Christian Pehle, Korbinian Schreiber, Yannik Stradmann, Johannes Weis, et al. Training spiking multi-layer networks with surrogate gradients on an analog neuromorphic substrate. arXiv preprint arXiv:2006.07239) 2020.
[32] Simon Davidson and Steve B Furber. Comparison of artificial and spiking neural networks on digital hardware. Frontiers in Neuroscience, 15, 2021.
[33] Emre O. Neftci, Hesham Mostafa, and Friedemann Zenke. Surrogate gradient learning in spiking neural networks: Bringing the power of gradient- based optimization to spiking neural networks. JEEE Signal Processing Magazine, 36(6):51 163,, 2019.
[34] Timo C Wunderlich and Christian Pehle. Event-based backpropagation can compute exact gradients for spiking neural networks. Scientific Reports, 11(1):1-17, 2021.
[35] Eric Hunsberger and Chris Eliasmith. Spiking deep networks with lif neurons. arXiv preprint arXiv:1510.08829. 2015.
[36] Sumit Bam Shrestha and Garrick Orchard. Slayer: Spike layer error reassignment in time. In Bengio, H. Wallach, Larochelle, K. Grauman, N. Cesa-Bianche and Garnett, editors. Advances in Neural Information Processing Systems, volume 31. Curran Associates, Inc., 2018.
[37] Stanislaw Wožniak, Angeliki Pantazi, Thomas Bohnstingl, and Evangelos Eleftheriou. Deep learning incorporating biologically inspired neural dynamics and in- in-memory computing. Nature Machine Intelligence, 2(6))325-3366 2020.
[38] Friedemann Zenke and Tim P Vogels. The remarkable robustness of surrogate gradient learning for instilling complex function in spiking neural networks. Neural Computation, 3394):899-925,
2021.
[39] Nicolas Perez-Nieves, Vincent CH Leung, Pier Luigi Dragotti, and Dan FM Goodman. Neural heterogeneity promotes robust learning. bioRxiv, pages 2020-12 12, 2021.
[40] Lei Jimmy Ba Brendan Frey. Adaptive dropout for training deep neural networks. Proceeding NIPS, 13:3084-3092, 2013.
[41] Guy Blane and Steffen Rendle. Adaptive sampled softmax with kernel based sampling. In International Conference on Machine Learning, pages 590-599. PMLR, 2018.
[42] Beidi Chen, Tharun Medini, James Farwell, Sameh Gobriel, Charlie Tai, and Anshumali Shrivastava. Slide: In defense of smart algorithms over hardware acceleration for large-scale deep learning systems. arXiv preprint 1rXiv:1903.03122 2019.
[43] Shabnam Daghaghi, Nicholas Meisburger, Mengnan Zhao, and Anshumali Shrivastava. Acceler- ating slide deep learning on modern cpus: Vectorization, quantizations, memory optimizations, and more. Proceedings of Machine Learning and Systems, 3, 2021.
[44] Han Xiao, Kashif Rasul, and Roland Vollgraf. Fashion-mnist: a novel image dataset for benchmarking machine learning algorithms. arXiv preprint 1rXiv:1708.07740 2017.
[45] Garrick Orchard, Ajinkya Jayawant, Gregory K Cohen, and Nitish Thakor. Converting static image datasets to spiking neuromorphic datasets using saccades. Frontiers in neuroscience, 9:437, 2015.
[46] Benjamin Cramer, Yannik Stradmann, Johannes Schemmel, and Friedemann Zenke. The heidelberg spiking data sets for the systematic evaluation of spiking neural networks. IFEE Transactions Neural Networks and Learning Systems, 2020.
13

---

[47] Wulfram Gerstner, Marco Lehmann, Vasiliki Liakoni, Dane Corneil, and Johanni Brea. Eli- gibility traces and plasticity on behavioral time scales; experimental support of neohebbian three-factor learning rules. Fronfiers in neural circuits, 12:53, 2018.
[48] Bojian Yin, Federico Corradi, and Sander M Bohté. Effective and efficient computation with multiple-timescale spiking recurrent neural networks. In International Conference on Neuromorphic Systems 2020, pages 1-8, 2020.
[49]
Adam Paszke, Sam Gross, Francisco Massa, Adam Lerer, James Bradbury, Gregory Chanan, Trevor Killeen, Zeming Lin, Natalia Gimelshein, Luca Antiga, Alban Desmaison, Andreas Kopf, Edward Yang. Zachary Vetito, Martin Raison, Alykhan Tejani, Sasank Chilamkurthy, Benoit Steiner, Lu Fang, Junjie Bai, and Soumith Chintala. Pytorch: An imperative style, high- performance deep learning library. In H. Wallach, H. Larochelle, A. Beygelzimer, F. d' d'Alché- Buc, E. Fox, and R. Garnett, editors, Advances in Neural Information Processing Systems 32, pages 8024-8035. Curran Associates, Inc., 2019.
[50] James C Knight and Thomas Nowotny. Gpus outperform current hpc and neuromorphic solutions in terms of speed and energy when simulating highly-connected cortical model. Frontiers in neuroscience, 12:941, 2018.
[51] Giacomo Indiveri and Shih-Chii Liu. Memory and information processing in neuromorphic systems. Proceedings of the IEEE, 103(8):139--137, 2015.
[52] Yigit Demirag, Filippo Moro, Thomas Dalgaty, Gabriele Navarro, Charlotte Frenkel, Giacomo Indiveri, Elisa Vianello, and Melika Payvand. Pem-trace: Scalable synaptic eligibility traceswith resistivity drift of phase-change materials. arXiv preprint arXiv:2102.072660 2021.
[53] Yanqi Chen, Zhaofei Yu, Wei Fang. Tiejun Huang, and Yonghong Tian. Pruning of deep spiking neural networks through gradient rewiring. arXiv preprint (.X.i:2205.04990 2021.
[54] Isabella Pozzi, Sander Bohte, and Pieter Roelfsema. Attention-gen greetdon--gaed brain propagation: How the brain can implement reward-basse based error backpropagation. Advances Neural Information Processing Systems, 33, 2020.
14


Reviews:
[{"review_id": "lLDynpLcK7D", "reviewer": "Reviewer_8Wqn", "summary": "The authors aimed at addressing the inefficient issue of SNN in backpropagation with dense tensor calculations. They designed a rule to estimate the spikes' gradient iteratively and theoretically avoid a lot of calculation. \n", "questions": "", "limitations": "", "rating": 5, "confidence": 5, "soundness": null, "presentation": null, "contribution": null, "strengths": "", "weaknesses": "", "quality": null, "clarity": null, "significance": null, "originality": null, "strengths_and_weaknesses": "", "was_revised": false, "final_justification": "", "rebuttal": "", "claims_and_evidence": "", "methods_and_evaluation_criteria": "", "theoretical_claims": "", "experimental_designs_or_analyses": "", "relation_to_broader_scientific_literature": "", "essential_references_not_discussed": "", "other_strengths_and_weaknesses": "", "other_comments_or_suggestions": "", "questions_for_authors": "", "summary_of_paper": "", "summary_of_recommendation": "", "technical_quality": "", "clarity_of_presentation": "", "potential_impact": "", "robotics_focus": "", "quality_of_limitations": "", "questions_for_rebuttal": "", "reasons_to_accept": "", "reasons_to_reject": "", "questions_to_authors": "", "main_review": "Overall, this paper is written clearly and easy to follow. I have two major concerns about the current work. \n1. First, the algorithm was only tested on small datasets. It is not clear how it would scale up to larger datasets like CIFAR10/100 and DVS-CIFAR. \n\n2. As the author also stated, there lacked efficient sparse tensor operations in most auto-differentiation libraries. On the other hand, there will be an incompatibility between the sparse operation and the parallelism of GPU, which may intrinsically limit the potential application of the proposed methods to complex models. A related question is whether the proposed method can be supported by any existing neuromorphic hardware? \n\nAnother question to clarify is why the authors used the BP time of the second layer rather than the BP time of the whole network? ", "summary_of_the_paper": "", "summary_of_the_review": "", "strength_and_weaknesses": "", "limitations_and_societal_impact": "NA", "review_text": "", "extra_scores": {"ethical_concerns": "NA", "needs_ethics_review": "No", "ethics_review_area": "", "time_spent_reviewing": "6"}, "extra_text": {}}, {"review_id": "kiyVxt7LLmc", "reviewer": "Reviewer_DiNr", "summary": "Surrogate gradient learning (SGL) is a recent approach to reconcile backpropagation with spiking neural networks. The approach works in discrete time. At each time step and for each neuron, a spike is generated if the potential is greater or equal than the threshold, and this is done by applying the Heaviside step function. This raises a problem when computing the gradients, as the derivative of Heaviside function is zero almost everywhere. The main idea of SGL is to replace this derivative by a \"surrogate\" one, typically the derivative of a sigmoid.\n\nHere, the main idea of the authors is to compute the gradients only for the neurons whose potential is close to threshold, because other neurons have negligible gradients. Although very simple, this idea allows to reduce computation time by up to 70x, and memory by 40 on simple networks (MLP with 2 hidden layers), with no accuracy loss on simple datasets (Fashion-MNIST, Neuromophic-MNIST and Spiking Heidelberg Digits)", "questions": "", "limitations": "", "rating": 6, "confidence": 4, "soundness": null, "presentation": null, "contribution": null, "strengths": "", "weaknesses": "", "quality": null, "clarity": null, "significance": null, "originality": null, "strengths_and_weaknesses": "", "was_revised": false, "final_justification": "", "rebuttal": "", "claims_and_evidence": "", "methods_and_evaluation_criteria": "", "theoretical_claims": "", "experimental_designs_or_analyses": "", "relation_to_broader_scientific_literature": "", "essential_references_not_discussed": "", "other_strengths_and_weaknesses": "", "other_comments_or_suggestions": "", "questions_for_authors": "", "summary_of_paper": "", "summary_of_recommendation": "", "technical_quality": "", "clarity_of_presentation": "", "potential_impact": "", "robotics_focus": "", "quality_of_limitations": "", "questions_for_rebuttal": "", "reasons_to_accept": "", "reasons_to_reject": "", "questions_to_authors": "", "main_review": "The idea is thus interesting, but it remains to be proven if it also works with deeper networks, convolutional layers, and with more complex datasets (eg ImageNet for static images or IBM DVS Gesture for neuromorphic datasets). For example I wonder whether the agreement between the approximated gradients and the true ones would still hold in deeper networks, or if errors would accumulate through the layers.\n\nOn the same ground, the accuracies that the authors obtained with the simple datasets are much below the SOTA (see for example Table 2 on Fang et al 2020 Incorporating Learnable Membrane Time Constant to Enhance Learning of Spiking Neural Networks). Of course this is partly due to the fact that the authors did not use convolutional layers. But it raises the question of whether their approach would still cause no accuracy loss on a network that really solves the tasks.\n", "summary_of_the_paper": "", "summary_of_the_review": "", "strength_and_weaknesses": "", "limitations_and_societal_impact": "N/A", "review_text": "", "extra_scores": {"needs_ethics_review": "No", "ethics_review_area": "", "time_spent_reviewing": "4"}, "extra_text": {}}, {"review_id": "TmGwyf4TXRb", "reviewer": "Reviewer_B2Bg", "summary": "This paper proposes a novel sparse gradient update rule to train spiking neural networks faster and more energy-efficient on GPUs. A mathematical derivation of backpropagation through time (BPTT) is given for a network of leaky integrate-and-fire (LIF), feed-forward, fully-connected layers without skip connections. A threshold is defined that marks neurons as active when they are close to the membrane threshold and the spike gradient is only propagated back if a neuron was active at that time during the forward pass. As a result, only a fraction of the actual update steps have to be computed, because all others would be zero anyway. The authors implement a version of their algorithm in CUDA to compare their sparse gradient update rule to the dense update rule from surrogate gradients. It is found, that on the three evaluated datasets, Fashion-MNIST, N-MNIST and Spiking Heidelberg Digits, a consistent improvement in memory efficiency and training speed can be measured while achieving similar accuracies.", "questions": "", "limitations": "", "rating": 7, "confidence": 5, "soundness": null, "presentation": null, "contribution": null, "strengths": "", "weaknesses": "", "quality": null, "clarity": null, "significance": null, "originality": null, "strengths_and_weaknesses": "", "was_revised": false, "final_justification": "", "rebuttal": "", "claims_and_evidence": "", "methods_and_evaluation_criteria": "", "theoretical_claims": "", "experimental_designs_or_analyses": "", "relation_to_broader_scientific_literature": "", "essential_references_not_discussed": "", "other_strengths_and_weaknesses": "", "other_comments_or_suggestions": "", "questions_for_authors": "", "summary_of_paper": "", "summary_of_recommendation": "", "technical_quality": "", "clarity_of_presentation": "", "potential_impact": "", "robotics_focus": "", "quality_of_limitations": "", "questions_for_rebuttal": "", "reasons_to_accept": "", "reasons_to_reject": "", "questions_to_authors": "", "main_review": "The results of this paper are an important contribution to the deep learning and neuromorphic community, as it tackles an important issue in the current state-of-the-art in the training of spiking neural networks. That is, the training speed is very slow, because potentially hundreds of time steps have to be simulated. As the common deep learning frameworks like PyTorch and TensorFlow offer no functionality to date, to compute sparse gradients efficiently, it is not possible to implement efficient update mechanisms for sparsely active networks like most spiking neural networks. The authors both, derived the theoretical foundation of sparse updates based on BPTT and the fact that the gradient is only non-zero close to the threshold and gave an actual implementation to validate their theory.\n\nStill, the paper can be improved in a few aspects.\n1.  Fig. 1 is not necessary in my opinion, as it does not provide any insights in the actual gradient updates, nor does it give an overview of the proposed algorithm. All relevant information can be found in Fig. 2. \n2. In Tab. 2, the authors report theoretical savings in energy. As there is an actual implementation for GPUs, I think measuring the actual power consumption would be very interesting, to see if there is an actual gain in energy-efficiency.\n3. In Fig. 3B, there is no colorbar and therefore it is not really possible to compare the results in a fair way. It could for example be, that all results are very close to zero and therefore the difference would be less impressive between the algorithms. Additionally, plotting the difference of Original GradW and Sparse GradW would make it easier to compare the two. \n4. When reporting results in Fig. 3D, please also report some concrete results from the literature instead of just stating that \"these accuracies are on par\" (line 209). \n\nGenerally, it would have been interesting to see more results, especially on deeper neural networks. I see no imminent reason why the algorithm should not scale to deeper networks, on the opposite it should be even more efficient than surrogate gradients, that have already proven to be working with at least 10+ layers.\n\nOverall, this paper shows solid results of a novel sparse gradient update rule with a small spiking neural network. I think this paper should be accepted, if at least some of the concerns in this review are addressed.\n\n\nSmall things that did not influence my score:\n- ln 22: I would remove the \"simultaneously\", as it sounds like humans can solve auditory and visual recognition problems while also playing games, all at the same time\n- Eq. 14 could be typeset prettier (without underscores and suitable variable names)\n- Fig. 3D could be zoomed in more (e.g., start the bars at 25 %)\n- A relevant paper to cite in the final version (was not published at submission): Event-based backpropagation can compute exact gradients for spiking neural networks, T. Wunderlich, C. Pehle, Sci Rep 11, 12829 (2021). ", "summary_of_the_paper": "", "summary_of_the_review": "", "strength_and_weaknesses": "", "limitations_and_societal_impact": "The limitations have not been discussed in detail. It is not clear why no deeper networks were used for the experiments. It is also not clear to me, why the speedup does not increase when increasing the layer size in Fig. 4.\nSocietal impact has not been discussed.", "review_text": "", "extra_scores": {"needs_ethics_review": "No", "ethics_review_area": "", "time_spent_reviewing": "4.5"}, "extra_text": {}}, {"review_id": "Saz8C_wPwfn", "reviewer": "Reviewer_X1Mr", "summary": "This work introduces a new method to train spiking neural networks using far fewer gradients during the backwards back-propagation pass.  By only retaining the potential of so-called \"active\" neurons (those within a threshold epsilon of spiking) and learning through a surrogate function, these networks of spiking neurons can be sparsely trained (requiring only around 1% of the gradients).  The authors test these claims on three datasets (a time-encoded version of Fashion-MNIST, N-MNIST, and Spiking Heidelberg Digits), and achieve speedups of up to 70x and memory saving of 40% while maintaining approximately the same accuracy.  Further contributions interpret the learning rule from a Hebbian perspective and establish the savings in computational complexity.", "questions": "", "limitations": "", "rating": 6, "confidence": 3, "soundness": null, "presentation": null, "contribution": null, "strengths": "", "weaknesses": "", "quality": null, "clarity": null, "significance": null, "originality": null, "strengths_and_weaknesses": "", "was_revised": false, "final_justification": "", "rebuttal": "", "claims_and_evidence": "", "methods_and_evaluation_criteria": "", "theoretical_claims": "", "experimental_designs_or_analyses": "", "relation_to_broader_scientific_literature": "", "essential_references_not_discussed": "", "other_strengths_and_weaknesses": "", "other_comments_or_suggestions": "", "questions_for_authors": "", "summary_of_paper": "", "summary_of_recommendation": "", "technical_quality": "", "clarity_of_presentation": "", "potential_impact": "", "robotics_focus": "", "quality_of_limitations": "", "questions_for_rebuttal": "", "reasons_to_accept": "", "reasons_to_reject": "", "questions_to_authors": "", "main_review": "Originality: this work combines two disparate threads in neural network improvements: the literature on sparse learning (adaptive dropout and adaptive sparsity), and methods for surrogate learning for more effective spiking neural networks.  This is a combination I have not seen combined before, offering an unexpected and valuable insight to achieve efficient training.\n\nQuality: the authors have provided a number of valuable contributions.  They provide a clear and detailed description of their neuron model, perform a computational complexity analysis, interpret and discuss their learning rule from a Hebbian perspective, and perform a number of high-quality experiments.  Multiple datasets are used (Fashion MNIST, Neuromorphic-NMIST, and the Spiking Heidelberg Dataset), and standard errors are evaluated.  Real-world computational efficiency and sparsity is evaluated, and GPU-based speedup and memory improvements are reported.\n\nLimitations to this work were not sufficiently discussed here, however.  For example, one dataset used is Fashion-MNIST.  Typical performance scores are around ~90%+ for this dataset, while the methodology here achieves around 80%, though it is difficult to discern from the plot and no performance is stated.  This can be problematic if sparse spiking gradient descent is proposed as an alternative to standard training: the difference in performance must be small in order for this to be a significant work.  A variety of modified training rules or even only-approximately-correlated feedback [1] and surrogate learning rules can be effective, or successful on simpler datasets, but struggle to scale to reach state-of-the-art accuracy [2][3].  \n\nThis is also true of more complex neuron architectures, whereas the architecture in this work is a three-layer fully-connected network.  As these are time-varying neurons, they are capable of quite complex computation, but an explicit evaluation against alternative architectures (LSTM, frame-based convnets, etc.) would allow a more realistic comparison point for the viability of sparse spiking gradients as a learning method.\n\nSimilarly, further baseline models or ablation studies would permit a better understanding of the sparse spiking gradient methodology.  For example, what if an equivalent random connected percentage (say 1-3%) of gradients were sampled and used from the full set of gradients?  Presumably, the most important gradients would be the ones that this work retains - those most relevant for around the spiking threshold - but this should be established in the work. How much worse would the method perform if a different set were chosen?  Additionally, as an ablation study, progressively widening the backpropagation threshold $Bth$ would provide valuable insight into the sparsity / accuracy tradeoff.\n\nFinally, I would like to see a more detailed description of the time-stepped / recurrent implications of this model.  Fashion-MNIST is not a time-varying input set, so it is artificially coded into the time domain via spike latencies; N-MNIST has built-in movement of the MNIST digits; and the SHD codes represents its output in the time domain.  Presumably, a natively recurrent model like the one presented here would perform best compared to standard architectures that would not appropriately process the time-varying inputs, and allow training tasks which would be difficult with a standard static neuron model.  Depending on the time-binning, it could be cost-prohibitive to train a model in any way other than sparsely, and such an analysis could reinforce those advantages.\n\nClarity: The clarity in this manuscript is to be lauded.  The authors take care to draft meaningful, clear, and consistent figures.  Their derivations include color-coded term groupings to clearly discuss them in text that persist whenever term groups are discussed.  Sufficient details are reported for a reader to reproduce their work, and the real-world systems which they use are well described.\n\nSignificance: the primary motivation of this training method are to achieve improvements in efficiency and a reduction in computation, a topic of general interest.  Specifically, though, this method delivers substantial advantages for spiking applications, a more niche research area, with particularly strong applicability to the neuromorphic community.  In real-world speedups of training on spiking data, GPU training on the backward pass can be a substantial 70x faster, and be 40% more memory efficient.  These are valuable improvements, but these datasets are not yet representative of real-world usage or state-of-the-art computer vision, so the work is of more specific interest specifically to these niche communities.\n\nOverall, this work contains multiple strong contributions, but the performance gap between state-of-the-art methods on the datasets and the performance measured here, the simpler neural network architectures, and the lack of a rigorous baseline to examine the impact of their simplification makes it challenging to assess whether future research can rely on the method introduced here to achieve sparse computation without sacrificing performance.  \n\n1.  Lillicrap, Timothy P., et al. \"Random synaptic feedback weights support error backpropagation for deep learning.\" Nature communications 7.1 (2016): 1-10.\n2. Lee, Jun Haeng, Tobi Delbruck, and Michael Pfeiffer. \"Training deep spiking neural networks using backpropagation.\" Frontiers in neuroscience 10 (2016): 508.\n3. Wu, Yujie, et al. \"Spatio-temporal backpropagation for training high-performance spiking neural networks.\" Frontiers in neuroscience 12 (2018): 331.\n\n\n---- \nAfter rebuttal:  I thank the authors for the interesting additional experimentation, and have raised my score in accordance with the more complex architectures and continued sustained performance.", "summary_of_the_paper": "", "summary_of_the_review": "", "strength_and_weaknesses": "", "limitations_and_societal_impact": "This reviewer identifies no specific negative societal impacts from this work.\n\n", "review_text": "", "extra_scores": {"ethical_concerns": "This reviewer identifies no ethical concerns.\n\n", "needs_ethics_review": "No", "ethics_review_area": "", "time_spent_reviewing": "4"}, "extra_text": {}}]

Author rebuttal:

Meta-review: Dear authors, 

congratulations on your submission being accepted at Neurips.  The reviewers appreciated the sparse BP algorithm for speeding up training of spiking neural networks, and agree that it would be of interest to the Neurips audience. However, they also included feedback and constructive criticisms which we would ask you to include in your final version, in particular regarding limitations of the approach on large data sets due to memory limitations (linear scaling with number of steps). It would be ideal if you are able to include stronger empirical results on more complex data-sets in the final version. 

Best, your AC 
Decision: Accept (Poster)