π€ AI Summary
This work addresses the high energy consumption and hardware dependency of large models on resource-constrained microcontrollers by proposing an integrated compression and deployment methodology that efficiently adapts FastGRNN to 8/16-bit MCUs lacking hardware multipliers. The approach features low-rank weight decomposition, iterative hard-thresholding sparsification, Q15 post-training quantization, activation calibration, and a novel lookup-table-based acceleration mechanism for sigmoid and tanh functions tailored to multiplier-less architectures, enabling bit-accurate deterministic inference across platforms. The resulting model occupies only 566 bytes and achieves a macro F1 score of 0.918 on the HAPT dataset. It enables real-time 50 Hz inference in 9.21 ms on Arduino and 13 ms on MSP430, with the lookup-table method yielding a 30.5Γ speedup and reducing energy consumption by 96.7%.
π Abstract
The dominant trajectory of modern machine learning has been to scale up: larger models, larger accelerators, larger memory budgets. Yet a multi-year global semiconductor supply constraint and the growing energy and carbon cost of always-online inference expose the fragility of this trajectory and motivate the opposite direction: refactoring AI and ML algorithms to fit the small, ubiquitous microcontrollers already in mass production in wearables, sensors, and edge appliances. We present an end-to-end open-source reproduction of FastGRNN, a compact gated recurrent cell, deployed on two bare-metal targets: the 8-bit Arduino (ATmega328P) and the 16-bit MSP430 (no hardware multiplier; 16 KB Flash; 512 B SRAM). Our compression pipeline combines low-rank weight factorization, iterative hard-thresholding sparsity, and per-tensor Q15 post-training quantization with explicit activation calibration. The deployed model occupies 566 bytes of weights and achieves macro F1 = 0.918 (seed 0; five-seed Q15 mean 0.853+-0.107) on the HAPT test set. It matches a PyTorch reference at 100% prediction agreement across 3,399 test windows (MCU seed 0; 99.91-100% C-equivalent across five seeds). Both platforms sustain real-time 50 Hz streaming inference (9.21 ms per sample on Arduino; 13 ms on MSP430), where a 256-entry sigmoid/tanh look-up table delivers a 30.5x speedup on the multiplier-less MSP430. Four contributions extend the original FastGRNN paper: (i) cross-platform bit-equivalent deterministic inference; (ii) characterization of recurrent warm-up latency (median 74 samples, 1.48 s; worst-case 125 samples, 2.50 s over 100 test windows); (iii) a deployable look-up-table recipe for multiplier-less embedded targets; and (iv) hardware energy characterization showing 17.7 mW active inference power, <0.09 mW idle power, and 96.7% energy reduction with the LUT.