Methods and systems for training a model for anomaly detection and remaining useful life (RUL) prediction
Patent Information
- Application Number
- GB2023013425
- Authority / Receiving Office
- GB · GB
- Patent Type
- Applications
- Current Assignee / Owner
- Filing Date
- 2023-09-04
- Publication Date
- 2025-03-12
Smart Images

Figure 00000000_0000_ABST
Abstract
Description
TECHNICAL FIELD
[0001] The present disclosure relates to physical systems. Specifically, the present disclosure relates to a computer-implemented method for training a contrastive learning model for anomaly detection and remaining useful life (RUL) prediction of a physical system. BACKGROUND
[0002] Remaining useful life (RUL) is an estimate of a length of time a physical system is likely to operate or function before it requires repair or replacement. One of the uses of the estimated RUL is for predictive maintenance of the physical system to detect possible defects, and subsequently identify and apply any required maintenance activities to avoid possible breakdowns.
[0003] Several methods exist to estimate the RUL of a physical system. For example, supervised methods are used to estimate RUL by learning health degradation behaviour of the physical system. Supervised methods learn patterns from ground truth data and require ground truth data of a wide variety of scenarios for good generalisation. However, such ground truth data may not be readily available in most cases. One of the challenges is obtaining accurate reference RUL data as ground truth data. In most cases, the RUL estimation is an arbitrary decision and may not be accurately defined prior to a degradation event. Defining the reference RUL is use case specific and varies for different systems. Furthermore, degradation events are often rare, and therefore, there is often insufficient data for supervised methods. Other methods used to estimate RUL are unsupervised and selfsupervised approaches.
[0004] Existing approaches estimate RUL by identifying the anomalies in the data without considering the semantic information of the life cycle of the physical system. Semantic information, or semantic features, are core features of the physical system. In general, physical systems have life cycles that can comprise several life stages including birth, degeneration and death. It is important to preserve semantic information on how a physical system degrades over time. However, these methods do not consider the reason for an emerging anomaly which may lead to the detection of anomalies that are not relevant for lifetime prediction or useful for estimation of RUL. In addition, these approaches are also two-stage based methods, which involves first detecting any anomalies, and then estimating the RUL based on the anomalies, which may lead to redundant calculation prior to the start of deterioration.
[0005] Furthermore, existing RUL frameworks are not generic, and a new framework must be developed from scratch for a different use case. They are not scalable to different use cases with minimal effort, and therefore the development of predicting maintenance frameworks are expensive in terms of time and money. In addition, the machine learning models of existing RUL frameworks do not allow integration of prior knowledge and do not enable accountability. SUMMARY
[0006] It is the object of the present disclosure to provide a method fortraining a contrastive learning model for anomaly detection and remaining useful life prediction that may be used for any physical system.
[0007] The object is achieved by the subject matter of the independent claims. Preferred embodiments are subject-matter of the dependent claims.
[0008] It shall be noted that all embodiments of the present disclosure concerning a method or a series of performed steps might be carried out with the order of the steps as described, nevertheless this has not to be the only and essential order of the steps of the method. The herein presented methods or series of performed steps can be carried out with another order of the disclosed steps without departing from the respective method embodiment, unless explicitly mentioned to the contrary hereinafter.
[0009] To solve the above technical problems, the present disclosure provides a computer-implemented method for training a contrastive learning model for anomaly detection and remaining useful life (RUL) prediction of a physical system, the method comprising: i) receiving, as input data, one or more multivariate time series data, wherein each multivariate time series data comprises one or more input variables measured by one or more sensors of a physical system over a full life cycle of the physical system; ii) receiving, from a user, a desired number of semantic prototypes, and one or more user-defined system parameters; iii) clustering the input data, determining semantic prototypes, and identifying anomalies using a contrastive learning model based on the input data, desired number of semantic prototypes, and the one or more user-defined system parameters, wherein the contrastive learning model is trained based on a contrastive loss; and iv) receiving, from a user, input mapping the determined semantic prototypes to life stages of the physical system such that each determined semantic prototype is associated with a life stage of the physical system.
[0010] The computer-implemented method of the present disclosure is advantageous over known methods as the method may be used to train a single contrastive learning model that can perform both anomaly detection and remaining useful life (RUL) prediction of any physical system. The method uses life cycle aware anomaly detection, allowing the integration of user prior knowledge and enables accountability via the incorporation of semantic prototypes, which are the representative prototypes for each semantic concept. The usage of a contrastive learning model is advantageous as it encourages the learning of features such that similar instances are close together in a feature embedding space while dissimilar instances are far apart.
[0011] The method uses a contrastive learning model to carry out cluster assignment-based instance to instance contrastive learning by clustering the input data, determining semantic prototypes and identifying anomalies. Instead of comparing features, the contrastive learning model compares cluster assignments to detect anomaly. Therefore, an embedding is encouraged to be closer to its belonging prototype (or cluster), such that instance features are not purely based on their history but are clustered when representing similar lifetime states, thereby potentially reducing the impact of irrelevant elements.
[0012] In addition, the method discloses using a single-model, semi-supervised approach, and therefore reduces redundant calculation prior to start of degradation. The method further incorporates prior user knowledge due to the inclusion of user-defined parameters, and therefore may be applied to a wide variety of physical systems without additional changes. Additionally, the semantic prototypes allow a user to determine a reason for a RUL estimation, based on similarity to other datapoints. Additionally, the method disclosed is performed online and therefore only requires very limited reference remaining useful life data as ground truth data, as compared to existing supervised methods that require large amounts of ground truth data.
[0013] A preferred computer-implemented method of the present disclosure is a computer-implemented method as described above, wherein step iii) of using a contrastive learning model comprises: extracting features of a present time window and features of a past time window; determining a code for each time window based on the extracted features using soft assignment clustering; performing a swapped prediction by predicting the code determined for each time window using the features of the other time window; and determining the contrastive loss based on a fit between the code of the present time window and the features of the past time window, and a fit between the code of the past time window and the features of the present time window.
[0014] The above-described aspect of the present disclosure has the advantage that the contrastive learning model is able to detect the transition of a physical system from one segment or stage of a life cycle of the physical system to the next segment or stage of the life cycle of the physical system. In general, the method identifies change points or segment boundaries (i.e., time points in present time that cannot be anticipated from the data before this point) in input time series data, or dissimilarities between a representation of a present time window and an anticipated representation to detect a transition to a next segment of a life cycle.
[0015] The method detects change points at samples associated with a salient mismatch in the codes (or cluster assignments) predicted based on representations of consecutive or adjacent time window signals by performing swapped prediction. In particular, the change points are detected by comparing the features of adjacent pairs of time window signals learnt using contrastive learning with swapped prediction. As prediction error tends to be highly dependent upon the distribution of input data, the generation of a compact latent representation (i.e., features) of each time window is advantageous as the representation is invariant to the original distribution of the data. Detection of change points may thus be more effective because the embedding space that is extracted from contiguous time intervals are likely to be dependent upon the same shared information. The determination of code using soft assignment clustering and performing swapped prediction is also advantageous as it is online, therefore only requiring limited reference remaining useful life data as ground truth data.
[0016] A preferred computer-implemented method of the present disclosure is a computer-implemented method as described above or as described above as preferred, wherein the contrastive learning model comprises an auto-regressive deep convolution network, and preferably: an encoder module, more preferably a temporal convolutional network (TCN), configured to extract features of an input time window; and a multi-layer perceptron-based projection head configured to provide a code for the input time window based on the features extracted from the input time window.
[0017] The above-described aspect of the present disclosure has the advantage that the encoder module is able to extract features from the time window inputs to be input into the multi-layer perceptron-based projection head. A temporal convolutional network (TCN) is a framework that employs dilated, causal convolutional layers with the same input and input lengths and is advantageous as it is adaptive for sequential data with its temporality and large receptive fields.
[0018] A preferred computer-implemented method of the present disclosure is a computer-implemented method as described above or as described above as preferred, wherein in step iii) the contrastive learning model is jointly trained with a denoising autoencoder based on a user-defined loss function combining the contrastive loss of the contrastive learning model and a reconstruction loss of the denoising autoencoder, wherein the loss determined using the user-defined loss function is backpropagated into the contrastive learning model and the denoising autoencoder during training.
[0019] The above-described aspect of the present disclosure has the advantage that only anomalies relevant for RUL estimation are considered, due to the joined training approach of the denoising autoencoder and the contrastive learning model. The denoising autoencoder learns a feature space that reduces the description to its own relevant elements or features, preventing the availability of spurious features that may be irrelevant for the task of RUL estimation. Therefore, the resulting model may perform better at anomaly detection and estimation of RUL without the consideration of features that are irrelevant or not useful for RUL estimation. Domain specific prior knowledge is also further incorporated through a user-defined loss function for the joined training which may lead to the resulting model performing better at anomaly detection and estimation of RUL.
[0020] A preferred computer-implemented method of the present disclosure is a computer-implemented method as described above or as described above as preferred, wherein the denoising autoencoder is configured to perform reconstruction learning based on the input data and noisy input data, wherein the noisy input data is generated by introducing noise based on a user-defined perturbation function into the input data.
[0021] The above-described aspect of the present disclosure has the advantage that the usage of noisy data for training the denoising autoencoder may train the model to be more robust to noise in the input data during inference or deployment. Therefore, the resulting model may perform better at anomaly detection and estimation of RUL. Domain specific prior knowledge is also incorporated through a user-defined perturbation function for the training of the denoising autoencoder which may lead to the resulting model performing better at anomaly detection and estimation of RUL.
[0022] A preferred computer-implemented method of the present disclosure is a computer-implemented method as described above or as described above as preferred, wherein the denoising autoencoder is a long short-term memory (LSTM) denoising encoder.
[0023] The above-described aspect of the present disclosure has the advantage that a LSTM denoising encoder is able to capture contextual information on a time axis of features and learn useful or relevant representations or compressions of sequence data. Therefore, the resulting model may perform better at anomaly detection and estimation of RUL without the consideration of features that are irrelevant or not useful for RUL estimation.
[0024] A preferred computer-implemented method of the present disclosure is a computer-implemented method as described above or as described above as preferred, further comprising v) refining the contrastive learning model using additional input data of one or more multivariate time series data comprising one or more input variables measured by one or more sensors of a physical system over one or more life stages of the life cycle of the physical system.
[0025] The above-described aspect of the present disclosure has the advantage that the contrastive learning model may be further refined though training with additional input data that may or may not comprise data measured over full life cycles of the physical system, and therefore the resulting model may be better at anomaly detection and estimation of RUL for a physical system.
[0026] A preferred computer-implemented method of the present disclosure is a computer-implemented method as described above or as described above as preferred, further comprising receiving, from a user, one or more adjustments to the desired number of semantic prototypes, one or more user-defined system parameters, and / or user-defined loss function, wherein steps iii) to iv) or steps iii) to v) are repeated using the adjusted desired number of semantic prototypes, adjusted one or more user-defined system parameters, and / or adjusted user-defined loss function.
[0027] The above-described aspect of the present disclosure has the advantage that user domain specific knowledge may be employed to further adjust / refine the contrastive learning model to improve the performance of the contrastive. The resulting model may therefore be better at anomaly detection and estimation of RUL for a physical system.
[0028] The above-described advantageous aspects of a computer-implemented method of the present disclosure also hold for all aspects of a below-described trained contrastive learning model of the present disclosure. All below-described advantageous aspects of a trained contrastive learning model of the disclosure also hold for all aspects of an abovedescribed computer-implemented method of the disclosure.
[0029] The present disclosure also relates to a trained contrastive learning model for anomaly detection and remaining useful life (RUL) prediction of a physical system obtainable by performing a computer-implemented method according to the present disclosure.
[0030] The above-described advantageous aspects of a computer-implemented method or trained contrastive learning model of the present disclosure also hold for all aspects of a below-described system of the present disclosure. All below-described advantageous aspects of a system of the present disclosure also hold for all aspects of an above-described computer-implemented method or trained contrastive learning model of the present disclosure.
[0031] The present disclosure also relates to a system for anomaly detection and remaining useful life (RUL) prediction for a physical system, the system comprising: one or more sensors configured to capture sensor data of one or more input variables monitoring a condition of a physical system; a processing system configured to receive the sensor data from the one or more sensors and detect anomalies and predict remaining useful life (RUL) of the physical system, wherein the processing system comprises the trained contrastive learning model of the present disclosure.
[0032] The above-described advantageous aspects of a computer-implemented method, trained contrastive learning model, or system of the present disclosure also hold for all aspects of a below-described method of the present disclosure. All below-described advantageous aspects of a method of the present disclosure also hold for all aspects of an above-described computer-implemented method, trained contrastive learning model, or system of the present disclosure.
[0033] The present disclosure also relates to method for anomaly detection and remaining useful life (RUL) prediction for a physical system using the system of the present disclosure, the method comprising: a) receiving a data flow comprising sensor data of one or more input variables from the one or more sensors over a period of time; b) at each time point: computing, using the trained contrastive learning model, the contrastive loss based on the data flow to measure a mutual information between a present time window and a past time window, wherein an anomaly is detected based on a peak identified in the mutual information; determining, using the trained contrastive learning model, the code and corresponding semantic prototype of the present time window; and determining the remaining useful life of the physical system based on a life stage of the physical system associated with the determined semantic prototype.
[0034] The above-described advantageous aspects of a computer-implemented method, trained contrastive learning model, system, or method of the present disclosure also hold for all aspects of a below-described computer program, a machine-readable storage medium, or a data carrier signal of the disclosure. All below-described advantageous aspects of a computer program, a machine-readable storage medium, or a data carrier signal of the disclosure also hold for all aspects of an above-described computer-implemented method, trained contrastive learning model, system, or method of the present disclosure.
[0035] The disclosure also relates to a computer program, a machine-readable storage medium, or a data carrier signal that comprises instructions, that upon execution on a data processing device and / or control unit, cause the data processing device and / or control unit to perform the steps of a computer-implemented method of the disclosure. The machine-readable medium may include any medium and / or mechanism for storing or transmitting information in a form readable by a machine (e.g., a computing device). The machine-readable medium may be any medium, such as for example, read-only memory (ROM); random access memory (RAM); a universal serial bus (USB) stick; a compact disc (CD); a digital video disc (DVD); a data storage device; a hard disk, electrical, acoustical, optical, or other forms of propagated signals (e.g., digital signals, data carrier signal, carrier waves), or any other medium on which a program element as described above can be transmitted and / or stored.
[0036] As used in this summary, in the description below, in the claims below, and in the accompanying drawings, the term “sensor” includes any sensor that detects or responds to some type of input and may be used to determine the condition of a physical system.
[0037] As used in this summary, in the description below, in the claims below, and in the accompanying drawings, the term “sensor data” means the output or data of any sensor.
[0038] In some embodiments, for a multivariate time series {XI, X2, ••• ,XT} of T observations, where the vector Xi £ Rd, the estimate at time (t) proposed to be associated with a change in the time series properties. The change points or segment boundaries may be defined as the time points in present that cannot be anticipated from the data before this point, i.e., past. Hence, the dissimilarity between present representation and anticipated representations may be used as a measure to detect transition to the next segment or stage. The change points may be detected at samples associated with a salient mismatch in the codes predicted. However, since the prediction error may be highly dependent upon the distribution of the data, representation learning may be employed to extract a compact latent representation that is invariant to the original distribution of the data.
[0039] In some embodiments, anomalies are detected by comparing the features of a pair of adjacent windowed time signals learnt using contrastive learning. To ensure that the instances are true representatives of their lifetime state and not wrong detections unrelated to the lifetime or lifecycle of the physical system such as noise and / or anomalous behaviour, semantic aware contrastive learning is used which discovers the representative prototypes for each semantic concept and encourages the embedding to be closer to its belonging prototype. This means, instance features are not purely based on their history, but are “clustered” when representing similar lifetime stages, reducing the impact of irrelevant elements. Data may be fed based on the life of the sample, and clusters may be formed based on the life of the samples. The clusters may be projected on the unit sphere and learnt online for each batch during training.
[0040] In some embodiments, the method in the present disclosure may comprise a pair of pair of discriminative networks: a denoising autoencoder and a contrastive learning-based anomaly detection network. A joined training approach ensures that only anomalies relevant for RUL prediction are considered. The autoencoder learns a feature space that reduces the description to its most relevant elements, preventing the availability of spurious features, irrelevant for the task. The contrastive learning-based detector then separates different stages of the lifetime cycle by assigning them to a semantic prototype, representative for the stage. Furthermore, the user can provide additional parameters containing domain specific prior knowledge, such as use case specific information not present in the data or only learnable with high amounts of examples. Furthermore, the user can control the number of prototypes to correlate with an already known number of steps or stages in the lifecycle.
[0041] In an embodiment, input variables may be input into an analysis framework. For a particular use-case, the input variables may be the pre-processed multivariate time series data of samples and user-defined parameters. The input variables may be aligned relative to the lifetime of the physical system. The output of the analysis framework may be the remaining useful life (RUL) of the physical system based on detected anomalies that are related to deteriorating stages of the lifecycle.
[0042] In an embodiment, training of the model using the analysis framework may be performed via the following steps: 1. A minimal number of examples with full lifetime is used to initialize the systems. This means that sufficient examples must exist to contain all relevant stages of the lifecycle of the physical system at least once. This data also may contain user-defined parameters for each timestep. 2. Given additional data, which may or may not containing the full lifecycle of the physical system, the prototypes are updated and refined. 3. In case the user is not satisfied with the learned lifecycle stages, it is possible to change or extend the user defined parameters and retrain the system.
[0043] In an embodiment, during inference, the model does not only predict the expected RUL, but also outputs the semantic prototype of the current lifecycle states. This allows the user to determine the relation to other examples within the same stage to obtain a reasoning. BRIEF DESCRIPTION OF THE DRAWINGS
[0044] These and other features, aspects, and advantages will become better understood with regard to the following description, appended claims, and accompanying drawings where:
[0045] Fig. 1 is a schematic illustration of a framework for remaining useful life (RUL) estimation for a physical system, in accordance with embodiments of the present disclosure;
[0046] Fig. 2 is a schematic illustration of a method for training a contrastive learning model for anomaly detection and remaining useful life (RUL) prediction of a physical system, in accordance with embodiments of the present disclosure;
[0047] Fig. 3 is a high level schematic illustration of a method of clustering the input data, determining semantic prototypes and identifying anomalies using a contrastive learning model, in accordance with embodiments of the present disclosure;
[0048] Fig. 4 is a schematic illustration of a method of training a contrastive learning model for clustering the input data, determining semantic prototypes and identifying anomalies, in accordance with embodiments of the present disclosure;
[0049] Fig. 5 is an example of pseudocode that may be used for a method of training a contrastive learning model, in accordance with embodiments of the present disclosure;
[0050] Figs. 6A to 6C illustrate an example of the clustering of input data and determining of semantic prototypes, in accordance with embodiments of the present disclosure;
[0051] Fig. 7 is a schematic illustration of a system for anomaly detection and remaining useful life (RUL) prediction for a physical system, in accordance with embodiments of the present disclosure;
[0052] Fig. 8 is a schematic illustration of a method for anomaly detection and remaining useful life (RUL) prediction for a physical system, in accordance with embodiments of the present disclosure; and
[0053] Fig. 9 is an example of pseudocode that may be used for a method for anomaly detection and remaining useful life (RUL) prediction for a physical system, in accordance with embodiments of the present disclosure.
[0054] In the drawings, like parts are denoted by like reference numerals.
[0055] It should be appreciated by those skilled in the art that any block diagrams herein represent conceptual views of illustrative systems embodying the principles of the present subject matter. Similarly, it will be appreciated that any flow charts, flow diagrams, state transition diagrams, pseudo code, and the like represent various processes which may be substantially represented in computer readable medium and executed by a computer or processor, whether or not such computer or processor is explicitly shown. DETAILED DESCRIPTION
[0056] In the summary above, in this description, in the claims below, and in the accompanying drawings, reference is made to particular features (including method steps) of the disclosure. It is to be understood that the disclosure in this specification includes all possible combinations of such particular features. For example, where a particular feature is disclosed in the context of a particular aspect or embodiment of the disclosure, or a particular claim, that feature can also be used, to the extent possible, in com-bination with and / or in the context of other particular aspects and embodiments of the disclosure, and in the disclosure generally.
[0057] In the present document, the word “exemplary” is used herein to mean “serving as an example, instance, or illustration.” Any embodiment or implementation of the present subject matter described herein as “exemplary” is not necessarily be construed as preferred or advantageous over other embodiments.
[0058] While the disclosure is susceptible to various modifications and alternative forms, specific embodiment thereof has been shown by way of example in the drawings and will be described in detail below. It should be understood, however that it is not intended to limit the disclosure to the forms disclosed, but on the contrary, the disclosure is to cover all modifications, equivalents, and alternative falling within the scope of the disclosure.
[0059] Fig. 1 is a schematic illustration of a framework 100 for remaining useful life (RUL) estimation for a physical system, in accordance with embodiments of the present disclosure. The framework 100 may comprise an analysis framework 104. The analysis framework 104 may receive as input one or more input variables 108, one or more user-defined model parameters 110, and one or more user-defined system parameters 112.
[0060] According to some embodiments, the one or more input variables 108 may be the pre-processed multivariate time series data of samples and may be aligned relative to a lifetime of a physical system. In some embodiments, the input variables 108 may be measured by one or more sensors of the physical system, the one or more systems configured to capture sensor data monitoring a condition of the physical system.
[0061] In some embodiments, the one or more user-defined model parameters 110 may be any parameters that affect the training or implementation of a model for anomaly detection and remaining useful life (RUL) prediction of a physical system. Examples of user-defined model parameters 110 include a desired number of semantic prototypes, loss functions, and / or perturbation functions.
[0062] In some embodiments, the one or more user-defined system parameters 112 may be any parameters that define or affect the physical system and may be determined or input based on domain-specific knowledge of a user. In some embodiments, the analysis framework 104 may detect one or more anomalies 116 based on the one or more input variables 108, one or more user-defined model parameters 110, and one or more user-defined system parameters 112. The anomalies may be anomalies relevant for RUL prediction. In some embodiments, a remaining useful life (RUL) 120 may be predicted or estimated based on the one or more anomalies 116 detected.
[0063] For example, where the physical system is a hose, the one or more input variables 108 may include temperature, pressure, humidity, dust, elastic expansion and decompression, and the one or more user-defined system parameters 112 may include thermal coefficient of elasticity, Young’s modulus, speed of sound and decay constant.
[0064] For example, where the physical system is a battery, the one or more input variables 108 may include temperature, pressure, humidity, dust, voltage and current, and the one or more user-defined system parameters 112 may include resistance, impedance, and capacitance.
[0065] Fig. 2 is a schematic illustration of a method 200 for training a contrastive learning model for anomaly detection and remaining useful life (RUL) prediction of a physical system, in accordance with embodiments of the present disclosure. Method 200 may be carried out as part of analysis framework 104 of framework 100. In some embodiments, the contrastive learning model may comprise an auto-regressive deep convolution network such as WaveNet as disclosed in “WaveNet: A Generative Model for Raw Audio” by van den Oord et., al.
[0066] According to some embodiments, method 200 may comprise step 204 wherein input data comprising one or more multivariate time series data, wherein each multivariate time series data comprises one or more input variables 108 measured by one or more sensors of a physical system over a full life cycle of the physical system. In some embodiments, a multivariate time series may be represented as {XI, X2, --,XT} of T observations. The sensors may be any sensor configured to capture sensor data of one or more input variables monitoring a condition of the physical system. There may be a minimal number of multivariate time series data as long as sufficient example exist to contain all relevant stages of the lifecycle of the physical system at least once. In some embodiments, the input data may comprise user-defined system parameters 112 for each timestep.
[0067] According to some embodiments, method 200 may comprise step 208 wherein a desired number of semantic prototypes and one or more user-defmed system parameters 112 are received from a user. The desired number of semantic prototypes may be received as a user-defmed model parameter 110. The desired number of semantic prototypes may be determined by the user based on domain specific knowledge of the physical system.
[0068] According to some embodiments, method 200 may comprise step 212 wherein a contrastive learning model is used to cluster the input data, determine semantic prototypes, and identify anomalies based on the input data, desired number of semantic prototypes, and the one or more user-defmed system parameters. The contrastive learning model may be trained based on a contrastive loss. In some embodiments, the contrastive learning model may be used to simultaneously cluster the input data, determine semantic prototypes, and identify anomalies.
[0069] According to some embodiments, method 200 may comprise step 216 wherein input is received from a user mapping the determined semantic prototypes to life stages of the physical system, wherein each determined semantic prototype is associated with a life stage of the physical system. The total number of life stages of the physical system may be determined by the user based on domain specific knowledge. Each life stage of the physical system may be associated with an estimated remaining useful life (RUL) of the physical system. In some embodiments, the mapped semantic prototype life stage pairs may be used to determine the remaining useful life (RUL) of the physical system.
[0070] According to some embodiments, method 200 may optionally comprise step 220 wherein the contrastive learning model is refined using additional input data of one or more multivariate time series data comprising input variables measured by one or more sensors of a physical system over one or more life stages of the life cycle of the physical system. In some embodiments, there may be a total of N samples in data, of which P samples are full life cycle data and N - P samples are data may not be full life cycle data. For example, P may be a minimal number « A, and at least 1. Any number of the P samples may be used in steps 208 to 216, and the remaining samples may be used in step 220 to refine the contrastive learning model.
[0071] According to some embodiments, method 200 may optionally comprise step 224 wherein one or more adjustments to the desired number of semantic prototypes and / or one or more user-defined system parameters, and / or user-defined loss function may be received from the user. Once the adjustment(s) are received from the user, steps 212 to 216 and / or steps 212 to 220 may be repeated using the adjusted desired number of semantic prototypes, adjusted one or more user-defined system parameters, and / or adjusted user-defined loss function.
[0072] Fig. 3 is a high level schematic illustration of a method 300 of clustering the input data, determining semantic prototypes and identifying anomalies using a contrastive learning model, in accordance with embodiments of the present disclosure. In some embodiments, clustering the input data, determining semantic prototypes and identifying anomalies may be carried out simultaneously by the contrastive learning model. In some embodiments, method 300 may be carried out in step 212 of method 200. In some embodiments, method 300 may be carried out such that the steps are carried out online during training.
[0073] According to some embodiments, the input data 304 may be adjacent time windows. The adjacent time windows may be termed a present time window (Xt) 308 and a past time window (Xm) 312. Each pair of present time window (Xt) 308 and past time window (Xu) 312 may be input into a contrastive learning model 316. The contrastive learning model 316 may process each pair of present time window (Xt) 308 and past time window (Xt-i) 312 to determine a contrastive loss 320. In some embodiments, the contrastive loss 320 may be backpropagated to train the contrastive learning model 316.
[0074] According to some embodiments, the contrastive learning model 316 may be jointly trained with a denoising autoencoder 324. In some embodiments, the denoising autoencoder 324 may receive as input the input data 304 and noisy input data, wherein the noisy input data is generated by introducing noise based on a user-defined perturbation function 116 into the input data 304. In some embodiments, the denoising autoencoder 324 is configured to perform reconstruction learning based on the input data 304 and noisy input data with a reconstruction loss 328. In some embodiments, the contrastive learning model 316 is jointly trained with denoising autoencoder 324 based on a user-defined loss function combining the contrastive loss 320 of the contrastive learning model 316 and the reconstruction loss 328 of the denoising autoencoder 324. The user-defined loss function may be backpropagated to train both the contrastive learning model 316 and the denoising autoencoder 324. For example, the user-defined loss function may be expressed as w1Lr + w2Lc, wherein and w2 are arbitrary weights, Lr is the reconstruction loss 328, and Lc is the contrastive loss 320. The example function provided is one of the simplest forms of the user-defined loss function, and the user-defined loss function may be more complex based on the user’s requirements.
[0075] According to some embodiments, the denoising autoencoder 324 may be a long short-term memory (LSTM) denoising encoder. Examples of the architecture of LSTM denoising encoders may be found at least in Figs. 1 and 3 of “LSTM-Autoencoder based Anomaly Detection for Indoor Air Quality Time Series Data” by Wei et., al., and at least Fig. 6 of “Denoising Autoencoders and LSTM-Based Artificial Neural Networks Data Processing for Its Application to Internal Model Control in Industrial Environments—The Wastewater Treatment Plant Control Case” by Pisa et., al.
[0076] Fig. 4 is a schematic illustration of a method 400 of training a contrastive learning model for clustering the input data, determining semantic prototypes and identifying anomalies, in accordance with embodiments of the present disclosure. Fig. 5 is an example of pseudocode that may be used for method 400 of training a contrastive learning model, in accordance with embodiments of the present disclosure. According to some embodiments, method 400 may be carried out in step 212 of method 200. In some embodiments, the input data 304 may comprise data from present time window (Xt) 308 and past time window (Xt. i) 312. In some embodiments, the present time window (Xt) 308 and past time window (Xt. i) may be adjacent time windows.
[0077] According to some embodiments, features 404 of the present time window (Xt) 308 may be extracted from data from the present time window (Xt) 308 and features 408 of the past time window (Xm) 312 may be extracted from data from the past time window (Xt-i) 312. Features 404 and 408 may be extracted using an encoder module 324 of the contrastive learning model 316. In some embodiments, the encoder module 324 may be a temporal convolutional network (TCN) configured to extract features of an input time window.
[0078] According to some embodiments, a code may be determined for each time window based on the extracted features using soft assignment clustering. In some embodiments, the code may be determined or provided based on features 404 and 408 using a multi-layer perceptron-based projection head. A code is a cluster assignment and may be determined by mapping the extracted features to a set of K prototypes {clt •••, cK} or semantic prototype vectors 412, wherein K corresponds to the desired number of semantic prototypes defined by the user in step 208. As illustrated in Fig. 4, a code 416 may be determined for present time window 308 based on features 404, and a code 420 may be determined for past time window 312 based on features 408. In some embodiments, the soft assignment may be produced by the Sinkhorn-Knopp algorithm as disclosed in “Sinkhorn distances: Lightspeed computation of optimal transport” by Cuturi M. As an example, the architecture of the temporal convolutional network (TCN) and / or the multi-layer perceptron based projection head may be found in “WaveNet: A Generative Model for Raw Audio” by van den Oord et., al.
[0079] According to some embodiments, a swapped prediction 424 may be performed by predicting the code determined for each time window using the features of the other time window. The contrastive loss 320 is then determined based on a fit between the code of the present time window and the features of the past time window, and a fit between the code of the past time window and the features of the present time window. For example, the swapped prediction, in particular, the contrastive loss may be expressed with the equation L(zt, zs) = l(zt, qs) + l(zs, qt), where the function l(z, q) measures the fit between features z, and a code q. Intuitively, the method compares the features zt and zs using codes qt and qs. An anomaly 428 is present if the cluster assignments of both samples are different. Additional background or general information on swapped prediction may be found in “Unsupervised Learning of Visual Features by Contrasting Cluster Assignments” by Caron et., al., the disclosure of which is incorporated by reference.
[0080] Figs. 6A to 6C illustrate an example of the clustering of input data and determining of semantic prototypes, in accordance with embodiments of the present disclosure. In Figs. 6A to 6C, the desired number of semantic prototypes K was set as 4. Referring to Fig. 6A, each instance (or data point) of a multivariate time series data sample may be embedded into an embedding space along a lifetime (T) of the sample from time 0 (new) to T (dead). As the desired number of semantic prototypes K was set as 4, the data may be separated into 4 clusters (illustrated by the circles with broken lines), with each cluster comprising a cluster prototype vector r^,r^, r^, The cluster prototype vectors may be projected on a unit sphere, as illustrated on the right of Fig. 6A.
[0081] Referring to Figs. 6B and 6C, adjacent time windowed time signals may be compared. The adjacent window time pair sample is illustrated in Figs. 6B and 6C as “s_past” and “s_present”. Features of the samples are learnt using contrastive learning. Each sample may then be assigned to the cluster learnt online during training based on the features of the sample (illustrated for sample “s_present” in Fig. 6B). The clusters capture the semantic relationship as they are formed and are updated based on the life cycle of the sample. In the example illustrated in Figs. 6A and 6B, the two samples "s past” and “s_present” were assigned to the cluster corresponding to the first semantic prototype that may be represented by cluster vector
[0082] Fig. 7 is a schematic illustration of a system 700 for anomaly detection and remaining useful life (RUL) prediction for a physical system, in accordance with embodiments of the present disclosure. In some embodiments, system 700 may comprise one or more sensors 704i - 704n configured to capture sensor data monitoring a condition of a physical system. The sensor data may be that of the one or more input variables 108. In some embodiments, system 700 may comprise a processing system 708 configured to receive the sensor data of one or more input variables 108 from the one or more sensors 7041 - 704n and detect anomalies and predict remaining useful life (RUL) of the physical system. In some embodiments, the processing system 708 may receive the sensor data from the one or more sensors 704i - 704n through a wired or wireless connection, or through a cloud. In some embodiments, the processing system 708 may comprise one or more processors and memory. In some embodiments, the processing system 708 may comprise the trained contrastive learning model generated using method 200.
[0083] Fig. 8 is a schematic illustration of a method 800 for anomaly detection and remaining useful life (RUL) prediction for a physical system, in accordance with embodiments of the present disclosure. Fig. 9 is an example of pseudocode that may be used for method 800 for anomaly detection and remaining useful life (RUL) prediction for a physical system, in accordance with embodiments of the present disclosure. In some embodiments, method 800 may be implemented by system 700 for anomaly detection and remaining useful life (RUL) prediction for a physical system.
[0084] According to some embodiments, method 800 may comprise step 804, wherein a data flow is received comprising sensor data of one or more input variables from the one or more sensors 704i - 704n over a period of time. In some embodiments, the data flow may comprise sensor data of one or more input variables from the one or more sensors 704i - 704n captured over multiple time points over a period of time. In some embodiments, the data flow may be received and / or stored as a multivariate time series data.
[0085] According to some embodiments, method 800 may comprise step 808 wherein, at each point, the contrastive loss may be computed using the trained contrastive learning model. In particular, the contrastive loss may be computed based on the data flow received in step 804 to measure a mutual information between a present time window and a past window, wherein an anomaly is detected based on a peak identified in the mutual information. In other words, an anomaly may be detected when there is a significantly high deviation between the code / cluster assignment / features of the past time window and the present time window.
[0086] According to some embodiments, method 800 may comprise step 812 wherein, at each time point, the code and corresponding semantic prototype of the present time window is determined using the trained contrastive learning model, and step 816 wherein the remaining useful life is determined based on a life state of the physical system associated with the determined semantic prototype. Each code corresponds to a semantic prototype, and each cluster assignment / semantic prototype may be associated with a specific life stage of the physical system that was previously mapped by the user during training (e.g., in step 216 of method 200). Each life stage of the physical system may be associated with an estimated remaining useful life (RUL) of a physical system. In some embodiments, the mapped semantic prototype life stage pairs may be used to determine the remaining useful life (RUL) of the physical system.
[0087] Finally, the language used in the specification has been principally selected for readability and instructional purposes, and it may not have been selected to delineate or circumscribe the inventive subject matter. It is therefore intended that the scope of the invention be limited not by this detailed description, but rather by any claims that issue on an application based here on. Accordingly, the embodiments of the present disclosure are intended to be illustrative, but not limiting, of the scope of the invention, which is set forth in the following claims.
Claims
1. A computer-implemented method (200) for training a contrastive learning model for anomaly detection and remaining useful life (RUL) prediction of a physical system, the method comprising:i) receiving (204), as input data, one or more multivariate time series data, wherein each multivariate time series data comprises one or more input variables measured by one or more sensors of a physical system over a full life cycle of the physical system;ii) receiving (208), from a user, a desired number of semantic prototypes, and one or more user-defined system parameters;iii) clustering the input data, determining semantic prototypes, and identifying anomalies (212) using a contrastive learning model based on the input data, desired number of semantic prototypes, and the one or more user-defined system parameters, wherein the contrastive learning model is trained based on a contrastive loss; andiv) receiving (216), from a user, input mapping the determined semantic prototypes to life stages of the physical system such that each determined semantic prototype is associated with a life stage of the physical system.
2. The computer-implemented method of claim 1, wherein step iii) of using a contrastive learning model comprises:extracting features of a present time window and features of a past time window;determining a code for each time window based on the extracted features using soft assignment clustering;performing a swapped prediction by predicting the code determined for each time window using the features of the other time window; anddetermining the contrastive loss based on a fit between the code of the present time window and the features of the past time window, and a fit between the code of the past time window and the features of the present time window.
3. The computer-implemented method of any of the preceding claims, wherein the contrastive learning model comprises an auto-regressive deep convolution network, and preferably:an encoder module, more preferably a temporal convolutional network (TCN), configured to extract features of an input time window; anda multi-layer perceptron-based projection head configured to provide a code for the input time window based on the features extracted from the input time window.
4. The computer-implemented method of any of the preceding claims, wherein in step iii) the contrastive learning model is jointly trained with a denoising autoencoder based on a user-defined loss function combining the contrastive loss of the contrastive learning model and a reconstruction loss of the denoising autoencoder, wherein the loss determined using the user-defined loss function is backpropagated into the contrastive learning model and the denoising autoencoder during training.
5. The computer-implemented method of claim 4, wherein the denoising autoencoder is configured to perform reconstruction learning based on the input data and noisy input data, wherein the noisy input data is generated by introducing noise based on a user-defined perturbation function into the input data.
6. The computer-implemented method of claim 4 or 5, wherein the denoising autoencoder is a long short-term memory (LSTM) denoising encoder.
7. The computer-implemented method of any of the preceding claims, further comprising v) refining (220) the contrastive learning model using additional input data of one or more multivariate time series data comprising one or more input variables measured by one or more sensors of a physical system over one or more life stages of the life cycle of the physical system.
8. The computer-implemented method of any of the preceding claims, further comprising receiving (224), from a user, one or more adjustments to the desired number of semantic prototypes, one or more user-defined system parameters, and / or user-defined loss function, wherein steps iii) to iv) or steps iii) to v) are repeated using the adjusted desired number of semantic prototypes, adjusted one or more user-defined system parameters, and / or adjusted user-defined loss function.
9. A trained contrastive learning model for anomaly detection and remaining useful life (RUL) prediction of a physical system obtainable by performing a computer-implemented method according to any of the preceding claims.
10. A system (700) for anomaly detection and remaining useful life (RUL) prediction for a physical system, the system comprising:one or more sensors (704) configured to capture sensor data of one or more input variables monitoring a condition of a physical system;a processing system (708) configured to receive the sensor data from the one or more sensors and detect anomalies and predict remaining useful life (RUL) of the physical system, wherein the processing system comprises the trained contrastive learning model of claim 9.
11. A method (800) for anomaly detection and remaining useful life (RUL) prediction for a physical system using the system of claim 10, the method comprising:a) receiving (804) a data flow comprising sensor data of one or more input variables from the one or more sensors over a period of time;b) at each time point:computing (808), using the trained contrastive learning model, the contrastive loss based on the data flow to measure a mutual information between a present time window and a past time window, wherein an anomaly is detected based on a peak identified in the mutual information;determining (812), using the trained contrastive learning model, the code and corresponding semantic prototype of the present time window; anddetermining (816) the remaining useful life of the physical system based on a life stage of the physical system associated with the determined semantic prototype.
12. A computer program, a machine-readable storage medium, or a data carrier signal that comprises instructions, that upon execution on a data processing device and / or control unit, cause the data processing device and / or control unit to perform the steps of a computer-implemented method according to any of the preceding claims 1 to 8.