Spiking Neural Network (SNN) is a promising energy-efficient AI model when implemented on neuromorphic hardware. However, it is a challenge to efficiently train SNNs due to their non-differentiability. Most existing methods either suffer from high latency (i.e., long simulation time steps), or cannot achieve as high performance as Artificial Neural Networks (ANNs). In this paper, we propose the Differentiation on Spike Representation (DSR) method, which could achieve high performance that is competitive to ANNs yet with low latency. First, we encode the spike trains into spike representation using (weighted) firing rate coding. Based on the spike representation, we systematically derive that the spiking dynamics with common neural models can be represented as some sub-differentiable mapping. With this viewpoint, our proposed DSR method trains SNNs through gradients of the mapping and avoids the common non-differentiability problem in SNN training. Then we analyze the error when representing the specific mapping with the forward computation of the SNN. To reduce such error, we propose to train the spike threshold in each layer, and to introduce a new hyperparameter for the neural models. With these components, the DSR method can achieve state-of-the-art SNN performance with low latency on both static and neuromorphic datasets, including CIFAR-10, CIFAR-100, ImageNet, and DVS-CIFAR10.
翻译:脉冲神经网络(SNN)是一种在神经形态硬件上实现时具有前景的节能型人工智能模型。然而,由于其不可微性,高效训练SNN面临挑战。现有方法大多存在高延迟(即长时间模拟步长)问题,或无法达到与人工神经网络(ANN)相当的高性能。本文提出脉冲表示微分(DSR)方法,该方法可在低延迟条件下实现与ANN相竞争的高性能。首先,我们采用(加权)发放率编码将脉冲序列编码为脉冲表示。基于脉冲表示,我们系统推导出常见神经模型下的脉冲动力学可表示为某种次可微映射。基于此观点,所提出的DSR方法通过该映射的梯度训练SNN,从而避免了SNN训练中常见的不可微问题。随后,我们分析了SNN前向计算中表示特定映射时的误差。为降低该误差,我们提出对每层脉冲阈值进行训练,并为神经模型引入新的超参数。通过上述组件,DSR方法可在静态和神经形态数据集(包括CIFAR-10、CIFAR-100、ImageNet和DVS-CIFAR10)上实现具有低延迟的最新SNN性能。