IoT applications, in many common scenarios, need to take smart decisions based on contextual information they have access to, information that is gathered from the environment by bound IoT devices. We encounter several examples in the use-cases of the IoT-NGIN Living Labs (LLs). In the human-centred twin smart cities LL, the application for predicting the traffic flow and the parking availability leverages weather forecast data, as well as the road conditions and public transportation information collected in real-time. The crowd management app developed in the same LL relies on images recorded through cameras and other data collected from radars at road intersection points in real-time as well. In the smart agriculture LL application domain, the application for crop-disease prediction leverages images and real-time video analysis of the crop and the leaves captured from visual and multi-spectral cameras located on semi-autonomous drones flying over the orchard. In the energy grid active monitoring/control LL, several applications for predicting the power generation, consumption and energy demand leverage electric metrics collected by different sensors located at the nodes of the grid.
In all these situations, contextual data is continuously collected and dispatched, from IoT devices, to applications, commonly through MQTT subscription channels. As app decisions are taken based on this changing contextual information, the application intelligence needs to be updated to this evolving context over time.
Online Learning [1] (see figure below) is a service of the IoT-NGIN ML as a Service (MLaaS) platform [2] that facilitates i) the continuous training of ML models (i.e., the application intelligence) and ii) the inference of intelligence predictions, from online data collected from IoT devices over the time. That is, the online learning service can be subscribed to multiple MQTT/Kafka topics where contextual data, collected through IoT devices, is published over time. Then, this data is used to dynamically fine-train the ML models associated to those topics, which are retrieved from the MLaaS model storage, and finally to return updated predictions. Online Learning can save model snapshots into the MLaaS storage when the performance of the trained models gains a noticeable improvement, and furthermore provide explainable AI (XAI) models that offer insights to AI developers to understand the inference decisions taken by these models. Online Learning service leverages KServe pipelines, consisting of transformers, predictors and explainers, for a customizable training/inference management of multiple ML models with different input datasets.
Online learning has been successfully adopted for the continuous training of ML models that forecast the power generation and consumption in concrete nodes of the electric grid of the Smart Energy LL (see figure below). From online published training sets, consisting of features describing the grid power consumption over the last 24-36 hours (averaged every hour), the model is continuously re-trained and the next hour prediction forecasted. Models have been further improved by adding additional features to the training set, including the weather observations at the grid site location, and the days of weeks, in order to better capturing and predicting the consumption oscillations due to seasonal weather conditions and weekly customer habits.
References
[1] D3.3 Enhanced IoT federated deep learning/reinforcement ML. IoT-NGIN technical report. 2022. To be published.
[2] https://iot-ngin.eu/wp-content/uploads/2022/10/IoT-NGIN_D3.1_v2.pdf