arXiv reaDer
256KB メモリ以下のオンデバイス トレーニング
On-Device Training Under 256KB Memory
オンデバイス トレーニングでは、事前トレーニング済みのモデルを微調整することで、センサーから収集された新しいデータにモデルを適応させることができます。ユーザーは、プライバシーを保護しながら、データをクラウドに転送することなく、カスタマイズされた AI モデルの恩恵を受けることができます。ただし、メモリ リソースが小さい IoT デバイスでは、トレーニング メモリの消費量が非常に大きくなります。わずか 256KB のメモリでオンデバイス トレーニングを可能にするアルゴリズムとシステムの協調設計フレームワークを提案します。オンデバイス トレーニングは、2 つの固有の課題に直面しています。(1) ニューラル ネットワークの量子化されたグラフは、ビット精度が低く、正規化されていないため、最適化が困難です。 (2) ハードウェア リソースが限られているため、完全な逆伝播はできません。最適化の難しさに対処するために、勾配スケールを調整し、8 ビットの量子化されたトレーニングを安定させるために、量子化認識スケーリングを提案します。メモリ フットプリントを削減するために、重要度の低いレイヤーとサブテンソルの勾配計算をスキップする Sparse Update を提案します。革新的なアルゴリズムは、軽量のトレーニング システムである Tiny Training Engine によって実装されます。Tiny Training Engine は、後方計算グラフをプルーニングしてスパース更新をサポートし、実行時の自動微分をコンパイル時にオフロードします。私たちのフレームワークは、tinyML アプリケーション VWW の精度に匹敵しながら、PyTorch と TensorFlow の 1/1000 未満のメモリを使用して、補助メモリなしで 256KB SRAM と 1MB フラッシュの下で畳み込みニューラル ネットワークの小さなオンデバイス トレーニングを可能にする最初のソリューションです。私たちの研究は、IoT デバイスが推論を実行するだけでなく、オンデバイスの生涯学習のために新しいデータに継続的に適応できるようにします。ビデオ デモは、https://youtu.be/XaDCO8YtmBw にあります。
On-device training enables the model to adapt to new data collected from the sensors by fine-tuning a pre-trained model. Users can benefit from customized AI models without having to transfer the data to the cloud, protecting the privacy. 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 low bit-precision and the lack of normalization; (2) the limited hardware resource does not allow full back-propagation. To cope with the optimization difficulty, we propose Quantization-Aware Scaling to calibrate the gradient scales and stabilize 8-bit 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 offload the runtime auto-differentiation to compile time. Our framework is the first solution to enable tiny on-device training of convolutional neural networks under 256KB SRAM and 1MB Flash without auxiliary memory, using less than 1/1000 of the memory of PyTorch and TensorFlow while matching the accuracy on tinyML application VWW. Our study enables IoT devices not only to perform inference but also to continuously adapt to new data for on-device lifelong learning. A video demo can be found here: https://youtu.be/XaDCO8YtmBw.
updated: Thu Nov 10 2022 18:10:18 GMT+0000 (UTC)
published: Thu Jun 30 2022 17:59:08 GMT+0000 (UTC)
参考文献 (このサイトで利用可能なもの) / References (only if available on this site)
被参照文献 (このサイトで利用可能なものを新しい順に) / Citations (only if available on this site, in order of most recent)
Amazon.co.jpアソシエイト