Q-SpiNN: A Framework for Quantizing Spiking Neural Networks

A prominent technique for reducing the memory footprint of Spiking Neural Networks (SNNs) without decreasing the accuracy significantly is quantization. However, the state-of-the-art only focus on employing the weight quantization directly from a specific quantization scheme, i.e., either the post-training quantization (PTQ) or the in-training quantization (ITQ), and do not consider (1) quantizing other SNN parameters (e.g., neurons' membrane potential), (2) exploring different combinations of quantization approaches (i.e., quantization schemes, precision levels, and rounding schemes), and (3) selecting the SNN model with a good memory-accuracy trade-off at the end. Therefore, the memory saving offered by these state-of-the-art to meet the targeted accuracy is limited, thereby hindering processing SNNs on the resource-constrained systems (e.g., the IoT-Edge devices). Towards this, we propose Q-SpiNN, a novel quantization framework for memory-efficient SNNs. The key mechanisms of the Q-SpiNN are: (1) employing quantization for different SNN parameters based on their significance to the accuracy, (2) exploring different combinations of quantization schemes, precision levels, and rounding schemes to find efficient SNN model candidates, and (3) developing an algorithm that quantifies the benefit of the memory-accuracy trade-off obtained by the candidates, and selects the Pareto-optimal one. The experimental results show that, for the unsupervised network, the Q-SpiNN reduces the memory footprint by ca. 4x, while maintaining the accuracy within 1% from the baseline on the MNIST dataset. For the supervised network, the Q-SpiNN reduces the memory by ca. 2x, while keeping the accuracy within 2% from the baseline on the DVS-Gesture dataset.

[1]  Muhammad Shafique,et al.  SpikeDyn: A Framework for Energy-Efficient Spiking Neural Networks with Continual and Unsupervised Learning Capabilities in Dynamic Environments , 2021, 2021 58th ACM/IEEE Design Automation Conference (DAC).

[2]  M. Shafique,et al.  NeuroAttack: Undermining Spiking Neural Networks Security through Externally Triggered Bit-Flips , 2020, 2020 International Joint Conference on Neural Networks (IJCNN).

[3]  Eugene M. Izhikevich,et al.  Which model to use for cortical spiking neurons? , 2004, IEEE Transactions on Neural Networks.

[4]  K. Deimling Fixed Point Theory , 2008 .

[5]  Timothée Masquelier,et al.  Deep Learning in Spiking Neural Networks , 2018, Neural Networks.

[6]  Abbas Nowzari-Dalini,et al.  SpykeTorch: Efficient Simulation of Convolutional Spiking Neural Networks With at Most One Spike per Neuron , 2019, Front. Neurosci..

[7]  Hananel Hazan,et al.  Unsupervised Learning with Self-Organizing Spiking Neural Networks , 2018, 2018 International Joint Conference on Neural Networks (IJCNN).

[8]  Muhammad Shafique,et al.  SparkXD: A Framework for Resilient and Energy-Efficient Spiking Neural Network Inference using Approximate DRAM , 2021, 2021 58th ACM/IEEE Design Automation Conference (DAC).

[9]  Daniel J. Saunders,et al.  STDP Learning of Image Patches with Convolutional Spiking Neural Networks , 2018, 2018 International Joint Conference on Neural Networks (IJCNN).

[10]  Xiaoxin Cui,et al.  A Novel Conversion Method for Spiking Neural Network using Median Quantization , 2020, 2020 IEEE International Symposium on Circuits and Systems (ISCAS).

[11]  Steve B. Furber,et al.  Stochastic rounding and reduced-precision fixed-point arithmetic for solving neural ODEs , 2019, ArXiv.

[12]  Maurizio Martina,et al.  An Efficient Spiking Neural Network for Recognizing Gestures with a DVS Camera on the Loihi Neuromorphic Processor , 2020, 2020 International Joint Conference on Neural Networks (IJCNN).

[13]  Yoshua Bengio,et al.  Gradient-based learning applied to document recognition , 1998, Proc. IEEE.

[14]  Raghuraman Krishnamoorthi,et al.  Quantizing deep convolutional networks for efficient inference: A whitepaper , 2018, ArXiv.

[15]  Jacques Kaiser,et al.  Synaptic Plasticity Dynamics for Deep Continuous Local Learning (DECOLLE) , 2018, Frontiers in Neuroscience.

[16]  Hananel Hazan,et al.  Lattice map spiking neural networks (LM-SNNs) for clustering and classifying image data , 2019, Annals of Mathematics and Artificial Intelligence.

[17]  Tobi Delbrück,et al.  A Low Power, Fully Event-Based Gesture Recognition System , 2017, 2017 IEEE Conference on Computer Vision and Pattern Recognition (CVPR).

[18]  Qian Liu,et al.  Optimizing the Energy Consumption of Spiking Neural Networks for Neuromorphic Applications , 2020, Frontiers in Neuroscience.

[19]  Michael Pfeiffer,et al.  Deep Learning With Spiking Neurons: Opportunities and Challenges , 2018, Front. Neurosci..

[20]  Darpan T. Sanghavi,et al.  BindsNET: A Machine Learning-Oriented Spiking Neural Networks Library in Python , 2018, Front. Neuroinform..

[21]  Matthew Cook,et al.  Unsupervised learning of digit recognition using spike-timing-dependent plasticity , 2015, Front. Comput. Neurosci..

[22]  Anand Raghunathan,et al.  Approximate computing for spiking neural networks , 2017, Design, Automation & Test in Europe Conference & Exhibition (DATE), 2017.

[23]  Muhammad Shafique,et al.  FSpiNN: An Optimization Framework for Memory- and Energy-Efficient Spiking Neural Networks. , 2020 .

[24]  Arnab Roy,et al.  A Programmable Event-driven Architecture for Evaluating Spiking Neural Networks , 2017, 2017 IEEE/ACM International Symposium on Low Power Electronics and Design (ISLPED).

[25]  Hananel Hazan,et al.  Locally Connected Spiking Neural Networks for Unsupervised Feature Learning , 2019, Neural Networks.

[26]  Pritish Narayanan,et al.  Deep Learning with Limited Numerical Precision , 2015, ICML.

[27]  Kaushik Roy,et al.  STDP-Based Pruning of Connections and Weight Quantization in Spiking Neural Networks for Energy-Efficient Recognition , 2017, IEEE Transactions on Computer-Aided Design of Integrated Circuits and Systems.

[28]  Anand Raghunathan,et al.  Dynamic Spike Bundling for Energy-Efficient Spiking Neural Networks , 2019, 2019 IEEE/ACM International Symposium on Low Power Electronics and Design (ISLPED).