Training-free Conversion of Pretrained ANNs to SNNs for Low-Power and High-Performance Applications

Tong Bu,Maohua Li,Zhaofei Yu
2024-09-05
Abstract:Spiking Neural Networks (SNNs) have emerged as a promising substitute for Artificial Neural Networks (ANNs) due to their advantages of fast inference and low power consumption. However, the lack of efficient training algorithms has hindered their widespread adoption. Existing supervised learning algorithms for SNNs require significantly more memory and time than their ANN counterparts. Even commonly used ANN-SNN conversion methods necessitate re-training of ANNs to enhance conversion efficiency, incurring additional computational costs. To address these challenges, we propose a novel training-free ANN-SNN conversion pipeline. Our approach directly converts pre-trained ANN models into high-performance SNNs without additional training. The conversion pipeline includes a local-learning-based threshold balancing algorithm, which enables efficient calculation of the optimal thresholds and fine-grained adjustment of threshold value by channel-wise scaling. We demonstrate the scalability of our framework across three typical computer vision tasks: image classification, semantic segmentation, and object detection. This showcases its applicability to both classification and regression tasks. Moreover, we have evaluated the energy consumption of the converted SNNs, demonstrating their superior low-power advantage compared to conventional ANNs. Our training-free algorithm outperforms existing methods, highlighting its practical applicability and efficiency. This approach simplifies the deployment of SNNs by leveraging open-source pre-trained ANN models and neuromorphic hardware, enabling fast, low-power inference with negligible performance reduction.
Neural and Evolutionary Computing
What problem does this paper attempt to address?
The problem that this paper attempts to solve is: how to efficiently convert pre - trained artificial neural networks (ANNs) into spiking neural networks (SNNs) with high performance and low power consumption without additional training. Specifically, the existing supervised learning algorithms and ANN - SNN conversion methods have the following problems: 1. **Supervised learning algorithms**: Although they can train SNNs with performance comparable to ANNs, these methods require a large amount of memory and time, and the training cost is much higher than that of ANNs. 2. **Existing ANN - SNN conversion methods**: They usually need to retrain the ANN to improve the conversion efficiency, which increases additional computational costs. To solve these problems, the author proposes a novel training - free ANN - SNN conversion pipeline. This method can directly convert a pre - trained ANN model into a high - performance SNN without additional training. This method includes a local - learning - based threshold - balancing algorithm, which can efficiently calculate the optimal threshold and perform fine - grained threshold adjustment through channel - level scaling. ### Main contributions 1. **Introduce the concept of training - free ANN - SNN conversion**: This conversion method can obtain a high - performance SNN from a pre - trained ANN model without any additional training or fine - tuning. Due to its low training cost, this method is more suitable for developing large - scale SNNs. 2. **Propose an efficient training - free algorithm**: Through theoretical derivation, the author obtains the upper bound of the conversion error between the original ANN and the converted SNN. To minimize the upper bound of the conversion error, they introduce a local threshold - balancing method to optimize the threshold, thereby converting the pre - trained ANN model into its SNN counterpart using very few computational resources. 3. **Successfully extend to multiple computer vision tasks**: The author applies the conversion framework to three typical computer vision tasks, including image classification, semantic segmentation, and object detection. The experimental results show that their training - free algorithm outperforms other training - free conversion methods in traditional image classification tasks and also shows practical application value in multiple regression - based vision tasks. ### Method overview 1. **Upper bound of conversion error**: Define the inter - layer conversion error and derive its upper bound. By minimizing the upper bound of the conversion error, the performance of the SNN can be optimized. 2. **Local threshold - balancing algorithm**: Based on the local learning rule, a local threshold - balancing method is proposed. This method optimizes the threshold layer by layer in a data - driven manner to reduce the conversion error. 3. **Channel - level threshold - balancing**: During the conversion process, a channel - level threshold - balancing method is adopted, which is applicable to fully - connected layers and convolutional layers. This method can more accurately determine the optimal threshold for each channel while maintaining the basic characteristics of spiking neurons. 4. **Pre - neuron max - pooling layer**: A simple and effective method is proposed to handle the conversion problem of the max - pooling layer. By inserting a down - sampling layer in front of the neuron, the problem that the max - pooling layer in the SNN cannot be effectively down - sampled is solved. ### Experimental results The author verifies the effectiveness and practical application value of the method through extensive experiments. The experimental results show that their training - free conversion method performs well in multiple tasks, especially in the image classification task, where its performance is close to that of the original ANN model. In addition, this method also shows good performance in tasks such as semantic segmentation and object detection. In conclusion, this paper provides an efficient and practical training - free ANN - SNN conversion method, which simplifies the SNN deployment process and enables fast, low - power - consumption inference on resource - constrained devices.