BRIDGING THE GAP BETWEEN ANNS AND SNNS BY CALIBRATING OFFSET SPIKES

Abstract

Spiking Neural Networks (SNNs) have attracted great attention due to their distinctive characteristics of low power consumption and temporal information processing. ANN-SNN conversion, as the most commonly used training method for applying SNNs, can ensure that converted SNNs achieve comparable performance to ANNs on large-scale datasets. However, the performance degrades severely under low quantities of time-steps, which hampers the practical applications of SNNs to neuromorphic chips. In this paper, instead of evaluating different conversion errors and then eliminating these errors, we define an offset spike to measure the degree of deviation between actual and desired SNN firing rates. We perform a detailed analysis of offset spike and note that the firing of one additional (or one less) spike is the main cause of conversion errors. Based on this, we propose an optimization strategy based on shifting the initial membrane potential and we theoretically prove the corresponding optimal shifting distance for calibrating the spike. In addition, we also note that our method has a unique iterative property that enables further reduction of conversion errors. The experimental results show that our proposed method achieves state-of-the-art performance on CIFAR-10, CIFAR-100, and ImageNet datasets. For example, we reach a top-1 accuracy of 67.12% on ImageNet when using 6 time-steps. To the best of our knowledge, this is the first time an ANN-SNN conversion has been shown to simultaneously achieve high accuracy and ultralow latency on complex datasets.

1. INTRODUCTION

Acclaimed as the third generation of Artificial Neural Networks (Maass, 1997) , Spiking Neural Networks (SNNs) have brought brand-new inspiration to computational neuroscience. As the corresponding neuron fires spikes only when the current membrane potential exceeds the firing threshold, SNNs have the distinctive characteristics of binary output, high sparsity, and biological plausibility. Therefore, compared with traditional ANN models, SNNs can further improve computational efficiency and reduce power consumption, which facilitates their remarkable superiority in the application of neuromorphic chips (Merolla et al., 2014; Davies et al., 2018; DeBole et al., 2019) . Considering that an effective learning algorithm has not yet been found for SNNs, ANN-SNN conversion and backpropagation through time (BPTT) are still the two most commonly applied training methods. Compared with BPTT, ANN-SNN conversion provides a way around the nondifferentiable problem in the direct training procedure for SNNs and thus reduces the overall training complexity. The aim in ANN-SNN conversion is to establish the mapping relationship between the activation output and the average firing rate. Traditional conversion methods exploit larger time-steps to overcome conversion errors and thus achieve high performance (Diehl et al., 2015) . Many of the following works have attempted to optimize the performance from multiple perspectives, including using the soft-reset mechanism (Han et al., 2020) , proposing more adaptive activation functions (Ho & Chang, 2021; Bu et al., 2022b) , adopting a trainable threshold (Sengupta et al., 2019; Ding et al., 2021; Bu et al., 2022a) , etc. However, these strategies cannot effectively eliminate the errors caused

availability

Code is available at https://github.com/hzc1208/ANN2SNN_COS.

