arXivDaily arXiv每日学术速递 周一至周五更新
arXiv 2312.07922cs.CVcs.NE
收藏

内存高效的可逆脉冲神经网络

Memory-Efficient Reversible Spiking Neural Networks

State Key Laboratory of Industrial Control Technology, College of Control Science and Engineering, Zhejiang University(浙江大学控制科学与工程学院工业控制技术国家重点实验室);Key Laboratory of Collaborative sensing and autonomous unmanned systems of Zhejiang Province(浙江省协同感知与自主无人系统重点实验室)

Hong Zhang, Yu Zhang

AI总结:

针对脉冲神经网络训练时内存开销大、难以训练深层模型的问题,提出可逆脉冲神经网络架构,通过可逆脉冲模块重计算中间变量,在精度相当的情况下大幅降低内存消耗,为训练大深度SNN铺路。

摘要:

脉冲神经网络(SNNs)凭借在神经形态硬件上的高能效特性,是人工神经网络(ANNs)的潜在有力竞争者。然而,SNN在训练过程中需要沿仿真时间步展开,因此其内存需求远高于ANN,这阻碍了更深层SNN模型的训练。本文提出可逆脉冲神经网络,以降低训练过程中中间激活值与膜电位的内存开销。首先,我们沿时间维度扩展可逆架构,提出可逆脉冲模块,该模块可重构计算图,并通过反向过程重新计算前向传播中的所有中间变量。在此基础上,我们将前沿SNN模型适配为可逆变体,即可逆脉冲ResNet(RevSResNet)和可逆脉冲Transformer(RevSFormer)。通过在静态数据集与神经形态数据集上的实验,我们证明所提可逆SNN的单图像内存开销不会随网络深度增加而上升。在CIFAR10与CIFAR100数据集上,我们的RevSResNet37和RevSFormer-4-384取得了与基线模型相当的精度,且在模型复杂度与参数量大致相同的情况下,单图像GPU内存消耗分别比对应基线低3.79倍和3.00倍。我们认为这项工作能够解除SNN训练中的内存限制,为训练超大规模、超深度的SNN铺平道路。代码可在https://github.com/mi804/RevSNN.git获取。

英文摘要:

Spiking neural networks (SNNs) are potential competitors to artificial neural networks (ANNs) due to their high energy-efficiency on neuromorphic hardware. However, SNNs are unfolded over simulation time steps during the training process. Thus, SNNs require much more memory than ANNs, which impedes the training of deeper SNN models. In this paper, we propose the reversible spiking neural network to reduce the memory cost of intermediate activations and membrane potentials during training. Firstly, we extend the reversible architecture along temporal dimension and propose the reversible spiking block, which can reconstruct the computational graph and recompute all intermediate variables in forward pass with a reverse process. On this basis, we adopt the state-of-the-art SNN models to the reversible variants, namely reversible spiking ResNet (RevSResNet) and reversible spiking transformer (RevSFormer). Through experiments on static and neuromorphic datasets, we demonstrate that the memory cost per image of our reversible SNNs does not increase with the network depth. On CIFAR10 and CIFAR100 datasets, our RevSResNet37 and RevSFormer-4-384 achieve comparable accuracies and consume 3.79x and 3.00x lower GPU memory per image than their counterparts with roughly identical model complexity and parameters. We believe that this work can unleash the memory constraints in SNN training and pave the way for training extremely large and deep SNNs. The code is available at https://github.com/mi804/RevSNN.git.

机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。

↑