| Author: |
黃柏碩 Huang, Po-Shuo |
|---|---|
| Thesis Title: |
針對記憶體內運算之強韌與節能神經網路訓練框架 A Training Framework Tailored for Robust and Energy-Efficient Compute-in-Memory Neural Network |
| Advisor: |
郭致宏
Kuo, Chih-Hung |
| Degree: |
碩士 Master |
| Department: |
電機資訊學院 - 電機工程學系 Department of Electrical Engineering |
| Thesis Publication Year: | 2024 |
| Graduation Academic Year: | 113 |
| Language: | 中文 |
| Pages: | 102 |
| Keywords (in Chinese): | 模型量化 、逐位元稀疏度 、高強韌性 、卷積神經網路 、記憶體內運算 |
| Keywords (in other languages): | Bit-wise sparsity, Computing-in-Memory (CIM), High robustness |
| Reference times: | Clicks: 160 Downloads: 0 |
| Share: |
| School Collection Retrieve National Library Collection Retrieve Error Report |
記憶體內運算(Computing-in-Memory, CIM)架構在記憶體單元儲存權重 並進行原地運算 (in-situ computation),大幅減少資料傳輸需求,使 CIM 加速器 具有高能效和低延遲的優勢。然而,由於深度神經網路中大量的乘加運算,往 往需要高解析度位元的類比數位轉換器(Analog-to-Digital Converter, ADC)避 免出現嚴重的轉換誤差,導致能耗顯著增加。為此,我們提出了一種針對高逐 位元稀疏度 (Bit-wise sparsity) 神經網路的稀疏訓練框架,稱為貝氏逐位元量 化感知訓練(Bayesian Bit-Wise Quantization-Aware Training, BBWQAT)。此方 法採用更細粒度的量化策略,將每個權重位元以可學習伯努利分布隨機變數表 示,逐位元進行訓練並透過逐位元正則器獲得高稀疏度之神經網路。搭配可調 配解析度 ADC,以較低解析度位元進行類比數位轉換,從而提升 ADC 轉換的 能源效率。此外,CIM 架構易受製程變異及類比運算雜訊等電路非理想性影響, 這一脆弱性在模型稀疏度增加時更加顯著。為了解決此問題,我們提出雜訊感 知訓練(Noise-Aware Training, NAT),在訓練階段考慮非理想雜訊的影響,以 提升神經網路的對雜訊的容忍度及強韌性。實驗結果顯示,以 8 位元整數 VGG- 16 訓練在 CIFAR-10 數據集上,我們所提出的稀疏訓練框架在逐位元稀疏度 99.02% 的情況下,仍維持 91.37% 的準確度,相較於傳統量化感知訓練方法, 稀疏度提升 1.83 倍,並減少 8.82 倍能耗。
Computing-in-Memory (CIM) architecture, which stores weights in memory cells and performs in-situ computations, significantly reduces data transfer requirements, offering high energy efficiency and low latency for CIM accelerators. However, the extensive multiply-accumulate (MAC) operations in deep neural networks (DNNs) often require high-resolution Analog-to-Digital Converters (ADCs) to prevent conversion errors, thereby increasing energy consumption. To address this issue, we propose a training framework tailored for high bit-wise sparsity neural networks, called Bayesian Bit-Wise Quantization-Aware Training (BBWQAT). Each integer weight is represented by a combination of Bayesian Weight Bits as random variables with learnable Bernoulli distributions. By applying bit-wise regularization, we reduce bit-width while simultaneously obtaining high bit-wise sparsity. This approach enables the reconfigurable resolution ADC to perform analog-to-digital conversions with fewer bits of resolution, thus achieving remarkable energy efficiency. Furthermore, CIM architectures are susceptible to circuit non-idealities, such as process variations and analog computation noise, with this vulnerability becoming more pronounced as model sparsity increases. To address this challenge, we propose Noise-Aware Training (NAT), which injects non-idealitie noises during the training phase to enhance the noise tolerance and robustness of neural networks. Experimental results demonstrate that our proposed sparse training framework, when applied to 8-bit VGG-16 on the CIFAR-10 dataset, achieves 91.37% accuracy with a bit-wise sparsity of 99.02%. This represents a 1.83× increase in sparsity and an 8.82 × reduction in power consumptions compared to conventional Quantization-Aware Training (QAT) methods.
[1] D. Silver, A, Huang, C. J. Maddison, A. Guez, L. Siffire, G. Van Dan Driessche, J.Schrittwieser, I. Antonoglou, V. Panneershelvam, and M. Lanctot, “Mastering the Game of Go with Deep Neural Networks and Tree Search.” Nature, vol. 529, no. 7587, pp.484-489, 2016.
[2] OpenAI, “GPT-4 Technical Report”, arXiv e-prints, 2023. doi:10.48550/arXiv.2303.08774.
[3] A. Krizhevsky, I. Sutskever, and G. E. Hinton, “Imagenet Classification with Deep Convolutional Neural Networks,” Advances in Neural Information Processing Systems, vol. 25, pp. 1097-1105, 2012.
[4] Y. Lecun, L.Bottou, Y. Bengio, and P. Haffner, “Gradient-Based Learning Applied to Document Recognition,” Proceedings of the IEEE, vol. 86, pp. 2278-2324, Nov 1998
[5] J. L. Elman, “Finding Structure in Time,” Cognitive science, vol. 14, no. 2, pp. 179-211, 1990.
[6] I. Goodfellow, J. Pouget-Abadie, M. Mirza, B. Xu, D. Warde-Farley, S. Ozair, and Y. Bengio, “Generative Adversarial Nets,” Advances in Neural Information Processing Systems, vol. 27, 2014.
[7] C. Subakan, M. Ravanelli, S. Cornell, M. Bronzi and J. Zhong, "Attention Is All You Need In Speech Separation," ICASSP 2021 - 2021 IEEE International Conference on Acoustics, Speech and Signal Processing (ICASSP), Toronto, ON, Canada, 2021, pp. 21-25, doi: 10.1109/ICASSP39728.2021.9413901.
[8] D. E. Rumelhart, G. E. Hintion, and R. J. Williams, “Learning Representations by Back-propagation Errors,” Cognitive Modeling, vol. 5, no. 3, p. 1, 1998.
[9] S. Ioffe, and S. Christian. “Batch Normalization: Accelerating Deep Network Training by Reducing Internal Covariate Shift,” International Conference on Machine Learning, pp. 448-456, 2015.
[10] J. Zhang, H. Yang, F. Chen, Y. Wang and H. Li, "Exploring Bit-Slice Sparsity in Deep Neural Networks for Efficient ReRAM-Based Deployment," 2019 Fifth Workshop on Energy Efficient Machine Learning and Cognitive Computing - NeurIPS Edition (EMC2-NIPS), Vancouver, BC, Canada, 2019, pp. 1-5, doi: 10.1109/EMC2-NIPS53020.2019.00008.
[11] K. Simonyan, and A. Zisserman, “Very Deep Convolutional Networks for Large-Scale Image Recognition,” 2014, arXiv:1409.1556.
[12] C. Szegedy, et al., “Going Deeper with Convolutions,” Proceedings of the IEEE conference on computer vision and pattern recognition, pp. 1-9, 2015.
[13] K. He, X. Zhang, S. Ren, and J. Sun. “Deep Residual Learning for Image Recognition,” Proceedings of the IEEE conference on computer vision and pattern recognition, pp. 770-778, 2016.
[14] G. Huang, Z Liu, L. Van Der Maaten, and K. Q. Weinberger. “Densely Connected Convolutional Networks,” Proceedings of the IEEE conference on Computer Vision and Pattern Recognition, pp. 4700-4708, 2017.
[15] J. Redmon, S. Divvala, R. Girshick, and A. Farhadi. “You Only Look Once: Unified, Real-time Object Detection,” Proceedings of the IEEE conference on Computer Vision and Pattern Recognition, pp. 779-788, 2016.
[16] G. Liu, Z. Lin, S. Yan, J. Sun, Y. Yu and Y. Ma, "Robust Recovery of Subspace Structures by Low-Rank Representation," in IEEE Transactions on Pattern Analysis and Machine Intelligence, vol. 35, no. 1, pp. 171-184, Jan. 2013, doi: 10.1109/TPAMI.2012.88.
[17] G. Hinton, O. Vinyals, and J. Dean, “Distilling the Knowledge in a Neural Network,” 2015, arXiv:1503.02531.
[18] A.G. Howard, et al. "MobileNets: Efficient Convolutional Neural Networks for Mobile Vision Applications." arXiv preprint arXiv:1704.04861 (2017).
[19] M. Sandler, A. Howard, M. Zhu, A. Zhmoginov and L. -C. Chen, "MobileNetV2: Inverted Residuals and Linear Bottlenecks," 2018 IEEE/CVF Conference on Computer Vision and Pattern Recognition, Salt Lake City, UT, USA, 2018, pp. 4510-4520, doi: 10.1109/CVPR.2018.00474.
[20] A. Howard et al., “Searching for MobileNetV3,” 2019 IEEE/CVF International Conference on Computer Vision (ICCV), Seoul, Korea (South), 2019, pp. 1314-1324 doi: 10.1109/ICCV.2019.00140.NAS
[21] B. Zoph, and Q. V. Le. “Neural Architecture Search with Reinforcement Learning,” 2016, arXiv:1611.01578.
[22] H. Li, A. Kadav, I. Durdanovic, H. Samet, and H. P. Graf, “Pruning Filters for Efficient ConvNets,” Advances in Neural Information Processing Systems, 2016.
[23] S. Han, J. Pool, J. Tran, and W. J. Dally, “Learning both Weights and Connections for Efficient Neural Network,” 2015, arXiv:1506.02626.
[24] B. Jacob, S. Kligys, B. Chen, M. Zhu, M. Tang, A. Howard, D. Kalenichenko, et al., “Quantization and Training of Neural Networks for Efficient Integer-Arithmetic-Only Inference,” Proceedings of the IEEE conference on computer vision and pattern recognition, pp. 2704-2713, 2018.
[25] Y. Bengio, N. Léonard, & A. Courville (2013). Estimating or Propagating Gradients Trough Stochastic Neurons for Conditional Computation. arXiv preprint arXiv:1308.3432
[26] H. Yang, L. Duan, Y. Chen, and H. Li. BSQ: Exploring Bit-Level Sparsity for Mixed-Precision Neural Network Quantization. In International Conference on Learning Representation, 2021
[27] S. Migacz, “Nvidia 8-bit Inference Width TensorRT,” In GPU Technology Conference, 2017.
[28] 盛祖丞, “一個採用雙路輸入架構與預先量化技巧之類比式記憶體內運算加速器,” 碩士論文, 國立成功大學電機工程學系, 2023。
[29] C. Y. Wang, A. Bochkovskiy & H. Y. M. Liao. YOLOv7: Trainable bag-of-freebies sets new state-of-the-art for real-time object detectors. In Proceedings of the IEEE/CVF Conference on Computer Vision and Pattern Recognition (pp. 7464-7475).
[30] W. -T. Chang, C. -H. Kuo and L. -C. Fang, "Variational Channel Distribution Pruning and Mixed-Precision Quantization for Neural Network Model Compression," 2022 International Symposium on VLSI Design, Automation and Test (VLSI-DAT), Hsinchu, Taiwan, 2022, pp. 1-3, doi: 10.1109/VLSI-DAT54769.2022.9768055.
[31] N. P. Jouppi et al., “In-Datacenter Performance Analysis of a Tensor Processing Unit,” 2017 ACM/IEEE 44th Annual International Symposium on Computer Architecture (ISCA), Toronto, On, Canada, 2017, pp. 1-12, doi: 10.1145/3079856.3080246
[32] A. Paszke, S. Gross, S. Chintala, G. Chanan, E. Yang, Z. DeVito, and A. Lerer, “Automatic Differentiation in PyTorch,” 2017.
[33] X. Si et al., “A Local Computing Cell and 6T SRAM-Based Computing-in-Memory Macro with 8-b MAC Operation for Edge AI Chips,” in IEEE Journal of Solid-State Circuits, vol. 56, no. 9, pp. 2817-2831, Sept. 2021, doi: 10.1109?JSSC.2021.3073254
[34] GM. Nagel, M. V. Baalen, T. Blankevoort and M. Welling, “Data-Free Quantization Through Weight Equalization and Bias Correction, ” 2019 IEEE/CVF International Conference on Computer Vision (ICCV), Seoul, Korea (South), 2019, pp. 1325-1334, doi: 10.1109/ICCV.2019.00141
[35] Ramachandran. P, Zoph. B, “Searching for activation functions, ” arXiv preprint arXiv:1710.05941, 2017.
[36] A. Shafiee, A. Nag, N. Muralimanohar, R. Balasubramonian, J. P. Strachan, M. Hu, R. S. Williams, and V. Srikumar, “Isaac: A Convolutional Neural Network Accelerator with In-Situ Analog Arithmetic in Crossbars,” ACM SIGARCH Computer Architecture News, vol. 44, no. 3, pp. 14–26, 2016.
[37] M. Saberi, R. Lotfi, K. Mafinezhad, and W. A. Serdijn, “Analysis of Power Consumption and Linearity in Capacitive Digital-to-Analog Con- verters Used in Successive Approximation ADCs,” IEEE Transactions on Circuits and Systems I: Regular Papers, vol. 58, no. 8, pp. 1736– 1748, 2011.
[38] V. Joshi, M. Le Gallo, S. Haefeli, I. Boybat, S. R. Nandakumar, C. Piveteau, M. Dazzi, B. Rajendran, A. Sebastian, and E. Eleftheriou, “Accurate Deep Neural Network Inference Using Computational Phase- Change Memory,” Nature communications, vol. 11, no. 1, p. 2473, 2020.
[39] C. Louizos, M. Welling, and D. P. Kingma, “Learning Sparse Neural Networks through l0 Regularization,” arXiv preprint arXiv:1712.01312, 2017
[40] M. Van Baalen, C. Louizos, M. Nagel, R. A. Amjad, Y. Wang, T. Blankevoort, and M. Welling, “Bayesian Bits: Unifying Quantization and Pruning,” Advances in neural information processing systems, vol. 33, pp. 5741–5752, 2020.
[41] M. Van Baalen, C. Louizos, M. Nagel, R. A. Amjad, Y. Wang, T. Blankevoort, and M. Welling, “Bayesian Bits: Unifying Quantization and Pruning,” Advances in neural information processing systems, vol. 33, pp. 5741–5752, 2020.