Batchnorm-Free Binarized Deep Spiking Neural Network for a Lightweight Machine Learning Model
Abstract
:1. Introduction
- We completely remove the batchnorm layer, which results in less computational usage and makes it more feasible to be realized in lightweight hardware implementations.
- We use a combination of a supervised spike-based BP and weight quantization algorithm, which ensures that the binary weights are optimally configured to minimize the loss between the target and predicted outputs.
- We extend our efforts to conduct a detailed analysis of the benefits of our proposed method in terms of the classification accuracy, memory saving, and computational complexity for the inference. The experimental result on benchmark datasets shows the effectiveness of our model compared to the conventional binarized CNN, such as the BWN and XNOR-Net [3], even with our fully binarized layers. The B-SNN can achieve comparable accuracy with a standard CNN, while performing low computational overhead operations.
2. Preliminary Works
2.1. Leaky Integrate-and-Fire Neuron Model
2.2. Input Encoding Scheme
2.3. Spike-Based Backpropagation Algorithm
2.3.1. Forward Propagation
2.3.2. Backward Propagation
3. Proposed Method
3.1. Weight Binarization Scheme
3.2. SNN Training
Algorithm 1: SNN training using spike-based backpropagation, weight binarization, and dropout at each iteration. |
Input: Pixel input and target output, SNN model, full-precision weight (), dropout ratio (p), total number of time steps (T), membrane potential (), time constant of membrane potential (), threshold (), and learning rate (). 1: for to do 2: for in do//binarize weight 3: 4: 5: 6: for to do 7: 8: 9: for to do 10: //accumulate weighted spikes in membrane potential 11: if then//membrane potential exceeds threshold 12: 13: 14: else//membrane potential decays over time 15: 16: 17: //backward pass using binary weight 18: //parameter update using real-valued weight 19: |
4. Experimental Results
4.1. Experimental Setup
4.2. Results and Discussion
5. Conclusions
Author Contributions
Funding
Data Availability Statement
Conflicts of Interest
References
- Courbariaux, M.; Bengio, Y.; David, J.-P. BinaryConnect: Training Deep Neural Networks with Binary Weights during Propagations. In Proceedings of the 29th International Conference on Neural Information Processing Systems—Volume 2; MIT Press: Cambridge, MA, USA, 2015; pp. 3123–3131. [Google Scholar]
- Courbariaux, M.; Hubara, I.; Soudry, D.; El-Yaniv, R.; Bengio, Y. Binarized Neural Networks: Training Deep Neural Networks with Weights and Activations Constrained to +1 or −1. arXiv 2016, arXiv:1602.02830. [Google Scholar]
- Rastegari, M.; Ordonez, V.; Redmon, J.; Farhadi, A. XNOR-Net: ImageNet Classification Using Binary Convolutional Neural Networks. In European Conference on Computer Vision; Springer: Berlin/Heidelberg, Germany, 2016; Volume 9908, pp. 525–542. [Google Scholar]
- Ioffe, S.; Szegedy, C. Batch Normalization: Accelerating Deep Network Training by Reducing Internal Covariate Shift. In Proceedings of the 32nd International Conference on International Conference on Machine Learning, Lille, France, 7–9 July 2015; JMLR: Brookline, MA, USA, 2015; Volume 37, pp. 448–456. [Google Scholar]
- Maass, W. Networks of Spiking Neurons: The Third Generation of Neural Network Models. Neural Netw. 1997, 10, 1659–1671. [Google Scholar] [CrossRef]
- Lee, C.; Panda, P.; Srinivasan, G.; Roy, K. Training Deep Spiking Convolutional Neural Networks with STDP-Based Unsupervised Pre-Training Followed by Supervised Fine-Tuning. Front. Neurosci. 2018, 12, 435. [Google Scholar] [CrossRef] [PubMed]
- Furber, S.B.; Lester, D.R.; Plana, L.A.; Garside, J.D.; Painkras, E.; Temple, S.; Brown, A.D. Overview of the SpiNNaker System Architecture. IEEE Trans. Comput. 2013, 62, 2454–2467. [Google Scholar] [CrossRef]
- Akopyan, F.; Sawada, J.; Cassidy, A.; Alvarez-Icaza, R.; Arthur, J.; Merolla, P.; Imam, N.; Nakamura, Y.; Datta, P.; Nam, G.J.; et al. TrueNorth: Design and Tool Flow of a 65 MW 1 Million Neuron Programmable Neurosynaptic Chip. IEEE Trans. Comput.-Aided Des. Integr. Circuits Syst. 2015, 34, 1537–1557. [Google Scholar] [CrossRef]
- Davies, M.; Srinivasa, N.; Lin, T.-H.; Chinya, G.; Cao, Y.; Choday, S.H.; Dimou, G.; Joshi, P.; Imam, N.; Jain, S.; et al. Loihi: A Neuromorphic Manycore Processor with On-Chip Learning. IEEE Micro 2018, 38, 82–99. [Google Scholar] [CrossRef]
- Liu, F.; Zhao, W.; Chen, Y.; Wang, Z.; Yang, T.; Jiang, L. SSTDP: Supervised Spike Timing Dependent Plasticity for Efficient Spiking Neural Network Training. Front. Neurosci. 2021, 15, 756876. [Google Scholar] [CrossRef] [PubMed]
- Datta, G.; Liu, Z.; Beerel, P.A. Can We Get the Best of Both Binary Neural Networks and Spiking Neural Networks for Efficient Computer Vision. In Proceedings of the Twelfth International Conference on Learning Representations, Vienna, Austria, 7–11 May 2024. [Google Scholar]
- Rumelhart, D.E.; Hinton, G.E.; Williams, R.J. Learning Internal Representations by Error Propagation. 1985. Available online: https://www.google.com.hk/url?sa=t&source=web&rct=j&opi=89978449&url=https://stanford.edu/~jlmcc/papers/PDP/Volume%25201/Chap8_PDP86.pdf&ved=2ahUKEwjH9u3r8tiMAxW_2TQHHXB-Ek4QFnoECBYQAQ&usg=AOvVaw3pgymY8RXsSzJeKGOPL4l6 (accessed on 20 February 2025).
- Lee, J.H.; Delbruck, T.; Pfeiffer, M. Training Deep Spiking Neural Networks Using Backpropagation. Front. Neurosci. 2016, 10, 508. [Google Scholar] [CrossRef] [PubMed]
- Panda, P.; Roy, K. Unsupervised Regenerative Learning of Hierarchical Features in Spiking Deep Networks for Object Recognition. In Proceedings of the 2016 International Joint Conference on Neural Networks (IJCNN), Vancouver, BC, Canada, 24–29 July 2016; IEEE: Vancouver, BC, Canada, 2016; pp. 299–306. [Google Scholar]
- Lee, C.; Sarwar, S.S.; Panda, P.; Srinivasan, G.; Roy, K. Enabling Spike-Based Backpropagation for Training Deep Neural Network Architectures. Front. Neurosci. 2020, 14, 119. [Google Scholar] [CrossRef] [PubMed]
- Dayan, P.; Abbott, L.F. Theoretical Neuroscience; MIT Press: Cambridge, MA, USA, 2001; Volume 806, ISBN 0262041995. [Google Scholar]
- Srivastava, N.; Hinton, G.; Krizhevsky, A.; Sutskever, I.; Salakhutdinov, R. Dropout: A Simple Way to Prevent Neural Networks from Overfitting. J. Mach. Learn. Res. 2014, 15, 1929–1958. [Google Scholar]
- Krizhevsky, A.; Geoffrey, H. Learning Multiple Layers of Features from Tiny Images. 2009. Available online: http://www.cs.utoronto.ca/~kriz/learning-features-2009-TR.pdf (accessed on 7 February 2025).
- Simonyan, K.; Zisserman, A. Very Deep Convolutional Networks for Large-Scale Image Recognition. In Proceedings of the 3rd International Conference on Learning Representations (ICLR 2015), San Diego, CA, USA, 7–9 May 2015; pp. 1–14. [Google Scholar]
- Han, S.; Pool, J.; Tran, J.; Dally, W.J. Learning Both Weights and Connections for Efficient Neural Networks. In Proceedings of the 29th International Conference on Neural Information Processing Systems—Volume 1; MIT Press: Cambridge, MA, USA, 2015; pp. 1135–1143. [Google Scholar]
Parameter | Value |
---|---|
Number of epochs | 100 |
Number of time- steps | 64 |
Batch size | 15 |
Learning rate | 0.005–0.012 |
Weight decay | 0.0003 |
Threshold | 1 (hidden layer), ∞ (final layer) |
Dropout | 0.01–0.08 |
Network | Accuracy | Memory Saving | Computational Saving |
---|---|---|---|
Standard CNN (w/o batchnorm) | 91.73% | 1.00× | 1.00× |
BWN [3] (w/o batchnorm) | 89.70% | 30.59× | 4.99× |
XNOR-Net [3] (w/o batchnorm) | 80.45% | 30.59× | 155.22× |
BANN [11] (w/o batchnorm) | 86.76% | 30.79× | 185.88× |
B-SNN (MID) | 91.11% | 30.79× | 10.55× |
B-SNN (FIRST + MID) | 89.21% | 31.03× | 142.77× |
B-SNN (LAST + MID) | 89.01% | 31.53× | 10.22× |
B-SNN (FULL) | 87.73% | 31.79× | 144.54× |
Disclaimer/Publisher’s Note: The statements, opinions and data contained in all publications are solely those of the individual author(s) and contributor(s) and not of MDPI and/or the editor(s). MDPI and/or the editor(s) disclaim responsibility for any injury to people or property resulting from any ideas, methods, instructions or products referred to in the content. |
© 2025 by the authors. Licensee MDPI, Basel, Switzerland. This article is an open access article distributed under the terms and conditions of the Creative Commons Attribution (CC BY) license (https://creativecommons.org/licenses/by/4.0/).
Share and Cite
Karimah, H.N.; Lee, C.; Seo, Y. Batchnorm-Free Binarized Deep Spiking Neural Network for a Lightweight Machine Learning Model. Electronics 2025, 14, 1602. https://doi.org/10.3390/electronics14081602
Karimah HN, Lee C, Seo Y. Batchnorm-Free Binarized Deep Spiking Neural Network for a Lightweight Machine Learning Model. Electronics. 2025; 14(8):1602. https://doi.org/10.3390/electronics14081602
Chicago/Turabian StyleKarimah, Hasna Nur, Chankyu Lee, and Yeongkyo Seo. 2025. "Batchnorm-Free Binarized Deep Spiking Neural Network for a Lightweight Machine Learning Model" Electronics 14, no. 8: 1602. https://doi.org/10.3390/electronics14081602
APA StyleKarimah, H. N., Lee, C., & Seo, Y. (2025). Batchnorm-Free Binarized Deep Spiking Neural Network for a Lightweight Machine Learning Model. Electronics, 14(8), 1602. https://doi.org/10.3390/electronics14081602