An industrial process fault detection method based on spatiotemporal causal graph autoencoder
By constructing a spatiotemporal causal graph autoencoder, utilizing spatial self-attention mechanism and graph convolutional long short-term memory network, and combining a three-step causal graph structure learning algorithm, the problem of insufficient characterization of causal relationships in industrial processes is solved, and high reliability and interpretability of fault detection are achieved.
Patent Information
- Application Number
- CN202511505237.X
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2025-10-21
- Publication Date
- 2026-03-03
- Estimated Expiration
- 2045-10-21
AI Technical Summary
Existing technologies for industrial process fault detection suffer from insufficient characterization of causal relationships, resulting in low reliability and poor interpretability, especially with decreased detection performance under changing operating conditions.
A spatiotemporal causal graph autoencoder-based approach is adopted. A causal graph is constructed through a spatial self-attention mechanism and a graph convolutional long short-term memory network. Combined with a three-step causal graph structure learning algorithm, invariant causal relationships are extracted from changing correlations, and process mechanism knowledge is integrated for fault detection.
It improves the reliability and interpretability of fault detection in industrial processes, effectively distinguishes between faults and normal operating conditions, reduces false alarm rates, and conforms to the physical mechanisms of industrial processes.
Smart Images

Figure CN120974245B_ABST
Abstract
Description
Technical Field
[0001] This invention belongs to the field of process monitoring and fault diagnosis, specifically relating to an industrial process fault detection method based on a spatiotemporal causal graph autoencoder. Background Technology
[0002] With the development of deep learning and artificial intelligence, data-driven multivariate statistical process monitoring methods have become powerful tools for monitoring complex industrial processes, ensuring operational safety and production efficiency. However, these methods suffer from low reliability and poor interpretability, leading to a significant gap between laboratory outputs and industrial applications. For example, monitoring model performance degrades under changing operating conditions, resulting in high false alarm rates; the decision-making logic of data-driven black-box models hinders trust from on-site personnel and makes it difficult to pinpoint the root cause of faults. Graph Neural Networks (GNNs) can utilize neural networks to process graph-structured data. In a real industrial process, variables are often closely related. By representing the relationships between variables as a graph, fault detection models based on GNNs can enhance the interpretability of process monitoring. However, existing technologies have two limitations. First, most GNN-based fault detection methods often build correlation graphs between variables, only capturing correlations and failing to characterize causal relationships. Correlation becomes invalid with fluctuations in operating conditions, resulting in poor generalization ability and decreased fault detection performance. In contrast, fault detection models based on causal graphs have significant advantages in reliability and interpretability. Secondly, existing industrial process causal discovery algorithms rely on transfer entropy and Granger causal analysis methods, without considering confounding factors caused by multidimensional variable coupling, resulting in poor causal discovery performance and the established causal graphs containing a large number of spurious correlations. Summary of the Invention
[0003] Objective of the Invention: The technical problem to be solved by the present invention is to address the shortcomings of existing technologies by providing an industrial process fault detection method based on a spatiotemporal causal graph autoencoder, comprising the following steps:
[0004] Step 1: For the target industrial process, preprocess the spatiotemporal process data of all process variables collected during the operation of the target industrial process to obtain a standardized time series data for each process variable; generate dynamic time series data through a fixed-length sliding window to form standardized dynamic input time series data.
[0005] Step 2: Establish a causal graph spatiotemporal autoencoder (CGSTAE). The causal graph spatiotemporal autoencoder (CGSTAE) includes a correlation graph structure learning module based on the spatial self-attention mechanism (SSAM) and a spatiotemporal encoder-decoder module based on the graph convolutional long short-term memory network (GCLSTM).
[0006] Step 3: Execute the three-step causal graph structure learning algorithm to train the causal graph spatiotemporal autoencoder CGSTAE, including three steps: pre-training, causal extraction, and fine-tuning.
[0007] Step 4: Based on the hidden layer features of the causal graph spatiotemporal autoencoder CGSTAE and the residual data of the reconstructed output, calculate the feature space statistics and residual space statistics respectively. Determine the control limit at a given significance level by kernel density estimation. Samples with statistics exceeding the control limit are regarded as fault samples, and the fault detection results are obtained.
[0008] In step 1, the data preprocessing includes outlier removal, missing value imputation, and max-min standardization. The spatiotemporal process data of all process variables are processed into the following form: X represents the training data consisting of N normal samples, and T represents the matrix transpose. Let X represent the t-th normal sample; let the i-th column of X be denoted as . , This represents the time-series data vector of the i-th process variable. This represents the measurement data of the i-th process variable at time t;
[0009] By reconstructing the data using a sliding window, the time series data matrix of the input model at time t is obtained. , where w represents the length of the sliding window.
[0010] In step 2, the causal graph is defined as a directed unweighted graph. ,in It is a set of nodes. It is a set of directed edges; nodes It is the i-th variable in a given process, and its node attribute is a standardized time-series data vector. Directed edge Representing variables and variables The causal dependency between them.
[0011] In step 2, the preprocessed time-series data is input into the Spatial Self-Attention Mechanism (SSAM). Attention weights between variables are obtained by calculating the query matrix and key-value matrix, forming the adjacency matrix of a dynamic correlation graph, thus achieving adaptive learning of time-varying correlations between process variables. Using the graph structure as input, a spatiotemporal encoder-decoder module based on a graph convolutional long short-term memory (GCLSTM) network is constructed. The reconstructed values of the process data are obtained using the hidden features and fully connected layer mapping of the spatiotemporal encoder-decoder module, achieving topology-guided spatiotemporal dynamic modeling of industrial processes. The Spatial Self-Attention Mechanism (SSAM) then processes the time-series data matrix... Convert to attention matrix :
[0012] ,
[0013] The query matrix Key-value matrix , and These are two trainable weight matrices for the Spatial Self-Attention Mechanism (SSAM). Use the Sigmoid activation function;
[0014] Since the spatial self-attention mechanism (SSAM) can model the correlation between changes in variables, the attention matrix can be used... It is considered as an adjacency matrix of a dynamic correlation graph.
[0015] In step 2, a spatiotemporal encoder-decoder module based on a graph convolutional long short-term memory network (GCLSTM) is constructed. The encoder in the spatiotemporal encoder-decoder module uses a temporal data matrix. and attention matrix As input, along the forward timing Circular execution of a graph convolutional long short-term memory network (GCLSTM) to update the forget gate at time k. Input gate Output gate Candidate status Unit status and hidden layer features ,in:
[0016] ,
[0017] ,
[0018] ,
[0019] ,
[0020] ,
[0021] ,
[0022] Where tanh represents the hyperbolic tangent function. Represents the Hadama product. , , , These represent the graph convolutional layers of the encoder: the forget gate, the input gate, the output gate, and the candidate states, respectively. , , , These represent the learnable bias parameters of the forget gate, input gate, output gate, and candidate state in the encoder, respectively.
[0023] The encoder in the spatiotemporal encoder-decoder module extracts spatiotemporal information by updating the unit state and hidden features through a graph convolutional long short-term memory (GCLSTM) network, and then passes this information to the decoder. The decoder proceeds along the reverse temporal sequence. The GCLSTM graph convolutional long short-term memory network is executed in a loop to update the unit states and hidden features:
[0024] ,
[0025] ,
[0026] ,
[0027] ,
[0028] ,
[0029] ,
[0030] The calculation method for GC in graph convolutional layers is as follows:
[0031] ,
[0032] Where D is the adjacency matrix. The degree matrix, I is the degree matrix with Unit arrays of the same shape For trainable weight parameters, Z represents the node features of the input graph convolutional layer: in the encoder In the decoder ;
[0033] Finally, by utilizing the hidden layer features, reconstructed values of the process data at time k are generated through a fully connected layer. :
[0034] ,
[0035] in and These are the trainable weight parameters and bias parameters of the fully connected layer, respectively.
[0036] In step 3, firstly, dynamic correlation maps under different operating conditions are generated using the pre-trained spatial self-attention mechanism SSAM; then, based on the principle of causal invariance, stable structures are extracted from the dynamic correlation maps, and causal graphs are generated by integrating process mechanism knowledge; finally, the learned causal graphs are used to fine-tune the parameters of the spatiotemporal encoder decoder module, establishing a causal-based fault detection model; the trainable model parameters in the causal graph spatiotemporal autoencoder CGSTAE are used... It means that, among them These represent the parameters of the correlation graph structure learning module. The parameters of the spatiotemporal encoder decoder module are represented by: and This represents the function mappings for the correlation graph structure learning module and the spatiotemporal encoder-decoder module.
[0037] In step 3, the pre-training includes: minimizing the mean square error (MSE) of the reconstructed values by jointly optimizing the parameters of the correlation graph structure learning module and the spatiotemporal encoder-decoder module.
[0038] ,
[0039] in express and The mean square error;
[0040] Reconstructed value The correlation graph structure learning module and the spatiotemporal encoder decoder module are used to calculate the dynamic correlation between industrial process variables, enabling the spatial self-attention mechanism (SSAM) to adaptively learn the dynamic correlation between industrial process variables.
[0041] The causal extraction includes: freezing the parameters of the pre-trained spatiotemporal encoder-decoder module and the correlation graph structure learning module, introducing a trainable causal graph adjacency matrix A, and learning the causal graph adjacency matrix A by optimizing the following objectives:
[0042] ,
[0043] in , , , Indicates the weighting coefficient;
[0044] The term ensures that the reconstruction capability of the causal graph is consistent with that of the correlation graph by constraining the root mean square error (MSE). The calculation method is as follows:
[0045] ,
[0046] The term extracts causal relationships based on invariance, and the calculation method is as follows:
[0047] ,
[0048] in, This represents the element in the i-th row and j-th column of the adjacency matrix A of a trainable causal graph. Adjacency matrix representing a dynamic correlation graph The element in the i-th row and j-th column;
[0049] The term guarantees that the learned cause-effect graph conforms to the prior knowledge of the process, and the calculation method is as follows:
[0050] ,
[0051] Where M is the mask matrix representing whether knowledge exists in the representation process, if ,but ;like , "Unknown" indicates that the process knowledge is unknown. This represents the element in the i-th row and j-th column of the mask matrix M;
[0052] Item and The term is used to improve the sparsity and discreteness of the causal graph, and is calculated as follows:
[0053] ,
[0054] ,
[0055] The fine-tuning includes: fine-tuning the parameters of the spatiotemporal encoder-decoder module based on the mean square error loss and using the learned causal graph, with the loss function... for:
[0056] .
[0057] Step 4 includes: performing fault detection, which consists of two phases: offline modeling and online monitoring.
[0058] Offline modeling stage: The causal graph spatiotemporal autoencoder CGSTAE is trained based on normal training samples, and the feature space statistic T² and residual space statistic SPE are constructed. The feature space statistic at time t... The calculation formula is:
[0059] ,
[0060] in Σ and Σ are the mean and covariance matrices of the hidden layer features of normal samples, respectively; It is the final hidden layer feature output by the encoder in the spatiotemporal encoder decoder module;
[0061] Residual spatial statistics at time t The calculation formula is:
[0062] ,
[0063] Control limits of feature space statistics Control limits for residual space statistics Determined at a given significance level by kernel density estimation;
[0064] Online monitoring phase: at every moment The input matrix is obtained by reorganizing the process data through a sliding window. Spatial statistics are calculated using a trained causal graph spatiotemporal autoencoder (CGSTAE). and residual space statistics ,if and If the process is normal, then the fault is determined; otherwise, the fault is determined.
[0065] The present invention also provides an electronic device, including a processor and a memory, the memory storing program code that, when executed by the processor, causes the processor to perform the steps of the method.
[0066] The present invention also provides a storage medium storing a computer program or instructions that, when the computer program or instructions are run on a computer, execute the steps of the method described.
[0067] The network architecture employed in this method consists of a correlation graph structure learning module and a spatiotemporal encoder-decoder. Based on this, a three-step causal graph structure learning algorithm is provided for training a spatiotemporal causal graph autoencoder. Through three steps—pre-training, causal extraction, and fine-tuning—the algorithm discovers invariant causal graph structures from changing correlations, thereby controlling confounding factors in industrial data. Furthermore, with the help of the spatiotemporal encoder-decoder, causal relationship-based industrial process fault detection is achieved, improving the reliability and interpretability of industrial process monitoring.
[0068] The present invention has the following advantages: First, the industrial process fault detection method based on spatiotemporal causal graph autoencoder of the present invention constructs a graph neural network model based on causal graph. The causal graph describes the causal relationship between process variables, which conforms to the physical mechanism of industrial process, so that the spatiotemporal causal graph autoencoder model has high reliability and interpretability.
[0069] Second, the industrial process fault detection method based on spatiotemporal causal graph autoencoder of the present invention has a network architecture including a correlation graph structure learning module based on spatial self-attention mechanism and a spatiotemporal encoder-decoder module based on graph convolutional long short-term memory network. The correlation graph structure learning module can describe the correlation of changes in process data by learning dynamic graphs, and the spatiotemporal encoder-decoder module can process dynamic graphs in the pre-training stage and causal graphs obtained by causal extraction. This network architecture is conducive to realizing causal discovery and fault detection.
[0070] Third, the industrial process fault detection method based on spatiotemporal causal graph autoencoder of the present invention proposes a three-step causal graph structure learning algorithm, which innovatively utilizes the principle of causal invariance to discover invariant causal graphs from changing correlations. At the same time, it integrates process mechanism knowledge to constrain the causal graph, which can control the confounding factors in industrial data and improve the effectiveness of causal discovery. Attached Figure Description
[0071] The present invention will be further described in detail below with reference to the accompanying drawings and specific embodiments, and the advantages of the present invention in the above and / or other aspects will become clearer.
[0072] Figure 1 This is a schematic diagram of the network architecture of the Spacetime Causal Graph Autoencoder (CGSTAE).
[0073] Figure 2 This is a schematic diagram of a graph convolutional long short-term memory (GCLSTM) unit of a spatiotemporal encoder.
[0074] Figure 3 This is a flowchart of the fault detection process based on the spatiotemporal causal graph autoencoder CGSTAE.
[0075] Figure 4 This is a process flow diagram of the Tennessee-Eastman process.
[0076] Figure 5 Different methods are used to address the T11 fault in the Tennessee-Eastman process. 2 Statistical graph.
[0077] Figure 6 These are SPE statistics plots for the Tennessee-Eastman process fault 11 using different methods.
[0078] Figure 7 It is a graph structure of the Tennessee-Eastman process. Detailed Implementation
[0079] This invention provides a fault detection method based on a spatiotemporal causal graph autoencoder, comprising the following steps S1 to S4, the specific process of which is as follows: Figure 3 As shown below, the implementation method of each step will be described in detail.
[0080] S1. After determining the target industrial process, first understand the process flow to be modeled, clarify the process variables involved in the industrial process modeling, and then collect spatiotemporal process data over a period of time through a distributed control system. For the target industrial process, preprocess the spatiotemporal process data of all process variables collected during the operation of the target industrial process, obtaining a standardized time series data for each process variable. Dynamic time series data is generated through a fixed-length sliding window to form standardized dynamic input time series data. Step S1 is detailed as follows:
[0081] S11: Perform data preprocessing, including outlier removal based on the 3-sigma principle, missing value imputation based on interpolation, and max-min standardization. The spatiotemporal process data of all process variables will be in the following form after preprocessing: X represents the training data consisting of N normal samples, and T represents the matrix transpose. Let X represent the t-th normal sample; let the i-th column of X be denoted as . , This represents the time-series data vector of the i-th process variable. This represents the measurement data of the i-th process variable at time t;
[0082] S12: Reassemble the data using a sliding window to obtain the time series data matrix of the input model at time t. , where w represents the length of the sliding window.
[0083] S2. Input the preprocessed time-series data into a spatial self-attention mechanism (SSAM). Calculate the query matrix and key-value matrix to obtain the attention weights between variables, thereby constructing the adjacency matrix of a dynamic correlation graph, achieving adaptive learning of time-varying correlations between process variables. Using the graph structure as input, construct a spatiotemporal encoder-decoder based on a graph convolutional long short-term memory network (GCLSTM). Utilize the hidden layer features of the spatiotemporal encoder-decoder and the mapping of fully connected layers to obtain the reconstructed values of the process data, realizing topology-guided spatiotemporal dynamic modeling of industrial processes. Step S2 is detailed below:
[0084] S21: Utilizing the Spatial Self-Attention Mechanism (SSAM) to integrate time-series data matrices Convert to attention matrix :
[0085] ,
[0086] The query matrix Key-value matrix , and These are two trainable weight matrices for the Spatial Self-Attention Mechanism (SSAM). Use the Sigmoid activation function;
[0087] S22: Construct a spatiotemporal encoder-decoder module based on a graph convolutional long short-term memory (GCLSTM) network. The encoder in the spatiotemporal encoder-decoder module uses a temporal data matrix. and attention matrix As input, along the forward timing Circular execution of a graph convolutional long short-term memory network (GCLSTM) to update the forget gate at time k. Input gate Output gate Candidate status Unit status and hidden layer features ,in:
[0088] ,
[0089] ,
[0090] ,
[0091] ,
[0092] ,
[0093] ,
[0094] Where tanh represents the hyperbolic tangent function. Represents the Hadama product. , , , These represent the graph convolutional layers of the encoder: the forget gate, the input gate, the output gate, and the candidate states, respectively. , , , These represent the learnable bias parameters of the forget gate, input gate, output gate, and candidate state in the encoder, respectively.
[0095] The encoder in the spatiotemporal encoder-decoder module extracts spatiotemporal information by updating the unit state and hidden features through a graph convolutional long short-term memory (GCLSTM) network, and then passes this information to the decoder. The decoder proceeds along the reverse temporal sequence. The GCLSTM graph convolutional long short-term memory network is executed in a loop to update the unit states and hidden features:
[0096] ,
[0097] ,
[0098] ,
[0099] ,
[0100] ,
[0101] ,
[0102] The calculation method for GC in graph convolutional layers is as follows:
[0103] ,
[0104] Where D is the adjacency matrix. The degree matrix, I is the degree matrix with Unit arrays of the same shape For trainable weight parameters, Z represents the node features of the input graph convolutional layer: in the encoder In the decoder ;
[0105] S23: Utilizing hidden layer features, reconstructed values of the process data at time k are generated through a fully connected layer. :
[0106] ,
[0107] in and These are the trainable weight parameters and bias parameters of the fully connected layer, respectively.
[0108] S3. The three-step causal graph structure learning algorithm is used to train the CGSTAE model, including pre-training, causal extraction, and fine-tuning. First, a dynamic correlation graph under different operating conditions is generated through pre-training of the spatial self-attention mechanism (SSAM). Then, based on the principle of causal invariance, a stable structure is extracted from the dynamic correlation graph, and process mechanism knowledge is integrated to generate a causal graph. Finally, the learned causal graph is used to fine-tune the parameters of the spatiotemporal encoder-decoder module, establishing a causal-based fault detection model. The trainable model parameters in the causal graph spatiotemporal autoencoder CGSTAE are used... It means that, among them These represent the parameters of the correlation graph structure learning module. The parameters of the spatiotemporal encoder decoder module are represented by: and This represents the function mapping between the correlation graph structure learning module and the spatiotemporal encoder-decoder module. Step S3 is as follows:
[0109] S31: Pre-training: Minimize the mean square error (MSE) of the reconstructed values by jointly optimizing the parameters of the correlation graph structure learning module and the spatiotemporal encoder-decoder module.
[0110] ,
[0111] in express and The mean square error;
[0112] Reconstructed value The correlation graph structure learning module and the spatiotemporal encoder decoder module are used to calculate the dynamic correlation between industrial process variables, enabling the spatial self-attention mechanism (SSAM) to adaptively learn the dynamic correlation between industrial process variables.
[0113] S32: Causal Extraction: Freeze the parameters of the pre-trained spatiotemporal encoder-decoder module and the correlation graph structure learning module, introduce a trainable causal graph adjacency matrix A, and learn the causal graph adjacency matrix A by optimizing the following objectives:
[0114] ,
[0115] in , , , Indicates the weighting coefficient;
[0116] The term ensures that the reconstruction capability of the causal graph is consistent with that of the correlation graph by constraining the root mean square error (MSE). The calculation method is as follows:
[0117] ,
[0118] The term extracts causal relationships based on invariance, and the calculation method is as follows:
[0119] ,
[0120] in, This represents the element in the i-th row and j-th column of the adjacency matrix A of a trainable causal graph. Adjacency matrix representing a dynamic correlation graph The element in the i-th row and j-th column;
[0121] The term guarantees that the learned cause-effect graph conforms to the prior knowledge of the process, and the calculation method is as follows:
[0122] ,
[0123] Where M is the mask matrix representing whether knowledge exists in the representation process, if ,but ;like , "Unknown" indicates that the process knowledge is unknown. This represents the element in the i-th row and j-th column of the mask matrix M;
[0124] Item and The term is used to improve the sparsity and discreteness of the causal graph, and is calculated as follows:
[0125] ,
[0126] ,
[0127] S33: Fine-tuning: Based on the mean squared error loss, the parameters of the spatiotemporal encoder-decoder module are fine-tuned using the learned causal graph. The loss function... for:
[0128] .
[0129] S4. Based on the hidden layer features of the model and the residual data of the reconstructed output, calculate the feature space statistics and residual space statistics respectively. Determine the control limits at a given significance level through kernel density estimation. Samples with statistics exceeding the control limits are considered fault samples, thus obtaining the fault detection results. Step S4 is detailed below:
[0130] S41: Offline modeling stage: Train the causal graph spatiotemporal autoencoder CGSTAE based on normal training samples, and construct the feature space statistic T² and the residual space statistic SPE. The feature space statistic at time t... The calculation formula is:
[0131] ,
[0132] in Σ and Σ are the mean and covariance matrices of the hidden layer features of normal samples, respectively; It is the final hidden layer feature output by the encoder in the spatiotemporal encoder decoder module;
[0133] Residual spatial statistics at time t The calculation formula is:
[0134] ,
[0135] Control limits of feature space statistics Control limits for residual space statistics Determined at a given significance level by kernel density estimation;
[0136] S42: Online monitoring phase: at every moment The input matrix is obtained by reorganizing the process data through a sliding window. Spatial statistics are calculated using a trained causal graph spatiotemporal autoencoder (CGSTAE). and residual space statistics ,if and If the process is normal, then the fault is determined; otherwise, the fault is determined.
[0137] Based on the industrial process fault detection method based on spatiotemporal causal graph autoencoders shown in S1-S4 above, a three-step causal graph structure learning algorithm is proposed for CGSTAE training, improving the reliability and interpretability of industrial process monitoring. It should be noted that the key feature of the industrial process fault detection method based on spatiotemporal causal graph autoencoders lies in the causal graph-based CGSTAE process monitoring model, which exhibits significant advantages in both reliability and interpretability.
[0138] The method described below will be applied to a specific example to demonstrate its implementation and technical effects.
[0139] In this embodiment, the Tennessee-Eastman process (TEP) is used as an example to illustrate the effectiveness of the present invention. The TEP involves 52 variables, including 22 continuous process measurements, 19 component measurements, and 11 manipulated variables. The TEP allows for the simulation of 21 types of faults, facilitating the evaluation of fault detection performance. The proposed method is evaluated using publicly available datasets from the TEP. The TEP process flow is as follows: Figure 4 As shown.
[0140] For TEP industrial processes, this embodiment provides a fault detection method based on a spatiotemporal causal graph autoencoder, and the implementation steps are as follows:
[0141] Step 1: Data preprocessing;
[0142] By collecting data from 52 variables in the TEP (Transmission of Processes), using 960 normal operating condition samples for training and 21 fault conditions as the test set, the spatiotemporal input sequence was reconstructed using a sliding window of length w=5. The spatiotemporal process data of the process variables, after data preprocessing, are in the following form: Let represent the training data consisting of N normal samples. The dynamic spatiotemporal input matrix is obtained by reorganizing the data through a sliding window. .
[0143] Step 2: Train CGSTAE;
[0144] This embodiment utilizes a three-step causal graph structure learning algorithm to train CGSTAE, in order to discover invariant causal graphs from changing correlations.
[0145] 2.1 Pre-training;
[0146] The parameters of the correlation graph structure learning module and the spatiotemporal encoder-decoder module are jointly optimized by the Adam optimizer with a learning rate of 0.05 and a batch size of 32 during pre-training.
[0147] 2.2 Causal Extraction;
[0148] Causal graph learning freezes parameters by introducing a trainable causal graph adjacency matrix A, selecting an Adam optimizer with a learning rate of 0.1, and learning the causal graph by minimizing the loss function. The four balancing hyperparameters are as follows: , , , .
[0149] 2.3, Fine-tuning;
[0150] Remove the SSAM module, fix the resulting causal graph A, and use the Adam optimizer with a learning rate of 0.05 to fine-tune the parameters of the spatiotemporal encoder-decoder to optimize its reconstruction capability.
[0151] Step 3: Fault detection;
[0152] In TEP process monitoring applications, CGSTAE achieves accurate fault detection through T² and SPE statistics. Taking fault 11 as an example, the application of this method in TEP fault detection is divided into an offline control limit calculation stage and an online monitoring stage.
[0153] 3.1, Offline control limit calculation stage;
[0154] Based on normal training data, kernel density estimation was used to determine the control limits at a significance level of 0.01. Figure 5 and Figure 6 The red dashed line represents the control limit.
[0155] 3.2 Online monitoring phase;
[0156] Taking fault 11 as an example, Figure 5 and Figure 6 The paper presents T2 and SPE statistics for test data using different methods, with the fault introduced from the 161st sample. The CGSTAE statistics proposed in this invention can clearly distinguish between fault conditions and normal conditions.
[0157] Step 4: Model evaluation and validation;
[0158] In this embodiment, process data from the publicly available TEP dataset is used to train and validate the process detection performance of CGSTAE and its comparative models. Comparison methods include autoencoders (AE), LSTM-AE (based on long short-term memory networks), GAE-I (Graph Autoencoder with Pearson correlation coefficient for graph construction), GAE-II (Graph Autoencoder with transfer entropy for graph construction), DGSTAE (Dynamic Graph Spatiotemporal Autoencoder with Spatial Self-Attention Mechanism for Dynamic Graph Construction), and CGSTAE, an industrial process fault detection method based on spatiotemporal causal graph autoencoders proposed in this invention. Detection rate (FDR), false alarm rate (FAR), and F1 score are selected as performance evaluation criteria for fault detection, where the F1 score is a comprehensive performance indicator that considers both FDR and FAR.
[0159] Table 1 presents the fault detection performance of all methods in TEP. CGSTAE achieves the best overall performance with an F1 score of 0.883, significantly reducing the false alarm rate while maintaining high detection accuracy. Thanks to its causal graph learning and spatiotemporal modeling capabilities, CGSTAE is the most reliable method for fault detection in TEP. DGSTAE also performs excellently, with an F1 score of 0.819 and the lowest FAR, demonstrating the importance of graph learning and spatiotemporal modeling. LSTM-AE and GAE-II achieve fault detection results with F1 scores of 0.813 and 0.774, respectively, reflecting their effectiveness in handling temporal and spatial dependencies. In contrast, GAE-I and AE show poor fault detection performance.
[0160] Table 1. Comparison of Fault Detection Performance of All Methods in TEP
[0161]
[0162] Figure 5 and Figure 6 The T² statistic and SPE statistic for all methods are compared for fault 11. Figure 5 and Figure 6 In the figure, (a) to (f) represent AE, LSTM-AE, GAE-I, GAE-II, DGSTAE, and CGSTAE, respectively. The dashed line represents the control limit, and the fault is introduced from the 161st sample. It can be seen that the T² statistic of the comparison methods such as AE and LSTM-AE frequently remains below the control limit after the fault occurs, making it difficult to distinguish between faulty and normal operating conditions. In contrast, the T² statistic of CGSTAE proposed in this invention can clearly distinguish between faulty and normal operating conditions. The SPE statistic of the comparison methods is below the control limit at many points after the fault occurs, resulting in a low detection rate. The CGSTAE proposed in this invention uses T²... 2 The SPE statistic successfully detected TEP fault 11 while maintaining a low false alarm rate.
[0163] Figure 7 A comparison of graph structure learning results on TEP. Figure 7 (a) shows a priori causal graph built from process knowledge. Figure 7 Figures (b) through (d) respectively show the graph structure learning results for GAE-I, GAE-II, and CGSTAE. It can be seen that neither the Pearson correlation coefficient nor the transitivity is sufficient to identify prior causality from process data. Figure 1 The causal relationships learned by CGSTAE are consistent with the underlying process mechanisms, thanks to the causal graph structure learning algorithm. This greatly improves the interpretability of the model.
[0164] As described above, the method of the present invention has satisfactory reliability and interpretability, and can accomplish practical industrial process monitoring tasks.
[0165] This invention provides a method for industrial process fault detection based on a spatiotemporal causal graph autoencoder. Many methods and approaches exist for implementing this technical solution; the above description is merely a preferred embodiment. It should be noted that those skilled in the art can make various improvements and modifications without departing from the principles of this invention, and these improvements and modifications should also be considered within the scope of protection of this invention. All components not explicitly stated in this embodiment can be implemented using existing technologies.
Claims
1. A method for industrial process fault detection based on spatiotemporal causal graph autoencoder, characterized in that, The method comprises the following steps: Step 1, for a target industrial process, data preprocessing is performed on the spatio-temporal process data of all process variables collected during the running of the target industrial process, and a standardized time series data of each process variable is obtained; a dynamic time series data is generated through a fixed-length sliding window to form a standardized dynamic input time series data; Step 2, a causal graph spatio-temporal autoencoder CGSTAE is established, the causal graph spatio-temporal autoencoder CGSTAE comprising a correlation graph structure learning module based on a spatial self-attention mechanism SSAM and a spatio-temporal encoder-decoder module based on a graph convolutional long short-term memory network GCLSTM; In step 2, the causal graph is defined as a directed and unweighted graph G = (V, ε), where V = {v1, v2,..., vn} is the node set, n} is the node set, is the directed edge set; a node v i ∈ V is the ith variable of the given process, and the node attribute is the normalized time series data vector x i , a directed edge (v i , v j ) ∈ ε represents the causal dependency between variable v i and variable v j ; In step 2, the preprocessed time series data is input into the spatial self-attention mechanism SSAM, the attention weights between variables are obtained by calculating a query matrix and a key-value matrix, an adjacency matrix of a dynamic correlation graph is constructed, and adaptive learning of time-varying correlation between process variables is realized; The spatio-temporal encoder-decoder module based on the graph convolutional long short-term memory network GCLSTM is constructed by taking the graph structure as input; the reconstruction value of the process data is obtained by using the hidden layer features and the full connection layer mapping of the spatio-temporal encoder-decoder module, and a topological guided industrial process spatio-temporal dynamic modeling is realized; The spatial self-attention mechanism SSAM converts a time series data matrix X (t) into an attention matrix A (t) : Where the query matrix Q (t) =X (t) W Q Key-value matrix K (t) =X (t) W K W Q and W K These are two trainable weight matrices for the Spatial Self-Attention Mechanism (SSAM), where σ is the Sigmoid activation function. Attention matrix A (t) adjacency matrix considered as a dynamic correlation graph; In step 2, a spatio-temporal encoder-decoder module based on graph convolutional long short-term memory network GCLSTM is constructed, the encoder in the spatio-temporal encoder-decoder module takes the time series data matrix X (t) and the attention matrix A (t) as input, and performs graph convolutional long short-term memory network GCLSTM in a forward time sequence k∈{t-w+1,...,t} loop, updates the forgetting gate f (k) , the input gate i (k) , the output gate o (k) , the candidate state , the cell state c (k) and the hidden layer feature h (k) at time k, where: f (k) = σ(GC f ([x (k) ; h (k-1) ], A (k) )+ b f ), i (k) = σ(GC i ([x (k) ; h (k-1) ], A (k) )+ b i ), o (k) = σ(GC o ([x (k) ; h (k-1) ], A (k) )+ b o ), h (k) = o (k) ⊙ tanh(c (k) ), wherein tanh denotes hyperbolic tangent function, represents Hadamard product, GC f , GC i , GC o , GC c respectively denote the forget gate, the input gate, the output gate, the candidate state of the graph convolution layer in the encoder, b f , b i , b o , b c respectively denote the learnable bias parameters of the forget gate, the input gate, the output gate, the candidate state in the encoder. The encoder in the spatio-temporal encoder-decoder module updates the unit state and the hidden features through the graph convolutional long short-term memory network GCLSTM update unit to transmit the spatio-temporal information to the decoder, and the decoder executes the graph convolutional long short-term memory network GCLSTM in a reverse time sequence k∈{t,t-1,...,t-w+1} cycle to update the unit state and the hidden features: h (k-1) = o (k-1) ⊙ tanh(c (k-1) ), The calculation method of the graph convolutional layer GC is as follows: where D is the degree matrix of the adjacency matrix A (k) , I is the identity matrix of the same shape as A (k) , W GC are trainable weight parameters, and Z represents the node features input to the graph convolution layers: Z = [x (k) ; h (k-1) ] in the encoder and Finally, the hidden layer features are used to generate the reconstruction of the process data at time k through a fully connected layer where W FC and b FC are fully connected layer trainable weight and bias parameters, respectively; Step 3, a three-step causal graph structure learning algorithm is executed to realize the training of the causal graph spatio-temporal autoencoder CGSTAE, including three steps of pre-training, causal extraction and fine-tuning; Step 4, based on the hidden layer features and the residual data of the reconstruction output of the causal graph spatio-temporal autoencoder CGSTAE, the feature space statistics and the residual space statistics are calculated respectively, the control limit is determined under a given significance level through kernel density estimation, the samples whose statistics exceed the control limit are regarded as fault samples, and a fault detection result is obtained.
2. The method of claim 1, wherein, In step 1, the data preprocessing includes abnormal data rejection, missing value filling and maximum minimum standardization, and the spatiotemporal process data of all process variables are in the form of X = [x (1) ,…x (t) ,…,x (N) ] T after data preprocessing, where X represents training data composed of N normal samples, T represents matrix transposition, x (t) represents the tth normal sample; the ith column of X is denoted as x i , which represents the time series data vector of the ith process variable, which represents the measurement data of the ith process variable at time t; The time series data matrix X inputting the model at time t is obtained by reorganizing data through a sliding window (t) = [x (t-w+1) ,…,x (t) ] T where w represents the length of the sliding window.
3. The method of claim 2, wherein, In step 3, firstly, the dynamic correlation graph under different working conditions is generated by pre-training the spatial self-attention mechanism SSAM; then, based on the principle of causal invariance, the stable structure is extracted from the dynamic correlation graph, and the causal graph is generated by fusing process mechanism knowledge; finally, the learned causal graph is used to fine-tune the parameters of the space-time encoder-decoder module, and a fault detection model based on causality is established; the trainable model parameters in the causal graph space-time autoencoder CGSTAE are represented by θ = [θ SSAM ,θ STAE ], wherein θ SSAM represents the parameters of the correlation graph structure learning module, and θ STAE represents the parameters of the space-time encoder-decoder module; the function mapping of the correlation graph structure learning module and the space-time encoder-decoder module is represented by f SSAM and f STAE , respectively.
4. The method of claim 3, wherein, In step 3, the pre-training comprises: by jointly optimizing the parameters of the correlation graph structure learning module and the spatio-temporal encoder-decoder module, minimizing the mean square error MSE of the reconstruction value: where L MSE (θ SSAM ,θ STAE ) denotes the mean square error of θ SSAM and θ STAE ; reconstructed values The correlation graph structure learning module and the spatiotemporal encoder-decoder module are calculated to enable the spatial self-attention mechanism (SSAM) to adaptively learn dynamic correlation relationships between industrial process variables. The causal extraction comprises: freezing the parameters of the pre-trained spatio-temporal encoder-decoder module and the correlation graph structure learning module, introducing a trainable causal graph adjacency matrix A, and learning the causal graph adjacency matrix A by optimizing the following objective: Wherein λ1, λ2, λ3, λ4 represent weight coefficients; L MSE Item 3 ensures the reconstruction ability of the causal graph consistent with that of the correlation graph by constraining the mean square error MSE, which is calculated as follows: L invariance Item-based approach extracts causal relationships based on invariance, which is calculated as: where A ij denotes the element in the i-th row and j-th column of the adjacency matrix A of the trainable causal graph, denotes the element in the i-th row and j-th column of the adjacency matrix A of the dynamic correlation graph (t) of the dynamic correlation graph. L prior An item guarantees that the learned causal graph conforms to the process prior knowledge, and the calculation is as follows: where M is a mask matrix representing whether the process knowledge exists or not, if M ij = 1; if M ij = 0, Unknown represents that the process knowledge is unknown, and M ij represents an element in the i-th row and the j-th column of the mask matrix M; L sparsity term and L discrete to promote sparsity and discrete of the causal graph, the calculation is as follows: The fine-tuning comprises fine-tuning parameters of the spatio-temporal encoder-decoder module using the learned causal graph based on a mean squared error loss, the loss function θ STAE is:
5. The method of claim 4, wherein, Step 4 comprises: performing fault detection, including two phases of offline modeling and online monitoring: An offline modeling stage: training the CGSTAE based on normal training samples, and constructing a feature space statistic T 2 and a residual space statistic SPE, and a feature space statistic T at time t 2 The calculation formula is: wherein and∑ are the mean and covariance matrix of the normal sample hidden layer features; h (t) is the final hidden layer feature of the encoder output in the spatio-temporal encoder-decoder module; The formula of the residual space statistics SPE(t) at time t is as follows: Control limits for feature space statistics Control limits for residual space statistics determined by kernel density estimation at a given significance level; Online monitoring phase: at each time instant t new Reorganize process data by sliding window to get input matrix Calculate spatial statistics T using trained causal graph spatio-temporal autoencoder CGSTAE 2 (t new ) and residual spatial statistics SPE(t new ), if and then determine that the process is normal, otherwise determine that a fault has occurred.
6. An electronic device, comprising: The device comprises a processor and a memory, and the memory stores program code, when the program code is executed by the processor, the processor executes the steps of the method in any one of claims 1 to 5.
7. A storage medium, characterized by a computer program or instructions stored in a storage medium, which, when run on a computer, perform the steps of the method according to any one of claims 1 to 5.
Citation Information
Patent Citations
Complex industrial process fault detection method based on space-time variation graph attention auto-encoder
CN116520799A
Industrial process fault monitoring method based on time information enhancement graph convolution auto-encoder
CN119758925A