Spiking Neural Networks (SNNs) are promising energy-efficient models for neuromorphic computing. For training the non-differentiable SNN models, the backpropagation through time (BPTT) with surrogate gradients (SG) method has achieved high performance. However, this method suffers from considerable memory cost and training time during training. In this paper, we propose the Spatial Learning Through Time (SLTT) method that can achieve high performance while greatly improving training efficiency compared with BPTT. First, we show that the backpropagation of SNNs through the temporal domain contributes just a little to the final calculated gradients. Thus, we propose to ignore the unimportant routes in the computational graph during backpropagation. The proposed method reduces the number of scalar multiplications and achieves a small memory occupation that is independent of the total time steps. Furthermore, we propose a variant of SLTT, called SLTT-K, that allows backpropagation only at K time steps, then the required number of scalar multiplications is further reduced and is independent of the total time steps. Experiments on both static and neuromorphic datasets demonstrate superior training efficiency and performance of our SLTT. In particular, our method achieves state-of-the-art accuracy on ImageNet, while the memory cost and training time are reduced by more than 70% and 50%, respectively, compared with BPTT.
翻译:脉冲神经网络(SNN)作为神经形态计算中极具前景的节能模型,其训练面临非微分模型的挑战。基于替代梯度(SG)的时间反向传播(BPTT)方法虽已取得高性能表现,但在训练过程中存在显著的内存开销与时间消耗问题。本文提出时空学习(SLTT)方法,该方法在保持高性能的同时,相较BPTT大幅提升了训练效率。首先,我们论证了SNN在时域上的反向传播对最终梯度计算的贡献甚微,因此提出在反向传播过程中忽略计算图中非关键路径。该方法减少了标量乘法运算次数,并实现了与总时间步长无关的低内存占用。进一步,我们提出SLTT的变体方法SLTT-K,仅在K个时间步长进行反向传播,从而进一步将所需标量乘法次数降至与总时间步长无关。在静态与神经形态数据集上的实验表明,SLTT兼具卓越的训练效率与性能表现。特别地,我们的方法在ImageNet上达到当前最优准确率,同时相比BPTT,内存成本与训练时间分别降低超过70%与50%。