一句话:提出MicroVSA,面向8/16/32位MCU优化LDC分类器实现,最高加速21.86倍、Flash占用降低8倍,可支持8位MCU常开推理。
低成本微型MCU难以承载AI算力与存储。本文提出MicroVSA:面向8/16/32位MCU的超轻量级向量符号架构(VSA)分类器库,优化实现低维计算(LDC)分类器。相比原始LDC,MicroVSA最高提速21.86倍、Flash占用减少8倍,仅需数十字节RAM。在心肌梗死检测、人体活动识别和热词检测三类always-on任务上,其精度优于传统分类器并接近tiny深度学习模型,且可运行于8位MCU。例如人体活动识别仅需2.46 KiB Flash和0.02 KiB RAM,单次推理在Cortex-M4上0.85 ms,而高阶Cortex-M3上的RNN需62.0 ms。
Artificial intelligence (AI) on tiny edge devices has become feasible thanks to the emergence of high-performance microcontrollers (MCUs) and lightweight machine learning (ML) models. Nevertheless, the cost and power consumption of these MCUs and the computation requirements of these ML algorithms still present barriers that prevent the widespread inclusion of AI functionality on smaller, cheaper, and lower-power devices. Thus, there is an urgent need for a more efficient ML algorithm and implementation strategy suitable for lower-end MCUs. This paper presents MicroVSA, a library of optimized implementations of a low-dimensional computing (LDC) classifier, a recently proposed variant of vector symbolic architecture (VSA), for 8, 16, and 32-bit MCUs. MicroVSA achieves up to 21.86x speedup and 8x less flash utilization compared to the vanilla LDC. Evaluation results on the three most common always-on inference tasks - myocardial infarction detection, human activity recognition, and hot word detection - demonstrate that MicroVSA outperforms traditional classifiers and achieves comparable accuracy to tiny deep learning models, while requiring only a few ten bytes of RAM and can easily fit in tiny 8-bit MCUs. For instance, our model for recognizing human activity from inertial sensor data only needs 2.46 KiB of flash and 0.02 KiB of RAM and can complete one inference in 0.85 ms on a 32-bit ARM Cortex-M4 MCU or 11.82 ms on a tiny 8-bit AVR MCU, whereas the RNN model running on a higher-end ARM Cortex-M3 requires 62.0 ms. Our study suggests that ubiquitous ML deployment on low-cost tiny MCUs is possible, and more study on VSA model training, model compression, and implementation techniques is needed to further lower the cost and power of ML on edge devices.
@inproceedings{NarkthongDRX24,
title = {MicroVSA: An Ultra-Lightweight Vector Symbolic Architecture-based Classifier Library for Always-On Inference on Tiny Microcontrollers},
author = {Nuntipat Narkthong and Shijin Duan and Shaolei Ren and Xiaolin Xu},
booktitle = {ASPLOS},
year = {2024},
doi = {10.1145/3620665.3640374}
}