## 3 Methods
### Spiking-Softmax Method
#### 3.3.2 Spiking Collaboration Normalized Neuron  
The Spiking Collaboration Normalized Neuron (SI-norm) is proposed to simulate the normalization operation of the Softmax function, which includes an input spike sequence (sr), a threshold voltage (\(\mathrm{V_{th}}\)), and weights (w), which can be directly used in the inference process. In the rate-encoding method proposed by [57], a floating-point number x is encoded into a spike sequence, with the number of spikes within a period T is denoted as \(\mathrm{N_{spike}}\). The input of the SI-norm neuron is a regular spike sequence sr obtained by encoding the floating-point number 1.0. The output \(\mathrm{exp_{i}}\) of the SI-exp neuron is considered the weight w of the SI-norm neuron, where i denotes the index of the SI-exp neuron and n  
Figure 9: Inference process of the SI-exp neuron over K time steps. Where x denotes the floating-point input, and the internal parameters h(t), d(t),  
denotes the number of SI-exp neurons. The threshold voltage \(V_{th}\) is obtained by summing the outputs \(exp_{i}\) of the SI-exp neurons, as shown in Equation (12).  
\[V_{th}=\sum_{i=1}^{n}exp_{i} \tag{12}\]  
The membrane potential \(v(t)\) changes over T time steps starting from the initial value \(v(0)=0\), as illustrated in Figure 11a. At each time step \(t\), the spiking neuron first undergoes charging, and the change in membrane potential during charging is given by Equation (13):  
\[v(t)=v(t-1)+sr(t)\cdot w \tag{13}\]  
w denotes the weight of the SI-norm neuron, \(sr(t)\) is the value of the regular spiking sequence \(sr\) at different time steps, where \(t=1,\ldots,T\). If \(v(t)\) exceeds the threshold voltage \(V_{th}\), then the spiking signal of the neuron is \(z(t)=1\), and the neuron discharges simultaneously; otherwise, \(z(t)=0\). The change in membrane potential during discharge is given by Equation (14).  
\[v(t)=v(t)-V_{th}\cdot z(t) \tag{14}\]  
Figure 11: SI-norm neuron: (**a**) A simulation of the SI-norm neuron over T time steps, with the output spike sequence denoted by \(z(t)\). (**b**) SI-norm neurons are implemented using \(N_{spike}\) rather than \(sr\).  
Figure 10: Distribution of optimized internal parameters of the SI-exp neuron. The horizontal axis denotes the time step, and the vertical axis denotes the parameter value.  
Through observation of the charging-discharging activity of the neuron, eventually, the change in the membrane potential of neuron can be given by Equation (15).  
\[\mathrm{v(t)=v(t-1)+sr(t)\cdot w-V_{th}\cdot z(t)} \tag{15}\]  
After T time steps of change, the output of the SI-norm neuron, denoted as out, is given by Equation (16). If no spikes are emitted, then \(\mathrm{out}=0\).  
\[\mathrm{out}=\max\left(0,\left\lfloor\sum_{t=1}^{T}sr(i)\cdot\frac{w}{V_{th}} \right\rfloor\right)=\max\left(0,\left\lfloor\sum_{t=1}^{T}z(t)\right\rfloor\right) \tag{16}\]  
As shown in Figure 8, the values of \(V_{th}\) and \(\exp_{i}\) depend on the inputs \(x_{1}\sim x_{n}\); hence, during the ANN-to-SNN conversion process, the weights and threshold voltage of the SI-norm neuron dynamically change. There exists a linear relationship between out and \(N_{spike}\), with the linear factor being \(w_{i}/V_{th}\), as shown in Equation (17):  
\[\mathrm{Spiking\_Softmax(x)=out=max\left(0,\left\lfloor N_{spike}\cdot\frac{w}{V _{th}}\right\rfloor\right)} \tag{17}\]  
\(N_{spike}\) denotes the number of spikes in the spiking sequence \(sr\) within the period T. If the threshold voltage \(V_{th}\) is the product of \(w\) and \(N_{spike}\), then this voltage accumulates \(N_{spike}\) times to generate an output spike. Substituting \(N_{spike}\) for the input \(sr\) of SI-norm, amplifying the spiking signal, it is possible to save time in the charging-discharging activity over T time steps in the inference process, as shown in Figure 11b.