The Machine Learning on the Edge Paradigm: for Safe and Scalable Use of Machine Learning in IoT and Industry 4.0

It is no longer needed to explain the potential of Machine Learning (ML). This technique has proven its strength and adaptability in the last decades in every technological field, and nowadays, you are surrounded by apps and devices that use ML models: they recognized your face when you unlock your phone, they suggest which film you should watch next, they probably (will) drive your car, they (very likely) defeat you at chess or StarCraft.

Despite its ubiquity, the application of Machine Learning to the Internet of Things (IoT) and Industry 4.0 is not straightforward. By now, the standard approach involves the transfer to the cloud of the massive amount of data (in the order of magnitude of terabytes per week) collected by every connected device. Then, this data is processed by computationally powerful computers, which run very complex ML models and return their responses. Unfortunately, this data movement brings with it a multitude of problems, the main ones being privacy leaks, sensitivity to hacker attacks, and a huge need for bandwidth and hardware to transfer and store the data.

Machine Learning on the Edge, or Edge Machine Learning, has the purpose of solving these problems. With this term, we refer to the technique by which Smart Devices and Industrial Machines can process data locally (either using local servers or at the device-level) using machine learning algorithms, reducing reliance on Cloud networks. These local computations reduce reliance on Cloud networks, avoiding any data transfer, along with all its consequences. They also enable processing data in real-time, which is crucial for technologies like autonomous vehicles and medical devices.

Unfortunately, Machine Learning on the Edge does not come for free. Usually, device-level hardware has exponentially lower storage and computational capabilities compared to cloud servers. This is a major issue when it comes to the training of a Machine Learning model. When we train a model, we let it look at a lot of input data, along with the desired output, and update its inner parameters to minimize some loss function. At the end of this training phase, the model should have learned the optimal operations to apply to the input to produce the output. This knowledge learned during the training phase is then used in the inference phase, where the model just applies the learned operations to any (possibly unseen) input and predicts a plausible output. To perform efficient and quick training, the ML algorithm must see each training record multiple times and make difficult computations to update its parameters. For these reasons, a complete edge computation is not feasible.

This limitation can be overcome with the division of tasks between cloud servers and local devices. If the training phase requires the ability to store an enormous amount of data and to modify the hundreds of thousands of parameters of the model, the inference phase is much less computationally expensive. Hence, a possible way to go may be the use of cloud servers to handle model training, while local devices would be used only to infer and get responses. Suppose we combine this division of tasks with the ability to reduce model complexities without affecting their performances. In that case, we could be able to fully apply edge ML to any IoT and Industry 4.0 application.

What has just been described is only one of the topics addressed by PLANET4 – Practical Learning of Artificial Intelligence on the Edge for indusTry 4.0. This project, supported by the Erasmus+ Program of the European Union,  aims at enabling a knowledge transfer between academia and industry, trying to satisfy the current need for the digital transition. The project approaches this objective in a cross-disciplinary manner, focusing on both hard skills in Artificial Intelligence (AI) and Machine Learning technologies and soft competencies needed to manage the changes introduced in the industrial ecosystem. By connecting academics and industry, PLANET4 also allows the adaptation of AI teaching to better fit the real-world industrial pains and needs, enabling this powerful technology to meet and exploit all the possibilities offered by the paradigm of the Internet of Things and Industry 4.0.