Abstract
Tiny Machine Learning (TinyML) is a new frontier of machine learning. By squeezing deep learning models into billions of IoT devices and microcontrollers (MCUs), we expand the scope of AI applications and enable ubiquitous intelligence. However, TinyML is challenging due to hardware constraints: the tiny memory resource makes it difficult to hold deep learning models designed for cloud and mobile platforms. There is also limited compiler and inference engine support for bare-metal devices. Therefore, we need to co-design the algorithm and system stack to enable TinyML. In this review, we will first discuss the definition, challenges, and applications of TinyML. We then survey the recent progress in TinyML and deep learning on MCUs. Next, we will introduce MCUNet, showing how we can achieve ImageNet-scale AI applications on IoT devices with system-algorithm co-design. We will further extend the solution from inference to training and introduce tiny on-device training techniques. Finally, we present future directions in this area. Today's large model might be tomorrow's tiny model. The scope of TinyML should evolve and adapt over time.
Introduction: The Memory Wall
Standard deep learning models are designed for the "cloud" (GPUs) or "mobile" (smartphones), where memory is measured in gigabytes. Microcontrollers (MCUs), however, are orders of magnitude smaller, often lacking an Operating System, DRAM, and having strictly limited SRAM (frequently <256KB).
A critical challenge identified is the "Memory Wall." While mobile-optimized models like MobileNet reduce parameters and FLOPs, they often increase peak activation memory compared to larger models like ResNet-50, making them impossible to run on MCUs. Furthermore, existing software frameworks are often too heavy (interpreter-based) or lack support for the complex math required for on-device training. The fundamental question is: how do we squeeze state-of-the-art AI into a footprint 1,000x smaller than a smartphone?
Methods: System-Algorithm Co-Design
To address these constraints, the authors propose a holistic solution called MCUNet, which relies on two pillars:
1. TinyNAS (Neural Architecture Search)
Instead of manually designing models, TinyNAS automates the process. It first optimizes the search space to fit specific hardware constraints and then specializes the model. A key innovation is using the FLOPs Cumulative Distribution Function (CDF) as a proxy to find search spaces likely to yield high-capacity models under strict memory limits.
2. TinyEngine (Inference Library)
Unlike TF-Lite Micro, which uses an interpreter, TinyEngine uses code generation. It compiles only the necessary operators into a slim binary, eliminating runtime overhead. It introduces patch-based inference, which processes images in small spatial chunks to break the memory bottleneck of early convolutional layers, and in-place depth-wise convolution to reduce memory footprints by half.
On-Device Training (MCUNetV3)
Extending the solution to training, the authors introduce:
- Quantization-Aware Scaling (QAS): Stabilizes 8-bit quantized training, which otherwise suffers from gradient mismatches.
- Sparse Update: Uses "Contribution Analysis" to identify and update only the most important layers/tensors, reducing training memory by up to 20x.
- Tiny Training Engine (TTE): A specialized engine that performs compile-time auto-differentiation and graph pruning to remove redundant nodes before deployment.
Key Insights
- Activations are the real enemy: In TinyML, the number of parameters matters less than the peak activation memory. A model can have few parameters but still fail to run if its first layer requires a large buffer.
- Receptive Field Redistribution: Shifting the receptive field from memory-heavy early layers to later layers (where feature maps are smaller) maintains accuracy while drastically cutting RAM usage.
- Code Generation > Interpreters: Moving logic from "runtime" to "compile-time" is essential for fitting models into FLASH memory on bare-metal devices.
- Sparse Backprop is Enough: Updating just a few "important" tensors can achieve nearly the same accuracy as full fine-tuning with a fraction of the memory.
Results and Benchmarks
The paper evaluates its methods across standard benchmarks like ImageNet, Visual Wake Words (VWW), CIFAR-10, Pascal VOC, WIDER FACE, and KWS-subset.
- ImageNet on MCUs: MCUNet achieved 71.8% Top-1 accuracy on ImageNet on a commercial MCU, outperforming previous bests while using less memory.
- Training Speedup: The Tiny Training Engine (TTE) achieved 23–25x faster training speeds compared to TF-Lite Micro's full update.
- Memory Reduction: Sparse update techniques reduced training memory from ~300MB down to just 149KB, fitting within the 256KB SRAM limit of an STM32 MCU.
- Object Detection: MCUNet improved the mAP on Pascal VOC by double digits compared to previous MCU-based detectors.
Future Directions
- Self-Supervised Learning: To overcome the labeling bottleneck for on-device training, allowing devices to learn from raw sensor data.
- Multi-modal Learning: Handling fused inputs (e.g., vision + IMU + temperature) for more robust IoT applications.
- Evolving Scope: As "Large Language Models" (LLMs) dominate the cloud, TinyML must constantly evolve to compress increasingly complex architectures. Today's "large" model is tomorrow's "tiny" model.
Summary updated