Probabilistic Modeling: Proving the Lottery Ticket Hypothesis in Spiking
  Neural Network
The Lottery Ticket Hypothesis (LTH) states that a randomly-initialized large
neural network contains a small sub-network (i.e., winning tickets) which, when
trained in isolation, can achieve comparable performance to the large network.
LTH opens up a new path for network pruning. Existing proofs of LTH in
Artificial Neural Networks (ANNs) are based on continuous activation functions,
such as ReLU, which satisfying the Lipschitz condition. However, these
theoretical methods are not applicable in Spiking Neural Networks (SNNs) due to
the discontinuous of spiking function. We argue that it is possible to extend
the scope of LTH by eliminating Lipschitz condition. Specifically, we propose a
novel probabilistic modeling approach for spiking neurons with complicated
spatio-temporal dynamics. Then we theoretically and experimentally prove that
LTH holds in SNNs. According to our theorem, we conclude that pruning directly
in accordance with the weight size in existing SNNs is clearly not optimal. We
further design a new criterion for pruning based on our theory, which achieves
better pruning results than baseline.
Man Yao, Yuhong Chou, Guangshe Zhao, Xiawu Zheng, Yonghong Tian, Bo Xu, Guoqi Li
# Probabilistic Modeling: Proving the Lottery Ticket Hypothesis in Spiking Neural Network

###### Abstract

The Lottery Ticket Hypothesis (LTH) states that a randomly-initialized large neural network contains a small sub-network (i.e., winning tickets) which, when trained in isolation, can achieve comparable performance to the large network. LTH opens up a new path for network pruning. Existing proofs of LTH in Artificial Neural Networks (ANNs) are based on continuous activation functions, such as ReLU, which satisfying the Lipschitz condition. However, these theoretical methods are not applicable in Spiking Neural Networks (SNNs) due to the discontinuous of spiking function. We argue that it is possible to extend the scope of LTH by eliminating Lipschitz condition. Specifically, we propose a novel probabilistic modeling approach for spiking neurons with complicated spatio-temporal dynamics. Then we theoretically and experimentally prove that LTH holds in SNNs. According to our theorem, we conclude that pruning directly in accordance with the weight size in existing SNNs is clearly not optimal. We further design a new criterion for pruning based on our theory, which achieves better pruning results than baseline.

## 1 Introduction

By mimicking the spatio-temporal dynamics behaviors of biological neural circuits, Spiking Neural Networks (SNNs) [1; 2; 3; 4] provide a low-power alternative to traditional Artificial Neural Networks (ANNs). The binary spiking communication enables SNNs to be deployed on neuromorphic chips [5; 6; 7] to perform sparse synaptic accumulation for low energy consumption. Given the memory storage limitations of such devices, neural pruning methods are well recognized as one of the crucial methods for implementing SNNs in real-world applications. Pruning redundant weights from an over-parameterized model is a mature and efficient way of obtaining significant compression [8; 9].

Recently, Lottery Ticket Hypothesis (LTH), a mile stone is proposed in the literature of network pruning, which asserts that an over-parameterized neural network contains sub-networks that can achieve a similar or even better accuracy than the fully-trained original dense networks by _training only once_[10]. A Stronger version of the LTH (SLTH) was then proposed: there is a high probability that a network with random weights contains sub-networks that can approximate any given sufficiently-smaller neural network, _without any training_[11]. SLTH claims to find the target sub-network without training, thus it is a kind of complement to original LTH that requires training [11]. Meanwhile, SLTH is considered to be "stronger" than LTH because it claims to require no training [12].
The effectiveness of LTH in ANNs have been verified by a series of experiments [10; 13; 14; 11]. Furthermore, it has been theoretically proved by several works with various assumptions [12; 15; 16; 17], due to its attractive properties in statement. A line of work is dedicated to designing efficient pruning algorithms based on LTH [18; 19; 20]. But the role of LTH in SNN is almost blank. There is only one work that experimentally verifies that LTH can be applied to SNNs [21], whether it can also be theoretically established remains unknown.

In this work, we theoretically and experimentally prove that LTH (Strictly speaking, SLTH3 ) holds in SNNs. There are two main hurdles. First and foremost, the binary spike signals are fired when the membrane potentials of the spiking neurons exceed the firing threshold, thus the activation function of a spiking neuron is discrete. But all current works [12; 15; 16; 17] proving LTH in ANNs relies on the Lipschitz condition. Only when the Lipschitz condition is satisfied, the error between the two layers of the neural network will be bounded when they are approximated. Second, brain-inspired SNNs have complex dynamics in the temporal dimension, which is not considered in the existing proofs and increases the difficulty of proving LTH in SNNs.

Footnote 3: In theoretical proofs, SLTH is considered a stronger version of LTH[12; 17]

To bypass the Lipschitz condition, we design a novel probabilistic modeling approach. The approach can theoretically provide the probability that two SNNs behave identically, which is not limited by the complex spatio-temporal dynamics of SNNs. In a nutshell, we establish the following result:

**Informal version of Theorem 4.3** For any given target SNN \(\hat{G}\), there is a sufficiently large SNN \(G\) with a sub-network (equivalent SNN) \(\tilde{G}\) that, with a high probability, can achieve the same output as \(\hat{G}\) for the same input,

\[\sup_{\mathbf{S}\in\mathcal{S}}\frac{1}{T}\sum_{t=1}^{T}\left\|\tilde{G}^{t}(\mathbf{ S})-\hat{G}^{t}(\mathbf{S})\right\|_{2}=0,\]

where \(t=1,2,\cdots,T\) is the timestep, \(\mathbf{S}\) is the input spiking tensor containing only 0 or 1.

As a complement to the theoretical proof part, we show experimentally that there are also sub-networks in SNNs that can work without training. Subsequently, it is clear that ANNs and SNNs operate on fundamentally distinct principles about how weight influences the output of the activation layer. Thus, simply using the weight size as the criterion for pruning like ANNs must not be the optimal strategy. Based on this understanding, we design a new weight pruning criterion for SNNs. We evaluate how likely weights are to affect the firing of spiking neurons, and prune according to the estimated probabilities. In summary, our contributions are as follows:

* We propose a novel probabilistic modeling method for SNNs that for the first time theoretically establishes the link between spiking firing and pruning (Section 3). The probabilistic modeling method is a general theoretical analysis tool for SNNs, and it can also be used to analyze the robustness and other compression methods of SNNs (Section 6).
* With the probabilistic modeling method, we theoretically prove that LTH also holds in SNNs with binary spiking activations and complex spatio-temporal dynamics (Section 4).
* We experimentally find the good sub-networks without weight training in random initialized SNNs, which is consistent with our theoretical results. (Section 5)
* We apply LTH for pruning in SNNs and design a new probability-based pruning criterion for it (Section 6). The proposed pruning criterion can achieve better performance in LTH-based pruning methods and can also be exploited in non-LTH traditional pruning methods.

## 2 Related Work

**Spiking neural networks.** The spike-based communication paradigm and event-driven nature of SNNs are key to their energy-efficiency advantages [3; 22; 23; 4]. Spike-based communication makes cheap synaptic Accumulation (AC) the basic operation unit, and the event-driven nature means that only a small portion of the entire network is active at any given time while the rest is idle. In contrast, neurons in ANNs communicate information using continuous values, so Multiply-and-Accumulate (MAC) is the major operation, and generally all MAC must be performed even if all inputs or activations are zeros. SNNs can be deployed on neuromorphic chips for low energy consumption
[6; 5; 24]. Thus, spike-based neuromorphic computing has broad application prospects in battery constrained edge computing platforms [25], e.g., internet of things, smart phones, etc.

**Pruning in spiking neural networks.** Recent studies on SNN pruning have mostly taken two approaches: 1) Gaining knowledge from ANN pruning's successful experience 2) incorporating the unique biological properties of SNNs. The former technical route is popular and effective. Some typical methods include pruning according to predefined threshold value [26; 27; 28], soft-pruning that training weights and pruning thresholds concurrently [29], etc. The temporal dynamics of SNN are often also taken into consideration in the design of pruning algorithms [30; 21]. Meanwhile, There have been attempts to develop pruning algorithms based on the similarities between SNNs and neural systems, e.g., regrowth process [31], spine motility [32; 33], gradient rewiring [34], state transition of dendritic spines [35], etc. None of these studies, however, took into account the crucial factor that affects network performance: the link between weights and spiking firing. In this work, we use probabilistic modeling to analyze the impact of pruning on spiking firing, and accordingly design a pruning criterion for SNNs.

## 3 Probabilistic Modeling for Spiking Neurons

No matter how intricate a spiking neuron's internal spatio-temporal dynamics are, ultimately the neuron decide whether to fire a spike or not based on its membrane potential at a specific moment. Thus, the essential question of the proposed probabilistic modeling is how likely is the firing of a spiking neuron to change after changing a weight.

**Leaky Integrate-and-Fire (LIF)** is one of the most commonly used spiking neuron models [1; 2], because it is a trade-off between the complex spatio-temporal dynamic characteristics of biological neurons and the simplified mathematical form. It can be described by a differential function

\[\tau\frac{du(t)}{dt}=-u(t)+I(t), \tag{1}\]

where \(\tau\) is a time constant, and \(u(t)\) and \(I(t)\) are the membrane potential of the postsynaptic neuron and the input collected from presynaptic neurons, respectively. Solving Eq. (1), a simple iterative

Figure 1: **Overview of this work.****(a)**, The goal of spiking neuron approximate. **(b)**, The firing behavior in the approximation of spiking neurons can be described by the proposed probabilistic modeling approach (Section 3). Spikes are fired when the membrane potential \(u\) exceeds the firing threshold \(u_{th}\). As long as a weight change induces \(u\) to fall into the crisis neighborhood, there is a certain probability that the spiking firing will be changed (0 to 1, or 1 to 0). We hope that spiking firing will not change after the redundant weights are pruned. **(c)**, Equivalent structure modeling. The error between the target and equivalent SNN is related to the network width (Section 4). **(d)**, Proof of LTH in SNN (Section 4). **(e)**, We provide a pruning technique for SNNs (Section 6). New pruning criterion: compute the probability that the firing of a spiking neuron changes when weights are pruned, and pruning according to the rank of the probability.
representation of the LIF neuron [36, 37] for easy inference and training can be obtained as follow

\[u_{i}^{t,l} =h_{i}^{t-1,l}+x_{i}^{t,l}, \tag{2}\] \[s_{i}^{t,l} =\mathrm{Hea}(u_{i}^{t,l}-u_{th}),\] (3) \[h_{i}^{t,l} =V_{reset}s_{i}^{t,l}+\beta u_{i}^{t,l}(1-s_{i}^{t,l}),\] (4) \[x_{i}^{t,l} =\sum_{j=1}^{N}w_{ij}^{l}s_{j}^{t,l-1}, \tag{5}\]

where \(u_{i}^{t,l}\) means the membrane potential of the \(i\)-th neuron in \(l\)-th layer at timestep \(t\), which is produced by coupling the spatial input feature \(x_{i}^{t,l}\) and temporal input \(h_{i}^{t-1,l}\), \(u_{th}\) is the threshold to determine whether the output spike \(s_{i}^{t,l}\in\{0,1\}\) should be given or stay as zero, \(\mathrm{Hea}(\cdot)\) is a Heaviside step function that satisfies \(\mathrm{Hea}(x)=1\) when \(x\geq 0\), otherwise \(\mathrm{Hea}(x)=0\), \(V_{reset}\) denotes the reset potential which is set after activating the output spiking, and \(\beta=e^{-\frac{\mu}{\mu}}<1\) reflects the decay factor. In Eq. (2), spatial feature \(x_{i}^{t,l}\) can be extracted from the spike \(s_{j}^{t,l-1}\) from the spatial output of the previous layer through a linear or convolution operation (i.e., Eq. (5)), where the latter can also be regraded as a linear operation [38]. \(w_{ij}^{l}\) denotes the weight concept from the \(j\)-th neuron in \((l-1)\)-th layer to the \(i\)-th neuron in \(l\)-th layer, \(N\) indicates the width of the \((l-1)\)-th layer.

The spatio-temporal dynamics of LIF can be described as: the LIF neuron integrates the spatial input feature \(x_{i}^{t,l}\) and the temporal input \(h_{i}^{t-1,l}\) into membrane potential \(u_{i}^{t,l}\), then, the fire and leak mechanism is exploited to generate spatial output \(s_{i}^{t,l}\) and the new neuron state \(h_{i}^{t,l}\) for the next timestep. Specifically, When \(u_{i}^{t,l}\) is greater than the threshold \(u_{th}\), a spike is fired and the neuron state \(h_{i}^{t,l}\) is reset to \(V_{reset}\). Otherwise, no spike is fired and the neuron state is decayed to \(\beta u_{i}^{t,l}\). Richer neuronal dynamics [2] can be obtained by adjusting information fusion [39], threshold [40], decay [41], or reset [42] mechanisms, etc. Note, notations used in this work are summarized in Appendix A.

**Probabilistic modeling of spiking neurons.** Our method is applicable to various spiking neuron models as long as Eq. (3) is satisfied. In this section, superscript \(l\) and \(i\) will be omitted when location is not discussed, and superscript \(t\) will be omitted when the specific timestep is not important. The crux of probabilistic modeling is how errors introduced by pruning alter the firing of spiking neurons.

We start by discussing only spatial input features. For a spiking neuron, assuming that the temporal input of a certain timestep is fixed, for two different spatial input features \(x\) and \(x^{\prime}\in[x-\epsilon,x+\epsilon]\), the corresponding membrane potentials are also different, i.e., \(u\) and \(u^{\prime}\in[u-\epsilon,u+\epsilon]\). Once \(u\) and \(u^{\prime}\) are located in different sides of the threshold \(u_{th}\), the output will be different (see Fig. 1**a**). This situation can only happen when \(u\) is located in _crisis neighborhood_\([u_{th}-\epsilon,u_{th}+\epsilon]\) (see Fig. 1**b**). That is, suppose membrane potential \(u\notin[u_{th}-\epsilon,u_{th}+\epsilon]\), if it changes from \(u\) to \(u^{\prime}\), and \(u^{\prime}\in[u-\epsilon,u+\epsilon]\), the output of the spiking neuron must not change. Consequently, the probability upperbound of a spiking neuron output change (_crisis probability_) is:

\[\int_{u_{th}-\epsilon}^{u_{th}+\epsilon}p(u)\mathrm{d}u, \tag{6}\]

where \(p(\cdot)\) is the probability density function of the membrane potential distribution. For the case of two independent spiking neurons, if the input is the same, then \(\epsilon\) is controlled by the weights of the two neurons (Fig. 1**a**).

It is reasonable to consider that the membrane potential follows a certain probability distribution. The membrane potential is accumulated by temporal input and spatial input feature, the former can be regarded as a random variable, and the latter is determined by the input spikes and weights. The input spike is a binary random variable according to a firing rate, and usually the weights are also assumed to satisfy a certain distribution. Moreover, some existing works directly assume that the membrane potential satisfies the Gaussian distribution [43, 44]. In this work, our assumptions about the membrane potential distribution are rather relaxed. Specifically, we give out a class of distributions for membrane potential, and we suppose all membrane potential should satisfy:

**Definition 3.1**.: **m-Neighborhood-Finite Distribution.** For a probability density function \(p(\cdot)\) and a value \(m\), if there exists \(\epsilon>0\) for the neighborhood \([m-\epsilon,m+\epsilon]\), in this interval, the max value
of function \(p(\cdot)\) is finite, we call the distribute function \(p(\cdot)\) as m-Neighborhood-Finite Distribution. The symbolic language is as follows

\[\exists\epsilon{>0},x\in[m-\epsilon,m+\epsilon]\,,\underset{x}{sup}\,p(x)<+\infty. \tag{7}\]

The upperbound of probability is controllable by controlling the input error \(\epsilon\):

**Lemma 3.2**.: _For the probability density function \(p(\cdot)\), if it is m-Neighborhood-Finite Distribution, for any \(\delta{>0}\), there exists a constant \(\epsilon{>0}\) so that \(\int_{m-\epsilon}^{m+\epsilon}p(x)\mathrm{d}x\leq\delta\)._

Now, we add consideration of the temporal dynamics of spiking neurons. As shown in Eq. (2) and Eq. (4), spiking neurons have a memory function that the membrane potential retains the neuronal state information from all previous timesteps. The spatial input feature \(x\) is only related to the current input, and the temporal input \(h\) is related to the spatial input features at all previous timesteps. For the convenience of mathematical expression, if there is no special mention to consider the temporal dynamics inside the neuron, we directly write the spiking neuron as \(\sigma\). But it should be noted that \(\sigma\) actually has complex internal dynamics. In its entirety, a spiking neuron in Eq. (3) can be denoted as \(\sigma_{x^{1:t-1}}^{t}(x^{t})\), where the temporal input \(h^{t-1}\) in the membrane potential \(u^{t}\) depends on \(x^{1:t-1}\), i.e., spatial input features from 1 to \(t-1\).

Using Definition 3.1, Lemma 3.2, and the math above, we can determine the probability of differing outputs from the two neurons due to errors in their spatial input features, under varying constraints.Specifically, in Lemma 3.3, it is assumed that the timestep is fixed and the temporal inputs to the two neurons are the same; in Lemma 3.4, we loosen the constraint on the timestep of the two neurons; finally, in Theorem 3.5, we generalize our results to arbitrary timesteps for two spiking layers (\(N\) neurons each layer).

**Lemma 3.3**.: _At a certain timestep \(T\), if the spiking neurons are \(u_{th}\)-Neighborhood-Finite Distribution and the spatial input features of two neuron got an error upperbound \(\epsilon\), and they got the same temporal input \(h^{t-1}\), the probability upperbound of different outputs is proportional to \(\epsilon\). Formally:_

_For two spiking neurons \(\hat{\sigma}^{T}\) and \(\tilde{\sigma}^{T}\), when \(\tilde{h}^{T-1}=\hat{h}^{T-1}\) and \(\hat{u}^{T}=\hat{h}^{T-1}+\hat{x}^{T}\) is a random variable follows the \(u_{th}\)-Neighborhood-Finite Distribution, if \(\|\tilde{x}^{T}-\hat{x}^{T}\|\leq\epsilon\), then: \(P\left[\hat{\sigma}^{T}(\hat{x}^{T})\neq\tilde{\sigma}^{T}(\tilde{x}^{T}) \right]\propto\epsilon\)_

**Lemma 3.4**.: _Suppose the spiking neurons are \(u_{th}\)-Neighborhood-Finite Distribution at timestep \(T\) and the spatial input features of two corresponding spiking neurons got an error upperbound \(\epsilon\) at any timestep, and they got the same temporal input \(h^{0}\), if both spiking neurons have the same output at the first \(T-1\) timesteps, then the probability upperbound is proportional to \(\frac{\epsilon}{1-\beta}\). Formally:_

_For two spiking neurons \(\hat{\sigma}^{T}\) and \(\tilde{\sigma}^{T}\), when \(\tilde{h}^{0}=\hat{h}^{0}\) and \(\hat{u}^{T}=\hat{h}^{T-1}+\hat{x}^{T}\) is a random variable follows the \(u_{th}\)-Neighborhood-Finite Distribution, if \(\|\tilde{x}^{t}-\hat{x}^{t}\|\leq\epsilon\) and \(\hat{\sigma}^{t}(\hat{x}^{t})=\hat{\sigma}^{t}(\tilde{x}^{t})\) for \(t=1,2,\cdots,T-1\), then: \(P\left[\hat{\sigma}^{T}(\hat{x}^{T})\neq\tilde{\sigma}^{T}(\hat{x}^{T}) \right]\propto\frac{\epsilon}{1-\beta}\)._

**Theorem 3.5**.: _Suppose the spiking layers are \(u_{th}\)-Neighborhood-Finite Distribution at timestep \(t\) and the inputs of two corresponding spiking layers with a width \(N\) got an error upperbound \(\epsilon\) for each element of spatial input feature vector at any timestep, and they got the same initial temporal input vector \(\mathbf{h^{0}}\), if there is no different spiking output at the first \(T-1\) timesteps, then the probability upperbound is proportional to \(N\frac{\epsilon}{1-\beta}\). Formally:_

_For two spiking layers \(\hat{\sigma}^{T}\) and \(\tilde{\sigma}^{T}\), when \(\tilde{\mathbf{h}}^{0}=\hat{\mathbf{h}}^{0}\) and \(\hat{\mathbf{u}}^{\mathbf{t}}=\hat{\mathbf{h}}^{\mathbf{t}-1}+\hat{\mathbf{x}}^{\mathbf{t}}\) is a random variable follows the \(u_{th}\)-Neighborhood-Finite Distribution, if \(\|\tilde{x}^{t}_{k}-\hat{x}^{t}_{k}\|\leq\epsilon\left(k=1,2,\cdots,N;i=1,2, \cdots,T\right)\) and \(\hat{\sigma}^{t}(\hat{\mathbf{x}}^{\mathbf{t}})=\hat{\sigma}^{t}(\tilde{\mathbf{x}}^{\mathbf{ t}})\) for \(t=1,2,\cdots,T-1\), then: \(P\left[\hat{\sigma}^{T}(\tilde{\mathbf{x}}^{\mathbf{T}})\neq\tilde{\sigma}^{T}(\tilde{\mathbf{x}}^{ \mathbf{T}})\right]\propto N\frac{\epsilon}{1-\beta}\)._

## 4 Proving Lottery Ticket Hypothesis for Spiking Neural Networks

SLTH states that a large randomly initialized neural network has a sub-network that is equivalent to any well-trained network. In this work, the large initialized network, sub-network, well-trained network are named _large network_\(G\), _equivalent (pruned) network_\(\tilde{G}\), and _target network_\(\hat{G}\), respectively. We use the same method to differentiate the weights and other notations in these networks.

We generally follow the theoretical proof approach in [12]. **Note, the only unique additional assumption we made (considering the characteristics of SNN) is that the membrane potentials
**follow a class of distribution defined in Definition 3.1, which is easy to satisfy.** Specifically, the whole proof in this work is divided into two parts: approximation of linear transformation (Fig. 1**c**) and approximation of spatio-temporal nonlinear transformation (Fig. 1**d**), each of which contains three steps. The first part is roughly similar to the proof of LTH in the existing ANN [12]. The second part requires our spatio-temporal probabilistic modeling approach in Section 3, i.e., Theorem 3.5.

**Approximation of linear transformation.** The existing methods for proving LTH in ANNs all first approach a single weight between two neurons by adding a virtual layer (introducing redundant weights), i.e., Step 1. Different virtual layer modeling methods [12, 15, 16] will affect the width of the network in the final conclusion. All previous proofs introduce two neurons in the virtual layer for approximation. In this work, we exploit only one spiking neuron in the virtual layer for the approximation, given the nature of the binary firing of spiking neurons. We then approximate the weights between one neuron and one layer of neurons (Step 2), and the weights between two layers of neurons (Step 3). Step 2 and Step 3 are the same as previous works.

_Step 1: Approximate single weight by a spiking neuron._ As shown in Fig. 2, a connection weight in SNNs can be approximated via an additional spiking neuron (i.e, a new virtual layer with only one neuron) with two weights, one connect in and one connect out. We set the two weights of the virtual neuron as \(v\) and \(\tilde{w}\), and the target connection weight is \(\hat{w}\). Consequently, the equivalent function for the target weight can be written as \(g(s)=\tilde{w}\tilde{\sigma}(vs)\), where the temporal input of the virtual neuron does not need to be considered. Once \(v\geq u_{th}\), the virtual neuron will fire no matter how the temporal input is if spatial input \(s=1\), while not fire if \(s=0\). Thus, the output of the virtual neuron is independent of the temporal input, which is \(V_{reset}\) or the decayed membrane potential (neither of which is likely to affect the firing of the virtual neuron). We have: 1) target weight connection: \(\hat{g}(s)=\hat{w}s\); 2) equivalent structure: \(\tilde{g}(s)=\tilde{w}\tilde{\sigma}(vs)\). If the weight \(v\) satisfy \(v\geq u_{th}\), the error between the target weight connection and the equivalent structure is

\[\left\|\tilde{g}(s)-\hat{w}s\right\|=\left\|\tilde{w}s-\hat{w}s\right\|\leq \left\|\tilde{w}-\hat{w}\right\|. \tag{8}\]

Once the number of initialized weights in the large network \(G\) is large enough, it can choose the weights \(\tilde{w}\) and \(v\) to make the error approximate to 0 by probability convergence. Thus, only one spiking neuron is needed for the virtual layer. Formally, we have Lemma C.1.

_Step 2: Layer weights approximation._ Based on Lemma C.1, we can extend the conclusion to the case where there is one neuron in layer \(l\) and several neurons in layer \(l-1\). The lemma is detailed in Lemma C.2.

_Step 3: Layer to layer approximation._ Finally, we get an approximation between the two layers of spiking neurons. See Lemma C.3 for proof.

**Lemma 4.1**.: _Layer to Layer Approximation. Fix the weight matrix \(\hat{W}\in[-\frac{1}{\sqrt{N}},\frac{1}{\sqrt{N}}]^{N\times N}\) which is the connection in target network between a layer of spiking inputs and the next layer of neurons. The equivalent structure is \(k\) spiking neurons with \(k\times N\) weights \(\mathbf{V}\in\mathbf{R}^{k\times N}\) connect the input and \(\tilde{\mathbf{W}}\in\mathbf{R}^{N\times k}\) connect. All the weights \(\tilde{w}_{ij}\) and \(v_{ij}\) random initialized with uniform distribution \(\mathrm{U}[-1,1]\) and i.i.d. \(\mathbf{B}\in\{0,1\}^{N\times k}\) is the mask for matrix \(\tilde{\mathbf{W}}\), \(\sum_{i,j}\left\|B_{ij}\right\|_{0}\leq N^{2},\sum_{j}\left\|B_{ij}\right\|_{0}\leq N\). Then, let the function of equivalent structure be \(\tilde{g}(\mathbf{s})=(\tilde{\mathbf{W}}\odot\mathbf{B})\tilde{\sigma}(\mathbf{V}\mathbf{s})\), where input spiking \(\mathbf{s}\) is a vector that \(\mathbf{s}\in\{0,1\}^{N}\). Then, \(\forall\mathrm{0}<\!\!\delta\!\leq 1,\mathrm{\SIUnitSymbolMicro}\mathrm{e}\!\!>0\) when \(k\geq N\lceil\frac{N}{C_{th}\mathrm{e}}\log\frac{N}{\delta}\rceil\) and \(C_{th}=\frac{1-u_{th}}{2}\), there exists a mask matrix \(\mathbf{B}\) that \(\left\|\tilde{g}(\mathbf{s})\right\|_{i}-[\hat{W}\mathbf{s}]_{i}\right\|\leq\epsilon\) w.p at least \(1-\delta\)._

**Approximation of spatio-temporal nonlinear transformation.** Since the activation functions in ANNs satisfy the Lipschitz condition, the input error can control the output error of the activation function. In contrast, the output error is not governed by the input error when the membrane potential of a spiking neuron is at a step position. To break this limitation, in Step 4, we combine the probabilistic modeling method in Theorem 3.5 to analyze the probability of consistent output

Figure 2: The target weight \(\hat{w}\) is simulated in the pruned network \(\tilde{G}\) by only one intermediate spiking neuron (this work), due to the spiking neuron only output 0 or 1. In contrast, previous ANN works required two intermediate artificial neurons to simulate the target weights.
(only 0 or 1) of spiking layers. Then, in Step 5, we generalize the conclusions in Step 4 to the entire network regardless of the temporal input. Finally, we consider the dynamics of SNNs in the temporal dimension in Step 6. Specifically, we can denote a SNN as follow:

\[G^{t}(\mathbf{S})=G^{t,L}\circ G^{t,L-1}\circ\cdots\circ G^{t,2}\circ G^{t,1}(\mathbf{S}), \tag{9}\]

where \(\mathbf{S}\in\{0,1\}^{N\times T}\) is the spatial input of the entire network at all timesteps. \(G^{t,l}(\cdot)\) represents the function of network \(G\) at \(t\)-th timestep and \(l\)-th layer, when considering the specific temporal input, it can be written as:

\[G^{t,l}(\mathbf{S})=\sigma_{\mathbf{W}^{l}\mathbf{S}^{1:t-1,l}}^{t,l}(\mathbf{W}^{l}\mathbf{S}^{t, l-1}), \tag{10}\]

where spatial input at \(t\)-th timestep is \(\mathbf{S}^{t,l-1}\in\{0,1\}^{N}\), \(\sigma\) denotes the activation function of spiking layer, its subscript \(\mathbf{S}^{1:t-1,l}\) indicates that the membrane potential at \(t\)-th timestep is related to the spatial inputs at all previous timesteps. We are not concerned with these details in probabilistic modeling, thus they are omitted in the remaining chapters where they do not cause confusion.

_Step 4: Layer spiking activation approximation._ Compared to the Step 3, we here include spiking activations to evaluate the probability that two different spiking layers (same input, different weights) have the same output. See Lemma C.4 for proof

**Lemma 4.2**.: _Layer Spiking Activation Approximation. Fix the weight matrix \(\mathbf{\hat{W}}\in[-\frac{1}{\sqrt{N}},\frac{1}{\sqrt{N}}]^{N\times N}\) which is the connection in target network between a layer of spiking inputs and the next layer of neurons. The equivalent structure is \(k\) spiking neurons with \(k\times N\) weights \(\mathbf{V}\in\mathbf{R}^{k\times N}\) connect the input and \(\mathbf{\tilde{W}}\in\mathbf{R}^{N\times k}\) connect out. All the weights \(\tilde{w}_{ij}\) and \(v_{ij}\) random initialized with uniform distribution \(\mathrm{U}[-1,1]\) and i.i.d. \(\mathbf{B}\in\{0,1\}^{N\times k}\) is the mask for matrix \(\mathbf{V}\), \(\sum_{i,j}\left\|B_{ij}\right\|_{0}\leq N^{2},\sum_{j}\left\|B_{ij}\right\|_{0}\leq N\). Then, let the function of equivalent structure be \(\tilde{g}(\mathbf{s})=\tilde{\sigma}((\mathbf{\tilde{W}}\odot\mathbf{B})\tilde{\sigma}(\bm {V}\mathbf{s})),\) where input spiking \(\mathbf{s}\) is a vector that \(\mathbf{s}\in\{0,1\}^{N}\). \(C\) is the constant depending on the supremum probability density of the dataset of the network. Then, \(\forall\delta,\exists\epsilon\) when \(k\geq N^{2}\lceil\frac{N}{C_{th}\epsilon}\log\frac{N^{2}}{\delta-NC\epsilon}\rceil\), there exists a mask matrix \(\mathbf{B}\) that \(\left\|\tilde{g}(\mathbf{s})-\hat{\sigma}(\mathbf{\hat{W}}\mathbf{s})\right\|=0\) w.p at least \(1-\delta\)._

_Step 5: Network approximation (\(T=1\))._ The lemma is generalized to the whole SNN in Lemma C.5.

_Step 6: Network approximation (\(T>1\))._ If the output of two SNNs in the first \(T-1\) timestep is consistent, and we assume that the error of spatial input features at all timesteps has an upperbound, there is a certain probability that the output of the two SNNs in timestep \(T\) is also the same. See detail proof in Theorem C.6 and detail theorem as follow Theorem 4.3:

**Theorem 4.3**.: _All Steps Approximation. Fix the weight matrix \(\mathbf{\hat{W}}^{l}\in[-\frac{1}{\sqrt{N}},\frac{1}{\sqrt{N}}]^{N\times N}\) which is the connection in target network between a layer of spiking inputs and the next layer of neurons. The equivalent structure is \(k\) spiking neurons with \(k\times N\) weights \(\mathbf{V}^{l}\in\mathbf{R}^{k\times N}\) connect the input and \(\mathbf{\tilde{W}}^{l}\in\mathbf{R}^{N\times k}\) connect out. All the weights \(\mathbf{\tilde{w}}_{ij}^{l}\) and \(v_{ij}^{l}\) random initialized with uniform distribution \(\mathrm{U}[-1,1]\) and i.i.d. \(\mathbf{B}^{l}\in\{0,1\}^{k\times N}\) is the mask for matrix \(\mathbf{V}^{l}\), \(\sum_{i,j}\left\|B_{ij}^{l}\right\|_{0}\leq N^{2},\sum_{j}\left\|B_{ij}^{l} \right\|_{0}\leq N\). Then, let the function of equivalent network at timestep \(t\) be \(\tilde{G}^{t}(\mathbf{S})=\tilde{G}^{t,L}\circ\tilde{G}^{t,L-1}\circ\cdots\circ \tilde{G}^{t,1}(\mathbf{S})\) and \(\tilde{G}^{t,l}=\tilde{\sigma}^{t}((\mathbf{\tilde{W}}^{l}\odot\mathbf{B}^{l})\tilde{ \sigma}^{t}(\mathbf{V}^{l}\mathbf{S}^{t}))\), where input spiking \(\mathbf{S}\) is a tensor that \(\mathbf{S}\in\{0,1\}^{N\times T}\). And the target network at timestep \(t\) is \(\tilde{G}^{t}(\mathbf{S})=\tilde{G}^{t,L}\circ\tilde{G}^{t,L-1}\circ\cdots\circ\tilde {G}^{t,1}(\mathbf{S})\), where \(\tilde{G}^{t,l}(\mathbf{S})=\tilde{\sigma}^{t}(\tilde{W}^{l}\mathbf{S}^{t})\). \(l=1,2,\cdots,L,t=1,2,\cdots,T\). \(C\) is the constant depending on the supremum probability density of the dataset of the network. Then, \(\forall 0<\delta\leq 1,\exists\epsilon>0\) which \(\geq N^{2}\lceil\frac{N}{C_{th}\epsilon}\log\frac{N^{2}L}{\delta-NCLT\epsilon}\rceil\), there exists a mask matrix \(\mathbf{B}\) that \(\left\|\tilde{G}(\mathbf{S})-\hat{G}(\mathbf{S})\right\rceil=0\), w.p at least \(1-\delta\)._

## 5 Searching Winning Tickets from SNNs without Weight Training

By applying the top-\(k\%\) sub-network searching (edge-popup) algorithm[11], we empirically verified SLTH as the complement of the theoretical proof in Section 4. Spiking neurons do not satisfy the Lipschitz condition, but the ANN technique can still be employed since the surrogate gradient of the SNN during BP training [36]. We first simply introduce the search algorithm, then show the results.
The sub-network search algorithm first proposed by [11] provides scores for every weight as a criterion for sub-network topology choosing. In each step of forward propagation, the top-\(k\%\) score weights are chosen while others are masked by \(0\). It means the network used for classification is actually a sub-network of the original random initialized network. During the BP training process, the scores are randomly initialized as weights at the beginning, and then the gradient of the score is updated while the gradient of weights is not recorded (weights are not changed). The updating rule of scores can be formally expressed in mathematical notations as follow:

\[s_{uv}\gets s_{uv}+\alpha\frac{\partial\mathcal{L}}{\partial\mathcal{I}_ {v}}S_{u}w_{uv}, \tag{11}\]

Where \(s_{uv}\) and \(w_{uv}\) denote the score and corresponding weight that connect from spiking neuron \(u\) to \(v\), respectively, \(S_{u}\in\{0,1\}\) indicates the output of neuron \(u\), \(\mathcal{L}\) and \(\mathcal{I}_{v}\) are loss function value of the network and the input value of the neuron \(v\), and \(\alpha\) is the learning rate.

We apply the edge-popup in SNN-VGG-16 and Res-SNN-19. We set maskable weights for all layers (the first layer and the last layer are included). The hyper-parameter sparsity \(k\%\) is set every 0.2 from 0.1 to 0.9. The datasets used to verify are CIFAR10/100. The network structures and other experiment details are shown in Appendix E. As shown in Fig. 3, the existence of good sub-networks is empirically verified, which is highly conformed with our theoretical analysis. The additional timesteps and discontinuous activation complicate the sub-network search problem in SNNs, but good sub-networks still exist without any weight training and can be found by specific algorithms.

## 6 Pruning

Criterion Based on Probabilistic Modeling

**Discussion.** For two spiking neurons, layers, or networks that have the same input but different weights, the proposed probabilistic modeling method can give the probability that the outputs (that is, the spiking firing) of both are the same. We convert the perturbation brought by pruning under the same input into the error of spatial input features, and then analyze its impact on spiking firing. Then, we prove that the lottery ticket hypothesis also holds in SNNs.

The potential of probabilistic modeling goes far beyond that. Probabilistic modeling prompts us to rethink whether the existing pruning methods in SNNs are reasonable, since most methods directly continue the idea and methods of ANN pruning. Firstly, from the view of linear transformation, _how to metrics the importance of weights in SNNs?_ The relationship between the inner state of the artificial neuron before activation and the input is usually not considered in ANN pruning. But we have to take this into account in binary-activated SNN pruning because the membrane potential is related to both weights and inputs. For instance, when the input spike frequency is 0, no matter how large the weight is, it will not affect the result of the linear transformation (Fig. 4). Secondly, from the view of nonlinear transformation, _how does pruning affect the output of SNNs?_ As shown in Fig. 1**b**, when the membrane potential is in different intervals, the probability that the output of the spiking neuron is changed is also different. Thus, we study this important question theoretically using probabilistic modeling.

Moreover, we can assume that the weights of the network remain unchanged, and add disturbance to the input, then exploit probabilistic modeling to analyze the impact of input perturbations on

Figure 4: The importance of weight needs to consider both the magnitude of the weight and the firing of neurons.

Figure 3: The horizontal and vertical coordinates represent the sparsity and accuracy. The solid line is the untrained sub-network. The dashed line is the trained large network (sparsity=\(0\%\)).
the output, i.e., analyze the robustness [45] of the SNNs in a new way. Similarly, probabilistic modeling can also analyze other compression methods in SNNs, such as quantization [46], tensor decomposition [47], etc. The perturbations brought about by these compression methods can be converted into errors in the membrane potential, which in turn affects the firing of spiking neurons.

**Pruning criterion design.** We design a new criterion to prune weights according to their probabilities of affecting the firing of spiking neurons. Based on Theorem 3.5, for each weight, its influence on the output of the spiking neuron has a probability upperbound \(P\), which can be estimated as:

\[P\approx E(|u^{\prime}-u|)\mathcal{N}(0|\mu-u_{th},var), \tag{12}\]

where \(E(|u^{\prime}-u|)\) is the expectation of the error in the membrane potential brought about by pruning. In this work, it is written as:

\[E(|u^{\prime}-u|)=\frac{E_{act}[|w|]\left|\gamma\right|}{\sqrt{\sigma_{\mathcal{ B}}^{2}+\epsilon}}, \tag{13}\]

where \(E_{act}[w]\) is the expectation that a weight is activated (the pre-synaptic spiking neuron outputs a spike). \(\gamma\) and \(\sigma_{B}\) are a pair of hyper-parameters in Batch Normalization [48], which can also affect the linear transformation of weights, thus we incorporate them into Eq. (13). The detailed derivation of Eq. (13) can be found in Appendix D. Note, in keeping with the notations in classic BN, there is some notation mixed here, but only for Eq. (12) and Eq. (13). Next, following [43; 44], here we suppose the membrane potential follows Gaussian distribution \(\mathcal{N}(\mu,var)\). Consequently, \(\mathcal{N}(0|\mu-u_{th},var)\) represents the probability density when the membrane potential is at the threshold \(u_{th}\). Finally, for each weight, we have a probability \(P\), and we prune according to the size of \(P\).

**Experiments.** Since our subject is to theoretically prove LTH in SNNs, we test the proposed new criteria using methods related to LTH. Note, Eq. (12) is a general pruning criterion and can also be incorporated in traditional non-LTH SNN pruning methods. Specifically, in this work we employ the LTH-based Iterative Magnitude Pruning (IMP) method for prune [10], whose criterion is to prune weights with small absolute values (algorithm details are given in Appendix F). Then, we change the criterion to pruning according to the size of \(P\) in Eq. (12).

We re-implement the pipeline network (Res-SNN-19 proposed in [43]) and IMP pruning method on the CIFAR-10/100 [49] datasets. We use the official code provided by authors in [21] for the whole pruning process. Then, we perform rigorous ablation experiments without bells and whistles, i.e., all experiment settings are same, the only change is to regulate the pruning criterion to Eq. (12). This is a IMP pruning based on Spiking Firing, thus we name it SF-IMP-1 (Appendix F). Moreover, the encoding layer (the first convolutional layer) in SNNs has a greater impact on task performance, and we can also allow the weights pruning in the encoding layer to be reactivated [50], called SF-IMP-2 (Appendix F).

The experimental results are shown in Fig. 5. First, these two approaches perform marginally differently on CIFAR-10/100, with SF-IMP-2 outperforming on CIFAR-10, and SF-IMP-1 performing better on CIFAR-100. Especially, compared with the vanilla IMP algorithm on CIFAR-100, SF-IMP-1 performs very well at all pruning sparsities. But on CIFAR-10, when the sparsity is high, the vanilla IMP looks better. One of the possible reasons is that the design of Eq. (12) still has room for improvement. These preliminary results demonstrate the effectiveness of the pruning criteria designed based on probabilistic modeling, and also lay the foundation for the subsequent design of more advanced pruning algorithms.

Figure 5: Observations from Iterative Magnitude Pruning (IMP) with the proposed pruning criterion \(P\) in eq. (12).
Conclusions

In this work, we aim to theoretically prove that the Lottery Ticket Hypothesis (LTH) also holds in SNNs, where the LTH theory has had a wide influence in traditional ANNs and is often used for pruning. In particular, spiking neurons employ binary discrete activation functions and have complex spatio-temporal dynamics, which are different from traditional ANNs. To address these challenges, we propose a new probabilistic modeling method for SNNs, modeling the impact of pruning on spiking firing, and then prove both theoretically and experimentally that LTH4 holds in SNNs. We design a new pruning criterion from the probabilistic modeling view and test it in an LTH-based pruning method with promising results. Both the probabilistic modeling and the pruning criterion are general. The former can also be used to analyze the robustness and other network compression methods of SNNs, and the latter can also be exploited in non-LTH pruning methods. In conclusion, we have for the first time theoretically established the link between membrane potential perturbations and spiking firing through the proposed novel probabilistic modeling approach, and we believe that this work will provide new inspiration for the field of SNNs.

Footnote 4: Specifically and strictly, strong LTH. We get a sub-network that performs well without any training.
