Introduction
The rapid proliferation of Internet of Things (IoT) devices has led to a surge in TinyML applications. Traditionally, these models follow a "train-then-deploy" paradigm: a deep neural network is trained on a powerful server, compressed, and then flashed onto a microcontroller (MCU) as a static entity. However, real-world environments are dynamic. Sensors age, lighting conditions change, and new data classes may emerge—a phenomenon known as "data distribution shift."
Static models cannot adapt to these changes without being sent back to the cloud for retraining, which raises concerns regarding privacy, latency, and bandwidth. While "Continual Learning" (CL) algorithms allow models to learn incrementally, they are typically too resource-intensive for microcontrollers. Specifically, "rehearsal-based" CL requires storing thousands of previous training samples to prevent "catastrophic forgetting," a requirement that far exceeds the memory capacity of standard MCUs.
Methodology: QLR-CL and the VEGA Platform
To address these challenges, this work introduces QLR-CL (Quantized Latent Replay-based Continual Learning), a hardware/software co-design implemented on the VEGA SoC.
Quantized Latent Replays (QLR)
The core strategy involves splitting the neural network into two parts: a "frozen" front-end that acts as a feature extractor and an "adaptive" back-end that is updated on-device. Instead of storing raw input images—which are memory-heavy—the system stores "latent replays" (LRs). These are intermediate feature maps captured at the boundary between the frozen and adaptive stages.
To further minimize the memory footprint, the authors propose quantizing these latent replays. By reducing the precision from 32-bit floating-point (FP32) to 8-bit (INT8) or even 7-bit integers, the memory required to store the "memory" of the network is reduced by 4x.
The VEGA SoC
The platform utilizes VEGA, a 22nm SoC featuring a 10-core PULP (Parallel Ultra-Low-Power) cluster based on the RISC-V architecture. The architecture includes:
- Multi-core Parallelism: 8 cores in the cluster share Floating Point Units (FPUs) to accelerate the heavy matrix multiplications of backpropagation.
- Efficient Memory Hierarchy: A specialized DMA engine manages data movement between the 1.5MB L2 memory and the ultra-fast 128KB L1 Tightly Coupled Data Memory (TCDM).
- Software Optimization: A custom software stack implements "tiling," which breaks large neural network layers into smaller chunks that fit into L1 memory, allowing the DMA to overlap data transfers with computation.
Experimental Results
The system was evaluated using the Core50 benchmark, a standard for incremental object recognition. The model (MobileNet-V1) was pre-trained on ImageNet-1k and then tasked with learning 40 new classes incrementally on-device.
Quantization Impact
A critical finding of this research is that 8-bit quantization of latent replays is "almost lossless." As shown in the experimental data, the accuracy drop when moving from FP32 to INT8 is a mere 0.26%. This demonstrates that high-precision storage is unnecessary for maintaining the network's previous knowledge.
Performance and Efficiency
Compared to a standard low-power microcontroller (STM32 L4), the VEGA platform achieved:
- 65x faster learning execution.
- 37x higher energy efficiency.
- 535 hours of battery life on a 3300mAh cell while learning a new mini-batch every minute.
The entire continual learning process, including the storage of quantized replays, fits within 64MB of memory, making it viable for high-end TinyML modules equipped with external RAM.
Conclusion
This work demonstrates that sophisticated on-device learning is possible on ultra-low-power hardware. By combining quantized latent replays with a parallel RISC-V architecture, the QLR-CL system overcomes the memory and computational barriers of traditional continual learning. Future research will focus on making the "frozen" front-end more flexible and exploring even more aggressive compression for latent replays to enable deployment on the most resource-constrained microcontrollers.
Summary updated