BS4NN: Binarized Spiking Neural Networks with Temporal Coding and Learning

We recently proposed the S4NN algorithm, essentially an adaptation of backpropagation to multilayer spiking neural networks that use simple non-leaky integrate-and-fire neurons and a form of temporal coding known as time-to-first-spike coding. With this coding scheme, neurons fire at most once per stimulus, but the firing order carries information. Here, we introduce BS4NN, a modification of S4NN in which the synaptic weights are constrained to be binary (+1 or -1), in order to decrease memory and computation footprints. This was done using two sets of weights: firstly, real-valued weights, updated by gradient descent, and used in the backward pass of backpropagation, and secondly, their signs, used in the forward pass. Similar strategies have been used to train (non-spiking) binarized neural networks. The main difference is that BS4NN operates in the time domain: spikes are propagated sequentially, and different neurons may reach their threshold at different times, which increases computational power. We validated BS4NN on two popular benchmarks, MNIST and Fashion MNIST, and obtained state-of-the-art accuracies for this sort of networks (97.0% and 87.3% respectively) with a negligible accuracy drop with respect to real-valued weights (0.4% and 0.7%, respectively). We also demonstrated that BS4NN outperforms a simple BNN with the same architectures on those two datasets (by 0.2% and 0.9% respectively), presumably because it leverages the temporal dimension.

[1]  Sen Song,et al.  Brain-inspired global-local hybrid learning towards human-like intelligence , 2020, ArXiv.

[2]  H. T. Kung,et al.  Embedded Binarized Neural Networks , 2017, EWSN.

[3]  Timothée Masquelier,et al.  STDP-based spiking deep neural networks for object recognition , 2016, Neural Networks.

[4]  Thomas Pellegrini,et al.  Low-Activity Supervised Convolutional Spiking Neural Networks Applied to Speech Commands Recognition , 2020, 2021 IEEE Spoken Language Technology Workshop (SLT).

[5]  Terrence J. Sejnowski,et al.  Gradient Descent for Spiking Neural Networks , 2017, NeurIPS.

[6]  Surya Ganguli,et al.  SuperSpike: Supervised Learning in Multilayer Spiking Neural Networks , 2017, Neural Computation.

[7]  Andrew S. Cassidy,et al.  Convolutional networks for fast, energy-efficient neuromorphic computing , 2016, Proceedings of the National Academy of Sciences.

[8]  Timothée Masquelier,et al.  Optimal Localist and Distributed Coding of Spatiotemporal Spike Patterns Through STDP and Coincidence Detection , 2018, Front. Comput. Neurosci..

[9]  Timothée Masquelier,et al.  Bio-inspired unsupervised learning of visual features leads to robust invariant object recognition , 2015, Neurocomputing.

[10]  Igor Carron,et al.  XNOR-Net: ImageNet Classification Using Binary Convolutional Neural Networks , 2016 .

[11]  Takashi Morie,et al.  A Supervised Learning Algorithm for Multilayer Spiking Neural Networks Based on Temporal Coding Toward Energy-Efficient VLSI Processor Design , 2020, IEEE Transactions on Neural Networks and Learning Systems.

[12]  Robert A. Legenstein,et al.  Long short-term memory and Learning-to-learn in networks of spiking neurons , 2018, NeurIPS.

[13]  Dan F. M. Goodman,et al.  Visualizing a joint future of neuroscience and neuromorphic engineering , 2021, Neuron.

[14]  Bo Xu,et al.  A Biologically Plausible Supervised Learning Method for Spiking Neural Networks Using the Symmetric STDP Rule , 2018, Neural Networks.

[15]  Dah-Jye Lee,et al.  A Review of Binarized Neural Networks , 2019, Electronics.

[16]  Ammar Belatreche,et al.  A review of learning in biologically plausible spiking neural networks , 2019, Neural Networks.

[17]  Shih-Chii Liu,et al.  Conversion of analog to spiking neural networks using sparse temporal coding , 2018, 2018 IEEE International Symposium on Circuits and Systems (ISCAS).

[18]  A Tandem Learning Rule for Efficient and Rapid Inference on Deep Spiking Neural Networks. , 2019, 1907.01167.

[19]  Yoshua Bengio,et al.  Understanding the difficulty of training deep feedforward neural networks , 2010, AISTATS.

[20]  David Saad,et al.  Training Feed Forward Nets with Binary Weights via a Modified CHIR Algorithm , 1990, Complex Syst..

[21]  Peter A. Flach,et al.  Advances in Neural Information Processing Systems 28 , 2015 .

[22]  J. Göltz,et al.  Fast and deep neuromorphic learning with first-spike coding , 2020, NICE.

[23]  Arindam Sanyal,et al.  Temporal-Coded Deep Spiking Neural Network with Easy Training and Robust Performance , 2019, AAAI.

[24]  Malu Zhang,et al.  Rectified Linear Postsynaptic Potential Function for Backpropagation in Deep Spiking Neural Networks. , 2020 .

[25]  Huajin Tang,et al.  Deep Spiking Neural Networks With Binary Weights for Object Recognition , 2021, IEEE Transactions on Cognitive and Developmental Systems.

[26]  P. Alam,et al.  H , 1887, High Explosives, Propellants, Pyrotechnics.

[27]  Dharmendra S. Modha,et al.  Backpropagation for Energy-Efficient Neuromorphic Computing , 2015, NIPS.

[28]  Somnath Paul,et al.  Event-Driven Random Back-Propagation: Enabling Neuromorphic Deep Learning Machines , 2016, Front. Neurosci..

[29]  Titus Sigamani,et al.  A novel and efficient classifier using spiking neural network , 2019, The Journal of Supercomputing.

[30]  John J. Soraghan,et al.  SpikeSEG: Spiking Segmentation via STDP Saliency Mapping , 2020, 2020 International Joint Conference on Neural Networks (IJCNN).

[31]  Vishal Saxena,et al.  Deep Convolutional Spiking Neural Networks for Image Classification , 2019, ArXiv.

[32]  Malu Zhang,et al.  Spike-Timing-Dependent Back Propagation in Deep Spiking Neural Networks , 2020, ArXiv.

[33]  R. Zecchina,et al.  Efficient supervised learning in networks with binary synapses , 2007, Proceedings of the National Academy of Sciences.

[34]  Ali Farhadi,et al.  XNOR-Net: ImageNet Classification Using Binary Convolutional Neural Networks , 2016, ECCV.

[35]  Tobi Delbrück,et al.  Training Deep Spiking Neural Networks Using Backpropagation , 2016, Front. Neurosci..

[36]  Shih-Chii Liu,et al.  Conversion of Continuous-Valued Deep Networks to Efficient Event-Driven Networks for Image Classification , 2017, Front. Neurosci..

[37]  Xiaochao Dang,et al.  Supervised learning in spiking neural networks: A review of algorithms and evaluations , 2020, Neural Networks.

[38]  Wulfram Gerstner,et al.  Biologically plausible deep learning - but how far can we go with shallow networks? , 2019, Neural Networks.

[39]  Sen Lu,et al.  Exploring the Connection Between Binary and Spiking Neural Networks , 2020, Frontiers in Neuroscience.

[40]  Yoshua Bengio,et al.  BinaryConnect: Training Deep Neural Networks with binary weights during propagations , 2015, NIPS.

[41]  Gang Hua,et al.  How to Train a Compact Binary Neural Network with High Accuracy? , 2017, AAAI.

[42]  Wenrui Zhang,et al.  Spike-Train Level Backpropagation for Training Deep Recurrent Spiking Neural Networks , 2019, NeurIPS.

[43]  Jyrki Alakuijala,et al.  Temporal Coding in Spiking Neural Networks with Alpha Synaptic Function , 2019, ICASSP 2020 - 2020 IEEE International Conference on Acoustics, Speech and Signal Processing (ICASSP).

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

[45]  Somnath Paul,et al.  Event-driven random backpropagation: Enabling neuromorphic deep learning machines , 2017, 2017 IEEE International Symposium on Circuits and Systems (ISCAS).

[46]  Santosh S. Venkatesh,et al.  Directed Drift: A New Linear Threshold Algorithm for Learning Binary Weights On-Line , 1993, J. Comput. Syst. Sci..

[47]  Thomas Pellegrini,et al.  Technical report: supervised training of convolutional spiking neural networks with PyTorch , 2019, ArXiv.

[48]  Emre Neftci,et al.  Surrogate Gradient Learning in Spiking Neural Networks: Bringing the Power of Gradient-based optimization to spiking neural networks , 2019, IEEE Signal Processing Magazine.

[49]  Peng Li,et al.  Temporal Spike Sequence Learning via Backpropagation for Deep Spiking Neural Networks , 2020, NeurIPS.

[50]  Bernabé Linares-Barranco,et al.  Hardware implementation of convolutional STDP for on-line visual feature learning , 2017, 2017 IEEE International Symposium on Circuits and Systems (ISCAS).

[51]  Garrick Orchard,et al.  SLAYER: Spike Layer Error Reassignment in Time , 2018, NeurIPS.

[52]  Malu Zhang,et al.  You Only Spike Once: Improving Energy-Efficient Neuromorphic Inference to ANN-Level Accuracy , 2020, ArXiv.

[53]  Abbas Nowzari-Dalini,et al.  Bio-inspired digit recognition using reward-modulated spike-timing-dependent plasticity in deep convolutional networks , 2019, Pattern Recognit..

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

[55]  Bernabé Linares-Barranco,et al.  Fast Pipeline 128×128 pixel spiking convolution core for event-driven vision processing in FPGAs , 2015, 2015 International Conference on Event-based Control, Communication, and Signal Processing (EBCCSP).

[56]  Thomas de Quincey [C] , 2000, The Works of Thomas De Quincey, Vol. 1: Writings, 1799–1820.

[57]  Min Kyu Park,et al.  Neuron Circuits for Low-Power Spiking Neural Networks Using Time-To-First-Spike Encoding , 2020, IEEE Access.

[58]  Ran El-Yaniv,et al.  Binarized Neural Networks , 2016, NIPS.

[59]  Anthony Maida,et al.  BP-STDP: Approximating Backpropagation using Spike Timing Dependent Plasticity , 2017, Neurocomputing.

[60]  Zhaofei Yu,et al.  Incorporating Learnable Membrane Time Constant to Enhance Learning of Spiking Neural Networks , 2020, 2021 IEEE/CVF International Conference on Computer Vision (ICCV).

[61]  Sander M. Bohte,et al.  Error-backpropagation in temporally encoded networks of spiking neurons , 2000, Neurocomputing.

[62]  Nitish V. Thakor,et al.  HFirst: A Temporal Approach to Object Recognition , 2015, IEEE Transactions on Pattern Analysis and Machine Intelligence.

[63]  Sander M. Bohte,et al.  Error-Backpropagation in Networks of Fractionally Predictive Spiking Neurons , 2011, ICANN.

[64]  Ying Chen,et al.  Direct training based spiking convolutional neural networks for object recognition , 2019, ArXiv.

[65]  Ruthvik Vaila,et al.  Feature Extraction using Spiking Convolutional Neural Networks , 2019, ICONS.

[66]  Kaushik Roy,et al.  Towards spike-based machine intelligence with neuromorphic computing , 2019, Nature.

[67]  Shuchang Zhou,et al.  DoReFa-Net: Training Low Bitwidth Convolutional Neural Networks with Low Bitwidth Gradients , 2016, ArXiv.

[68]  Mingguo Zhao,et al.  Brain-inspired global-local learning incorporated with neuromorphic computing , 2020, Nature Communications.

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

[70]  T. Masquelier,et al.  S4NN: temporal backpropagation for spiking neural networks with one spike per neuron , 2019, Int. J. Neural Syst..

[71]  Timothée Masquelier,et al.  First-Spike-Based Visual Categorization Using Reward-Modulated STDP , 2017, IEEE Transactions on Neural Networks and Learning Systems.

[72]  Chris Eliasmith,et al.  Spiking Deep Networks with LIF Neurons , 2015, ArXiv.

[73]  Hesham Mostafa,et al.  Supervised Learning Based on Temporal Coding in Spiking Neural Networks , 2016, IEEE Transactions on Neural Networks and Learning Systems.

[74]  Roland Vollgraf,et al.  Fashion-MNIST: a Novel Image Dataset for Benchmarking Machine Learning Algorithms , 2017, ArXiv.

[75]  Gorjan Alagic,et al.  #p , 2019, Quantum information & computation.

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