New Technique Enables Training of AI Models on Intelligent Edge Devices

Author photo: Chantal Polsonetti
ByChantal Polsonetti
Category:
Acquisition or Partnership

Microcontrollers are the basis for billions of connected devices, from internet-of-things (IoT) devices to sensors in automobiles. But cheap, low-power microcontrollers have extremely limited memory and no operating system, making it challenging to train artificial intelligence models on edge devices that work independently from central computing resources.

Training a machine-learning model on an intelligent edge device allows it to adapt to new data and make Intelligent Edge Devicesbetter predictions. For instance, training a model on a smart keyboard could enable the keyboard to continually learn from the user’s writing. However, the training process requires so much memory that it is typically done using powerful data center computers or cloud compute before the model is deployed on a device. This is more costly and raises privacy issues since user data must be sent to a central server.

To address this problem, researchers at MIT and the MIT-IBM Watson AI Lab developed a new technique that enables on-device training using less than a quarter of a megabyte of memory. Other training solutions designed for connected devices can use more than 500 megabytes of memory, greatly exceeding the 256-kilobyte capacity of most microcontrollers.

The intelligent algorithms and framework the researchers developed reduce the amount of computation required to train a model, which makes the process faster and more memory efficient. Their technique can be used to train a machine-learning model on a microcontroller in a matter of minutes.

This technique also preserves privacy by keeping data on the device, which could be especially beneficial with sensitive data. It could also enable model customization based on the needs of users. Moreover, the framework preserves or improves the accuracy of the model when compared to other training approaches.

This study claims to enable IoT devices to not only perform inference but also continuously update the AI models to newly collected data, paving the way for lifelong on-device learning. The low resource utilization makes deep learning more accessible and can have a broader reach, especially for low-power edge devices.

Lightweight Training

A neural network is a common type of machine-learning model. Loosely based on the human brain, these models contain layers of interconnected nodes, or neurons, that process data to complete a task, such as recognizing people in photos. The model must be trained first, which involves showing it millions of examples so it can learn the task. As it learns, the model increases or decreases the strength of the connections between neurons, which are known as weights.

The model may undergo hundreds of updates as it learns, and the intermediate activations must be stored during each round. In a neural network, activation is the middle layer’s intermediate results. Because there may be millions of weights and activations, training a model requires much more memory than running a pre-trained model.

The researchers developed a system, called a tiny training engine, that can run algorithmic innovations on a simple microcontroller that lacks an operating system. This system changes the order of steps in the training process, so more work is completed in the compilation stage, before the model is deployed on the edge device.

A Successful Speedup

The study optimization required only 157 kilobytes of memory to train a machine-learning model on a microcontroller, whereas other techniques designed for lightweight training would still need between 300 and 600 megabytes.  They tested their framework by training a computer vision model to detect people in images. After only 10 minutes of training, it learned to complete the task successfully. Their method was able to train a model more than 20 times faster than other approaches.

This work is funded by the National Science Foundation, the MIT-IBM Watson AI Lab, the MIT AI Hardware Program, Amazon, Intel, Qualcomm, Ford Motor Company, and Google.

Engage with ARC Advisory Group

Representative End User Clients
Representative Automation Clients
Representative Software Clients