References & Citations
Computer Science > Computer Vision and Pattern Recognition
Title: On-Device Training Under 256KB Memory
(Submitted on 30 Jun 2022 (v1), revised 14 Jul 2022 (this version, v2), latest version 3 Apr 2024 (v4))
Abstract: On-device training enables the model to adapt to new data collected from the sensors by fine-tuning a pre-trained model. However, the training memory consumption is prohibitive for IoT devices that have tiny memory resources. We propose an algorithm-system co-design framework to make on-device training possible with only 256KB of memory. On-device training faces two unique challenges: (1) the quantized graphs of neural networks are hard to optimize due to mixed bit-precision and the lack of normalization; (2) the limited hardware resource (memory and computation) does not allow full backward computation. To cope with the optimization difficulty, we propose Quantization-Aware Scaling to calibrate the gradient scales and stabilize quantized training. To reduce the memory footprint, we propose Sparse Update to skip the gradient computation of less important layers and sub-tensors. The algorithm innovation is implemented by a lightweight training system, Tiny Training Engine, which prunes the backward computation graph to support sparse updates and offloads the runtime auto-differentiation to compile time. Our framework is the first practical solution for on-device transfer learning of visual recognition on tiny IoT devices (e.g., a microcontroller with only 256KB SRAM), using less than 1/100 of the memory of existing frameworks while matching the accuracy of cloud training+edge deployment for the tinyML application VWW. Our study enables IoT devices to not only perform inference but also continuously adapt to new data for on-device lifelong learning.
Submission history
From: Ji Lin [view email][v1] Thu, 30 Jun 2022 17:59:08 GMT (2108kb,D)
[v2] Thu, 14 Jul 2022 03:20:34 GMT (2108kb,D)
[v3] Thu, 10 Nov 2022 18:10:18 GMT (4929kb,D)
[v4] Wed, 3 Apr 2024 03:15:55 GMT (3054kb,D)
Link back to: arXiv, form interface, contact.