Hello.
This demo illustrates our capabilities
for implementing incremental learning on streaming data.
We'll use our monitoring cooling system
in manufacturing as context, but similar challenges
exist in many other contexts.
Let's begin by understanding why incremental learning is needed.
The standard AI workflow assumes you collect data, train
your model, deploy this model to your production system,
and you are done, or so you think.
Unfortunately, in many real world applications,
properties of the data may change over time
or differ across the environment where you deploy your model.
To illustrate, let's look at deploying a battery
state of charge estimation across a fleet of vehicles
in different geographies.
Batteries, and how fast they discharge,
are sensitive to the temperature.
The temperature distribution is very
different between a moderate climate,
like Europe, shown on the left, and the heat
of the African desert.
Your battery monitoring system needs
to take that into account.
And you may want to adapt the generic model to the operating
conditions where a vehicle actually is used.
That's one of the use cases where
incremental learning can help.
The second is when machine learning task
itself evolves over time.
You need to identify conditions that
weren't present during initial training.
In our example, imagine you want to add a condition
to your battery monitoring system that
alerts the driver when the battery discharges unusually
quickly, like for vehicles operated in very
cold conditions, in Siberia.
You may not be able to collect sufficient data
until you deploy vehicles to those extreme conditions.
How does incremental learning work?
Conceptually, an incremental learner
receives data on an ongoing basis,
regularly checks whether models need
to be adapted, which you need to operationalize
with some criteria.
When the criteria is met, model parameters are updated.
Yet all the while, the model delivers predictions
that are used in your intelligence application,
in our demo and Monitoring Dashboard.
In MATLAB, you can do this using a new construct called
an Incremental Learner.
Let's understand what technologies
you can employ to implement this architecture.
You can stream data, using frameworks
like Apache Kafka or Azure Event Hub.
Alternatively, you can access the data
in databases or process historians.
MATLAB Production Server lets you scale deployed systems
to handle lots of streaming data,
or to multiple simultaneous inquiries,
like coming from vehicle operators all over the world
or, closer to our actual demo, from manufacturing
equipment located in several different plants.
Model parameters could be stored in the Redis in-memory database
for high-speed access.
Web App Server lets you deploy a monitoring dashboard built
using App Designer, or use other commercial dashboards
like Tableau, Spotfire, or Power BI.
Before we dive into the actual demo,
let's understand the context of an industrial monitoring
system.
Imagine a plant with machinery that
generates heat, and cooling equipment,
like fans, keep the temperature from rising.
A human operator is available to intervene when an issue arises.
To facilitate automated monitoring,
the equipment is instrumented with sensors
that deliver the temperature of the machinery,
the voltage applied to the cooling equipment,
and the actual fan speed.
With this context, let's walk through how
the incremental learning architecture actually
plays out.
The demo uses the MATLAB Kafka Connector to stream sensor
data, and MATLAB Production Server to host the Incremental
Learner.
Sensor readings are uploaded to the monitor server using Kafka.
The server could be on-premise or in the cloud.
Cooling status predictions are delivered to monitoring
personnel using a dashboard.
An operator can override any decisions the system makes.
Their actions provide labels, periodically,
that are then used to check the data for drift,
and update the models, if needed.
The model is updated when the error exceeds a threshold.
Or, alternatively, you can apply drift detection.
The model update will likely be performed by your data science
team.
And the updated model continues to monitor system health.
Here, you're looking at a sample of the actual data we received
from this monitoring system.
The model is trying to distinguish three conditions.
First, there is an issue with a fan,
like some debris got stuck in the casing,
interfering with the spinning blades.
Next, the machinery may be on high load,
thus generates more heat than normal.
And normal operating condition.
During a period of fan issue, you
can see the fan speed omega drop,
while the system tries to compensate
by increasing voltage.
During high load, the temperature increases,
and the system reacts by increasing voltage and fan
speed.
Here, you see the prototype monitoring dashboard
we've built. On the left side, you see the sensor measurements
streaming into the system.
The data looks quite different from what I just showed,
because of the difference in scale.
Here you see a window of 1200 samples
that we feed into the incremental learner,
while the previous graph showed 30,000 samples.
The system status is represented by the round button
in the upper right corner, distinguishing normal, high
load, and fan issue.
The graph in the middle illustrates the status
of the Incremental Learner, plotting the error measured
on pages of data that came with labels, like from the operator
confirming status.
Whenever the error exceeds a threshold,
the Incremental Learner is updated with label data.
Namely, whatever has been received since the last update.
You can see the impact of the update,
with the error dropping below the threshold.
Here's the structure of the loop at the core
of an incremental learning algorithm.
First, you check for new data, like from the Kafka screen.
Next, you extract features, if needed.
In our demo, we got away without feature extraction,
because the data signatures are very distinct.
Then you check whether drift has occurred.
If so, you apply the Incremental Learner
and get the model parameters updated.
Otherwise, you simply apply the current model
to obtain predictions on the new data.
Let's look at key elements of the implementation.
First, we need to initialize the Incremental Learner,
here with Naive Bayes, though other models are available.
And we also need to open the Kafka streams.
In this demo, we have separate streams, one for unlabeled data
and one for the occasional labeled data.
Next is the incremental learning loop.
We expect new data and read it.
If there is new data, we apply the prediction
with the current model, and then update our dashboard
accordingly.
Additionally, we check whether new label data is available.
If so, we compute the current error, or loss.
And if that's above a threshold, we
update the model and metrics.
Alternatively, you could apply drift detection here.
We demonstrated capabilities and a system architecture
for deploying machine learning into systems
that need to adapt to their environment that's changing.
Aside from monitoring a cooling system, as shown in the demo,
where would you apply this?
Here are some examples--
changing conditions in manufacturing,
adapting to individuals for health and wellness
applications, or in transport systems.
Also, batteries, and in other intelligent
controls in vehicles and heavy machinery.
And finally, beam selection in wireless communications.
To wrap this up, here are some capabilities
that are available in MATLAB, and could extend
the applicability of what we showed
to your specific project, even if it
wasn't included in this demo.
Namely, applying our drift detection
to detect when the model needs updated, instead of using
a simple criteria threshold.
Second, ingesting data from a database, or a process
historian, or from a Simulink model.
Please reach out to us if you'd like
to explore streaming incremental learning for your AI powered
applications.
Thank you for your attention.