Benchmarking In-Sensor Machine Learning Computing: An Extension to the MLCommons-Tiny Suite
Abstract
:1. Introduction
2. Key Contributions of This Work
- To propose a benchmark to target in-sensor ML computing constrained by an ultra-low memory footprint.
- To introduce ML models trained with Quantization Aware Training (QAT) and compare their performances with Post-Training Quantization (PTQ).
- To include three different use cases such as Human Activity Recognition (HAR), Physical Activity Monitoring (PAM), and Superficial ElectroMioGraphy (S-EMG).
3. Related Works
3.1. Tools and Techniques in TinyML
- Post-Training Quantization (PTQ);
- Quantization Aware Training (QAT).
3.2. Industry Benchmarks
- Keyword Spotting (KWS), which evaluates the ability to recognize specific keywords from audio input, such as voice commands in smart devices;
- Visual Wake Words (VWW), which assesses the ability to detect the presence of a person in an image, often used in smart cameras or other visual recognition tasks;
- Image Classification (IC), which consists of recognizing the object depicted by the image;
- Anomaly Detection (AD) of machine faults from audio recordings, crucial for applications like predictive maintenance.
4. Proposed Benchmark
4.1. Requirements
4.2. The Use Cases
4.2.1. SHL Dataset
4.2.2. PAMAP2 Dataset
4.2.3. NINAPRO DB8 Dataset
4.3. Model Performance, Size and Latency
5. Conclusions and Future Works
Author Contributions
Funding
Institutional Review Board Statement
Informed Consent Statement
Data Availability Statement
Conflicts of Interest
References
- Al-Sarawi, S.; Anbar, M.; Abdullah, R.; Al Hawari, A.B. Internet of Things Market Analysis Forecasts, 2020–2030. In Proceedings of the 2020 Fourth World Conference on Smart Trends in Systems, Security and Sustainability (WorldS4), London, UK, 27–28 July 2020; pp. 449–453. [Google Scholar] [CrossRef]
- Zhang, C.; Lu, Y. Study on artificial intelligence: The state of the art and future prospects. J. Ind. Inf. Integr. 2021, 23, 100224. [Google Scholar] [CrossRef]
- Zhang, J.; Tao, D. Empowering Things with Intelligence: A Survey of the Progress, Challenges, and Opportunities in Artificial Intelligence of Things. IEEE Internet Things J. 2021, 8, 7789–7817. [Google Scholar] [CrossRef]
- Han, S.; Mao, H.; Dally, W.J. Deep Compression: Compressing Deep Neural Networks with Pruning, Trained Quantization and Huffman Coding. In Proceedings of the 4th International Conference on Learning Representations, ICLR 2016, San Juan, Puerto Rico, 2–4 May 2016. [Google Scholar]
- Wang, K.; Liu, Z.; Lin, Y.; Lin, J.; Han, S. HAQ: Hardware-Aware Automated Quantization with Mixed Precision. In Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition (CVPR), Long Beach, CA, USA, 15–20 June 2019. [Google Scholar]
- Liu, Z.; Li, J.; Shen, Z.; Huang, G.; Yan, S.; Zhang, C. Learning Efficient Convolutional Networks through Network Slimming. In Proceedings of the ICCV, Venice, Italy, 22–29 October 2017. [Google Scholar]
- Hinton, G.; Vinyals, O.; Dean, J. Distilling the Knowledge in a Neural Network. arXiv 2015, arXiv:1503.02531. [Google Scholar]
- Cheng, H.; Zhang, M.; Shi, J.Q. A survey on deep neural network pruning-taxonomy, comparison, analysis, and recommendations. arXiv 2023, arXiv:2308.06767. [Google Scholar] [CrossRef]
- Fu, Y.; Yang, H.; Yuan, J.; Li, M.; Wan, C.; Krishnamoorthi, R.; Chandra, V.; Lin, Y. DepthShrinker: A New Compression Paradigm Towards Boosting Real-Hardware Efficiency of Compact Neural Networks. In Proceedings of the 39th International Conference on Machine Learning, Baltimore, MD, USA, 17–23 July 2022; Chaudhuri, K., Jegelka, S., Song, L., Szepesvari, C., Niu, G., Sabato, S., Eds.; Volume 162, pp. 6849–6862. [Google Scholar]
- Lee, N.; Ajanthan, T.; Torr, P.H. Snip: Single-shot network pruning based on connection sensitivity. arXiv 2018, arXiv:1810.02340. [Google Scholar]
- Su, J.; Chen, Y.; Cai, T.; Wu, T.; Gao, R.; Wang, L.; Lee, J.D. Sanity-checking pruning methods: Random tickets can win the jackpot. Adv. Neural Inf. Process. Syst. 2020, 33, 20390–20401. [Google Scholar]
- Wang, C.; Zhang, G.; Grosse, R. Picking winning tickets before training by preserving gradient flow. arXiv 2020, arXiv:2002.07376. [Google Scholar]
- Wen, W.; Wu, C.; Wang, Y.; Chen, Y.; Li, H. Learning structured sparsity in deep neural networks. Adv. Neural Inf. Process. Syst. 2016, 29. [Google Scholar]
- Huang, Z.; Wang, N. Data-driven sparse structure selection for deep neural networks. In Proceedings of the European Conference on Computer Vision (ECCV), Munich, Germany, 8–14 September 2018; pp. 304–320. [Google Scholar]
- Bai, Y.; Wang, H.; Tao, Z.; Li, K.; Fu, Y. Dual lottery ticket hypothesis. arXiv 2022, arXiv:2203.04248. [Google Scholar]
- Chen, T.; Zhang, Z.; Liu, S.; Chang, S.; Wang, Z. Long live the lottery: The existence of winning tickets in lifelong learning. In Proceedings of the International Conference on Learning Representations, Addis Ababa, Ethiopia, 30 April 2020. [Google Scholar]
- Chen, T.; Sui, Y.; Chen, X.; Zhang, A.; Wang, Z. A unified lottery ticket hypothesis for graph neural networks. In Proceedings of the International Conference on Machine Learning. PMLR, Virtual, 18–24 July 2021; pp. 1695–1706. [Google Scholar]
- Huang, Y.; Aloufi, R.; Cadet, X.; Zhao, Y.; Barnaghi, P.; Haddadi, H. MicroT: Low-Energy and Adaptive Models for MCUs. arXiv 2024, arXiv:2403.08040. [Google Scholar]
- Choukroun, Y.; Kravchik, E.; Yang, F.; Kisilev, P. Low-bit quantization of neural networks for efficient inference. In Proceedings of the 2019 IEEE/CVF International Conference on Computer Vision Workshop (ICCVW), Seoul, Republic of Korea, 27–28 October 2019; pp. 3009–3018. [Google Scholar]
- Hubara, I.; Courbariaux, M.; Soudry, D.; El-Yaniv, R.; Bengio, Y. Quantized neural networks: Training neural networks with low precision weights and activations. J. Mach. Learn. Res. 2018, 18, 1–30. [Google Scholar]
- Lin, D.; Talathi, S.; Annapureddy, S. Fixed point quantization of deep convolutional networks. In Proceedings of the International Conference on Machine Learning, New York, NY, USA, 19–24 June 2016; pp. 2849–2858. [Google Scholar]
- Hubara, I.; Courbariaux, M.; Soudry, D.; El-Yaniv, R.; Bengio, Y. Binarized neural networks. Adv. Neural Inf. Process. Syst. 2016, 29. [Google Scholar]
- David, R.; Duke, J.; Jain, A.; Reddi, V.J.; Jeffries, N.; Li, J.; Kreeger, N.; Nappier, I.; Natraj, M.; Regev, S.; et al. TensorFlow Lite Micro: Embedded Machine Learning on TinyML Systems. arXiv 2021, arXiv:2010.08678. [Google Scholar]
- Abadi, M.; Agarwal, A.; Barham, P.; Brevdo, E.; Chen, Z.; Citro, C.; Corrado, G.S.; Davis, A.; Dean, J.; Devin, M.; et al. TensorFlow: Large-Scale Machine Learning on Heterogeneous Systems. In Proceedings of the 12th USENIX Conference on Operating Systems Design and Implementation, Savannah, GA, USA, 2–4 November 2016. [Google Scholar]
- Ayaz, F.; Zakariyya, I.; Cano, J.; Keoh, S.L.; Singer, J.; Pau, D.; Kharbouche-Harrari, M. Improving Robustness Against Adversarial Attacks with Deeply Quantized Neural Networks. In Proceedings of the 2023 International Joint Conference on Neural Networks (IJCNN), Gold Coast, Australia, 18–23 June 2023; pp. 1–8. [Google Scholar] [CrossRef]
- Coelho, C.N.; Kuusela, A.; Li, S.; Zhuang, H.; Ngadiuba, J.; Aarrestad, T.K.; Loncar, V.; Pierini, M.; Pol, A.A.; Summers, S. Automatic heterogeneous quantization of deep neural networks for low-latency inference on the edge for particle detectors. Nat. Mach. Intell. 2021, 3, 675–686. [Google Scholar] [CrossRef]
- Coelho, C.N.; Kuusela, A.; Zhuang, H.; Aarrestad, T.; Loncar, V.; Ngadiuba, J.; Pierini, M.; Summers, S. Ultra low-latency, low-area inference accelerators using heterogeneous deep quantization with QKeras and hls4ml. arXiv 2020, arXiv:2006.10159. [Google Scholar]
- Wang, E.; Davis, J.J.; Moro, D.; Zielinski, P.; Lim, J.J.; Coelho, C.; Chatterjee, S.; Cheung, P.Y.; Constantinides, G.A. Enabling binary neural network training on the edge. In Proceedings of the 5th International Workshop on Embedded and Mobile Deep Learning, Virtual, 25 June 2021; pp. 37–38. [Google Scholar]
- Mattson, P.; Reddi, V.J.; Cheng, C.; Coleman, C.; Diamos, G.; Kanter, D.; Micikevicius, P.; Patterson, D.; Schmuelling, G.; Tang, H.; et al. MLPerf: An Industry Standard Benchmark Suite for Machine Learning Performance. IEEE Micro 2020, 40, 8–16. [Google Scholar] [CrossRef]
- Banbury, C.; Reddi, V.J.; Torelli, P.; Holleman, J.; Jeffries, N.; Kiraly, C.; Montino, P.; Kanter, D.; Ahmed, S.; Pau, D.; et al. MLPerf Tiny Benchmark. In Proceedings of the Neural Information Processing Systems Track on Datasets and Benchmarks, Virtual, 6–14 December 2021. [Google Scholar]
- Gal-On, S.; Levy, M. Exploring Coremark a Benchmark Maximizing Simplicity and Efficacy; The Embedded Microprocessor Benchmark Consortium: Gainesville, VA, USA, 2012. [Google Scholar]
- Torelli, P.; Bangale, M. Measuring Inference Performance of Machine-Learning Frameworks on Edge-Class Devices with the Mlmark Benchmark. Techincal Report. Available online: https://api.semanticscholar.org/CorpusID:232220731 (accessed on 5 April 2021).
- Ioffe, S.; Szegedy, C. Batch Normalization: Accelerating Deep Network Training by Reducing Internal Covariate Shift. arXiv 2015, arXiv:1502.03167. [Google Scholar]
- Benchmarking in Sensor Machine Learning: An Extension to MLCommons-Tiny Github Repository. Available online: https://github.com/fabrizioaymone/sensor (accessed on 28 June 2024).
- Update: ISM330ISN and ISM330IS, Sensors with Intelligent Sensor Processing Unit for Greater AI at the Edge. Available online: https://www.st.com/content/st_com/en/campaigns/ispu-ai-in-sensors.html (accessed on 28 May 2024).
- Gjoreski, H.; Ciliberto, M.; Wang, L.; Ordonez Morales, F.J.; Mekki, S.; Valentin, S.; Roggen, D. The University of Sussex-Huawei Locomotion and Transportation Dataset for Multimodal Analytics With Mobile Devices. IEEE Access 2018, 6, 42592–42604. [Google Scholar] [CrossRef]
- Wang, L.; Gjoreski, H.; Ciliberto, M.; Mekki, S.; Valentin, S.; Roggen, D. Enabling Reproducible Research in Sensor-Based Transportation Mode Recognition With the Sussex-Huawei Dataset. IEEE Access 2019, 7, 10870–10891. [Google Scholar] [CrossRef]
- Reiss, A.; Stricker, D. Introducing a New Benchmarked Dataset for Activity Monitoring. In Proceedings of the 2012 16th International Symposium on Wearable Computers, Newcastle, UK, 18–22 June 2012; pp. 108–109. [Google Scholar] [CrossRef]
- Reiss, A.; Stricker, D. Creating and benchmarking a new dataset for physical activity monitoring. In Proceedings of the 5th International Conference on Pervasive Technologies Related to Assistive Environments, Heraklion Crete, Greece, 6–8 June 2012; pp. 1–8. [Google Scholar]
- Krasoulis, A.; Vijayakumar, S.; Nazarpour, K. Effect of user practice on prosthetic finger control with an intuitive myoelectric decoder. Front. Neurosci. 2019, 13, 461612. [Google Scholar] [CrossRef]
- Zanghieri, M.; Benatti, S.; Burrello, A.; Kartsch, V.; Conti, F.; Benini, L. Robust Real-Time Embedded EMG Recognition Framework Using Temporal Convolutional Networks on a Multicore IoT Processor. IEEE Trans. Biomed. Circuits Syst. 2020, 14, 244–256. [Google Scholar] [CrossRef] [PubMed]
- Lea, C.; Vidal, R.; Reiter, A.; Hager, G.D. Temporal Convolutional Networks: A Unified Approach to Action Segmentation. arXiv 2016, arXiv:cs.CV/1608.08242. [Google Scholar]
- Zanghieri, M.; Benatti, S.; Burrello, A.; Kartsch Morinigo, V.J.; Meattini, R.; Palli, G.; Melchiorri, C.; Benini, L. sEMG-based Regression of Hand Kinematics with Temporal Convolutional Networks on a Low-Power Edge Microcontroller. In Proceedings of the 2021 IEEE International Conference on Omni-Layer Intelligent Systems (COINS), Barcelona, Spain, 23–25 August 2021; pp. 1–6. [Google Scholar] [CrossRef]
- Voelker, A.; Kajić, I.; Eliasmith, C. Legendre Memory Units: Continuous-Time Representation in Recurrent Neural Networks. In Proceedings of the Advances in Neural Information Processing Systems, Vancouver, BC, Canada, 8–14 December 2019; Wallach, H., Larochelle, H., Beygelzimer, A., d’Alché-Buc, F., Fox, E., Garnett, R., Eds.; Curran Associates, Inc.: Red Hook, NY, USA, 2019; Volume 32. [Google Scholar]
Dense | CNN | TCN | |||
---|---|---|---|---|---|
Layers | Shape | Layers | Shape | Layers | Shape |
Input | 24, 6 | Input | 24, 6 | Input | 256, 16 |
Dense | 24, 128 | Conv2D | 6, 4, 8 | 3XConv1D | 256, 16 |
Dense | 24, 64 | Conv2D | 6, 4, 8 | AvgPool1D | 128, 16 |
Dense | 24, 128 | Flatten | 48 | 2XConv1D | 128, 32 |
Flatten | 3072 | Dense | 64 | Conv1D | 64, 32 |
Dense | 32 | Dense | 8 or 12 | AvgPool1D | 32, 32 |
Dense | 8 or 12 | Softmax | 8 or 12 | 2XConv1D | 32, 64 |
Softmax | 8 or 12 | Conv1D | 8, 64 | ||
AvgPool1D | 4, 64 | ||||
Flatten | 256 | ||||
Dense | 256 | ||||
Dense | 32 | ||||
Dense | 5 |
Dataset | SHL | PAMAP2 | ||||||
---|---|---|---|---|---|---|---|---|
Carry Position | Hand | Hips | Torso | Bag | Chest | Ankle | Hand | |
Dense | Keras | 81.1% | 92.9% | 84.2% | 95.3% | 90.7% | 86.9% | 87.6% |
TFLite | 77.8% | 88.9% | 72.2% | 93.9% | 85.2% | 76.8% | 87.1% | |
Qkeras | 79.9% | 92.4% | 81.0% | 94.9% | 90.4% | 87.4% | 87.5% | |
CNN | Keras | 77.1% | 90.4% | 83.0% | 93.7% | 88.8% | 83.6% | 86.5% |
TFLite | 75.9% | 89.4% | 74.6% | 93.5% | 87.7% | 80.6% | 86.3% | |
QKeras | 77.4% | 90.5% | 81.9% | 93.6% | 88.3% | 82.1% | 84.7% |
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. |
© 2024 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
Aymone, F.M.; Pau, D.P. Benchmarking In-Sensor Machine Learning Computing: An Extension to the MLCommons-Tiny Suite. Information 2024, 15, 674. https://doi.org/10.3390/info15110674
Aymone FM, Pau DP. Benchmarking In-Sensor Machine Learning Computing: An Extension to the MLCommons-Tiny Suite. Information. 2024; 15(11):674. https://doi.org/10.3390/info15110674
Chicago/Turabian StyleAymone, Fabrizio Maria, and Danilo Pietro Pau. 2024. "Benchmarking In-Sensor Machine Learning Computing: An Extension to the MLCommons-Tiny Suite" Information 15, no. 11: 674. https://doi.org/10.3390/info15110674
APA StyleAymone, F. M., & Pau, D. P. (2024). Benchmarking In-Sensor Machine Learning Computing: An Extension to the MLCommons-Tiny Suite. Information, 15(11), 674. https://doi.org/10.3390/info15110674