Method and Apparatus for Monitoring Machine Learning Models

A method includes training a first control model by utilizing a first set of input data as first input, resulting in a trained first control model; copying the trained first control model to a second control model, wherein, after copying, the second input layer and the plurality of second hidden layers is identical to the plurality of first hidden layers, and the first output layer is replaced by the second output layer; freezing the plurality of second hidden layers; training the second control model by utilizing the first set of input data as second input, resulting in a trained second control model; and running the trained second control model by utilizing a second set of input data as second input, wherein the second output outputs the quality measure of the first control model.

FIELD OF THE DISCLOSURE

The present disclosure relates to the field of monitoring or controlling an industrial process, particularly by utilizing an artificial neural net, ANN.

BACKGROUND OF THE INVENTION

A machine learning model, e.g. an artificial neural net (ANN), can be used in industrial processes, e.g. for performing monitoring and/or control tasks. However, at least some of the machine learning models may degrade over time, because the process, which produces the related data, may change over use time. In at least some applications, the degrading is difficult to measure.

BRIEF SUMMARY OF THE INVENTION

In a general aspect, the present disclosure describes a method that, at least partly, improves the shortcomings of the prior art and, specifically, addresses the undesired degradation of machine learning models over time.

In one embodiment, a method for determining a quality measure of a first control model for monitoring or controlling an industrial process, wherein the first control model is an artificial neural net, ANN, comprising a first input, a first input layer, a plurality of first hidden layers, a first output layer, and a first output, is described. The method comprises the steps of:Training the first control model by utilizing a first set of input data as first input, resulting in a trained first control model.Copying the trained first control model to a second control model, wherein the second control model comprises a second input, a second input layer, a plurality of second hidden layers, a second output layer, and a second output that is configured to output the quality measure of the first control model, wherein, after copying, the second input layer is identical to the first input layer, the plurality of second hidden layers is identical to the plurality of first hidden layers, and the first output layer is replaced by the second output layer.Freezing at least parts of the plurality of second hidden layers.Training the second control model by utilizing the first set of input data as second input, resulting in a trained second control model.Running the trained second control model by utilizing a second set of input data as second input, wherein the second output outputs the quality measure of the first control model.

The first control model may be called “primary model.” The industrial process may be any process that produces, manufactures, and/or changes any goods, for instance of chemical, mechanical, and/or electrical nature. The first control model may be used for controlling the industrial process, directly or indirectly, and/or for monitoring the industrial process, e.g. by delivering information about the process and/or its behaviour. The first control model may be or comprise an artificial neural net, possibly combined with a standard computer and/or other computing means, for short named as “ANN”. Each one of the layers of the first control model may comprise a set of neurons, which are connected by weighted edges. The values produced by the first output layer may be outputted, via the first output, to the industrial process and/or to a display, an alarm device, or the like. The values that are outputted to the industrial process may contribute to control and/or steer the industrial process.

Before a productive use of the first control model, it is trained by utilizing a first set of input data as first input or applied to the first input. The first set of input data may comprise historical data of one or more known monitoring or controlling situation(s), i.e. both the inputs and the outputs (e.g. the desired actions or reactions) are known. The situation(s) may comprise situations that ran well or very well and/or situations that ran badly. Training means that the first control model is changed by the training, particularly its plurality of first hidden layers, its neurons, and/or the weights of its weighted edges may be changed. Training the first control model may comprise to consider a cost function and/or rewards, when the monitoring or controlling outputs are within a desired range. This may include some kind of prediction how the industrial process will behave in some near future, for instance in one second, one minute, one hour, one day, etc. The prediction time ranges may depend on the type and/or on other specifics of the industrial process.

Training the first control model results in a trained first control model, which is, then, ready for its function(s). It is noted that the productive use of the trained first control model may change the first control model, thus degrading the first control model over time.

Immediately following the (initial) training by utilizing the first set of input data, the trained first control model is copied to the second control model. The second control model may be called “proxy model”. The second control model is “frozen” afterwards, i.e. at least some of the second hidden layers are kept unchanged. The second control—e.g. the second input layer and the plurality of second hidden layers—model is, then, quite similar or identical to the trained first control model, with the exception of its second output layer. The second output layer may be trained for outputting the quality measure of the first control model, i.e. for evaluating a current quality of the first control model. The cost function and/or rewards of the second control model may comprise quality-related values, and thus change the second output layer.

These quality-related values may consider the direct reaction of the industrial process, but also—additionally or as an alternative—a prediction of the industrial process in some near future (e.g. as defined above). This prediction may include long-term effects or reactions of the industrial process, some delay time (dead time) and/or other effects or reactions. In other words, the second output is configured to output the quality measure of the first control model. Thus, after copying, the first output layer is replaced by the second output layer. The trained second control model may then be fixed or “frozen.”. This “freezing” may comprise fixing the weights between the neurons of different layers, so that the training process cannot adjust the fixed weights of the frozen layers. This “freezing” may comprise not to fix all of the hidden layers, but to keep some of the layers unfrozen.

During the productive use of the first control model, the first control model is trained further by utilizing a second set of input data. This training may comprise to make and/or to use predictions. The second set of input data may be “live data” from the industrial process. In parallel, the trained second control model is run—i.e. not trained and thus kept unchanged—by utilizing the second set of input data as second input. Since the second output of the trained second control model is configured to output the quality measure of the first control model, any degrading of the first control model—i.e. its quality and/or performance—can be measured this way. Once available, the measure of degrading may be used in various way, for instance for warning service personnel, for improving the industrial process and/or its controlling, and/or for running tailored applications.

DETAILED DESCRIPTION OF THE INVENTION

FIG.1aschematically shows a first control model10according to an embodiment. The first control model may also be called a “primary model.” The first control model10has one or more inputs11and one or more outputs19. The inputs11may come from user specifications, control specifications, and/or signals fed back from an industrial process50. The outputs19may control or monitor the industrial process50. For monitoring or controlling the industrial process50, further means (not shown) may be helpful and/or necessary, e.g. networks, displays, databases, journals, and/or further means.

FIG.1bschematically shows a second control model20according to an embodiment. The second control model may be called a “proxy model”. The second control model20may be run in parallel to the first control model10(seeFIG.1a), and/or may be run by feeding a defined data set to its input(s)21. The output29may be configured to deliver a quality measure qm and/or further data. The quality measure qm may be an indicator of the quality or performance of the first control model10and/or of the industrial process50.

FIG.2aschematically shows a simplified schema of a first control model10according to an embodiment. The first control model10comprises an input layer12, hidden layers14, and an output layer18. Each layer of the hidden layers14comprises a set of neurons, depicted as set of nodes, which are connected by weighted edges. In numerous control models, the number of hidden layers may be freely configurable (possibly within predefined ranges), and the weights of the weighted edges may be changed by a training process, which influences at least the weights. Furthermore, the first control model10has inputs11and outputs19.

FIG.2bschematically shows a simplified schema of a second control model20according to an embodiment. The second control model20comprises an input layer22, hidden layers24, and an output layer28. Furthermore, the second control model20has inputs21and at least one output29.

Using two control models10,20allows not only to monitor and/or to control an industrial process, but also to get a measure for the quality of the industrial process and/or its controlling model. For this, both the first control model10and the second control model20is trained.FIG.2aandFIG.2billustrate the relationship between the first control model or primary model10and the second control model or proxy model20. Both models are identical regarding the inputs, the architecture—e.g. the number of hidden layers and nodes as well as the connection—and the weights between the input layers and first hidden layer and between the hidden layers. In this way, the performance of the two models10,20is tightly connected. If features and relationships learned in the primary model are not valid anymore for the new data and subsequently the performance will degrade, the same will happen for the proxy model.

FIG.3shows a dataflow300according to an embodiment, comprising a training process for the primary model10and the proxy model20. First, the primary model10is trained. The primary model10is then copied and the output layer28is replaced. The output layer28may be chosen in a way that data itself can be used for labelling (self-learning or self-supervised learning). As an example, a compression-reconstruction task (e.g. AutoEncoder) or a regression task on the data (e.g. predict a future value) may be implanted. Then, all layers22,24, except the final layer28are frozen, i.e. the training process is no longer allowed to change weights between the input layer22and the hidden layer24and between the hidden layers24. Then, the proxy model20is retrained for the new task. Finally, the performance of the proxy model20on the training data and a validation set is measured. The performance measure depends on the self-supervised learning task, e.g. reconstruction error for AutoEncoder, Mean-Squared Error for regression.

The dataflow300ofFIG.3shows additional details of this process of the initial training sequence of the first control model10and second control model20. In a step302, a first data set31is provided. In a step304, the first control model10is trained by utilizing a first set of input data31as first input11. This results, in a step306, in a trained first control model or trained primary model10T. In a step308, the trained first control model10T is copied to a second control model20. As a result, the second input layer22is identical to the first input layer12and the plurality of second hidden layers24is identical to the plurality of first hidden layers14. In a step310, the copied output layer18of first control model10is replaced by output layer28in the second control model20. The values of the output layer28are outputted to the second output29, which is configured to output the quality measure qm or Key-Performance-Indicator (KPI) of the first control model10. The qm or KPI may include to consider some prediction of the behaviour of the industrial process50, e.g. in some near future. In a step312, the hidden layers24of the second control model20are frozen. In a step314, the second control model20is trained with first data set31. This results, in step316, in a trained second control model or proxy model20T. In a step318, the quality measure29of the first control model10is provided by the trained second control model20T, and it can be used for further steps.

FIG.4shows a dataflow400according to an embodiment, comprising the application of the proxy model20during its productive use, e.g. for the industrial process50. Both the primary model10and the proxy model20are feed with the same live data32from the industrial process and/or a database. The primary model10may be used to produce a prediction for the monitoring or control task, which may e.g. result in a display on a human machine interface or in triggering of actions. By utilizing the proxy model20, the performance or quality spanning over a defined time window or number of predictions is calculated. If the performance is outside, e.g. below, a predefined threshold, the user or administrator may be notified and/or a retraining may be triggered.

The dataflow400ofFIG.4shows some details of this process of applying the second data set—e.g. live data from the industrial process50—to the control models10,20. In a step402, the second data set32is provided. The second data set32may comprise live data from the industrial process50. In a step404, the second data set32is applied to the first control model10, which may result in a further training of the first control model10, and in changing the first control model10. In a step406, first outputs19of the first control model10are provided to the industrial process50, e.g. for controlling it. In a step408, first outputs19of the first control model10are provided to a database, a display, and/or to another a human-machine interface (HMI). Steps406and408may be run in parallel, or one of the steps (e.g.406) may be prioritized.

In a step410, the (unchanged) trained second control model20T is run, and the quality measure qm is output at output29. In a step412, the quality measure qm is compared to a predefined measure or measure range, and is checked if the quality measure qm is outside, e.g. below, the predefined measure. If the quality measure qm is inside the predefined measure, in a step414predefined actions are performed; this may include to do nothing, or send a message. If the quality measure qm is outside (e.g. below) the predefined measure in a step416predefined actions are performed. The predefined actions may comprise the actions of dataflow500(seeFIG.5).

FIG.5shows a dataflow500according to an embodiment, which includes to show how the proxy model20is configured to find a time-window on the historical data that is suitable for retraining. This is based on the insight, that because of having changed the underlying data, not all historical data may be beneficial for retraining the models10and20. Based on this idea, different time windows (or third data set33) are sampled from the entire set of historical data, and are used as training data for the self-learning proxy model20. Because the data itself is used for labelling, the performance of the models10and20may be measured, e.g. based on a test data set with recent data, which may represent a current behaviour of the industrial process50. When the performance of the retrained proxy model20shows a sufficiently good quality measure qm, the primary model10is retrained on the same third data set33of this time-window. Due to the strong similarity of the two models and the fact the selected historical data enabled to train a proxy model20capable of capturing some recent behaviour, very likely the primary model10behaves well on this data set33, too.

The dataflow500ofFIG.5shows some details of this process of re-training the first control model10. In a step502, a third data set33, a subset of historical data, is provided. In a step504, hidden layers24of second control model20are unfrozen. In a step506, the third data set33is applied to second control model20, resulting in a re-training of the second control model20. In a step508, the quality measure qm is output. In a step510, hidden layers24are frozen. In a step512, quality measure qm is compared to a predefined measure (or measure range), and some checking if quality measure qm is within the predefined measure is conducted. If quality measure qm is not within the predefined measure, steps504to510are repeated, in many cases by selecting a different subset of historical data as the third data set33.

When quality measure qm is within the predefined measure, in a step514, the first control model10is re-trained, by taking the selected third data set33as input11. This re-training results, in a step516, in a corrected or updated trained first control model or corrected primary model10T2.

In various embodiments, the last step—particularly running the trained second control model by utilizing a second set of input data—is repeated periodically and/or on request. The period of “periodically” may depend on the industrial process to be monitored or controlled. For some industrial processes, the repeating may be performed every month, week, day, hour, minute, second, and/or less or more frequently. Additionally or as an alternative, a user and/or a machine may request repeating said last step. The repeating may advantageously contribute to a high-quality supervision of the industrial process, and/or to do this in a timely manner.

In various embodiments, the method further comprises the steps of:comparing the quality measure to a predefined measure; andwhen or if the quality measure is outside the predefined measure, performing a predefined action.

The predefined measure may be a measure range and/or may comprise a sequence of predefined measure for comparing with a sequence of quality measures. Being outside the predefined measure may mean to be below or even above the predefined measure. The predefined action may be one action or a plurality and/or a sequence of actions. When the quality measure is inside the predefined measure, another predefined action may be performed, e.g. to send a message, to enter a record in a journal, another action, or no action at all.

In various embodiments, the predefined action comprises at least one of: outputting an alarm, and/or re-training the first control model. Outputting an alarm may comprise to send a message of any kind to a user and/or to a machine and/or journal. Re-training the first control model may result in a corrected trained first control model, which may improve and/or otherwise change the industrial process and/or its quality.

Re-training the first control model comprises the steps of:unfreezing the hidden layers of the trained second control model;training the second control model by utilizing a third set of input data as second input, wherein the third set of input data is a set of historical data selected from a plurality of second sets of input data, wherein the second output outputs the quality measure;freezing the hidden layers of the second control model;comparing the quality measure to a predefined measure; andif or when the quality measure is inside the predefined measure, training the first control model by utilizing the third set of input data as first input, resulting in a corrected trained first control model.

Unfreezing the hidden layers of the trained second control model makes the second control model ready for training, i.e. for changes. The training is performed by using the third set of input data as second input. The third set of input data is a set or subset of historical data, which may have been used already as input data for the first input and/or for the second input. The historical data may comprise a plurality and/or a sequence of second sets of input data (or, at least, one second set of input data). The historical data may be generated by storing a sequence of live data from the industrial process. The third set of input data may be selected in an arbitrary way, or by using criteria such as: best performance of the industrial process, highest stability, and/or other criteria. The length of the third set of input data—for example the time-window taken from the historical data—may be similar to the length of the first set of input data, which has been used for the initial training.

The third set of input data, which has been selected as described, is then applied to the second input. As a result, the second output outputs the quality measure and the second control model is trained (and changed) by this third set of input data. Then, the hidden layers of the trained second control model are frozen.

Afterwards, the quality measure is compared to a predefined measure. In case the quality measure is inside the predefined measure, the trained second control model is kept frozen and the first control model by utilizing the third set of input data as first input. This re-training results in a corrected trained first control model. Advantageously, the corrected trained first control model makes use of the third set of input data, which is known to be beneficial for the industrial process, because this set of data already led to an improved process. Consequently, the first control model may not only be saved from degrading, but may be improved continuously.

In various embodiments, the method further comprises the steps of: if or when the quality measure is outside the predefined measure, repeating the steps of unfreezing, training, freezing, and comparing. This may advantageously contribute to a directed improving of the first control model and therefore to an improving of the industrial process.

In various embodiments, the training and/or re-training the first control model and/or the second control model comprises to make predictions and/or to use predictions. This may be possible, because historical data may be for the training and/or for the re-training, so that reactions of the industrial process are known, at least for the near future. To make predictions and/or to use predictions may advantageously contribute to a further improvement of monitoring or controlling the industrial process, or to further improve the industrial process itself, particularly because critical, long-term and/or unexpected reactions of the process may be considered by this.

An aspect relates to a computer program product comprising instructions, which, when the program is executed by a computer and/or an artificial neural net, ANN, cause the computer to and/or the ANN to carry out the method as described above and/or below.

An aspect relates to a computer-readable storage medium where a computer program or a computer program product as described above is stored on.

An aspect relates to a first control model and/or a second control model, configured for executing a method as described above and/or below.

An aspect relates to a use of a first control model for monitoring and/or controlling an industrial process.

LIST OF REFERENCE SYMBOLS

10T trained first control model

10T2corrected or updated trained first control model

11inputs of first control model

12input layer of first control model

14hidden layers of first control model

18output layer of first control model

19outputs of first control model

20T trained second control model

11inputs of second control model

22input layer of second control model

24hidden layers of second control model

28output layer of second control model

29outputs of second control model (KPI)

31first data set

32second data set (live data from the industrial process)