A Free Lunch from ANN: Towards Efficient, Accurate Spiking Neural Networks Calibration

Abstract

Spiking Neural Network (SNN) has been recognized as one of the next generation of neural networks. Conventionally, SNN can be converted from a pre-trained ANN by only replacing the ReLU activation to spike activation while keeping the parameters intact. Perhaps surprisingly, in this work we show that a proper way to calibrate the parameters during the conversion of ANN to SNN can bring significant improvements. We introduce SNN Calibration, a cheap but extraordinarily effective method by leveraging the knowledge within a pre-trained Artificial Neural Network (ANN). Starting by analyzing the conversion error and its propagation through layers theoretically, we propose the calibration algorithm that can correct the error layer-by-layer. The calibration only takes a handful number of training data and several minutes to finish. Moreover, our calibration algorithm can produce SNN with state-of-the-art architecture on the large-scale ImageNet dataset, including MobileNet and RegNet. Extensive experiments demonstrate the effectiveness and efficiency of our algorithm. For example, our advanced pipeline can increase up to 69% top-1 accuracy when converting MobileNet on ImageNet compared to baselines. Codes are released at https://github.com/yhhhli/SNN_Calibration.

Cite

Text

Li et al. "A Free Lunch from ANN: Towards Efficient, Accurate Spiking Neural Networks Calibration." International Conference on Machine Learning, 2021.

Markdown

[Li et al. "A Free Lunch from ANN: Towards Efficient, Accurate Spiking Neural Networks Calibration." International Conference on Machine Learning, 2021.](https://mlanthology.org/icml/2021/li2021icml-free/)

BibTeX

@inproceedings{li2021icml-free,
  title     = {{A Free Lunch from ANN: Towards Efficient, Accurate Spiking Neural Networks Calibration}},
  author    = {Li, Yuhang and Deng, Shikuang and Dong, Xin and Gong, Ruihao and Gu, Shi},
  booktitle = {International Conference on Machine Learning},
  year      = {2021},
  pages     = {6316-6325},
  volume    = {139},
  url       = {https://mlanthology.org/icml/2021/li2021icml-free/}
}