Proceedings

Optimal ANN-SNN Conversion for Fast and Accurate Inference in Deep Spiking Neural Networks

Download BibTeX Cite

Proceedings of the Thirtieth International Joint Conference on Artificial Intelligence. Main Track. Pages 2328-2336.

https://doi.org/10.24963/ijcai.2021/321

© 2021 International Joint Conferences on Artificial Intelligence

Abstract

Spiking Neural Networks (SNNs), as bio-inspired energy-efficient neural networks, have attracted great attentions from researchers and industry. The most efficient way to train deep SNNs is through ANN-SNN conversion. However, the conversion usually suffers from accuracy loss and long inference time, which impede the practical application of SNN. In this paper, we theoretically analyze ANN-SNN conversion and derive sufficient conditions of the optimal conversion. To better correlate ANN-SNN and get greater accuracy, we propose Rate Norm Layer to replace the ReLU activation function in source ANN training, enabling direct conversion from a trained ANN to an SNN. Moreover, we propose an optimal fit curve to quantify the fit between the activation value of source ANN and the actual firing rate of target SNN. We show that the inference time can be reduced by optimizing the upper bound of the fit curve in the revised ANN to achieve fast inference. Our theory can explain the existing work on fast reasoning and get better results. The experimental results show that the proposed method achieves near loss-less conversion with VGG-16, PreActResNet-18, and deeper structures. Moreover, it can reach 8.6× faster reasoning performance under 0.265× energy consumption of the typical method. The code is available at https://github.com/DingJianhao/OptSNNConvertion-RNL-RIL.

  1. [Berner et al., 2019] Christopher Berner, Greg Brockman, Brooke Chan, Vicki Cheung, Przemysław Dębiak, Christy Dennison, David Farhi, Quirin Fischer, Shariq Hashme, Chris Hesse, et al. Dota 2 with large scale deep reinforcement learning. arXiv preprint arXiv:1912.06680, 2019.
  2. [Brown et al., 2020] Tom B Brown, Benjamin Mann, Nick Ry- der, Melanie Subbiah, Jared Kaplan, Prafulla Dhariwal, Arvind Neelakantan, Pranav Shyam, Girish Sastry, Amanda Askell, et al. Language models are few-shot learners. arXiv preprint arXiv:2005.14165, 2020.
  3. [Cao et al., 2015] Yongqiang Cao, Yang Chen, and Deepak Khosla. Spiking deep convolutional neural networks for energy-efficient object recognition. International Journal of Computer Vision, 113(1):54-66, 2015.
  4. [Davies et al., 2018] Mike Davies, Narayan Srinivasa, Tsung-Han Lin, Gautham Chinya, Yongqiang Cao, Sri Harsha Choday, Geor- gios Dimou, Prasad Joshi, Nabil Imam, Shweta Jain, et al. Loihi: A neuromorphic manycore processor with on-chip learn- ing. IEEE Micro, 38(1):82-99, 2018.
  5. [DeBole et al., 2019] Michael V DeBole, Brian Taba, Arnon Amir, Filipp Akopyan, Alexander Andreopoulos, William P Risk, Jeff Kusnitz, Carlos Ortega Otero, Tapan K Nayak, Rathinakumar Appuswamy, et al. TrueNorth: Accelerating from zero to 64 mil- lion neurons in 10 years. Computer, 52(5):20-29, 2019.
  6. [Diehl and Cook, 2015] Peter U Diehl and Matthew Cook. Un- supervised learning of digit recognition using spike-timing- dependent plasticity. Frontiers in Computational Neuroscience, 9:99, 2015.
  7. [Diehl et al., 2015] Peter U Diehl, Daniel Neil, Jonathan Binas, Matthew Cook, Shih-Chii Liu, and Michael Pfeiffer. Fast- classifying, high-accuracy spiking deep networks through weight and threshold balancing. In IJCNN, pages 1-8, 2015.
  8. [Eng Jr and Matson, 1994] Benjamin Eng Jr and Don P Matson. Multiple slope analog-to-digital converter, June 14 1994. US Patent 5,321,403.
  9. [Han and Roy, 2020] Bing Han and Kaushik Roy. Deep spiking neural network: Energy efficiency through time based coding. In ECCV, pages 388-404, 2020.
  10. [Han et al., 2020] Bing Han, Gopalakrishnan Srinivasan, and Kaushik Roy. RMP-SNN: Residual membrane potential neuron for enabling deeper high-accuracy and low-latency spiking neural network. In CVPR, pages 13558-13567, 2020.
  11. [He et al., 2016a] Kaiming He, Xiangyu Zhang, Shaoqing Ren, and Jian Sun. Deep residual learning for image recognition. In CVPR, pages 770-778, 2016.
  12. [He et al., 2016b] Kaiming He, Xiangyu Zhang, Shaoqing Ren, and Jian Sun. Identity mappings in deep residual networks. In ECCV, pages 630-645. Springer, 2016.
  13. [Hu et al., 2018] Yangfan Hu, Huajin Tang, Yueming Wang, and Gang Pan. Spiking deep residual network. arXiv preprint arXiv:1805.01352, 2018.
  14. [Hunsberger and Eliasmith, 2015] Eric Hunsberger and Chris Elia- smith. Spiking deep networks with LIF neurons. arXiv preprint arXiv:1510.08829, 2015.
  15. [Kheradpisheh et al., 2018] Saeed Reza Kheradpisheh, Moham- mad Ganjtabesh, Simon J Thorpe, and Timothée Masquelier. STDP-based spiking deep convolutional neural networks for ob- ject recognition. Neural Networks, 99:56-67, 2018.
  16. [Kim et al., 2020] Seijoon Kim, Seongsik Park, Byunggook Na, and Sungroh Yoon. Spiking-YOLO: Spiking neural network for energy-efficient object detection. In AAAI, pages 11270-11277, 2020.
  17. [Lee et al., 2018] Chankyu Lee, Priyadarshini Panda, Gopalakrish- nan Srinivasan, and Kaushik Roy. Training deep spiking con- volutional neural networks with STDP-based unsupervised pre- training followed by supervised fine-tuning. Frontiers in Neuro- science, 12:435, 2018.
  18. [Neil et al., 2016] Daniel Neil, Michael Pfeiffer, and Shih-Chii Liu. Learning to be efficient: Algorithms for training low-latency, low-compute deep spiking neural networks. In ACM SAC, pages 293-298, 2016.
  19. [Painkras et al., 2013] Eustace Painkras, Luis A Plana, Jim Gar- side, Steve Temple, Francesco Galluppi, Cameron Patterson, David R Lester, Andrew D Brown, and Steve B Furber. SpiN- Naker: A 1-w 18-core system-on-chip for massively-parallel neu- ral network simulation. IEEE Journal of Solid-State Circuits, 48(8):1943-1953, 2013.
  20. [Rathi et al., 2020] Nitin Rathi, Gopalakrishnan Srinivasan, Priyadarshini Panda, and Kaushik Roy. Enabling deep spik- ing neural networks with hybrid conversion and spike timing dependent backpropagation. In ICLR, pages 1-14, 2020.
  21. [Rueckauer et al., 2016] Bodo Rueckauer, Iulia-Alexandra Lungu, Yuhuang Hu, and Michael Pfeiffer. Theory and tools for the con- version of analog to spiking convolutional neural networks. arXiv preprint arXiv:1612.04052, 2016.
  22. [Rueckauer et al., 2017] Bodo Rueckauer, Iulia-Alexandra Lungu, Yuhuang Hu, Michael Pfeiffer, and Shih-Chii Liu. Conver- sion of continuous-valued deep networks to efficient event-driven networks for image classification. Frontiers in Neuroscience, 11:682, 2017.
  23. [Rullen and Thorpe, 2001] Rufin Van Rullen and Simon J Thorpe. Rate coding versus temporal order coding: what the retinal ganglion cells tell the visual cortex. Neural Computation, 13(6):1255-1283, 2001.
  24. [Sengupta et al., 2019] Abhronil Sengupta, Yuting Ye, Robert Wang, Chiao Liu, and Kaushik Roy. Going deeper in spiking neural networks: VGG and residual architectures. Frontiers in Neuroscience, 13:95, 2019.
  25. [Stöckl and Maass, 2021] Christoph Stöckl and Wolfgang Maass. Optimized spiking neurons can classify images with high accu- racy through temporal coding with two spikes. Nature Machine Intelligence, 3(3):230-238, 2021.
  26. [Stromatias et al., 2015] Evangelos Stromatias, Daniel Neil, Francesco Galluppi, Michael Pfeiffer, Shih-Chii Liu, and Steve Furber. Scalable energy-efficient, low-latency implementations of trained spiking deep belief networks on SpiNNaker. In IJCNN, pages 1-8, 2015.
  27. [Tavanaei and Maida, 2019] Amirhossein Tavanaei and Anthony Maida. BP-STDP: Approximating backpropagation using spike timing dependent plasticity. Neurocomputing, 330:39-47, 2019.
  28. [Wu et al., 2019] Yujie Wu, Lei Deng, Guoqi Li, Jun Zhu, Yuan Xie, and Luping Shi. Direct training for spiking neural networks: Faster, larger, better. In AAAI, pages 1311-1318, 2019.
  29. [Zenke and Vogels, 2021] Friedemann Zenke and Tim P Vogels. The remarkable robustness of surrogate gradient learning for in- stilling complex function in spiking neural networks. Neural Computation, 33(4):899-925, 2021.

References were extracted automatically from the PDF and may contain errors.

Welcome Future Conferences AI Journal Division IJCAI Proceedings About IJCAI IJCAI Awards