Exploring Loss Functions for Time-based Training Strategy in Spiking Neural Networks
Authors: Yaoyu Zhu
Wei Fang
Xiaodong Xie
Tiejun Huang
Zhaofei Yu
Venue: NeurIPS 2023 spotlight (2023)
Keywords: Spiking neural networks
Spike encoding
Time-based training

Abstract: Spiking Neural Networks (SNNs) are considered promising brain-inspired energy-efficient models due to their event-driven computing paradigm.
The spatiotemporal spike patterns used to convey information in SNNs consist of both rate coding and temporal coding, where the temporal coding is crucial to biological-plausible learning rules such as spike-timing-dependent-plasticity.
The time-based training strategy is proposed to better utilize the temporal information in SNNs and learn in an asynchronous fashion.
However, some recent works train SNNs by the time-based scheme with rate-coding-dominated loss functions.
In this paper, we first map rate-based loss functions to time-based counterparts and explain why they are also applicable to the time-based training scheme.
After that, we infer that loss functions providing adequate positive overall gradients help training by theoretical analysis.
Based on this, we propose the enhanced counting loss to replace the commonly used mean square counting loss.
In addition, we transfer the training of scale factor in weight standardization into thresholds.
Experiments show that our approach outperforms previous time-based training methods in most datasets. 
Our work provides insights for training SNNs with time-based schemes and offers a fresh perspective on the correlation between rate coding and temporal coding.
Our code is available at https://github.com/zhuyaoyu/SNN-temporal-training-losses.

Exploring Loss Functions for Time-based Training Strategy in Spiking Neural Networks
Yaoyu Zhu
Wei Fang
Tiejun Huang
School of Computer Science
School of Computer Science Peking University Beijing, China 100871
School of Computer Science
Peking University Beijing, China 100871 yaoyu. yaoyu.zhu@pku edu. cn
Peking University
Beijing, China 100871
brei@pku..e edu. cn
tjhuang@pku. edu. cn
Xiaodong Xie
Zhaofei Yu
School of Computer Science Peking University Beijing, China 100871 donxie@pku. edu. cn
Institute for Artificial Intelligence
Peking University
Beijing, China 100871
yuzf 120pku edu. edu. cn
Abstract
Spiking Neural Networks (SNNs) are considered promising brain-inspired energy- efficient models due their event-driven computing paradigm. The spatiotemporal spike patterns used to convey information in SNNs consist of both rate coding and temporal coding, where the temporal coding crucial to biological plauusbble learning rules such as hane-iiiinn--deedeee----lllatsse strategy is proposed to better utilize the temporal information in SNNs and learn in an asynchronous fashion. However, some recent works train SNNs by the time- based scheme with waw--coodnddiinnne map rate-based loss functions to time-based counterparts and explain why they are also applicable to the time-based training scheme. After that, we infer that loss functions providing adequate positive overall gradients help training by theoretical analysis. Based on this, we propose the enhanced counting loss to replace the commonly used mean square counting loss. In addition. we transfer the training of scale factor in weight standardization into thresholds. Experiments show that our approach outperforms previous time-based training methods in most datasets. Our work provides insights for training SNNs with time-based schemes and offers a fresh perspective on the correlation between rate coding and temporal coding. Our code is available at httt:://gihuub..om///yyayyyuuu/ teeeooo training-lossed
The time-based training
loss functions. In this paper, we first
Introduction
Artificial Neural Networks (ANNs) have achieved remarkable progress in various fields, such as computer vision 233, natural language processing [58], and reinforcement learning [5T]. Compared with the conventional non-spiking ANNs, Spiking Neural Networks (SNNs) exhibit a greater level of biological plausibility
(65) and achieve significantly improved energy efficiency on neuromorphic
chips 17
17 37
49 The benefit of SNNs on computation cost and power consumption originates
from their event-driven nature to a large extent [47].
ANNs use real values to encode the state a neuron. This encoding scheme similar to the firing rate of biological neuron. Inspired by this encoding scheme, researchers have applied ANN-SNN
Corresponding author
37th Conference on Neural Information Processing Systems (NcurIPS 2023).

---

conversion to obtain the parameters of SNNs 7 22 52.. Unlike firing rate coding, temporal coding unique feature of SNNs (compared with ANNs), which utilizes the temporal information of spikes in SNNs and encodes information by the absolute and relative firing times between spikes. The most commonly used temporal coding in SNNs is ome--to-frst-sppe which encodes the information by the firing time of the first spike emitted by neuron. Although the encoding schemes in SNNs are richer than ANNs, directly training SNNs is harder than ANNs due to the binary nature of spikes and the oin-eeffereeti membrane potential at spike time. Therefore, SNNs has not reached the performance of their ANN counterparts in classification tasks 10 63
(TTFS) coding [ 19 67],
There are two major categories of supervised learning techniques to train SNNs; activation based learning, which treats SNNs as binary-output recurrent neural networks (RNNs) and uses packpropagation-thronn through-timg (BPTT) to train SNNs [2 16 19 59]. The main difference between training SNNs and RNNs with these methods that they apply continuous surrogate deriva- tives to substitute the discontinuous spike firing process [40]. Although competitive performances are achieved on the CIFAR- 1 00/00,, and even the ImageNet dataset [T] 14, these methods do not follow the asynchronous nature of SNNs. Firing-rate-basee coding is intensively used in these approaches. In the output stage, the commonly used loss functions include spike-train-based ones [50 64], spike- count-based ones [59] 66), and those defined on discrete time steps 11155 All these loss functions behave in a rate coding scheme and have no direct relation to spike firing time (which indicates tem- poral coding). The second category is spike-time-bel
The first category
learning, which considers spikes' timing as an information carrier for parameter update in SNNs [3 8 61. They are more biologically plausible since they keep the event-driven nature of biological learning rules [69]. Originated in SpikeProp [3), researchers try to solve the discontinuity at spike firing time and gradient vanishing/explosiin backpropagation. In the output stage, most of them use mase- loss functions [8 66]. which is
in
consistent with the temporal coding. However, loss functions not belonging to the temporal coding
family can also successfully train SNNs with time-based gradients [67 69 not yet been clearly explained.
This phenomenon has
In this work, we investigate the relationship between rate coding and temporal coding by analyzing the loss functions that correspond to both coding schemes applied in time-based training algorithms. Besides, we study how to improve the performance of time-baset training methods with appropriate loss functions (as well as other mechanisms). Our main contributions can be summarized as follows:
1. We prove that rate-based loss functions, extensively used in activation-based SNN training, suit the more biologically plausible time-based training scheme. This result implics that there are implicit relations between rate coding and temporal coding in SNNs.
2. We find that loss functions providing adequate positive overall gradients are more suitable for based training schemes in SNN training. Based on this, we propose the enhanced counting loss to improve the previously used mean square counting loss.
3. We transfer the training of scale factor used by weight standardization into thresholds. Experiments have shown that this action improves network performance.
4. We test our method on MNIST, Fashion-MNIST, NMNIST, CIFAR1O, CIFAR100, DVS- Gesture, and CIFAR 10-DVS datasets. The proposed method achieves SOTA performance around time-based SNN training methods on most datasets.
2 Related Work
Neuron coding scheme. Spike timing information provides SNNs with richer coding schemes than non-spiking ANNs, which can be grouped into three main types: rate, temporal, and burst. Rate coding encodes information by firing rates of neurons (57). which is widely used in SNN
training 7 [0 Temporal coding shown to convey richer and more precise information than rate
coding [35 53 54), which can be classified into time-toffirst-spkk (TTFS) (55), rank-order [56], and
phase coding 26). Among them, the most commonly used scheme is the TTFS coding 3
39 43
67],
which can be applied to both the network input and neuron output. When applied to network input, it converts static pixel intensity into spike firing time (higher intensity corresponds to earlier input spike time) [66] 68). When encoding the neuron outputs, it takes the timing of the first spike a neuron fires as the feature of neuron 3 68). Besides, several recent works explore burst coding, a group of short inter-spike interval spikes, to improve the efficiency of information transmission and enhance the performance of SNNs (42. Some works also extend the temporal-based ronk-order coding into ANNs (25). bringing forward the time of decisions of ANNs without trading off accuracy.

---

Training methods of SNNs. SNN learning methods mainly include ANN-SNN conversion and direct training. ANN-SNN conversion assists SNN training with ANNs, which trains an ANN and replaces its activation functions by spiking neurons with transformed weights to get an SNN 77. The converted SNN can achieve comparable performance as the source ANN when simulated long enough [5] 12 21
[3 4S]. whereas degrading seriously when the number of time steps is small [6]. Direct training mainly falls into two categories. The first category is activation-based training, which regards SNNs as RNNs and trains them with the Backpropagation Through Time (BPTT) method [ I 20
59 60 64]. Surrogate gradients [40] are used in this scheme to handle the discontinuity when neurons emit spikes. SNNs trained in this fashion can be scaled to large datasets like ImageNet (14) with low latency. They can deal with temporal tasks such as classifying neuromorphic datasets [TI] while relying rate coding: The loss function and gradient propagation scheme modify synaptic weights by modifying the firing rate of neurons. Specifically, the loss functions they includes ppine-train-based losses (50] 64), spike-count-based losses [59] (0), and those defined on discrete time steps [1 [5], among which losses defined on discrete time steps empirically perform better. The second category is time-based training, which takes the spike firing times as the intermediate variable to update synaptic weights (3. Most algorithms in this track approximate the derivative of output spike timing to membrane potential diout as the
36
du
negative inverse of membrane potential's ' time derivative du/di B
38
66
67 69]. Some works
use other approximations (27, while others directly derive the relation between output spike firing times and input spike firing times 39]. Although this training scheme has not yet trained SNNs with comparable performance as BPTT-based approaches, they satisfy the asynchronous nature of SNNs 69 and better utilize temporal coding in SNNs. In addition to the spike timing of neurons used in the backward calculation, the loss functions adopted in this scheme
typically time-based
losses 3 38 39 66]. However, other loss functions can also successfully train SNNs with
gradients 67 69. This leaves question: Why can rate-coding- ooding-based based losses successfully be applied in the time-based training scheme? We will analyze this question in the following content.
3 Preliminaries
Spike response model. In this work, we use the spike response model for the neurons in the Spiking Neural Network. The state of neurons can be described by the following equations 3 [8
67
u:
(n) (t) f
Σ
(1 (T) wiy sj
(n)
ce(t r)dT,
(1)
(m) (t) 8(u, (16) 0),
5;
(2)
(n) denotes the weight where u: (n) (1) denotes the membrane potential of neuron in layer at time 1, wi
between neuron j in layer 1 and neuron i in layer n. (x)
i,lnst is the time of last spike of neuron in
layer n, and s(") (t) represents the spike emitted from neuron i time t. The function 8(.) is the Dirac Delta function and 0 is the firing threshold. The spike response kernel is <(t) = T..
Fm (e Fm - ).
where Tm and т2 are membrane and synapse time constants, respectively. Following [67| 69), we climinate the influence of input spikes prior to the last output spike on membrane potentials.
Backpropagation based on spike timing. The backpropagation formulas in the time-based training scheme are given by [69]
AL
OL Ola(s!")) o (d))) (x (n)) ou (1x) Oug (N)
(3)
(n)
ØL
Σ OL Obe(s!")) (tx)
06m (8)
( Ot4(s,")) ouj"" (1x) Omm (s) (1)
where I. is the loss function, 14 (x(() and Im (s/ (m/m-1)) are timings of spikes (()) (by neuron i in layer
n) and 8 (n-1) (by neuron j in layer n 1), u; (m) (14) is the membrane potential of neuron i in layer at time tR. and wiy)
(n) is the synaptic weight between neuron in layer and neuron j in layer n 1.
3

---

d
A(6]
Altu
4,66]
4/6]
Sa(e,)) La(e)) ta(s,)
(.())) tad (w((s))
Time
Time
Time
Spike
No Spiki
G Grallenn direction
Gradient direction
Figure 1: Forward and backward processes in activation-based training schemes and time-based training schemes. (a) Forward and (b) backward propagation in activation- -aased schemes: In the backward stage, the loss function updates parameters to adjust the firing rate. (c) Forward and (d) backward propagation in time-based schemes: In both forward and backward stages, information is delivered by spikes, which accords with the asynchronous nature of SNNs. The parameters are updated adjust the firing times in the backward stage.
Figure (c) shows the gradient propagation path in Eq. 3 and It starts from the loss function and propagates to spike firing times (s:) of neurons, neuron membrane potentials spike times u, (1x), and synaptic weights Wij in each layer. There are three major derivatives: output spike timing
0t, (sf) membrane potential to input spike timing 00x(s)
(t.((e) and membrane
to membrane potential
Bug (fx)
potential weight
Ou. (tx)
Dhey The latter can be directly derived since the original function (Eq. (I)
continuous. The first derivative needs to take an approximation due to discontinuity at spike time:
Ot (sp))
(5)
Oul (tx)
du. (tx)/dt
which is first proposed by Spikeprop K and followed by many other works 38 proved that the sum of time-based gradients does not change between layers during backpropagation based on the above gradient calculation approach [69]:
67
69
has been
ΣΣ
t (s) = ΣΣ I'
ÔL
OT
(n @t (m
Therefore, for time-based gradients, the derivative of spike firing time with respect to the loss function equipped with more useful properties than the loss function itself. In other words, is natural to view the loss function from the aspect of the gradients spike firing times.
4 Methods
Here we first establish a framework to relate the gradients the spike train to spike firing time for the output layer in Sect. 4.1 and 4.2. Starting with this framework, will show how to view rate-based losses (defined on spike trains) as lime-based losses (defined on spike firing times) with two examples, the rate-based counting loss used by [69 and spike train loss used [67]. Sect. 4.3 analyzes the influence of overall gradients on spike timing on the SNN performance. Based on our analysis, infer that loss functions providing adequate positive overall gradients for time-based training schemes. Formulated by this inference, we propose the enhanced counting loss in Sect. 4.4. In Sect. 4.5, propose to transfer the training of scale factor used by weight standardization into thresholds since threshold values do not appear in backpropagation formulas. At last, will provide an overall algorithm description in Sect. 4.6.
suitable
4.1 Relate Gradients of Spike Train to Spike Firing Time
Unlike time-based losses defined on spike firing times, a rate-based loss T. is defined on the output spike train instead of the firing times of the output spike train t(s). As result, the spike train itself

---

should be an intermediate variable to pass the gradients, and a derivative from s to t(s) should be defined in the backpropagation stage:
0L
0L
as at(s)
0t(s)
0s
Note that aL is defined by the loss function itself, but 0s is somewhat custom. Hence we add Øt(a)
limitations on the derivative Øt(=)* First, gradients should not propagate from one spike to the timing of another spike, which means 0 (x() [*y))) * only if = 1' and t'. Here J ((()) means converting an infinite Dirac delta spike s;(() to a finite value 1. Hence the derivative of the timing of one spike is
Bs
ØL
aL
0 0f stttt)
(8)
(s;)
à f stt)))
(tx
Second, noticing there are still two degrees of freedom afa(())))
OL
0 0 [sttte)) when calculating the and
(5.)
gradient, we can control one of them to set 0 ((((t))
=1
8tu(ss)
8 (((tt) to take value -1 Sect. 4.2 and 4.4 (ty
However, for ease of understanding, we will allow
4.2 Why Can Rate-coded Losses be Applied in The Time-based Training Scheme?
Actually, rate-based loss functions have their time-based counterparts. For rate-based loss L, there is time-based loss L that has the same derivation, that is, [ex( (s,)' We first consider the case when loss functions do not involve spike timing in their expressions and have the following theorem: Theorem 4.1. For rate-based loss function L(s) which does not involve spike liming, with spike-to- trike-to-timing timing derivative Bt(a) ding( (tg(ss) aL (s:)s) defined the timing of spikes.
ac ør.
as
0. sc(tu)) where (ss,t)) takes all neurons and spikes,
it has an equivalent form L(t(s)) = E. Ene @s.(te)
The detailed proof is provided in the Appendix. With Theorem 4.1, we can analyze why rate-based losses can be applied the time-based training scheme.
Counting loss. The counting loss is commonly used for activation-based gradients 59 the condition in Theorem 4. It has the form:
60
satisfies
L(s, target) = = (1% si(t)dt s:(t)dt-targel target,
I=1
Here À scaling constant, and C' is the number of classes (which equals the number of output neurons). Besides, target is the target spike count sequence, and target, is the target spike number fired by neuron Typically, target, is bigger when i corresponds to the label. According to Thcorem
4.1 the equivalent time-based loss function of the counting loss (when all 8 8fs,lt =1) is
(Tx(
aL (tt)) (e(e.)
(x)) Σ ΣΣ 21 (1,"
c(t(s))= =
st()) (t ttagett
(st).
(10)
(c(es)
The detailed deduction is provided in the Appendix. The equivalent temporal-coder loss L is linear for each spike firing time 4 (*:). It encourages a spike to fire earlier when the number of fired spikes Oc of the corresponding neuron exceeds the target Dt. (=:) 0 when 1"' (t))dt target, > 0) and fire
later when the spike count is below the target. This actually contrary to our expectations. The [[((())) = - 11, which is adopted by [69]. As result, our analysis framework not only explains why counting losses works for time-based training
simplest way to fix it is modifying 0 ((((() = 1 to (t,)
(ax)
(()())) -1 is necessary.
but also shows why dlg(s()
Spike train difference loss. The difference between spike trains [46] is also widely used in activation- based SNNs 29 50 64). It can be described by the following formula:
C
L(s, g larget) = A Σ
K (8: -s,
s(oree)) dt.
(11)
1=1
5

---

Desnnd
Doind
Dwirdd
Dosind
Cpps
Outut
Odpe
Figure 2: The spike train difference loss. It aims minimize the difference (purple area) between the (filtered) output spike train (red curve) and the target spike train (dashed curve). The kernel here is x(() = ar. eatt (c) are four different situations, where the output pushed upward (a)(c) and downward in (b)(d) by the loss. Note that the desired output spike train is empty in (d).
Here, strgget is the target spike train for output neurons, and 8; jarget the target spike train of neuron Typically the target spike train of the neuron corresponding than other neurons. is a 1-d convolution kernel to smooth the spike trains. Theorem [4. can't directly apply due spike timings being involved in the loss function, making difficult find its corresponding temporal-coded function. Instead, we apply qualitative analysis to it.
the label contains more spikes
The spike train difference loss measures the height difference between two filtered spike trains, as shown in Figure 2] Sometimes we can find inconsistencies for in the time-based training scheme: In both Figure (b), the spike should be moved carlier the time axis. However, spikes will be moved in different directions (minimizing the purple area by moving up or down since it acts on spike scale 8; (x())) in two cases under this loss. This spike direction inconsistency will impede training. On the other hand, the target spike train is dense enough and covers all time ranges (Figure (c)), the spike will always be pushed upward when the output spike train is sparse. Meanwhile, it is clear that output spikes of a neuron will be pushed down when the target spike train is empty (Figure ( In both cases (c), there are inconsistencies. As result, can also correspond turning spike scale 8 {f.((t) up with moving spike time earlier and let (e.) - in this case. Our analysis explains why spike train difference loss works for time-based training and why 0. st(t) (1.
adopted in 667
4.3 Balance Positive and Negative Time-based Gradient
According Eq. (6, the positive part and the negative part of time-based gradients should be balanced to control the sum of gradients since they keep unchanged among layers.
Deficiencies of counting loss. The derivative a (:(a)) ff
-1 will cause the sum of gradients spike timing to comprise too much positive portion near convergence, especially when the target number of spikes for label neurons is large. To see this, according to Eq. (8). supposing a label output neuron emits spikes, then the total gradients on these spikes are:
(t,(s;)
aL
aL Ot,, (s:)
2Am m))
(12)
(s,(s:)
laceell
Here 'label' is the index of the labeled neuron, and txp (s;) is representative spike timing since all ]ta[s,]
AL are equal. The detailed proof is provided in the Appendix. This gradient sum on label output neurons is a quadratic function of the number of output spikes which provides too much positive gradient on spike timing when m is large.
Positive sum of gradients on spike timing, When the network is nearly converged, output neurons corresponding the labels often emit much more spikes than other neurons, which implies that significant than
the slope of membrane potential du for these neurons spike time is usually others. As a result, the 3u part on gradient propagation path (refer to Figure 1 for label neurons is smaller than others in scale (but their signs are both negative). If the sum of gradients is exactly zero, the weights in the last layer will receive more positive gradients than negative ones, leading to decreasing weights in the last layer. This effect will inhibit output neurons from emitting spikes.
di
#t

---

Therefore the change in the weight scale will influence the gradient backpropagation by changing un(() in 17 However, threshold values not appear in the above backpropagation paths. Thus, learning thresholds instead of weights might stabilize the training process. In forward formulas 4.4 Enhanced Counting Loss
Based on the analysis in Section we infer that loss functions providing adequate positive overall gradients are more suitable for lime-based training schemes. Building upon this conclusion, we introduce novel loss function optimize network training. Since the counting loss (used in (69] provides too much positive gradient on spike timing when the label output neuron emits many spikes, it is more adequate to let (t,(te)
8L be a linear function 2A(target; - m) instead of a quadratic
(8))
function 2Am m) in Eq. [12
To do this, suppose neuron fires m spikes,
substitute 2 The form of this modified loss function is
@L(m) = 2(m target,) with @L(m) dm
dm
L(s, target)
22
Es
(t(t), target,
(13)
==1
target In(x),
>
where fa, target)
(14)
0,
x 0
with derivative [tg(5,]
(f)((
1. We name the loss as enhanced counting loss. The detailed
equation-deducing procedure is provided in the Appendix.
4.5 Moving Scaling Weights to Thresholds
In previous works, weight standardization 45 is used 66 to stabilize training since common normalization schemes [24] are not applicable in asynchronous networks. The weights of a layer are decided by three sets of parameters W,7; 7, 89 which correspond to the original weight, scale, and shift:
(ir(k) (h) F(
w²(k) (1) 17-(0) ((4))
(15)
V Var[W +
Here (R) means the k-th channel of x, (K) is the normalized weights for Wh), and the final weight W goes through linear transform with the scale ((*) and shift g(k), In time-based training
(Figure [))d)), weights participate in backpropagation by passing gradients from output spike timing
to membrane potential and then to input spike timing of a neuron. According to Eqs. (2) (5). have:
(5(" ou, (t+)
-1
Σ
(tx)
(16)
dul dul" (tx)/tt
SiCk ) (6- (mm(s(-1))
sta(
Ou: (1) (1x)
de(1x - (m)
w (1)
(17)
0t 111)
atm
Eqs. (T) (2). scaling up weights (n))) and thresholds 0 by the same factor will not change the output spike train. The weight scale determined by y and 8, so we can transform keep constant and learn 0:
((0)
((K) g(0) g(K) + 7((
To
30
((0) (1) + 70-
(18)
where "o is the value we want to fix 7 to. When doing parameter updates, denote dr(k)
,. and
8L
BL the parameter update rule after the above transformation can be described by: (b) aguej
((A)
()()) = d( To ((x)) = (14)
70 (N)
7(5) dr
(19)
bow
(n(k))z
dr = =d,(k) (8())
d,(()) new
= d( 7o
g(8)) = 71
dz(k)
+ B(k))
-7 (7(1))22
7(k) (7)
(20)
7(k)
(k)
7

---

It should be noticed that the value of 7 will be unchanged (always equal to ro) during learning after this transformation. During learning, parameters to be learned and where ((k) 0(k) +yd0 how and ((k) t 3(k) + ndd
4.6 Overall Algorithm
Algorithm 1 Discrete Version of Our Algorithm
s Input spike train, W (n 1,,,,, N): Weight for all layers (where N is the number of layers), Total simulation time
Input:
Output: VW (n N)
// Forward propagation: Initialize N Newron" (n L, I,... N): Neurons with states (membrane potential parameters) for all layers for to N do
= to Update state of Neuron (++1) according to Eq.
do
if Membrane potential u (1) 2 then
Fire spikes
(t =
Reset state of Neurom(n+))
end if
end end for
// Backward propagation:
Initialize VW(n)) +- 0, 3)(a)" +- 1,2,
8L
az Calculate a)(e)x according to Eq. 14
for = do
for - T 1 to 0 do
if s (()) (f) then
Spikes fired
ac Set Sut Reset At
is part of Eq. 3
(e(a(o)) (1))
else
Set At At +1
end if
and
Grg Jefain-Da
(n both involve c(Att where e(-) is the spike response kernel
OWint
Set (W(M)
(W(")
> Eq.
Buin)
@Wis)
BZ Set
9r Puein
By
Eg
86(ain-11)
end for Update 9, 3 according to Eq. 19 end for
20 well as W using (W(n)
Algorithm describes overall algorithm. Our algorithm works in discrete time-steps here since it suits better for current deep learning frameworks such as Py Torch.. The main training and inference workflow follows [69]. The enhanced counting loss is in the beginning of the backward propagation and the transfer of training from scaling factor to threshold is embodied the second last line.
Experiments
We conduct experiments on MNIST 31] Fashion-MNIST 62 NMNIST 41, CIFARI0/100 (3)]
DVS- DVS-Gesture [1], and CIFAR10-DVS
32 datasets to evaluate the performance of our method.
The methods we compare are Spiking Neural Networks trained with time-based gradients carried
by spikes, including TC [39]. ASF & S4NN (27). BS4NN (28), STiDi-BP [38], STDBP [66].
TSSL-BP(67),, and EDBP [69]. All experiments are run on single Nvidia RTX 3080T\/3090 GPUs.
The implementation details are provided in the Appendix.
5.1 Compare with the State-of-the-AAr
We first compare our method with current state-of-the-art time-based SNN training approaches. Table. [ reports the results MNIST, Fashion-MNSS N-MNIST, CIFAR1O, CIFAR100, DVS-

---

Table 1: Performance comparison MNIST and CIFAR-10/100 datasets
Datasct
Model
Gradient Type
Architecture
Accuracy
TC: [39
Temporal
784-800)
97.5%
ASF
8
Temporal
784-340
97.9%
S4NN
27
Temporal
784-600
97.4%
BS4NN
28
Temporal
784-600
97.0%
STiDi-BP BP
38
Temporal
784-500
97.4%
MNIST
STDBP
66
Temporal
16CC-PP-32C5--2--800-222
99.4%
TSSL-BP
66
Temporal
15C5-PP2-4CC5-22-00
99.53%
EDBP 69
Temporal
1SCC5-P2-40C5-P2--00
99.47%
ANN
1SCS-P2-40C5--P2-00
99.50%
Ours
Temporal
ISC:5P22-40C5-P2-300
99.50%
S4NN 27
Temporal
784-1000
88.0%
BS4NN 28
Temporal
784-1000
87.3%
STDBP 66
Temporal
IGC5-P2-32C5-P2-80000
90,1 10.1%
Fashion-MNIST
TSSL-BP 67
Temporal
32CS-P2-64C5-P2--022
92.83%
EDBP 69
Temporal
32C5-P2-64C5-P2
93.28%
ANN
32C5-P2-64CS-P2--022
93.94%
Ours
Temporal
32C5-P2-64C5-P2 P2-1024
94.03%
TSSL BP 667
Temporal
I2C5-P2-64CS-P2
99.40%
N-MNIST
EDBP 69
Temporal
12C5-P2-64C5-P2
99.39%
Ours
Temporal
P2C5-P2-64CS-P2
99.39% %
TSSL-BI 66
Temporal
CIFARNet
91.41%
EDBP 69
Temporal
VGG11*
92.10%
CIFAR1O
ANN
VGGII
94.51%
Ours
Temporal
VGGIT
93.54 %
EDBP 66
Temporal
VGGTI
63.97%
CIFARI00
ANN
VGG11
74.23%
Ours
Temporal
VGGII
70.50 %
DVS-Gesture
Ours
Temporal
VGGII
97.22 %
CIFARTO-DVS
Ours
Temporal
VGGIT
76.30% %
a 15CS: convolution layer with 15 channels of x 5 filters; P2: pooling layer with 2 x filters
b The detailed network architectures are provided in the Appendix (section Experimental Settings)
Gesture, and CIFARIO-DV'S datasets. It should be noticed that we do not list BPTT-based methods here since they make use information when neurons do not fire spikes in the gradient propagation, which certainly benefits the training process and the final performance. On the easy MNIST and N-MNIST datasets, the performance of our algorithm is comparable to those of TSSL-BP BP (67 and EDBP 699. The improvement is not noticeable as the performance is saturated (> 99%). On other datasets, our algorithm evidently outperforms other time- based SNN training algorithms. For the MNISTT dataset, algorithm outperforms the previous time-based SOTA algorithm [69] by 0.75% For the CIFART 10 dataset, we achieve 93.54% top-1 accuracy with a VGG11 network, outperforming EDBP 669 by 1.44% with the same network architecture. Besides, have achieved 70.50% accuracy on the CIFARIO6 dataset, outperforming the previous SOTA SNN trained with time-based scheme by more than 6% with the same architecture. In addition, we are the first time to train SNNs with time-based schemes on both the DVS-Gesture and CIFAR 10-DVS datasets, achieving 97. 17.22% accuracy the DVS-Gesture dataset and 76.30% accuracy the CIFARIO-DVS dataset. All these results demonstrate that the proposed method outperforms the state-of-the-ar accuracy on nearly all datasets.
5.2 Ablation Study
In this section, study the effects of proposed loss function and normalization scheme on the network performance. We select EDBP [69 as the baseline in our ablation experiments, which uses counting loss and weight normalization. The performance of SNNs with different loss functions and normalization schemes is illustrated in Table. 2 and Figure 3(a) It can be seen that the proposed enhanced counting loss outperforms the original counting loss on CIFAR100
large extent. We achieve 68%95% top-1 accuracy, which is higher than the baseline by 4.97%. At the same time, our proposed threshold normalization scheme is also effective in increasing the network performance.

---

1.20
needing Uneivlls
60
Sua Gledin Vilao
misueol viili
coeatig Sondek -chanee- Sacee---gg sage
calannd Hlaokala
norrding thiioads
coteting finddad
R30
mouzees Spooeedo
ostareed thootaa
30
(a)
(b)
(c)
(d)
Figure 3: Ablation results. (a) Test accuracy along with training epoch index. (b) Accumulated sum of absolute gradient values along with training epoch index. (c) Accumulated sum of gradient values along with training epoch index. (d) The ratio of positive gradients along with training accuracy. In the figures, the blue line indicates the counting loss and threshold normalization scheme; the green line indicates the enhanced counting loss and weight normalization scheme; the orange line indicates the enhanced counting loss and threshold normalization scheme.
To further illustrate how our proposed methods help the network training, we analyze the gradi-
Table 2: Ablation study on the CIFAR-100 dataset
ent scale as well as the ratio of positive gradients. Figure3]jb plots the gradient scale described by
Loss Function
Normalization
Accuracy
Count (MSE)
Weight
63.98%
the L1-norm of gradients, which is the sum of
Count (MSE)
Threshold
66.35%
the absolute gradient value. Also, provide the sum of (not absolute) gradient values in Fig- ure c). Both values are plotted against the number of training epochs, and they are both accumulated through epochs. From the figures, we
Enhanced
Weight 68.95%
Enhanced
Threshold 70.50%
find that the enhanced counting loss greatly reduces the overall scale of gradients. Besides, the proposed threshold normalization scheme also slightly reduces the overall gradient scale.
We also show the ratio of positive gradients among all gradients in Figure. d). It should be noticed that we do not plot against the epoch index, instead, we plot it against the network training accuracy. The underlying reason is that this ratio is largely influenced by the ratio between the number of spikes that label output neurons emitted and other output neurons emitted. The spike emission status comparison between label neurons and other neurons in the output layer can be better described by the network training accuracy compared with the epoch index, especially when the convergence rates do not accumulate gradient data in this figure since
in different settings are different. Besides, want to get the information in each epoch. From this figure, we can see that in most cases, gradients trained with the enhanced counting loss and the threshold normalization scheme are more balanced (closer to 0.5 in the figure). There is a rising tendency for the proportion of positive gradients with the convergence of the network, which influenced by more spikes emitted by label output neurons. In the very beginning, the negative part of gradients is much larger than the positive part. Oppositely, the overall gradients mainly consist of the positive part near convergence.
Conclusion
In this paper, we demonstrate the applicability of rate-coding- based loss functions to time-based training. We analyze loss function properties, introducing the enhanced counting loss to replace mean square counting loss. Furthermore, we transfer scale factor training in weight standardization to thresholds. Experiments show significant network performance improvements on datasets like CIFAR 100, achieving state-of- the-art results most others. While we've made notable progress, there's 's potential for further research into the optimal positive gradient ratio during training and the effectiveness of loss functions for SNN training in the time-based scheme. Additionally, extending our approach to ANNs, as demonstrated in 255, holds promise.
7 Acknowledgements
This work was supported by the National Natural Science Foundation of China under Grant No. 621 76003 and No. 62088102.
10

---

References
[1] Arnon Amir, Brian Taba, David Berg. Timothy Melano, Jeffrey McKinstry, Carmelo Di Nolfo, Tapan Nayak, Alexander Andreopoulos, Guillaume Garreau, Marcela Mendoza, et al. A low power, fully event- based gesture recognition system. In Proceedings of the IEEE conference on compuder vision and pattern recognition, pages 7243-7252, 2017.
[2] Guillaume Bellec, Darjan Salaj, Anand Subramoney, Robert Legenstein, and Wolfgang Maass. Long short-term memory and learning-to-learn in networks of spiking neurons. Advances in Neural Information Processing Systems, 31:795-805, 2018.
[3] Sander M. Bohte, Joost N. Kok, and Han La Poutré. Error- backpooaappoooiiooonnnn in temporally encoded networks of spiking neurons. Neurocomputingg 48( (8(1-4)177-7,, 2002.
[4] Olaf Booij and Hieu tat Nguyen. A gradient descent rule for spiking neurons emitting multiple spikes. Information Processing Letters, 95(6):552-558 2005.
[5] Tong Bu, Jianhao Ding, Zhaofei Yu, and Tiejun Huang. Optimized potential initialization for low-lateney spiking neural networks. In In Proceedings of the AAA! Conference on Artificial Intelligence, pages 1-20. 2022.
[6] Tong Bu, Wei Fang, Jianhao Ding, PengLin Dai, Zhaofei Yu, and Tiejun Huang. Optimal ANN-SNN conversion for high-accuracy and loa-ennnccy spiking neural networks. In International Conference on Learning Representations, 2022.
[7] Yonggiang Cao, Yang Chen, and Deepak Khosla. Spiking deep convolutional neural networks for energy- efficient object recognition. International Journal of Computer Vision, 113(1):54-66, 2015.
[8] Iulia-Maria Comsa, Krzysztof Potempa, Luca Versari, Thomas Fischbacher, Andrea Gesmundo, and Jyrki Alakuijala. Temporal coding in spiking neural networks with alpha synaptic function: Learning with backpropagation. IEEE Transactions on Neural Networks and Learning Systems, pages 1-14, 2021.
[9] Mike Davies, Narayan Srinivasa. Tsung- Han Lin, Gautham Chinya. Yongqiang Cao. Sri Harsha Choday, Georgios Dimou, Prasad Joshi, Nabil Imam, Shweta Jain, Yuyun Liao, Chit- Kwan Lin, Andrew Lines, Ruokun Liu, Deepak Mathaikutty, Steven McCoy, Arnb Paul, Jonathan Tse, Guruguhanathan Venkatara- manan, Yi-Hsin Weng, Andreas Wild, Yoonseok Yang. and Hong Wang. Loihi: A neuromorphic manycore processor with on-chip learning. IEEE Micro, 38(1):82 8:2-999, 2018.
[10] Lei Deng, Yujie Wu, Xing Hu, Ling Liang, Yufei Ding, Guoqi Li, Guangshe Zhao, Peng Li, and Yuan Xie. Rethinking the performance comparison between SNNs and ANNs. Neural Nenworks, 121:294-3282 307, 2020.
[11] Shikuang Deng, Yuhang Li, Shanghang Zhang, and Shi Gu. Temporal efficient training of spiking neural network via gradient re-wetihting. In International Conference on Learning Representations, 2021.
[12] Jianhao Ding, Zhaofei Yu, Yonghong Tian, and Tiejun Huang. Optimal ann-snn conversion for fast and accurate inference in deep spiking neural networks. In International Joint Conference on Artificial 2021.
Intelligence, pages
[13] Chaoteng Duan, Jianhao Ding, Shiyan Chen, Zhaofei Yu, and Tiejun Huang. Temporal effective batch normalization in spiking neural networks. Advances in Neural Information Processing Systems, 35:34377- 34390, 2022.
[14] Wei Fang. Zhaofei Yu, Yanqi Chen, Tiejun Huang, Timothée Masquelier, and Yonghong Tian. Deep residual learning in spiking neural networks. Advances in Neural Information Processing Systems, 34:21056-21069, 2021.
[15] Wei Fang, Zhaofei Yu, Yançi Chen, Timothée Masquelier. Tiejun Huang, and Yonghong Tian. Incorporating learnable membrane time constant to enhance learning of spiking neural networks. In Proceedings of the IEEE/CVF International Conference on Computer Vision, pages 2661-2671, 2021.
[16] Zenke Friedemann and Ganguli Surya. Superspike: Supervised learning in multilayer spiking neural networks. Neural Computation, 304):1514-1541, 2018
[17] Steve B Furber, Francesco Galluppi, Steve Temple, and Luis A Plana. The spinnaker project. Proceedings of the IEEF, 102(5)=652-665, 2014.
[18] Wulfirm Gerstner, Werner M Kistler, Richard Naud, and Liam Paninski. Neuronal dynamics: From single
neurons to networks and models of cognition. Cambridge University Press, 2014.
[19] Yufei Guo, Xuhui Huang, and Zhe Ma. Direct lcarning- based deep spiking neural networks: a review. Frontiers in Neuroscience, 17:1209795, 2023.
[20] Yufei Guo, Xinyi Tong, Yuanpei Chen, Liwen Zhang, Xiaode Liu, Zhe Ma. and Xuhui Huang. Reedis-snn: Rectifying membrane potential distribution for directly training spiking neural networks. In Proceedings of the IEEE/CVF Conference on Computer Vision and Pattern Recognition (CVPR), pages 226-335, June
2022.
11

---

[21] Bing Han, Gopalakrishnan Srinivasan, and Kaushik Roy. RMP-SNN: Residual membrane potential neuron for enabling deeper high-accuracy and low-latency spiking neural network. In Proceedings of the IEEE/CVF Conference on Computer Vision and Puttern Recognition, pages 13558-13567, 2020.
[22] Zecheng Hao, Tong Bu, Jianhao Ding, Tiejun Huang, and Zhaofei Yu. Reducing ann-snn conversion error through residual membrane potential. In Proceedings of the AAAI Conference on Artificial Intelligence. 2023.
[23] Kaiming He, Xiangyu Zhang. Shaoqing Ren, and Jian Sun. Deep residual learning for image recognition. In Proceedings of the IEFE conference on computer vision and pottern recognition, pages 770-778, 2016.
[24] Sergey loffc and Christian Szegedy. Batch normalization: Accelerating deep network training by reducing internal covariate shift. In International conference on machine learning, pages 448-456. PMLR, 2015.
[25] Alan Jeffares, Qinghai Guo, Pontus Stenetorp. and Timolcon Moraitis. Spike-inspired rank coding for fast and accurate recurrent neural networks. In International Conference on Learning Representations, 2022.
[26] Christoph Kayser, Marcelo A Montemurro, Nikos K Logothetis, and Stefano Panzeri. Spike-phase coding boosts and stabilizes information carried by spatial and temporal spike patterns. Neuron, 6744-56776 2009.
[27] Saeed Reza Kheradpisheh and Timothée Masquelier. SANN:
Temporal backpropagation for spiking neural networks with one spike per neuron. International Journal of Neural Systems, 30(06):2050027, 2020.
[28] Saeed Reza Kheradpisheh, Maryam Mirsadeghi, and Timothée Masquelier. BS4NN: Binarized spiking neural networks with temporal coding and learning. Neural Processing Letters, pages 1-19, 2021.
[29] Jinseok Kim, Kyungsu Kim, and Jae-Joon Kim. Unifying activation-and Liming-based learning rules for spiking neural networks. In Advances in Neural Information Processing Systems, volume 33, pages 19534-19544, 2020.
[30] Alex Krizhevsky, Geoffrey Hinton, et al. Learning multiple layers of features from tiny images. 2009.
[31] Yann LeCun, Léon Bottou, Yoshua Bengio, and Patrick Haffner. Gradient-based learning applied to document recognition. Proceedings of the IEEE, 86(1 1):2278 2324, 1998.
[32] Hongmin Li. Hanchao Liu, Xiangyang Ji, Guoqi Li, and Luping Shi. CifarlO-dvs: an event-stream dataset for object classification. Frontiers in neuroscience, 11:309, 2017.
[33] Yuhang Li, Shikuang Deng, Xin Dong, Ruihao Gong, and shi Gu. A free lunch from ann: Towards efficient, accurate spiking neural networks calibration. In International Conference on Machine Learning, 2021.
(34] Yuhang Li, Yufci Guo, Shanghang Zhang, Shikuang Deng, Yongqing Hai, and Shi Gu. Differentiable spike: Rethinking gradient-descent for training spiking neural networks. Advances in Neural Information Processing Systems, 34:23426-23499, 2021.
[35] Zachary F Mainen and Terrence J Sejnowski. Reliability of spike timing in neocortical neurons. Science, 268(5216): 1503-1506, 1995.
[36] Qingyan Meng, Mingqing Xiao, Shen Yan, Yisen Wang. Zhouchen Lin, and Zhi- Luo. Training high- performance low-latency spiking neural networks by differentiation on spike representation. In Proceedings of the IEEE/CVF Conference on Computer Vision and Pattern Recognition, pages 12453,, 2022.
[37] Paul A. Merolla, John V. Arthur, Rodrigo Alvarez-Icaza, Andrew S. Cassidy, Jun Sawada, Filipp Akopyan, Bryan L. Jackson, Nabil Imam. Chen Guo, Yutaka Nakamura, Bernard Brezzo, Ivan Vo. Steven K. Esser. Rathinakumar Appuswamy, Brian Taba, Amon Amir, Myron D. Flickner, William P. Risk, Rajit Manohar, and Dharmendra Modha. million spiking- neuron integrated circuit with scalable communication network and interface. Science, 345(6197):668 673, 2014.
[38] Maryam Mirsadeghi, Majid Shalchian, Saeed Reza Kheradpisheh, and Timothée Masquelier. STiDi-BP: Spike time displacement based error backpropagation multilayer spiking neural networks. Neurocomput- ing, 427:131-1400 2021.
[39] Hesham Mostafa. Supervised learning based on temporal coding in spiking neural networks. JEFE Transactions on Neural Networks and Learning Systems, 29(7):327-33255, 2017.
[40] Emre O. Neftci, Hesham Mostafa, and Friedemann Zenke. Surrogate gradient learning in spiking neural networks: Bringing the power of gradient-basee optimization to spiking neural networks. IEEE Signal Processing Maguzine, 36(6):51-63, 2019.
[41] Garrick Orchard, Ajinkya Jayawant, Gregory K Cohen, and Nitish Thakor. Converting static image datasets to spiking neuromorphic datascts using saccades. Frontiers in Neuroscience, 9:437, 2015.
[42] Seongsik Park. Seijoon Kim, Hyeokjun Choe, and Sungroh Yoon. Fast and efficient information transmis- sion with burst spikes in deep spiking neural networks. In 56th ACM/IEEE Design Automation Conference. pages 1-6. IEEE, 2019.
12

---

[43] Seongsik Park. Seijoon Kim, Byunggook Na, and Sungroh Yoon. T2fsnn: Deep spiking neural networks with time-to-fist-ssike coding. In 2020 57th ACM/IEEE Design Automation Conference, pages 1-6. IEEE, 2020.
[44] Jing Pei, Lei Deng, Sen Song, Mingguo Zhao, Youhui Zhang. Shuang Wu, Guanrui Wang. Zhe Zou, Zhenzhi Wu, Wei He, al. Towards artificial general intelligence with hybrid tianjic chip architecture. Nature, 572(7767):106-111 2019.
[45] Siyuan Qiao, Huiyu Wang. Chenxi Liu, Wei Shen, and Alan Yuille. Micro-batch training with normalization and weight standardization. arXiv preprint arXiv:1903. 10520. 2019.
[46] M. C. W. van Rossum. A novel spike distance. Neural Computation, 13(4):751-763, 2001.
[47] Kaushik Roy, Akhilesh Jaiswal, and Priyadarshini Panda. Towards spike-based machine intelligence with neuromorphic computing. Nature, 575(7784):607-617, 2019.
[48] Bodo Rueckauer, Iulia-Alexanden Lungu, Yuhuang Hu, Michael Pfeiffer, and Shih-Chii Liu. Conversion of continuous-valued deep networks to efficient wenttdrrien networks for image classification. Frontiers in neuroscience, 11:682, 2017.
[49] Juncheng Shen, De Ma, Zonghua Gu, Ming Zhang, Xiaolci Zhu, Xiaoqiang Xu, Qi Xu, Yangjing Shen, and Gang Pan. Darwin: neuromorphic hardware co-processor based spiking neural networks. Science China Information Sciences, 59(2);155, 2016.
[50] Sumit Bam Shrestha and Garrick Orchard. Slayer: Spike layer error reassignment in time. In Advances in Neural Information Processing Systems, volume 31, pages 1419-1428, 2018.
[51] David Silver, Aja Huang, Chris Maddison, Arthur Guez, Laurent Sifre, George Van Den Driessche, Julian Schrittieser. Ioannis Antonoglou, Veda Panneershelvam, Mare Lanctot, et al. Mastering the game of go with deep neural networks and tree search. Nature, (29(7587):4844
2016.
[52] Christoph Stöckl and Wolfgang Maass, Optimized spiking neurons can classify images with high accuracy through temporal coding with two spikes. Nature Machine Intelligence, 3(3):230-236 2021.
[53] KJ Stratford, K Barczy-Hornooe KAC Martin, NJ Bannister. and JJB Jack. Excitatory synaptic inputs to spiny stellate cells in cat visual cortex. Nature, 382(6588) 261. 1996.
[54]
Amirhossein Tavanaci, Masoud Ghodrati, Saced Reza Kheradpisheh, Timothée Masquelier, and Anthony Maida. Deep learning in spiking neural networks. Neural Networks, 111:47-63, 2019.
[55] Simon Thorpe, Arnaud Delorme, and Rufin Van Rullen. Spike-based strategies for rapid processing. Neural Networks, 14(6-7):715-72) 2001.
[56] Simon J Thorpe. Spike arrival times: A highly efficient coding scheme for neural networks. Parallel Processing in Neural Systems, pages 91-94, 1990.
[57] Rufin Van Rullen and Simon Thorpe. Rate coding versus temporal order coding: what the retinal ganglion cells tell the visual cortex. Neural Computation, (3(6): 2001.
[S8] Ashish Vaswani, Noam Shazeer, Niki Parmar, Jakob Uszkoreit, Llion Jones, Aidan N Gomez, Lukasz Kaiser, and Illia Polosukhin. Attention is all you need. Advances in Neural Information Processing Systems, 30, 2017.
[59] Vujie Wu, Lei Deng, Guoqi Li, Jun Zhu, and Luping Shi. Spatio-temporal hackpropagation for training high-performance spiking neural networks. Frontiers in neuroscience, 12:331, 2018.
[60] Yujie Wu, Lei Deng, Guoqi Li, Jun Zhu, Yuan Xie, and Luping Shi. Direct training for spiking neural networks: Faster, larger, better. In Proceedings of the AAAI Conference on Artificial Intelligence, volume 33, pages 1311-1318. 2019.
[61] Timo C. Wunderlich and Christian Pehle. Event-based backpropagation can compute exact gradients for spiking neural networks. Scientific Reports, 11(1):12829, 2021.
[62] Han Xiao, Kashif Rasul, and Roland Vollgraf. Fashion-mnist: a novel image dataset for benchmarking machine learning algorithms. arXiv preprint /00.::707007777777 2017.
[63] Qi Xu. Yaxin Li, Jiangrong Shen, Jian Liu. Huajin Tang, and Gang Pan. Constructing deep spiking neural networks from artificial neural networks with knowledge distillation. In Proceedings of the IEEE/CVF Conference on Computer Vision and Pattern Recognition, pages 7886-7895, 2023.
[64] Yukun Yang, Wenrui Zhang, and Peng Li. Backpropagated neighborhood aggregation for accurate training of spiking neural networks. In International Conference on Machine Learning, pages 11852-11862. PMLR, 2021.
[65] Friedemann Zenke, Sander M Bohté, Claudia Clopath, Iulia M Comşa, Julian Göltz, Wolfgang Maass, Timothée Masquelier, Richard Naud, Emre O Neftci, Mihai A Petrovici, et al. Visualizing joint future of neuroscience and neuromorphic engineering. Neuron, 109(4):511-55, 2021.
13

---

[66] Malu Zhang, Jiadong Wang. Jibin Wu, Ammar Belatreche, Burin Amornpaisannon, Zhixuan Zhang. Venkata Pavan Kumar Miriyala, Hong Qu Yansong Chua, Trevor E. Carlson, and Haizhou Li. Recti- lied linear postsynaptic polential function for backpropagation in deep spiking neural networks. IEEE Transactions on Neural Nenworks and Learning Systems, pages 1-12, 2021.
[67] Wenrui Zhang and Peng Li. Temporal spike sequence learning via backpropagation for deep spiking neural networks. Advances in Neural Information Processing Systems, pages 12022 12033, 2020.
[68] Shibo Zhou, Xiaohua Li, Ying Chen, Sanjeev T Chandrasckaran, and Arindam Sanyal. Temporal-coded deep spiking neural network with casy training and robust performance. In Proceedings of the AAAI Conference on Artificial Intelligence, volume 35, pages 11143-11151, 2021.
[69] Yaoyu Zhu, Zhaofei Yu, Wei Fang, Xiaodong Xie, Tiejun Huang, and Timothée Masquelier. Training spiking neural networks with event-driven backpropagation. Advances in Neural Information Processing Systems, 2022.
14


Reviews:
[{"review_id": "lBfS1zw6qz", "reviewer": "Reviewer_hbi5", "summary": "This paper focuses on the time-based training approach for spiking neural networks (SNNs). It first explains why rate-based loss functions can be used in time-based training for SNNs by establishing a link between rate-based losses and time-based ones. Then it does some analysis on the overall gradient provided by the loss function and proposes the enhanced counting loss based on this analysis. At last, it proposes a new normalization method that changes the threshold instead of the weight scale. Experimental results on classification tasks show improved performance", "questions": "\n1. Is section 4.1 and 4.2 related to the proposed methods in this paper? I am somewhat confused about the role of this part in this paper, and hard to follow its conclusion.\n2. Authors do not list BPTT-based methods in experiments. They say BPTT-based methods incorporate information when neurons do not fire in training, which improves the final performance. Does it mean BPTT-based methods have a better performance than time-based methods?\n3. Is time-based learning of SNN more suitable for neuromorphic chips than activation-based learning?\n", "limitations": "See above", "rating": 6, "confidence": 4, "soundness": 3, "presentation": 3, "contribution": 3, "strengths": "1. Exploring event-driven learning for SNNs is important.\n2. This paper is technically solid in analyzing various aspects of rate-based loss functions.\n3. The proposed enhanced counting loss and threshold training are shown to be effective by the experiments.\n", "weaknesses": "This paper has a relatively narrow scope, focusing solely on improving counting-based loss functions for time-based training schemas.", "quality": null, "clarity": null, "significance": null, "originality": null, "strengths_and_weaknesses": "", "was_revised": false, "final_justification": "", "rebuttal": "We sincerely appreciate your constructive and insightful feedback. It is truly heartening to learn that you acknowledge the sound analysis presented in our paper and find merit in our newly proposed loss function, which contributes to the stabilization of the entire training process. We are committed to addressing your concerns and providing comprehensive responses to the questions you have raised, as outlined in the following sections.\n\n> This paper has a relatively narrow scope, focusing solely on improving counting-based loss functions for time-based training schemas.\n\nThank you for your valuable feedback. We wish to underscore that, alongside the counting-based loss function tailored for the time-based training schema, we have also introduced a mechanism to incorporate rate-based loss functions into the temporal training approach. Moreover, the potential to apply time-based loss functions to rate-based training schemes in a reverse manner offers a compelling avenue for future exploration.\n\nFurthermore, our method proposing the transfer of training scale factors utilized by weight standardization into thresholds is not restricted to specific SNN training algorithms. We believe that our work provides a foundation for future research in this area, and we genuinely appreciate your keen interest in our work.\n\n\n> Is section 4.1 and 4.2 related to the proposed methods in this paper? I am somewhat confused about the role of this part in this paper, and hard to follow its conclusion.\n\nThank you for raising this point. Sections 4.1 and 4.2 of our paper furnish a theoretical basis for applying rate-based losses in temporal SNN training. The analysis presented in these sections elucidates the underlying principles behind both the counting loss and our proposed enhanced counting loss and elucidates why they are effective in our approach. We will clarify it in the revised version.\n\n\n> Is time-based learning of SNN more suitable for neuromorphic chips than activation-based learning?\n\nYes. The event-driven nature of our learning scheme contributes to its increased biological plausibility and suitability for continuous-time learning while also exhibiting enhanced efficiency when executed on neuromorphic hardware.\n\nTo highlight the hardware efficiency advantage, we conduct a comparison of the number of operations between our method and Backpropagation Through Time (BPTT) algorithms when dealing with sparse spikes. Although we analyze a single fully-connected layer for simplicity, the analysis extends similarly to other types of layers and the entire network.\n\nDuring training, BPTT algorithms necessitate unfolding through the time axis, as depicted in Figure 1(a)(b). Consequently, this leads to a corresponding number of operations of at least $O(TC_{in}C_{out})$, where $T$ denotes the total time steps, and $C_{in}$ and $C_{out}$ represent the number of input and output neurons, respectively. In contrast, temporal learning algorithms, such as ours, only need to address scenarios where a specific neuron fires a spike and records pertinent information. During the forward stage, a spike fired by an input neuron influences the state of both itself and all output neurons, culminating in a total of $O(C_{out})$ operations. During the backward stage, a spike discharged by an output neuron requires propagating gradient information to all intervening spikes between this spike and the last spike fired by the same neuron (thus, all input spikes are processed once during this stage). Therefore, by denoting the average firing rate of input and output neurons as $\\alpha$ and $\\beta$, the number of operations for this layer is determined as $O(T(\\alpha C_{in}C_{out}+\\beta C_{in}))$.\n\nIn the case of sparse spikes, event-based learning algorithms exhibit an advantage, as $\\alpha+\\beta \\ll 1$ under such circumstances.\n\n\n> Authors do not list BPTT-based methods in experiments. They say BPTT-based methods incorporate information when neurons do not fire in training, which improves the final performance. Does it mean BPTT-based methods have a better performance than time-based methods?\n\nWe would like to point out that the performance of time-based training methods has yet to match that of surrogate gradient methods, attributed to the following reasons:\n\nFirstly, our event-driven approach restricts information propagation solely through spikes during both forward and backward propagation, as depicted in Figure 1d. In contrast, surrogate gradient techniques propagate gradient information even when no spikes are emitted, as exemplified in Figure 1b, where the surrogate gradient approximates $\\frac{\\partial s}{\\partial u}$ regardless of spike occurrence. This event-driven property renders our method more challenging to train in comparison to surrogate gradient techniques, primarily due to the sparse gradient propagation path.\n\nFurthermore, our learning scheme is relatively novel in contrast to surrogate gradient methods.\n\nConversely, the time-based training method boasts certain advantages over surrogate gradient methods. Specifically, our event-driven learning scheme exhibits enhanced biological plausibility, proving more amenable to continuous-time learning, and significantly more efficient when executed on neuromorphic hardware. The in-depth rationale is elucidated in the preceding question."}, {"review_id": "mIxotNODhG", "reviewer": "Reviewer_LeWP", "summary": "In this work, the authors propose a framework that applies the rate-coding-based loss functions to time-based training. They show that the proposed method outperforms existing time-based ones. ", "questions": "Please check the weakness. ", "limitations": "NA", "rating": 6, "confidence": 4, "soundness": 4, "presentation": 3, "contribution": 3, "strengths": "1. The proposed method suggests a way to combine different approaches to train spiking neural networks. \n2. It provides detailed derivation and a clear explanation of the pipeline. ", "weaknesses": "1. Overall, the performance of time-based models suffers a deficit compared to other SNN methods. What kind of evaluable benefit does this kind of training bring to the current paper?\n\n2. What's the difference between encoding the error time w.r.t to the membrane potential and the spike time? \n\n3. It would be better to have an Algorithm description in the main context. \n\n4. It lacks a clear demonstration of what kind of new information/feature is captured so that the overall performance is improved. ", "quality": null, "clarity": null, "significance": null, "originality": null, "strengths_and_weaknesses": "", "was_revised": false, "final_justification": "", "rebuttal": "We express our sincere gratitude for providing constructive and insightful feedback such as the addition of the algorithm description. It is truly gratifying to know that you value the meticulous derivation and lucid explanation of our pipeline. In light of your input, we are fully dedicated to addressing your concerns as outlined in the forthcoming sections.\n\n> Overall, the performance of time-based models suffers a deficit compared to other SNN methods. What kind of evaluable benefit does this kind of training bring to the current paper?\n\nThe primary objective of our research is to develop a fully biologically plausible learning scheme akin to STDP. These approaches possess key properties, including being event-driven, online, and local. While more biologically plausible schemes may incur performance trade-offs, they hold significant value in explaining learning rules observed in biological brains.\n\nOur work focuses on event-driven property. One can gain insight into the distinction between time-based and activation-based training schemes by comparing Figure 1(a)(b) and (c)(d):\nIn Figure 1(a)(b), the forward and backward propagation of activation-based training schemes cannot be simulated in continuous time, as the surrogate gradient in the backward stage is also propagated through neurons that have not fired.\nMeanwhile, in Figure 1(c)(d), the simulation of time-based training schemes can indeed operate in continuous time, as both the forward and backward stages entail information propagation between neurons conveyed by spikes.\n\nApart from conferring more biological plausibility, this event-driven property ensures the feasibility of network simulation in continuous time and holds the potential to conserve energy when executed on neuromorphic chips.\n\n> What's the difference between encoding the error time w.r.t to the membrane potential and the spike time?\n\nThe membrane potential and spike time are not against each other since they pertain to distinct stages in SNN time-based training. You can refer to Figure.1: Suppose there are $N$ layers in total, then in time-based training, the gradient propagation path is loss -> (spike timing in layer $N$ -> membrane potential in layer $N$) -> (spike timing in layer $N-1$ -> membrane potential in layer $N-1$) -> ... -> (spike timing in layer $1$ -> membrane potential in layer $1$), and there is an additional path from membrane potential in layer $n$ to weight between layer $n$ and $n-1$.\n\n> It would be better to have an Algorithm description in the main context.\n\nAlthough there exists a continuous version of our algorithm, we implement the discrete version since it aligns more seamlessly with existing deep learning frameworks, rendering it easier to implement and enabling better utilization of CUDA acceleration. The following is the discrete version of our algorithm and will be added to our paper:\n$$\\begin{array}{l}\n\\text{Input: Input spike train $\\boldsymbol s^{(0)}$, weight for all layers $\\boldsymbol W^{(n)}(n = 1, ..., N)$, total simulation time }T\\\\\\\\\n\\text{Output:}\\nabla\\boldsymbol W^{(n)}(n=1,...,N)\\\\\\\\\n\\text{//Forward}\\\\\\\\\n\\text{Initialize$\\boldsymbol{Neuron}^{(n)}(n=1,...,N)$: Neurons with states for all layers}\\\\\\\\\n\\text{for $n=0$ to $N-1$ do}\\\\\\\\\n\\qquad\\text{for $t=0$ to $T-1$ do}\\\\\\\\\n\\qquad\\qquad\\text{Update state of $\\boldsymbol{Neuron}^{(n+1)}$by Eq.(1)}\\\\\\\\\n\\qquad\\qquad\\text{if Membrane potential $\\boldsymbol u^{(n+1)}\\geq\\theta$ then}\\\\\\\\\n\\qquad\\qquad\\qquad\\boldsymbol s^{(n+1)}=1\\\\\\\\\n\\qquad\\qquad\\qquad\\text{Reset state of }\\boldsymbol{Neuron}^{(n+1)}\\\\\\\\\n\\qquad\\qquad\\text{end if}\\\\\\\\\n\\qquad\\text{end for}\\\\\\\\\n\\text{end for}\\\\\\\\\n\\text{//Backward}\\\\\\\\\n\\text{Initialize$\\nabla\\boldsymbol W^{(n)},\\frac{\\partial L}{\\partial\\boldsymbol t(s)^{n}}\\gets0$for }n=1,2,...,N\\\\\\\\\n\\text{Calculate$\\frac{\\partial L}{\\partial\\boldsymbol t(s)^{N}}$by Eq.(13)}\\\\\\\\\n\\text{for $n=N$ to 1 do}\\\\\\\\\n\\qquad\\text{for $t=T-1$ to 0 do}\\\\\\\\\n\\qquad\\qquad\\text{if $\\boldsymbol s^{(n)}(t)=1$ then}\\\\\\\\\n\\qquad\\qquad\\qquad\\text{Change$\\frac{\\partial L}{\\partial\\boldsymbol u^{(n)}}$to$\\frac{\\partial L}{\\partial \\boldsymbol t(s^{(n)})}\\frac{\\partial\\boldsymbol t(s^{(n)})}{\\partial\\boldsymbol u^{(n)}(t)}$by part of Eq.(3)(4)}\\\\\\\\\n\\qquad\\qquad\\text{end if}\\\\\\\\\n\\qquad\\qquad\\text{Add$\\frac{\\partial L}{\\partial\\boldsymbol u^{(n)}}\\frac{\\partial\\boldsymbol u^{(n)}}{\\partial\\boldsymbol W^{(n)}}$to$\\nabla\\boldsymbol W^{(n)}$by Eq.(3)}\\\\\\\\\n\\qquad\\qquad\\text{Add$\\frac{\\partial L}{\\partial\\boldsymbol u^{(n)}}\\frac{\\partial\\boldsymbol u^{(n)}}{\\partial\\boldsymbol t(s^{(n-1)})}$to$\\frac{\\partial L}{\\partial \\boldsymbol t(s^{(n-1)})}$by Eq.(4)}\\\\\\\\\n\\qquad\\text{end for}\\\\\\\\\n\\text{end for}\\\\\\\\\n\\end{array}$$\n\n> It lacks a clear demonstration of what kind of new information/feature is captured so that the overall performance is improved.\n\nIn section 4.3, we have analyzed the deficiency of counting loss: Suppose an output neuron corresponding to the label emits $m$ spikes, then the total gradients on these spikes are $m (\\text{target}\\_{label} - m)$ (Eq(12)). This is a concave quadratic function, which means firing one spike will receive a total gradient equal to firing $\\text{target}\\_{label} - 1$ spikes and less than firing $2$ to $\\text{target}\\_{label} - 2$ spikes. Recall that the total time-based gradient means the cumulative pushing of all spikes for how much earlier, remains constant across layers (Eq(6)). A quadratic function is not reasonable under this concern.\nOur proposed enhanced counting loss converts this function $m (\\text{target}\\_{label} - m)$ to a decreasing linear function $\\text{target}\\_{label} - m$, which is more reasonable regarding the total gradient.\n\nTherefore in experiments, we show the total gradient scale (both original and after absolute function), and the ratio of positive gradients w.r.t the training accuracy. Results show that our proposed method decreases the total gradient scale and makes the ratio of positive gradients more balanced."}, {"review_id": "tQAqekR7rk", "reviewer": "Reviewer_98Db", "summary": "This paper explores the loss function for SNNs and proves that rate-based loss functions can be also used in the time-based training scheme. Besides, the authors propose a new loss function called enhanced counting loss, which improves the network performance (compared with previously-used mean square counting loss) by providing adequate positive overall gradients for time-based training schemes in SNN training. In addition, they propose a new normalization approach, which helps the training process by tuning the threshold instead of standardizing the weights. In summary, this paper brings some interesting ideas to the community of SNNs.", "questions": "1. Despite better utilizing the temporal information of SNNs, what are the advantages of time-based learning methods compared to activation-based approaches? Could the authors give some comments?\n2. I would like to see some comments on the time-based learning of SNNs on neuromorphic chips. Is it more energy efficient?\n3. The loss function (13) seems not well-defined when no spikes are emitted (the value in the ln() function is 0). I would like to see some explanations to cover this corner case.", "limitations": "N.A.", "rating": 8, "confidence": 5, "soundness": 3, "presentation": 3, "contribution": 3, "strengths": "1. This paper focuses on time-based learning of SNNs, which is a very important direction of SNNs as it can better utilize the temporal information of SNNs. There is little work at present. The authors propose some interesting ideas (loss function, normalization approach), which is very impressive.\n2. The proposed framework can explain why the derivative of integration of spikes with respect to the firing time is set to -1 in many previous studies.\n3. The paper is well-written and includes rigorous proofs.\n4. The proposed approach outperforms previous time-based training methods.", "weaknesses": "I think the description from Eqs.(1)-(5) is hard for readers unfamiliar with time-based learning to understand. They need to check the reference [58]. I suggest adding the detailed derivation in Appendix.", "quality": null, "clarity": null, "significance": null, "originality": null, "strengths_and_weaknesses": "", "was_revised": false, "final_justification": "", "rebuttal": "Thank you for providing such an encouraging and positive response. We sincerely appreciate your recognition of the significance of our work, its alignment with an important direction, its well-written nature, and the inclusion of rigorous proofs. In light of your feedback, we are fully dedicated to addressing any concerns you have raised and offering comprehensive responses to the questions, as delineated in the subsequent sections.\n\n> I think the description from Eqs.(1)-(5) is hard for readers unfamiliar with time-based learning to understand. They need to check the reference [58]. I suggest adding the detailed derivation in Appendix.\n\nThank you for your valuable suggestion. We will add the corresponding derivation as well as an algorithm description to our paper (please refer to the response to Reviewer LeWP for the algorithm description).\n\n> Despite better utilizing the temporal information of SNNs, what are the advantages of time-based learning methods compared to activation-based approaches? Could the authors give some comments?\n\nThe key point is that our approach is event-driven. \nOne can compare Figure.1(a)(b) and (c)(d) to understand the difference between the time-based training scheme and the activation-based training scheme:\nIn Figure.1(a)(b), the forward and backward propagation of activation-based training schemes cannot be simulated in continuous time, since the surrogate gradient in the backward stage is also propagated through neurons that are not fired.\nIn Figure.1(c)(d), the simulation of time-based training schemes can operate in continuous time, since in both forward and backward stage the information propagation between neurons are conveyed by spikes.\nThis event-driven property guarantees the possibility of network simulation in continuous time, has the potential to save energy on neuromorphic chips, and provides more biological plausibility. \n\n\n> I would like to see some comments on the time-based learning of SNNs on neuromorphic chips. Is it more energy efficient?\n\nOur learning scheme has the potential to exhibit enhanced energy efficiency when executed on neuromorphic hardware.\n\nTo highlight the hardware efficiency advantage, we conduct a comparison of the number of operations between our method and Backpropagation Through Time (BPTT) algorithms when dealing with sparse spikes. Although we analyze a single fully-connected layer for simplicity, the analysis extends similarly to other types of layers and the entire network.\n\nDuring training, BPTT algorithms necessitate unfolding through the time axis, as depicted in Figure 1(a)(b). Consequently, this leads to a corresponding number of operations of at least $O(TC_{in}C_{out})$, where $T$ denotes the total time steps, and $C_{in}$ and $C_{out}$ represent the number of input and output neurons, respectively. In contrast, temporal learning algorithms, such as ours, only need to address scenarios where a specific neuron fires a spike and records pertinent information. During the forward stage, a spike fired by an input neuron influences the state of both itself and all output neurons, culminating in a total of $O(C_{out})$ operations. During the backward stage, a spike discharged by an output neuron requires propagating gradient information to all intervening spikes between this spike and the last spike fired by the same neuron (thus, all input spikes are processed once during this stage). Therefore, by denoting the average firing rate of input and output neurons as $\\alpha$ and $\\beta$, the number of operations for this layer is determined as $O(T(\\alpha C_{in}C_{out}+\\beta C_{in}))$.\n\nIn cases of sparse spikes, event-based learning algorithms exhibit an advantage, as $\\alpha+\\beta \\ll 1$ under such circumstances.\n\n\n> The loss function (13) seems not well-defined when no spikes are emitted (the value in the ln() function is 0). I would like to see some explanations to cover this corner case.\n\nThank you for pointing it out. The integral $\\int_0^T s_i(t) dt$ must be an integer since it represents the number of spikes fired by neuron $i$ during simulation time ($0$ to $T$), so only the derivation at integer point is meaningful. As a result, we can let $f(x) = x - \\text{target}_i \\ln(x)$ when $x>0$ and $f(x) = 0$ when $x=0$ to fix this bug. Then the loss function is\n$$L( \\boldsymbol{s}, \\boldsymbol{target} ) = 2\\lambda \\sum\\_{i=1}^C f \\left( \\int_0^T s_i(t) dt \\right).$$"}, {"review_id": "1S0N6pVXxD", "reviewer": "Reviewer_jtny", "summary": "This paper focuses on the loss functions for time-based training schemes of SNNs, which propagate gradients only when the neurons fire a spike. The authors propose to map rate-based loss functions to time-based ones and explain why they also work. Besides, the authors propose the enhanced counting loss to replace the commonly used mean square counting loss. The experimental results show that the proposed method achieves SOTA performance among time-based methods.", "questions": "1. Have the authors tried loss functions other than counting-based losses? For example, loss functions defined on spike timings as in [1] or time-to-first-spike based loss function as in [2]?\n\n2. How is the simulation performed? Is it simulated in continuous time or discrete time steps? If it is simulated discretely, what time steps do you use in your experiment?\n\n[1]Bohte, S. M., Kok, J. N., & La Poutre, H. (2002). Error-backpropagation in temporally encoded networks of spiking neurons. Neurocomputing, 48(1-4), 17-37.\n[2]Mostafa, H. (2017). Supervised learning based on temporal coding in spiking neural networks. IEEE Transactions on neural networks and learning systems, 29(7), 3227-3235.", "limitations": "There’s no potential negative societal impact that should be addressed.", "rating": 7, "confidence": 5, "soundness": 3, "presentation": 3, "contribution": 3, "strengths": "1. The training algorithm studied in this paper is relatively novel and fits the event-driven feature of SNN. It also provides a novel aspect to link temporal coding and rate coding in SNNs.\n\n2. This paper provides a solid analysis of applying rate-coded losses in time-based training schemes. The proposed enhanced counting loss reasonably stabilizes the whole training process and thus improves performance.\n\n3. This paper is relatively well-organized and well-written.", "weaknesses": "The training algorithm studied in this paper cannot achieve comparable performance compared with BPTT-based methods.", "quality": null, "clarity": null, "significance": null, "originality": null, "strengths_and_weaknesses": "", "was_revised": false, "final_justification": "", "rebuttal": "Thank you for acknowledging our research direction and the innovative approach we have employed. We are truly grateful for your recognition of the solid analysis, well-structured organization, and clear exposition in our work. In response to your valuable feedback, we are fully committed to addressing any concerns you have raised and providing comprehensive responses to the questions, as detailed in the following sections.\n\n\n> The training algorithm studied in this paper cannot achieve comparable performance compared with BPTT-based methods.\n\nWe appreciate your attention to this matter. Our proposed method differs from BPTT-based approaches in two significant aspects.\nFirstly, we calculate gradients of spike timings generated by the loss function, whereas BPTT-based methods compute gradients of the 'spike scale' (as depicted in Figure 1(b)(d)).\nSecondly, our method operates in an event-driven manner, wherein information propagates solely through spikes during both forward and backward propagation. In contrast, BPTT-based techniques propagate gradient information even in the absence of emitted spikes, as exemplified by the surrogate gradient's approximation of $\\frac{\\partial s}{\\partial u}$ regardless of spike occurrence.\n\nThe event-driven property of our method poses a challenge during training compared to BPTT-based approaches due to the sparse gradient propagation path. Additionally, as our learning scheme is relatively novel when compared with BPTT-based methods, its performance and convergence speed have not yet surpassed those of the latter.\nHowever, the event-driven property empowers our learning scheme with enhanced biological plausibility and the potential for more efficient optimization when executed on neuromorphic hardware.\n\n\n> Have the authors tried loss functions other than counting-based losses? For example, loss functions defined on spike timings as in [1] or time-to-first-spike based loss function as in [2]?\n\nWe have tried other loss functions, including these two loss functions. The corresponding results are listed in Section 5.1 in the supplementary material.\nWe have conducted the experiments on the Fashion-MNIST dataset, and the results are listed in Table.3 in the appendix.\nFrom the results, cross-entropy losses (whether with respect to firing rate such as the temporal efficient training loss [3] or firing time such as the time to first spike loss(CE)) cannot achieve good results on this dataset. This is partly due to the abnormal ratio of positive gradients (Figure.1(d) and Figure.2(d) in the appendix). The ratio is easily to be too large.\nFor the spike train (kernel) and spike train (timing) loss, they behave normally in the Fashion-MNIST dataset. However, when extending to larger datasets like CIFAR-10, the spike train (timing) loss cannot achieve a good result (90.09\\% compared with 93.54\\% for the enhanced counting loss).\nTherefore, currently the enhanced counting loss is the best one under our attempt among different losses for the time-based SNN training scheme.\n\n    [1]Bohte, S. M., Kok, J. N., & La Poutre, H. (2002). Error-backpropagation in temporally encoded networks of spiking neurons. Neurocomputing, 48(1-4), 17-37. \n    [2]Mostafa, H. (2017). Supervised learning based on temporal coding in spiking neural networks. IEEE Transactions on neural networks and learning systems, 29(7), 3227-3235.\n    [3]Deng, S., Li, Y., Zhang, S., & Gu, S. (2021, October). Temporal Efficient Training of Spiking Neural Network via Gradient Re-weighting. In International Conference on Learning Representations.\n\n\n> How is the simulation performed? Is it simulated in continuous time or discrete time steps? If it is simulated discretely, what time steps do you use in your experiment?\n\nWe would like to emphasize that our training approach does not require splitting the entire process into discrete time steps. As shown in Figure 1, we only need to record information at spike times (such as the precise timing and slope of the membrane potential) to train our network, and there is no inherent need to use clock-driven methods. However, to better integrate with current deep learning frameworks, we convert the training process from continuous time to discrete time steps in our simulation. For MNIST and Fashion-MNIST, we set the number of time steps to 5, for CIFAR10 we set it to 12, for CIFAR100 we set it to 16, and for N-MNIST we set it to 30 (these parameters are consistent with [4]). For further information about hyper-parameters, please refer to Table S1 in the appendix.\n\n    [4] Zhu, Y., Yu, Z., Fang, W., Xie, X., Huang, T., & Masquelier, T. (2022). Training Spiking Neural Networks with Event-driven Backpropagation. In 36th Conference on Neural Information Processing Systems (NeurIPS 2022)."}]

Author rebuttal:

Meta-review: The authors first analyze rate-based and time-based loss functions for the training of spiking neural networks (SNNs). Based on this, they propose an enhanced counting loss of SNNs as well as a new normalization method that tunes thresholds. They demonstrate in experiments that this approach outperforms previous time-based methods.

The reviewers acknowledge that the manuscript explores an interesting topic in SNN research. The manuscript provides detailed theoretical derivations, it is technically solid. The reviewers were convinced by the experiments, showing that the method outperforms previous time-based training methods.

A few questions regarding clarifications, the relation to BPTT-based methods, and the suitability for neuromorphic implementations have been addressed adequately in the rebuttal.

In summary, the manuscript presents a very nice study that improves the state-of-the-art for timing-based training of SNNs.
Decision: Accept (spotlight)