Abstract
MicroNets are a family of highly efficient neural network architectures designed specifically for the extreme resource constraints of microcontrollers (MCUs). By discovering that total operation (op) count serves as a surprisingly accurate linear proxy for latency on these devices, the researchers used hardware-aware Differentiable Neural Architecture Search (DNAS) to produce state-of-the-art models for the TinyMLperf benchmark suite.
Introduction: The Resource Constraint Challenge
Deploying deep learning on commodity microcontrollers, such as the ARM Cortex-M series, is significantly more challenging than on mobile SoCs. While mobile platforms benefit from gigabytes of RAM and complex memory hierarchies, MCUs typically operate with only a few hundred kilobytes of SRAM and a few megabytes of Flash.
The primary hurdles include:
- Memory Bottlenecks: Model weights must reside in Flash, while activations must fit within the extremely limited SRAM.
- Compute Limits: Low clock speeds necessitate lean inference to maintain real-time performance.
- Search Complexity: Manual design for these specific hardware "cliffs" is often a slow, trial-and-error process.
Methodology: Hardware-Aware DNAS
The authors utilize a hardware-aware Differentiable Neural Architecture Search (DNAS) approach. A pivotal observation driving this method is that end-to-end model latency scales linearly with total operation count ($r^2 > 0.95$), despite non-linear behaviors in individual layers due to varying overheads.
The search process involves:
- Supernet Formulation: Defining backbone search spaces (MobileNetV2 for vision, DS-CNN for audio) to optimize width and depth.
- Integrated Constraints: Differentiable penalty terms for SRAM, Flash, and op count are added to the loss function.
- Runtime Optimization: Models are optimized specifically for the TensorFlow Lite Micro (TFLM) runtime, accounting for its specific memory management.
- Sub-Byte Quantization: Custom 4-bit kernels for Cortex-M were developed to explore higher accuracy within fixed memory footprints.
Memory Management and Constraints
SRAM is identified as the critical bottleneck; if activations exceed its capacity, the model cannot execute. The DNAS explicitly models the TFLM memory planner to ensure every discovered architecture is actually deployable.
The researchers found that 4-bit quantization allows for larger, more accurate architectures that still fit within memory limits, even when accounting for the software emulation overhead required on 8-bit hardware.
Evaluation and Results
MicroNets were evaluated on the industry-standard TinyMLperf benchmark suite, covering Visual Wake Words (VWW), Audio Keyword Spotting (KWS), and Anomaly Detection (AD).
The models achieved state-of-the-art, Pareto-optimal results:
- Visual Wake Words: Achieved 88.03% accuracy, nearly matching a full MobileNetV2 while fitting on a mid-range MCU.
- Keyword Spotting: MicroNet-KWS was 2.7x faster and more accurate than the previous DS-CNN(L) baseline.
- Anomaly Detection: Achieved over 95% AUC on the smallest MCU (STM32F446RE), outperforming much larger unquantized baselines.
Conclusion
MicroNets demonstrate that hardware-aware NAS, guided by simple yet effective proxies like op count, can overcome the severe limitations of commodity microcontrollers. While current performance is limited by software emulation of sub-byte types, native hardware support for 4-bit arithmetic promises even greater efficiency in the future.
Summary updated