Spiking Neural Networks (SNNs) have gained great attraction due to their distinctive properties of low power consumption and fast inference on neuromorphic hardware. As the most effective method to get deep SNNs, ANN-SNN conversion has achieved comparable performance as ANNs on large-scale datasets. Despite this, it requires long time-steps to match the firing rates of SNNs to the activation of ANNs. As a result, the converted SNN suffers severe performance degradation problems with short time-steps, which hamper the practical application of SNNs. In this paper, we theoretically analyze ANN-SNN conversion error and derive the estimated activation function of SNNs. Then we propose the quantization clip-floor-shift activation function to replace the ReLU activation function in source ANNs, which can better approximate the activation function of SNNs. We prove that the expected conversion error between SNNs and ANNs is zero, enabling us to achieve high-accuracy and ultra-low-latency SNNs. We evaluate our method on CIFAR-10/100 and ImageNet datasets, and show that it outperforms the state-of-the-art ANN-SNN and directly trained SNNs in both accuracy and time-steps. To the best of our knowledge, this is the first time to explore high-performance ANN-SNN conversion with ultra-low latency (4 time-steps). Code is available at https://github.com/putshua/SNN\_conversion\_QCFS
翻译:脉冲神经网络(SNN)因其在神经形态硬件上具有低功耗和快速推理的独特特性而备受关注。作为获取深层SNN的最有效方法,ANN-SNN转换已在大型数据集上取得与人工神经网络(ANN)相当的精度表现。然而,该方法需要长时间步长才能使SNN的脉冲发射率与ANN的激活值相匹配。这导致转换后的SNN在短时间步长下出现严重的性能退化问题,阻碍了SNN的实际应用。本文从理论上分析了ANN-SNN转换误差,推导了SNN的估计激活函数,并提出用量化截断-移位激活函数替代源ANN中的ReLU激活函数,该函数能更精确地逼近SNN的激活函数。我们证明了SNN与ANN之间的期望转换误差为零,从而实现了高精度与超低延迟的SNN。在CIFAR-10/100和ImageNet数据集上的评估表明,该方法在精度和时间步长两方面均优于当前最先进的ANN-SNN转换方法与直接训练的SNN。据我们所知,这是首次探索在超低延迟(4个时间步长)下实现高性能ANN-SNN转换的研究。相关代码已开源:https://github.com/putshua/SNN_conversion_QCFS