Sharing Leaky-Integrate-and-Fire Neurons for Memory-Efficient Spiking
  Neural Networks
Spiking Neural Networks (SNNs) have gained increasing attention as
energy-efficient neural networks owing to their binary and asynchronous
computation. However, their non-linear activation, that is
Leaky-Integrate-and-Fire (LIF) neuron, requires additional memory to store a
membrane voltage to capture the temporal dynamics of spikes. Although the
required memory cost for LIF neurons significantly increases as the input
dimension goes larger, a technique to reduce memory for LIF neurons has not
been explored so far. To address this, we propose a simple and effective
solution, EfficientLIF-Net, which shares the LIF neurons across different
layers and channels. Our EfficientLIF-Net achieves comparable accuracy with the
standard SNNs while bringing up to ~4.3X forward memory efficiency and ~21.9X
backward memory efficiency for LIF neurons. We conduct experiments on various
datasets including CIFAR10, CIFAR100, TinyImageNet, ImageNet-100, and
N-Caltech101. Furthermore, we show that our approach also offers advantages on
Human Activity Recognition (HAR) datasets, which heavily rely on temporal
information.
Youngeun Kim, Yuhang Li, Abhishek Moitra, Ruokai Yin, Priyadarshini Panda
# Sharing Leaky-Integrate-and-Fire Neurons for Memory-Efficient Spiking Neural Networks

###### Abstract

Spiking Neural Networks (SNNs) have gained increasing attention as energy-efficient neural networks owing to their binary and asynchronous computation. However, their nonlinear activation, that is Leaky-Integrate-and-Fire (LIF) neuron, requires additional memory to store a membrane voltage to capture the temporal dynamics of spikes. Although the required memory cost for LIF neurons significantly increases as the input dimension goes larger, a technique to reduce memory for LIF neurons has not been explored so far. To address this, we propose a simple and effective solution, EfficientLIF-Net, which shares the LIF neurons across different layers and channels. Our EfficientLIF-Net achieves comparable accuracy with the standard SNNs while bringing up to \(\sim 4.3\times\) forward memory efficiency and \(\sim 21.9\times\) backward memory efficiency for LIF neurons. We conduct experiments on various datasets including CIFAR10, CIFAR100, TinyImageNet, ImageNet-100, and N-Caltech101. Furthermore, we show that our approach also offers advantages on Human Activity Recognition (HAR) datasets, which heavily rely on temporal information.

 Neuromorphic Computing, Memory Efficiency, Spiking Neural Networks

## I Introduction

Spiking Neural Networks (SNNs) have gained significant attention as a promising candidate for low-power machine intelligence [1, 2, 3, 4, 5, 6]. By mimicking biological neuronal mechanisms, Leaky-Integrate-and-Fire (LIF) neurons in SNNs convey visual information with temporal binary spikes over time. The LIF neuron [7] considers temporal dynamics by accumulating incoming spikes inside a membrane potential, and generates output spikes when the membrane potential voltage exceeds a firing threshold. Such binary and asynchronous operation of SNNs incurs energy-efficiency benefits on low-power neuromorphic hardware [8, 9, 10, 11].

Although SNN brings computational efficiency benefits, memory overhead caused by LIF neurons can be problematic. As shown in Fig. 1, LIF neurons require additional memory for storing the membrane potential value which changes over time. This is not the case for the traditional Artificial Neural Networks (ANNs) where most non-linear activation functions are parameter-free (_e.g._, ReLU, Sigmoid). At the same time, LIF neurons occupy a large portion of memory with the high-resolution input image (Fig. 1). For instance, the LIF memory takes \(53\%\) of memory overhead in the case of ResNet19 [12] with a \(224\times 224\) image. Unfortunately, the LIF memory overhead has been overlooked so far in SNN studies.

To address this, we propose EfficientLIF-Net where we share the LIF neurons across different layers and channels. By sharing the memory, we do not need to assign separate memory for each layer and channel. For layer-wise sharing, we use common LIF neurons across layers having the same activation size, such as layers in one ResNet block [12]. For channel-wise sharing, we equally divide the LIF neurons into multiple groups through the channel dimension and share common LIF neurons across different groups. Surprisingly, our EfficientLIF-Net provides similar performance as the standard SNN models where each layer and channel has independent LIF neurons. We show the gradient can successfully flow back through all layers, thus the weight can be trained to consider the temporal dynamics of spike information.

Furthermore, the proposed EfficientLIF-Net brings huge benefits to saving memory costs during training. Spatio-temporal operation inside SNNs incurs a huge computational graph for computing backward gradients. Each LIF neuron needs to store membrane potential to make gradients flow back, where the training memory increases as the SNN goes deeper and uses larger timesteps. This huge computational graph often is difficult to be trained on the limited GPU mem

Fig. 1: Motivation of our work. **Top:** Comparison between neurons in ANNs and SNNs: Unlike ReLU neurons, which do not require any parameters, LIF neurons maintain a membrane potential with voltage values that change across timesteps. **Bottom:** Memory cost breakdown for the Spiking-ResNet19 architecture during inference on an image with a resolution of \(224\times 224\).
ory [13, 14, 15]. In this context, since our architecture shares the membrane potential across all layers, we can compute each layer's membrane potential from the next layer's membrane potential real-time during backward step. This enables us to perform backpropagation without the need for storing/caching the membrane potentials of all layers in memory (from the forward step).

Our contributions can be summarized as follows:

* We pose the memory overhead problem of LIF neurons in SNNs, where the memory cost significantly increases as the image size goes larger.
* To address this, we propose a simple and effective architecture, EfficientLIF-Net where we share the LIF neurons across different layers and channels.
* EfficientLIF-Net also reduces memory cost during training by computing each layer's (channel's) membrane potential from the next layer's (channel's) membrane potential real-time during backward step, drastically reducing the caching of membrane potentials.
* We conduct experiments on five public datasets, validating EfficientLIF-Net can achieve comparable performance as the standard SNNs while bringing up to \(\sim 4.3\times\) forward memory efficiency and up to \(\sim 21.9\times\) backward memory efficiency for LIF neurons.
* We also observe that the LIF memory cost problem exists in pruned SNNs and in fact the LIF memory overhead percentage goes higher when the weight sparsity goes higher. Our EfficientLIF-Net successfully reduces the LIF memory cost to \(\sim 23\%\) in pruned SNNs while achieving iso-accuracy compared to the pruned baseline.

## II Related Work

### _Spiking Neural Networks_

Different from the standard Artificial Neural Networks (ANNs), Spiking Neural Networks (SNNs) convey temporal spikes [1, 2]. Here, Leaky-Integrate-and-Fire (LIF) neuron plays an important role as the non-linear activation. The LIF neurons have a "memory" called membrane potential, where the incoming spikes are accumulated. Output spikes are generated if the membrane potential exceeds a firing threshold, then the membrane potential resets to zero. This firing operation of LIF neurons is non-differentiable, so the previous SNN literature has focused on resolving the gradient problem. A widely-used training technique is converting pre-trained ANNs to SNNs using weight or threshold balancing [16, 17, 18, 19, 20]. However, such methods require large number of timesteps to emulate float activation using binary spikes. Recently, a line of works propose to circumvent the non-differentiable backpropagation problem by defining a surrogate function [21, 22, 23, 24, 25, 26, 27, 28, 29, 30]. As the weight is trained to consider temporal dynamics, they show both high performance and short latency. Although the previous methods have made huge advances in terms of improving the performance, they assume that SNNs have different LIF neurons for different layers and channels, which imposes a huge memory overhead in both forward and backward.

### _Compression Methods for Efficient SNNs_

Due to the energy-efficiency benefit of SNNs, they can be suitably implemented on edge devices with limited memory storage [31, 32, 33]. Therefore, a line of work has proposed various methods to reduce the memory cost for SNNs using compression techniques. Neural pruning is one of the effective methods for SNN compression. Several works [34, 35] have proposed a post-training pruning technique using a threshold value. Unsupervised online adaptive weight pruning [36] dynamically prunes trivial weights over time. Shi _et al._[37] prune weight connections during training with a soft mask. Recently, deeper SNNs are pruned with ADMM optimization tool [38], gradient-based rewiring [39], and lottery ticket hypothesis [40]. Meanwhile, various quantization techniques also have been proposed to compress SNNs [41, 42, 43, 44]. Schaefer and Joshi [45] propose integer fixed-point representations for neural dynamics, weights, loss, and gradients. The recent work [46] performs quantization through temporal dimension for low-latency SNNs. Lui and Neftci propose a quantization technique based on the Hessian of weights [47]. Nonetheless, no prior work has explicitly addressed the memory overhead caused by LIF neurons. Our method effectively reduces memory overhead by modifying the architecture, and is orthogonal to previous methods. Thus, combining EfficientLIF-Net with compression techniques will further compound the benefits.

## III Preliminaries

### _Leaky Integrate-and-Fire Neuron_

In our paper, we mainly address the memory cost from a Leaky-Integrate-and-Fire (LIF) neuron, which is widely adopted in SNN works [22, 25, 26, 27, 28, 24, 25, 28]. Suppose LIF neurons in \(l\)-th layer have membrane potential \(U_{l}^{t}\) at timestep \(t\), we can formulate LIF neuron dynamics as:

\[U_{l}^{t}=\lambda U_{l}^{t-1}+W_{l}O_{l-1}^{t}, \tag{1}\]

where \(W_{l}\) is weight parameters in layer \(l\), \(O_{l-1}^{t}\) represents the spikes from the previous layer, \(\lambda\) is a decaying factor in the membrane potential. Note, we use uppercase letters for matrix notation. The LIF neuron generates an output spike \(O_{l}^{t}\) when the membrane potential exceeds the firing threshold \(\theta\). Here, we define the spike firing function as:

\[f(U_{l}^{t})=O_{l}^{t}=\begin{cases}1&\text{if }U_{l}^{t}>\theta\\ 0&\text{otherwise}\end{cases}. \tag{2}\]

After firing, the membrane potential can be reset to zero (_i.e._, hard reset), or reduced by the threshold value (_i.e._, soft reset). Thus, an LIF neuron always stores the membrane potential to capture the temporal information of spikes. The memory cost for LIF neurons is proportional to the input image dimension, which poses huge memory overhead for high-resolution data such as ImageNet [49].

### _Gradient Backpropagation in SNNs_

For the class probability prediction, we accumulate the final-layer activation across all timesteps, followed by the Softmax function. We apply cross-entropy loss \(L\) for training
the weights parameters. The backward gradients are calculated in both spatial and time axis [23, 3] according to the chain rule:

\[\frac{\partial L}{\partial W_{l}}=\sum_{t}(\frac{\partial L}{\partial O_{l}^{t}} \frac{\partial O_{l}^{t}}{\partial U_{l}^{t}}+\frac{\partial L}{\partial U_{l}^ {t+1}}\frac{\partial U_{l}^{t+1}}{\partial U_{l}^{t}})\frac{\partial U_{l}^{t} }{\partial W_{l}}. \tag{3}\]

Here, the gradient of output spikes with respect to the membrane potential \(\frac{\partial O_{l}^{t}}{\partial U_{l}^{t}}\) is non-differentiable. Following previous work [6], we use \(arctan()\) to approximate gradients, _i.e._, we use an approximate function \(f(x)=\frac{1}{\pi}arctan(\pi x)+\frac{1}{2}\) for computing gradients of \(\frac{\partial O_{l}^{t}}{\partial U_{l}^{t}}\). The overall computational graph is illustrated in Fig. 3(a).

## IV EfficientLIF-Net

In this section, we first describe the details of how we reduce the memory cost of LIF neurons across layers and channels. The overall concept of EfficientLIF-Net is illustrated in Fig. 2. After that, we provide the analysis of the backward gradient in EfficientLIF-Net for training, which shows our EfficientLIF-Net successfully considers the entire time horizon. Finally, we show the memory advantage of our EfficientLIF-Net during backpropagation.

### _Sharing Memory of LIF neurons_

**Cross-layer Sharing.** The key idea here is sharing the LIF neurons across different layers where they have the same output activation size. Thus, LIF neurons are shared across multiple subsequent layers before the layer increases channel size or reduces spatial resolution. Such architecture design can be easily observed in CNN architectures such as ResNet [12].

Let's assume the networks have the same activation size from the \(l\)-th layer to the \((l+m)\)-th layer. The membrane potential of the \((l+1)\)-th layer is calculated by adding the previous layer's membrane potential and weighted spike output from the previous layer:

\[U_{l+1}^{t}=\lambda(U_{l}^{t}-O_{l}^{t})+W_{l+1}O_{l}^{t}. \tag{4}\]

Here the previous layer's membrane potential \(U_{l}^{t}\) decreases its value by the threshold for soft reset (firing threshold is set to \(1\)) after it generates spikes \(O_{l}^{t}\). After that, decay factor \(\lambda\) is applied to the previous layer's membrane potential, since we aim to dilute the previous layers' information as networks go deeper. The layer \((l+1)\) generates output spike following Eq. 2:

\[O_{l+1}^{t}=f(U_{l+1}^{t}). \tag{5}\]

In the same timestep, the spike information goes through all layers (from \(l\)-th layer to \(l+m\)-th layer) with Eq. 4 and Eq. 5 dynamics. Then, the membrane potential of layer \(l+m\) is shared with layer \(l\) at the next timestep (purple arrow in Fig. 3(b)).

\[U_{l}^{t+1}=\lambda(U_{l+m}^{t}-O_{l+m}^{t})+W_{l}O_{l-1}^{t+1}, \tag{6}\]

where the soft reset and decaying is applied to \(U_{l+m}^{t}\), and the weighted input comes from layer \(l-1\).

Overall, we require only one-layer LIF memory for layer \(l\sim\text{layer }(l+m)\) computation, which is shared across all layers and timesteps. Thus, LIF memory of layers \(l\sim(l+m)\) can be reduced by \(\frac{1}{m}\). The overall computational graph is illustrated in Fig. 3(b).

**Cross-channel Sharing.** We also explore the neuron sharing scheme in the channel dimension. Let \(X_{l}\) be the weighted input spike, _i.e._, \(X_{l}=W_{l}O_{l-1}^{t}\), then we first divide the weighted input spike tensor into \(N\) groups in channel axis.

\[X_{l}^{t}\rightarrow[X_{l}^{t,(1)},X_{l}^{t,(2)},...,X_{l}^{t,(N)}]. \tag{7}\]

Suppose \(X_{l}^{t}\in\mathbb{R}^{C\times H\times W}\), then the spike of each group can be represented as \(X_{l}^{t,(i)}\in\mathbb{R}^{\frac{C}{N}\times H\times W}\), \(i\in\{1,2,...,N\}\). Then, the LIF neurons can be sequentially shared across different groups (_i.e._, different channels) of weighted input spike. The membrane potential of \((i+1)\)-th group at layer \(l\) can be formulated as:

\[U_{l}^{t,(i+1)}=\lambda(U_{l}^{t,(i)}-O_{l}^{t,(i)})+X_{l}^{t,(i+1)}, \tag{8}\]

where \(U_{l}^{t,(i)}\) is the membrane potential of the previous group, and \(X_{l}^{t,(i+1)}\) is the incoming weighted spike input of the \((i+1)\)-th group from the previous layer. Here, soft reset and decaying also applied. The output spikes of each group are

Fig. 2: Illustration of the proposed EfficientLIF-Net. (a) Conventional SNNs where each layer and channel has separate LIF neurons. (b)-(d) is our proposed EfficientLIF-Net which shares LIF neurons across layer, channel, and layer & channel.
generated by standard firing dynamics (Eq. 2):

\[O_{l}^{t,(i)}=f(U_{l}^{t,(i)}). \tag{9}\]

We concatenate the output spikes of each groups through channels in order to compute the output at timestep \(t\):

\[O_{l}^{t}=[O_{l}^{t,(1)},O_{l}^{t,(2)},...,O_{l}^{t,(N)}]. \tag{10}\]

After completing the LIF sharing in timestep \(t\), we share the last group's (_i.e_., group \(N\)) membrane potential to the first group in the next timestep \(t+1\).

\[U_{l}^{t+1,(1)}=\lambda(U_{l}^{t,(N)}-O_{l}^{t,(N)})+X_{l}^{t+1,(1)}. \tag{11}\]

By using cross-channel sharing, the memory cost for LIF neuron of one layer can be reduced by \(\frac{1}{N}\), where \(N\) is the number of groups. Thus, memory-efficiency will increase as we use larger group number.

**Cross-layer&channel Sharing.** The cross-layer and cross-channel sharing methods are complementary to each other, therefore they can be used together to bring further memory efficiency. The LIF neurons are shared across channels and layers as shown in Fig. 2(d). The neuron-sharing mechanism can be obtained by combining cross-layer and cross-channel sharing methods.

Let's assume the networks have the same activation size from the \(l\)-th layer to the \((l+m)\)-th layer. The sharing mechanism in one layer is same as channel sharing. Let \(X_{l}\) be the weighted input spike, _i.e_., \(X_{l}=W_{l}O_{l-1}^{t}\), then we first divide the weighted input spike tensor into \(N\) groups in channel axis.

\[X_{l}^{t}\rightarrow[X_{l}^{t,(1)},X_{l}^{t,(2)},...,X_{l}^{t,(N)}]. \tag{12}\]

Suppose \(X_{l}^{t}\in\mathbb{R}^{C\times H\times W}\), then the spike of each group can be represented as \(X_{l}^{t,(i)}\in\mathbb{R}^{\frac{C}{N}\times H\times W}\), \(i\in\{1,2,...,N\}\). Then, the LIF neurons can be sequentially shared across different groups (_i.e_., different channels) of weighted input spike. The membrane potential of \((i+1)\)-th group at layer \(l\) can be formulated as:

\[U_{l}^{t,(i+1)}=\lambda(U_{l}^{t,(i)}-O_{l}^{t,(i)})+X_{l}^{t,(i+1)}, \tag{13}\]

where \(U_{l}^{t,(i)}\) is the membrane potential of the previous group, and \(X_{l}^{t,(i+1)}\) is the incoming weighted spike input of the \((i+1)\)-th group from the previous layer. Here, soft reset and decaying is also applied. The output spikes of each group are generated by standard firing dynamics:

\[O_{l}^{t,(i)}=f(U_{l}^{t,(i)}). \tag{14}\]

We concatenate the output spikes of each group through channels in order to compute the output at timestep \(t\):

\[O_{l}^{t}=[O_{l}^{t,(1)},O_{l}^{t,(2)},...,O_{l}^{t,(N)}]. \tag{15}\]

After completing the LIF sharing at layer \(l\), we share the last group's (_i.e_., group \(N\)) membrane potential of \(l\)-th layer to the first group of \(l+1\)-th layer.

\[U_{l+1}^{t,(1)}=\lambda(U_{l}^{t,(N)}-O_{l}^{t,(N)})+X_{l+1}^{t+1,(1)}. \tag{16}\]

In the same timestep, the spike information goes through all layers (from \(l\)-th layer to \(l+m\)-th layer) dynamics. Then, the last group's (_i.e_., group \(N\)) membrane potential of layer \(l+m\) is shared with the first group of layer \(l\) at the next timestep.

\[U_{l}^{t+1,(1)}=\lambda(U_{l+m}^{t,(N)}-O_{l+m}^{t,(N)})+X_{l}^{t+1,(1)}. \tag{17}\]

By using cross-channel sharing, the memory cost of LIF neuron for layer \(l\sim\) layer \((l+m)\) computation can be reduced by \(\frac{1}{mN}\), where \(N\) is the number of groups. Our experimental results show that although we combine two sharing methods, we still get iso-accuracy as the standard SNNs.

### _Gradient Analysis_

Sharing LIF neurons leads to different gradient paths compared to standard SNNs. Therefore, we provide the gradient analysis for EfficientLIF-Net.

**Gradient of Cross-layer Sharing.** Suppose that we compute the gradients for \(m\) subsequent layers where they have the same activation size. For simplicity, we call these \(m\) subsequent layers as a "sharing block". The unrolled computational graph is illustrated in Fig. 3(b).

Fig. 3: Illustration of a unrolled computational graph for the backpropagation. Black solid arrows and gray dotted arrows represent forward and backward paths, respectively. For simplicity, we omit the reset path from the spike output.
For the intermediate layers of the sharing block, the gradients flow back from the next layer (marked as 1 in Fig. 3(b)), which can be formulated as:

\[\frac{\partial L}{\partial W_{l}}=\sum_{t}\left(\frac{\partial L}{\partial O_{l}^ {t}}\frac{\partial O_{l}^{t}}{\partial U_{l}^{t}}+\frac{\partial L}{\partial U _{l+1}^{t}}\frac{\partial U_{l+1}^{t}}{\partial U_{l}^{t}}\right)\frac{\partial U _{l}^{t}}{\partial W_{l}}, \tag{18}\]

where both terms are derived by the forward dynamics in Eq. 4. For the final layer of the sharing block, the gradients flow back through both layer and temporal axis:

\[\frac{\partial L}{\partial W_{l+m}}\!\!=\!\!\sum_{t}\left(\frac{\partial L}{ \partial O_{l+m}^{t}}\frac{\partial O_{l+m}^{t}}{\partial U_{l+m}^{t}}+\frac{ \partial L}{\partial U_{l}^{t+1}}\frac{\partial U_{l}^{t+1}}{\partial U_{l+m} ^{t}}\right)\frac{\partial U_{l+m}^{t}}{\partial W_{l+m}}. \tag{19}\]

The first term shows the gradient from the next layer (marked as 2 in Fig. 3(b)), and the second term is from the first layer of the sharing block at the next timestep (marked as 3 in Fig. 3(b)). The last layer of the sharing block obtains the gradients from the next timestep (marked as 3) which is then, propagated through the intermediate layers. This allows the weight parameters to be trained with temporal information, achieving similar performance as the standard SNN architecture.

**Gradient of Cross-channel Sharing.** Assume that we divide the channel into \(N\) groups. We define an index set \(G=\{1,2,...,N\}\). Then, the gradients of weight parameters in layer \(l\) can be computed as:

\[\frac{\partial L}{\partial W_{l}} =\sum_{t}\sum_{i\in G}\frac{\partial L}{\partial O_{l}^{t,(i)}} \frac{\partial O_{l}^{t,(i)}}{\partial U_{l}^{t,(i)}}\frac{\partial U_{l}^{t, (i)}}{\partial X_{l}^{t}}\frac{\partial X_{l}^{t}}{\partial W_{l}} \tag{20}\] \[+\sum_{t}\sum_{i\in G\setminus\{N\}}\frac{\partial L}{\partial U _{l}^{t,(i+1)}}\frac{\partial U_{l}^{t,(i+1)}}{\partial U_{l}^{t,(i)}}\frac{ \partial U_{l}^{t,(i)}}{\partial X_{l}^{t}}\frac{\partial X_{l}^{t}}{\partial W _{l}}\] \[+\sum_{t}\frac{\partial L}{\partial U_{l}^{t+1,(1)}}\frac{ \partial U_{l}^{t+1,(1)}}{\partial U_{l}^{t,(N)}}\frac{\partial U_{l}^{t,(N)} }{\partial X_{l}^{t}}\frac{\partial X_{l}^{t}}{\partial W_{l}}.\]

The first term represents the gradient from the next layer (marked as 1 in Fig. 3(c)). The second term is the gradients from the next group's membrane potential except for the last group (marked as 2 in Fig. 3(c)). The last term represents the gradients from the first group of the next timestep (marked as 3 in Fig. 3(c)). Thus, the gradients propagate through both temporal and spatial dimension, training weight parameters to consider the temporal information.

### _Memory-Efficient Backpropagation_

In addition to the memory efficiency in forward propagation, our EfficientLIF-Net saves memory costs during backward gradient computation. As shown in Fig. 4(a), the standard SNNs need to store all membrane potential to compute the gradient such as \(\frac{\partial U_{l}^{t+1}}{\partial U_{l}^{t}}\) in Eq. 3. However, saving the full-precision membrane potential of LIF neurons is costly.

**Backpropagation in Cross-layer Sharing.** The key idea here is that the membrane potential of the previous layer can be computed from the next layer's membrane potential in a reverse way (Fig. 4(b)). Thus, without storing the membrane potential of the intermediate layers during forward, we can compute the backward gradient. By reorganizing Eq. 4 and Eq. 6, we obtain the membrane potential of the previous layer or the previous timestep.

\[\left\{\begin{array}{ll}&U_{l}^{t}=\frac{1}{\lambda}(U_{l+1}^{t}-W_{l+1}O_ {l}^{t})+O_{l}^{t}.&\text{from Eq.~{}\ref{eq:1}}\\ &U_{l+m}^{t}=\frac{1}{\lambda}(U_{l}^{t+1}-W_{l}O_{l-1}^{t+1})+O_{l+m}^{t}.& \text{from Eq.~{}\ref{eq:1}}\end{array}\right. \tag{21}\]

Based on this, we can compute \(\frac{\partial U_{l}^{t+1}}{\partial U_{l}^{t}}\) in Eq. 18, and \(\frac{\partial U_{l}^{t+1}}{\partial U_{l+m}^{t}}\) in Eq. 19, without storing the intermediate membrane potential.

**Backpropagation in Cross-channel Sharing.** In a similar way, we can also reduce memory cost through channel dimension by performing a reverse computation on the membrane potential of channel groups (Fig. 4(c)). Instead of storing a memory for all channels, we use a partial memory for storing the membrane potential of the last group channel of each layer. From Eq. 8 and Eq. 11, we calculate the membrane potential of the previous channel group or the previous timestep.

\[\left\{\begin{array}{ll}&U_{l}^{t,(i)}=\frac{1}{\lambda}(U_{l}^{t,(i+1)}-X_{l }^{t,(i+1)})+O_{l}^{t,(i)}.&\text{from Eq.~{}\ref{eq:1}}\\ &U_{l}^{t,(N)}=\frac{1}{\lambda}(U_{l}^{t+1,(1)}-X_{l}^{t+1,(1)})+O_{l}^{t,(N)}. &\text{from Eq.~{}\ref{eq:1}}\end{array}\right. \tag{22}\]

This reverse computation allows us to compute \(\frac{\partial U_{l}^{t,(i+1)}}{\partial U_{l}^{t,(i)}}\) and \(\frac{\partial U_{l}^{t+1,(i)}}{\partial U_{l}^{t,(N)}}\) in Eq. 20, without storing the intermediate membrane potential.

### _Hardware Discussion_

In this section, we aim to provide insights into the role that efficientLIF-Net will play during the hardware deployment.

**Cross-layer Sharing.** One of the major contributions that the cross-layer sharing EfficientLIF-Net can make to the hardware is the reduction of memory communications. When deploying an SNN on the hardware, one can either choose to either first process through all the layers and then repeat for all timesteps (standard) or first process through all timesteps then proceed to the next layer (tick-batch [50]). While the tick-batch can help to reduce the number of memory communications across timesteps, it requires more hardware resources. On the other

Fig. 4: Memory-efficient backpropagation. Compared to baseline, we do not need to store an intermediate membrane potential for backpropagation. Instead, we perform a reverse computation on the membrane potential from the next layers/channels.
hand, with a proper processing pipeline across layers, the standard way of processing SNNs will have smaller hardware resource requirements and a larger throughput. And cross-layer sharing can further reduce the memory communication overheads of the standard SNN processing.

As we show in Fig. 5(a), instead of writing the membrane potential to the memory for every layer and timestep, layer-sharing EfficientLIF-Net requires only one time of writing to memory for each shared layer for each timestep.

**Cross-channel Sharing.** Due to the high level of parallelism and data reuse in these designs, we are focusing on examining the effects of cross-channel sharing on EfficientLIF-Net for ASIC systolic array-based inference accelerators for SNNs [15, 50, 51].

The key idea behind this group of designs is to broadcast input spikes and weights to an array of processing elements (PEs), where accumulators perform convolution operations. Each post-synaptic neuron's entire convolution operation is

\begin{table}
\begin{tabular}{l|l c c c} \hline \hline  & \multicolumn{4}{c}{VGG16} \\ \hline \multirow{2}{*}{Dataset} & \multirow{2}{*}{Methods} & \multirow{2}{*}{Acc (\(\%\))} & LIF Forward & LIF Backward \\  & & & Memory (MB) & Memory (MB) \\ \hline \hline \multirow{4}{*}{CIFAR10} & Baseline & 91.31 & 1.80 & 9.0 \\  & EfficientLIF-Net [L] & 90.23 & 1.23 & 1.23 \\  & EfficientLIF-Net [C\#2] & 90.30 & 0.90 & 0.90 \\  & EfficientLIF-Net [L+C\#2] & 90.09 & 0.62 & 0.62 \\ \hline \multirow{4}{*}{CIFAR100} & Baseline & 66.83 & 1.80 & 9.0 \\  & EfficientLIF-Net [L] & 65.01 & 1.23 & 1.23 \\  & EfficientLIF-Net [C\#2] & 64.92 & 0.90 & 0.90 \\  & EfficientLIF-Net [L+C\#2] & 64.85 & 0.62 & 0.62 \\ \hline \multirow{4}{*}{TinyImageNet} & Baseline & 56.11 & 7.22 & 36.1 \\  & EfficientLIF-Net [L] & 55.14 & 4.91 & 4.91 \\  & EfficientLIF-Net [C\#2] & 55.43 & 3.61 & 3.61 \\  & EfficientLIF-Net [L+C\#2] & 55.36 & 2.46 & 2.46 \\ \hline \multirow{4}{*}{ImageNet-100} & Baseline & 73.81 & 88.43 & 442.15 \\  & EfficientLIF-Net [L] & 73.22 & 60.10 & 60.10 \\  & EfficientLIF-Net [C\#2] & 72.65 & 44.21 & 44.21 \\  & EfficientLIF-Net [L+C\#2] & 72.14 & 30.05 & 30.05 \\ \hline \multirow{4}{*}{N-Caltech101} & Baseline & 64.40 & 4.06 & 40.6 \\  & EfficientLIF-Net [L] & 63.50 & 2.76 & 2.76 \\  & EfficientLIF-Net [C\#2] & 64.02 & 2.03 & 2.03 \\  & EfficientLIF-Net [L+C\#2] & 63.10 & 1.38 & 1.38 \\ \hline \hline \multirow{4}{*}{Dataset} & \multirow{2}{*}{Methods} & \multirow{2}{*}{Acc (\(\%\))} & LIF Forward & LIF Backward \\  & & & Memory (MB) & Memory (MB) \\ \hline \hline \multirow{4}{*}{CIFAR10} & Baseline & 92.26 & 2.88 & 14.40 \\  & EfficientLIF-Net [L] & 91.99 & 1.31 & 1.31 \\  & EfficientLIF-Net [C\#2] & 91.92 & 1.44 & 1.44 \\  & EfficientLIF-Net [L+C\#2] & 91.73 & 0.66 & 0.66 \\ \hline \multirow{4}{*}{CIFAR100} & Baseline & 70.89 & 2.88 & 14.40 \\  & EfficientLIF-Net [L] & 70.14 & 1.31 & 1.31 \\  & EfficientLIF-Net [C\#2] & 70.01 & 1.44 & 1.44 \\  & EfficientLIF-Net [L+C\#2] & 69.99 & 0.66 & 0.66 \\ \hline \multirow{4}{*}{TinyImageNet} & Baseline & 56.74 & 11.5 & 57.5 \\  & EfficientLIF-Net [L] & 55.20 & 5.25 & 5.25 \\  & EfficientLIF-Net [C\#2] & 55.44 & 5.75 & 5.75 \\  & EfficientLIF-Net [L+C\#2] & 55.10 & 2.63 & 2.63 \\ \hline \multirow{4}{*}{ImageNet-100} & Baseline & 79.38 & 140.88 & 704.4 \\  & EfficientLIF-Net [L] & 79.44 & 64.31 & 64.31 \\  & EfficientLIF-Net [C\#2] & 78.92 & 70.44 & 70.44 \\  & EfficientLIF-Net [L+C\#2] & 78.88 & 32.16 & 32.16 \\ \hline \multirow{4}{*}{N-Caltech101} & Baseline & 66.27 & 6.47 & 64.7 \\  & EfficientLIF-Net [L] & 65.82 & 2.95 & 2.95 \\ \cline{1-1}  & EfficientLIF-Net [C\#2] & 66.01 & 3.24 & 3.24 \\ \cline{1-1}  & EfficientLIF-Net [L+C\#2] & 65.45 & 1.48 & 1.48 \\ \hline \hline \end{tabular}
\end{table} TABLE I: Accuracy and LIF memory cost (Forward & Backward) comparison between baseline (_i.e._, standard SNN) and our EfficientLIF-Net. Here, _EfficientLIF-Net[L], EfficientLIF-Net[C\#2], EfficientLIF-Net[L+C\#2]_ denote EfficientLIF with cross-layer, cross-channel (\(\#\)group=2), and cross-layer&channel sharing, respectively.
mapped to one dedicated PE. Once the convolution results are ready, they are sent to the LIF units inside the PE to generate the output spikes.

LIF units are notorious for their high hardware overheads. This is because we need at least one buffer to hold the full precision membrane potential for each neuron. These buffers heavily contribute to the hardware cost of LIF units. Originally, all the prior designs [15, 50, 51] equipped each of the 128 PEs with an LIF unit inside to match the design's throughput requirements. These LIF units contribute significantly to the entire PE arrays. Even if the number of LIF units is reduced, there is no way to reduce the number of buffers required to hold the unique membrane potentials for each LIF neuron.

Based on this design problem, we can instantly realize one role that cross-channel sharing EfficientLIF plays in these hardware platforms. Depending on the number of cross-channel shared LIF neurons, we can have the same ratio of LIF units and buffer reduction at the hardware level, as we show in Fig. 5(b). For example, in the case of C#4 shared networks, we can manage to reduce the 128 LIF units in [15, 50, 51] to 32. However, the shared LIF units will bring longer latency as a trade-off. In the case of C#4, originally, one cycle was needed to generate spikes from 128 post-synaptic neurons for one timestep. Now, we will need 4 cycles instead. However, the major portion of latency still lies in the convolution and memory operations, which is typically hundreds of times larger than the cycles needed for generating spikes through LIF units. We provide experimental results in Section V.C to further illustrate the effects of EfficientLIF-Net on hardware.

## V Experiments

### _Implementation Details_

We evaluate our method on four static image datasets (_i.e._, CIFAR10 [52], CIFAR100 [52], TinyImageNet [49], ImageNet-100 [49]), and one spiking dataset (_i.e._, N-Caltech101 [53]). Here, ImageNet-100 is the subset of ImageNet-1000 dataset [49]. We use VGG16 [54] and ResNet19 [12]. For both architectures, we use the scaled-up channel size following previous SNN works [55, 56]. We train the SNNs with 128 batch samples using SGD optimizer with momentum 0.9 and weight decay 5e-4. The initial learning rate is set to 0.1 and decayed with cosine learning rate scheduling [57]. We set the total number of epochs to 300 for CIFAR10, CIFAR100, and N-Caltech101, and 140 for TinyImageNet and ImageNet-100, respectively. We use timesteps \(T=5\) across all experiments.

### _Performance Comparison_

Across all experiment sections, _EfficientLIF-Net[L]_ denotes the cross-layer sharing scheme, _EfficientLIF-Net[C#N]_ stands for the cross-channel sharing scheme with \(N\) channel groups. _EfficientLIF-Net[L+C#N]_ means the cross-layer & channel sharing method. In Table I, we show the memory benefit from EfficientLIF-Net. We assume a 32-bit representation for membrane potential in LIF neurons. Regarding the backward LIF memory of baseline, we consider the standard backpropagation method which stores membrane potential across entire timesteps [13, 14, 15].

The experimental results show the following observations: (1) The EfficientLIF-Net based on ResNet19 achieves a similar performance compared to the baseline, which implies that the proposed membrane sharing strategy still can learn temporal information in spikes. (2) The EfficientLIF-Net also can be applied to the DVS dataset. (3) The ResNet19 EfficientLIF-Net achieves less performance degradation compared to VGG16, which implies that skip connection improves training capability in EfficientLIF-Net. Furthermore, ResNet19 brings higher memory efficiency since it has more layers with similar sized activation. (4) As expected, a large-resolution image dataset has more benefits compared to a small-resolution image dataset. For instance, _EfficientLIF-Net [L+C#2]_ saves \(108.72\)MB and \(672.24\)MB for forward and backward path, respectively, on ImageNet-100 which consists of \(224\times 224\) resolution images, on the other hand, the same architecture saves \(2.22\)MB (forward) and \(13.74\)MB (backward) on CIFAR10.

### _Experimental Analysis_

**Analysis on Training Dynamics.** In our method section, we showed that the backward gradients of each method are different. To further analyze this, we investigate whether the trained weight parameters can be compatible with other architectures. We expect that the transferred weights to different architectures may show performance degradation since each architecture has different training dynamics (_e.g._, gradient path). To this end, we train standard ResNet19-SNN (_i.e._, baseline), EfficientLIF-Net [L], EfficientLIF-Net [C#2], EfficientLIF-Net [L+C#2], In Fig. 6, we report the accuracy of various weights-architecture configurations on CIFAR10 and TinyImageNet. We observe the following points: (1) As we expected, transferring weights to a different architecture brings performance degradation. This supports our statement that each architecture has different training dynamics. (2) Especially, baseline shows a huge performance drop as compared to other architectures. Thus, EfficientLIF-Net needs to be trained

Fig. 5: Visualization of the potential hardware mapping of the two sharing methods. We provide some hardware insights on the potential hardware benefits we can get from the EfficientLIF-Net.
from scratch with gradient-based training. (3) The trained weights from EfficientLIF-Net [L+C#2] show reasonable performance on EfficientLIF-Net [L] and EfficientLIF-Net [C] as it contains the feature from both cross-layer and cross-channel sharing.

**Ablation Studies on #Group.** In the cross-layer sharing scheme, we can further reduce LIF memory cost by increasing _#group_. Table II shows the accuracy and LIF memory cost with respect to _#group_. Interestingly, EfficientLIF-Net with high _#group_ almost maintains the performance while minimizing the LIF memory cost significantly. For example, on the ImageNet-100 dataset, EfficientLIF-Net [C#8] incurs only \(0.8\%\) accuracy drop with \(75\%\) higher memory saving. Thus, one can further reduce LIF memory cost by increasing _#group_ based on the hardware requirements.

**Combining with Group Convolution.** To further enhance the efficiency in cross-channel sharing, we explore the feasibility of combining a group convolution layer with cross-layer sharing. Since group convolution splits input channels and output channels into multiple groups, they can be applied to each channel spike (\(O_{l}^{t,(i)}\) in Eq. 10). In Table III, we observe the accuracy does not show a huge drop with two convolution groups. However, as the number of groups increases, the performance goes down drastically due to lesser number of parameters available for training convergence.

**Soft Reset vs. Hard Reset.** We also conduct experiments on the reset scheme in our EfficientLIF-Net. The membrane potential can be reset to zero (_i.e._, hard reset), or decreased by the threshold value (_i.e._, soft reset). In Table V, we compare the accuracy of both reset schemes on ResNet19 architecture, where we observe the hard reset achieves similar accuracy as the soft reset. However, using the hard reset does not allow computation of the previous layer's or timestep's membrane potential in a reverse way (Eq. 21 and Eq. 22) during backpropagation. This is because the hard reset removes the residual membrane potential which can be used in the reverse computation. Therefore, our EfficientLIF-Net is based on the soft reset such that we get memory savings both during forward and backward.

**Analysis on Spike Rate.** In Fig. 7, we compare the spike rate across all different LIF sharing schemes in ResNet19. We conduct experiments on four datasets. Note, a high spike rate implies the networks require larger computational cost. The experimental results show that all LIF sharing schemes have a similar spike rate as the baseline. This demonstrates that EfficientLIF-Net does not bring further computational overhead while saving memory cost by sharing the membrane potential.

**Time Overhead Analysis.** We measured the time overhead on a V100 GPU with a batch size of 128. We used VGG16 with CIFAR10 and ImageNet-100 datasets with image sizes of 32x32 and 224x224, respectively. Tabel IV shows the latency results for each method. Interestingly, we found that our method improves computation time, implying that our LIF layer-sharing method reduces the time required to access DRAM, which originally takes a significant percentage of computational time. As a result, our method can be implemented without a huge computational burden.

**Memory Cost Breakdown.** In Fig. 8, we compare the memory cost breakdown between the SNN baseline and EfficientLIF-Net in both forward and backward. In the memory cost comparison, we consider memory for weight parameters (32-bit), spike activation (1-bit), and LIF neurons (32-bit). In the baseline SNN, LIF neurons take a dominant portion for both forward and backward memory cost. Especially, for backward, LIF neurons occupy around \(7\times\) larger memory than weights or

\begin{table}
\begin{tabular}{c|c|c c} \hline \hline \multirow{2}{*}{Dataset} & \multirow{2}{*}{Methods} & \multirow{2}{*}{Acc (\(\%\))} & 
\begin{tabular}{c} LIF Memory for \\ Fw \& Bw (MB) \\ \end{tabular} \\ \hline \hline \multirow{3}{*}{CIFAR10} & EfficientLIF-Net [C\#2] & 91.92 & 1.44 \\  & EfficientLIF-Net [C\#4] & 91.73 & 0.72 \\  & EfficientLIF-Net [C\#8] & 91.21 & 0.36 \\ \hline \multirow{3}{*}{TinyImageNet} & EfficientLIF-Net [C\#2] & 55.44 & 5.75 \\  & EfficientLIF-Net [C\#4] & 55.06 & 2.88 \\  & EfficientLIF-Net [C\#8] & 54.84 & 1.44 \\ \hline \multirow{3}{*}{ImageNet-100} & EfficientLIF-Net [C\#2] & 78.92 & 70.44 \\  & EfficientLIF-Net [C\#4] & 78.24 & 35.22 \\ \cline{1-1}  & EfficientLIF-Net [C\#8] & 78.12 & 17.61 \\ \hline \hline \end{tabular}
\end{table} TABLE II: Ablation on the number of groups in cross-channel EfficientLIF-Net with ResNet19 architecture.

\begin{table}
\begin{tabular}{c|c c c} \hline \hline Dataset & Methods & \#Conv. Group & Acc (\(\%\)) \\ \hline \hline \multirow{3}{*}{CIFAR10} & EfficientLIF-Net [C\#2] & 2 & 91.42 \\  & EfficientLIF-Net [C\#4] & 4 & 90.45 \\  & EfficientLIF-Net [C\#8] & 8 & 87.38 \\ \hline \multirow{3}{*}{CIFAR100} & EfficientLIF-Net [C\#2] & 2 & 69.26 \\  & EfficientLIF-Net [C\#4] & 4 & 66.42 \\  & EfficientLIF-Net [C\#8] & 8 & 60.20 \\ \hline \multirow{3}{*}{TinyImageNet} & EfficientLIF-Net [C\#2] & 2 & 53.65 \\  & EfficientLIF-Net [C\#4] & 4 & 51.39 \\ \cline{1-1}  & EfficientLIF-Net [C\#8] & 8 & 42.86 \\ \hline \hline \end{tabular}
\end{table} TABLE III: Performance of combing cross-layer sharing and group convolution on ResNet 19 architecture.

Fig. 6: Analysis on Training Dynamics. Unit: accuracy (%). We investigate whether the trained weight parameters can be compatible with other architectures.

\begin{table}
\begin{tabular}{c|c c} \hline \hline Dataset & Methods & Acc (\(\%\)) & 
\begin{tabular}{c} LIF Memory for \\ Fw \& Bw (MB) \\ \end{tabular} \\ \hline \hline \multirow{3}{*}{CIFAR10} & EfficientLIF-Net [C\#2] & 91.92 & 1.44 \\  & EfficientLIF-Net [C\#4] & 91.73 & 0.72 \\  & EfficientLIF-Net [C\#8] & 91.21 & 0.36 \\ \hline \multirow{3}{*}{TinyImageNet} & EfficientLIF-Net [C\#2] & 55.44 & 5.75 \\  & EfficientLIF-Net [C\#4] & 55.06 & 2.88 \\ \cline{1-1}  & EfficientLIF-Net [C\#8] & 54.84 & 1.44 \\ \hline \multirow{3}{*}{ImageNet-100} & EfficientLIF-Net [C\#2] & 78.92 & 70.44 \\ \cline{1-1}  & EfficientLIF-Net [C\#4] & 78.24 & 35.22 \\ \cline{1-1}  & EfficientLIF-Net [C\#8] & 78.12 & 17.61 \\ \hline \hline \end{tabular}
\end{table} TABLE II: Ablation on the number of groups in cross-channel EfficientLIF-Net with ResNet19 architecture.
activation memory. Our EfficientLIF-Net significantly reduces the LIF memory cost, resulting in less memory overhead compared to weight parameters (in both forward and backward) and activation (in backward only).

**EfficientLIF-Net with Weight Pruning.** As pruning for SNNs is popular due to its usage on edge devices [34, 36, 37, 39, 40], it is important to figure out whether the advantage from EfficientLIF-Net remains in sparse SNNs. Before exploring the effectiveness of the LIF sharing method in sparse SNNs, we first investigate if LIF neurons still require a huge memory in sparse SNNs. This is because a number of LIF neurons might not generate output spikes in the high weight sparsity regime (\(\geq 90\%\)), then, the memory cost for such dead neurons can be reduced. To this end, we prune the SNN model to varied sparsity using magnitude-based pruning [58]. Interestingly, as shown in Fig. 9 **Left**, only \(\sim 3\%\) neurons do not generate spikes (_i.e._, dead neuron) across all sparsity levels. This implies that the LIF memory cost is still problematic in sparse SNNs. Based on the observation, we prune EfficientLIF-Net and compare the memory cost and accuracy with the standard SNN baseline. Here, we prune all architectures to have \(94.94\%\) weight sparsity. In Fig. 9 **Right**, the baseline architecture requires 2.9 MB for LIF neurons, which is equivalent to \(\sim 60\%\) of the memory cost for weight parameters. With cross-layer (denoted as \(L\) in Fig. 9) and cross-channel sharing (denoted as _C#2_ in Fig. 9), we can reduce the LIF memory cost by about half compared to the baseline. Cross-layer& channel sharing (denoted as _L+C#2_ in Fig. 9) further reduces the memory cost, which takes only \(\sim 23\%\) memory compared to the baseline. Overall, the results demonstrate that LIF memory reduction is not only important for high-resolution images but also for relatively low-resolution images such as CIFAR10 especially when considering pruned SNNs.

**Hardware Evaluation.** As discussed in Section IV-D, both cross-channel and cross-layer sharing can significantly enhance hardware efficiency during deployment. From the top portion of Fig.10, it is evident that cross-channel sharing in EfficientLIF-Net can considerably decrease the number of required LIF units. Specifically, our approach reduces the area portion of LIF units from 61.6% to 28.6% of total computation units when employing C#4 cross-channel sharing.

The bottom part of Fig.10 indicates that cross-layer sharing can effectively minimize the number of DRAM accesses, which is the most energy-consuming operation during on-chip SNN inference. For single-batch scenarios, the reduction is not significant, since weight data movement dominates the DRAM accesses, as outlined in [15]. However, when employing mini-batches, the reduction becomes more substantial. We note a 23% and 25% reduction in total DRAM accesses on CIFAR10 and TinyImageNet, respectively, for 64 mini-batches. This reduction trend continues to rise with larger mini-batch numbers.

### _Evaluation on Human Activity Recognition (HAR) datasets_

To further validate our method on datasets that rely heavily on temporal information, we conduct experiments using Human Activity Recognition (HAR) datasets obtained from

\begin{table}
\begin{tabular}{c|l c c} \hline \hline Dataset & Methods & Reset Scheme & Acc (\(\%\)) \\ \hline \hline \multirow{8}{*}{CIFAR10} & EfficientLIF-Net [L] & Soft & 91.99 \\  & EfficientLIF-Net [L] & Hard & 91.66 \\  & EfficientLIF-Net [C\#2] & Soft & 91.92 \\  & EfficientLIF-Net [C\#2] & Hard & 91.67 \\  & EfficientLIF-Net [L+C\#2] & Soft & 91.73 \\  & EfficientLIF-Net [L+C\#2] & Hard & 91.65 \\ \hline \multirow{8}{*}{CIFAR100} & EfficientLIF-Net [L] & Soft & 70.14 \\  & EfficientLIF-Net [L] & Hard & 70.05 \\  & EfficientLIF-Net [C\#2] & Soft & 70.01 \\  & EfficientLIF-Net [C\#2] & Hard & 68.93 \\  & EfficientLIF-Net [L+C\#2] & Soft & 69.99 \\  & EfficientLIF-Net [L+C\#2] & Hard & 69.74 \\ \hline \hline \end{tabular}
\end{table} TABLE V: Ablation on the reset methods.

Fig. 8: Comparison of the memory breakdown between the baseline SNN and the EfficientLIF-Net in both forward and backward. We use ResNet19 architecture on ImageNet-100.

Fig. 7: Spike rate analysis on four public datasets.

Fig. 9: Experiments on ResNet19 EfficientLIF-Net with weight pruning methods on CIFAR10. **Left:** Most LIF neurons generate output spikes although the weight sparsity increases. Therefore, the LIF memory cost cannot be reduced by weight pruning. **Right:** Accuracy and LIF memory cost comparison across baseline and EfficientLIF-Net. The weight memory cost across all models is \(\sim 5MB\) indicated with a grey dotted line.
wearable devices. Descriptions of these datasets are provided below:

* _UCI-HAR_[59] consists of 10.3k instances collected from 30 subjects, involving six different activities: walking, walking upstairs, walking downstairs, sitting, standing, and lying. The dataset employs sensors such as a 3-axis accelerometer and a 3-axis gyroscope (both at 50Hz) from a Samsung Galaxy SII.
* _HHAR_[60] is collected from nine subjects and encompasses six daily activities: biking, sitting, standing, walking, stair ascent, and stair descent. The dataset utilizes accelerometers from eight smartphones and four smartwatches (with sampling rates ranging from 50Hz to 200Hz).

Following previous work, we split both datasets into 64% for the training set, 16% for the validation set, and 20% for the test set. We report test accuracy when the model achieves its best validation accuracy.

In Table VI, we compare our method with the baseline model, which consists of six 1D-convolutional layers, \(i.e.\), \(Conv1D(InputChannel,128)-4\times Conv1D(128,128)\)-\(Conv1D(128,\#Class)\). In addition, we provide the performance of other methods [61, 62, 63] on HHAR and UCI-HAR. Aviles _et al._[61] uses a CNN, Mukherjee _et al._[62] uses a combination of CNN and LSTM, and Wang _et al._[63] uses an LSTM. From the table, we can observe the following results: (1) The baseline Spiking MLP achieves an accuracy of 97.68% on the HHAR dataset and 96.06% on the UCI-HAR dataset, which is comparable accuracy with the previous methods. (2)Comparing the different configurations of EfficientLIF-Net to the baseline Spiking MLP, we can see that the EfficientLIF-Net maintains a similar level of accuracy as the baseline on both datasets. These results suggest that our LIF-sharing method also works well with tasks that heavily rely on temporal information. Overall, our empirical results support the observation that gradients propagate through both temporal and spatial dimensions, effectively training the weight parameters to account for temporal information, as demonstrated in Eq. 18, 19, and 20.

## VI Conclusion

In this paper, we highlight and tackle the problem of LIF memory cost in SNNs. This problem becomes severe as the image resolution increases. To address this, we propose EfficientLIF-Net where we share the membrane potential across layers and channels, which can effectively reduce memory usage. During backpropagation, our EfficientLIF-Net also enables reverse computation on the previous layer and channel. Therefore, we only need to store the membrane potential of the last layer/channel during forward. In our experiments, EfficientLIF-Net achieves similar performance and computational cost while significantly reducing memory cost compared to standard SNN baseline. We also found that the LIF memory problem exists in sparse-weight SNNs where even a small resolution dataset causes LIF memory overhead. The memory benefit of EfficientLIF-Net is shown in pruned SNNs, which implies our method is complementary to previous compression methods.

## Acknowledgements

This work was supported in part by CoCoSys, a JUMP2.0 center sponsored by DARPA and SRC, Google Research Scholar Award, the National Science Foundation CAREER Award, TII (Abu Dhabi), the DARPA AI Exploration (AIE) program, and the DoE MMICC center SEA-CROGS (Award #DE-SC0023198).
