Method for constructing neural network model based on adversarial training and storage medium
Through the adversarial training neural network model construction method, the problems of reduced prediction performance and high computational complexity of the hybrid modeling strategy when facing new working condition data are solved, and a high-precision and high-generalization industrial process model is achieved.
Patent Information
- Application Number
- CN202511035488.6
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-07-25
- Publication Date
- 2025-10-17
AI Technical Summary
In the existing technology, the hybrid modeling strategy has degraded prediction performance when facing new working condition data other than offline data, has high computational complexity, and the domain adaptation method has limitations in industrial process soft measurement.
A neural network model construction method based on adversarial training is adopted. The feature invariants in the working process are extracted by the feature extractor, the key data are predicted by the predictor, and the domain label is discriminated by the domain discriminator. The target loss function is constructed for adversarial training to obtain a neural network model based on adversarial training.
It has achieved the construction of a high-precision and good generalization model based on limited offline data, improving the generalization ability and prediction accuracy of industrial process models.
Smart Images

Figure CN120804716A_ABST
Abstract
Description
TECHNICAL FIELD
[0001] The present application mainly relates to the field of computers, and particularly relates to a method for constructing a neural network model based on adversarial training and a storage medium. BACKGROUND
[0002] Since the operating conditions of industrial processes are constantly adjusted according to market demand, the data collected by actual industrial processes often presents a multi-distribution characteristic. In the case of data distribution deviation after online deployment of a model, how to construct a model with high precision and good generalization based on limited offline data is an important research problem. The mixed modeling strategy solves the problem of decline in model prediction performance caused by offline data presenting a multi-distribution in actual industrial processes, but this method mainly establishes local sub-models for specific operating conditions in offline data to predict the same operating condition data. When the model is deployed online for prediction, if new operating condition data other than offline data appears, due to the difference in distribution of data in different operating conditions, each local sub-model has a problem of decline in prediction performance when predicting due to covariate shift. In addition, the mixed modeling strategy needs to train and establish corresponding local sub-models for data in different operating conditions, and when there are more operating conditions in offline data and the complexity of the local sub-models is high, the training process needs to consume a large amount of time and computing resources.
[0003] For the problem of data distribution deviation in the multi-condition scenario, domain transfer learning is one of the current research hotspots. Among them, domain adaptation (DA) is an effective solution, which can improve the performance of the model in the target domain by minimizing the distribution difference between the source domain and the target domain. However, since the industrial process data includes time scale information, the data of the target domain is difficult to obtain in real time, and DA needs to use the data of the target domain for distribution adaptation, which makes DA have certain limitations in the application of industrial process soft measurement. SUMMARY
[0004] An object of the present application is to provide a method for constructing a neural network model based on adversarial training and a storage medium, which solves the problems of decline in prediction performance of mixed models for new operating condition data other than offline data, high computational complexity, waste of computing resources, and certain limitations of domain adaptation methods in the application of industrial process soft measurement in the prior art.
[0005] According to one aspect of the present application, a method for constructing a neural network model based on adversarial training is provided, which comprises:
[0006] extracting a feature invariant in the operating condition process by a feature extractor from the sampled and reconstructed data, wherein the sampled and reconstructed data is obtained by sampling and reconstructing the operating condition data after operating condition classification of the operating condition data;
[0007] predicting key data in the working condition data from the feature invariants by the predictor;
[0008] inputting the sampling reconstruction data and the feature invariants into the domain discriminator through a gradient reversal layer to perform domain labeling of the domain where the predicted working condition data is located;
[0009] constructing a target loss function according to the predicted key data and the domain label to complete the adversarial training of the model, and obtaining a neural network model based on adversarial training, wherein the neural network model based on adversarial training comprises a feature extractor, a predictor, a domain discriminator and a target loss function.
[0010] Optionally, the reconstruction data is obtained by the following steps:
[0011] performing working condition classification on the obtained working condition data using an encoder to obtain a plurality of working condition label data, wherein the encoder comprises different lengths of convolution kernels;
[0012] sampling the plurality of working condition label data using a decoder, and reconstructing data of the sampling result to obtain sampling reconstruction data.
[0013] Optionally, performing working condition classification on the obtained working condition data using an encoder to obtain a plurality of working condition label data, comprising:
[0014] extracting time sequence mode information in the obtained working condition data using different lengths of convolution kernels to obtain Gaussian mixture distribution parameters, wherein the Gaussian mixture distribution parameters comprise mean and variance of each domain;
[0015] sampling according to the corresponding Gaussian distribution according to the Gaussian mixture distribution parameters to obtain sampling variables under each Gaussian distribution;
[0016] performing weighted summation on the sampling variables to obtain latent variables of the working condition label.
[0017] Optionally, the decoder comprises two layers of stacked fully connected layers, and sampling the plurality of working condition label data using the decoder, reconstructing data of the sampling result to obtain sampling reconstruction data, comprising:
[0018] down-sampling the latent variables of the working condition label using two layers of stacked fully connected layers to obtain mean and variance of reconstruction data under each Gaussian distribution;
[0019] reconstructing data according to the mean and variance of the reconstruction data under each Gaussian distribution to obtain sampling reconstruction data.
[0020] Optionally, extracting feature invariants in the working condition process from the sampling reconstruction data through a feature extractor, comprising:
[0021] Constructing a priori topological graph structure based on the variable relationship between the sampled and reconstructed data to obtain a feature extractor;
[0022] The feature invariants of the working condition are extracted from the sampled and reconstructed data according to the feature extractor.
[0023] Optionally, the predictor includes an output layer network, and the structure of the output layer network satisfies the following formula:
[0024] y=fc out (dropout(fc in (z)));
[0025] Among them, fc in The input dimension is the deep feature dimension |z|, and the output dimension is fc out The input dimension is The output dimension is 1, and dropout() indicates the probability of preventing overfitting.
[0026] Optionally, the domain discriminator includes: a first fully connected layer and a second fully connected layer, wherein the input dimension of the first fully connected layer is the deep feature dimension |z|, and the output dimension is The input dimension of the second fully connected layer is The output dimension is the number of categories for the working condition classification.
[0027] Optionally, construct a target loss function based on the predicted key data and domain labels, including:
[0028] Introducing a regularization term for graph structure learning in the feature extractor;
[0029] Constructing a first loss function based on the predicted key data and the feature invariants extracted by the feature extractor;
[0030] Construct the loss function of the domain discriminator based on the predicted domain label and cross entropy function;
[0031] The target loss function is constructed based on the first loss function, the loss function of the domain discriminator, and the regularization term of graph structure learning.
[0032] Optionally, the objective loss function satisfies the following formula:
[0033] L total =L MSE +αL D +βL F +γL S ;
[0034] Among them, L total represents the target loss function, L MSERepresents the first loss function, L D represents the loss function of the domain discriminator, L F and L S represents the regularization term for graph structure learning, and α, β, and γ are the learnable weight parameters corresponding to each regularization term.
[0035] Optionally, the method further includes:
[0036] The encoder and decoder are jointly optimized with a variational evidence lower bound as the objective function, where the variational evidence lower bound includes the reconstruction error and the KL divergence, which is used to calculate the distance between different distributions.
[0037] According to another aspect of the present application, a device for constructing a neural network model based on adversarial training is also provided, the device comprising:
[0038] one or more processors; and
[0039] A memory storing computer-readable instructions, which, when executed, cause the processor to perform the operations of the method described above.
[0040] According to another aspect of the present application, a computer-readable medium is provided, on which computer instructions are stored. The computer-readable instructions can be executed by a processor to implement the method described above.
[0041] Compared with the prior art, the present application extracts characteristic invariants of the working condition process by passing sampled and reconstructed data through a feature extractor, wherein the sampled and reconstructed data is obtained by sampling and reconstructing the working condition data after working condition classification; predicts key data in the working condition data from the characteristic invariants through a predictor; inputs the sampled and reconstructed data and the characteristic invariants into a domain discriminator after passing through a gradient reversal layer to predict the domain label of the domain where the working condition data is located; constructs a target loss function based on the predicted key data and domain label to complete the adversarial training of the model, and obtains a neural network model based on adversarial training, wherein the neural network model based on adversarial training includes a feature extractor, a predictor, a domain discriminator, and a target loss function. It is possible to construct a model with high accuracy and good generalization based on limited offline data, thereby improving the generalization ability and prediction accuracy of the industrial process model. BRIEF DESCRIPTION OF THE DRAWINGS
[0042] In order to make the above-mentioned objects, features and advantages of the present application more clearly understood, the specific embodiments of the present application are described in detail below with reference to the accompanying drawings, wherein:
[0043] Figure 1 A schematic flow chart of a method for constructing a neural network model based on adversarial training according to one aspect of the present application is shown;
[0044] Figure 2 A framework diagram of a neural network model based on adversarial training in an embodiment of the present application is shown.
[0045] Figure 3 A network diagram of an encoder in an embodiment of the present application is shown.
[0046] Figure 4 A flowchart of a two-stage dynamic graph neural network construction based on adversarial training under distribution shift in an embodiment of the present application is shown.
[0047] Figure 5 Results of using Time-GMVAE to classify operating conditions of a TE process dataset in an embodiment of the present application are shown.
[0048] Figure 6 Fitting results of predicted values and true values of a model under different operating conditions in an embodiment of the present application are shown.
[0049] Figure 7 Results of using Time-GMVAE to classify operating conditions of a DC process dataset in an embodiment of the present application are shown.
[0050] Figure 8 Results of using Time-GMVAE to classify operating conditions of a FCC process dataset in an embodiment of the present application are shown.
[0051] Figure 9 A schematic diagram of predicted results of each model in a TE process is shown.
[0052] Figure 10 A schematic diagram of predicted results of each model in a DC and FCC process is shown.
[0053] Figure 11 A fitting effect diagram of predicted values and true values of each model under a C4 content operating condition in an embodiment of the present application is shown.
[0054] Figure 12 A fitting effect diagram of predicted values and true values of each model under a diesel oil yield operating condition in an embodiment of the present application is shown.
[0055] Figure 13 A system block diagram of an apparatus for constructing a neural network model based on adversarial training in an embodiment of the present application is shown.
[0056] The same or similar reference signs in the drawings represent the same or similar components. DETAILED DESCRIPTION
[0057] In order to make the above-mentioned purposes, features and advantages of the present application more obvious and easy to understand, the specific embodiments of the present application will be described in detail below with reference to the drawings.
[0058] In the following description, numerous specific details are set forth in order to provide a thorough understanding of the present application. The present application, however, can be practiced without the specific details. In other instances, well-known methods have not been described in detail in order not to unnecessarily obscure aspects of the present application.
[0059] As used in this application and the claims, the terms "for example," "e.g.," "may," and "for instance" and the like specify the presence of certain described features, operations, conditions, or the like, but do not foreclose the presence or addition of other described features, operations, conditions, or the like. Furthermore, situations have not only those features or operations but other possible features or operations have been omitted, so as to make a reading of the application more tractable. The terms "a" and "an," as used herein, mean "one or more." The term "another," as used herein, means "at least a second" or "at least one." The term "set," as used herein, means "one or more." The term "plurality," as used herein, means "two or more." The term "another," as used herein, means "at least a second" or "at least one." The term "comprising" is used herein to mean, and is used herein to mean, that the composition or process include, but are not limited to, those elements specifically named. The term "comprising" is used herein to mean, and is used herein to mean, that the composition or process include, but are not limited to, those elements specifically named. The term "consisting essentially of" is used herein to mean and is used herein to mean that the composition or process include, but are not limited to, those elements specifically named, and that other elements not specifically named are present in the composition or process, as long as these other elements do not materially alter the basic and novel characteristics of the claimed composition or process. The term "consisting of" is used herein to mean and is used herein to mean that the composition or process include, but are not limited to, those elements specifically named. The term "method" is used herein to mean and is used herein to mean a combination of steps or operations that are performed to achieve a result.
[0060] Figure 1 A method flow diagram of constructing a neural network model based on adversarial training is shown according to one aspect of the present application, the method comprising steps S11-S14, wherein,
[0061] Step S11, extracting the feature invariants in the working condition process by the feature extractor from the sampling reconstruction data, wherein the sampling reconstruction data is obtained by sampling and reconstructing the working condition data after working condition classification; In this regard, the construction of the neural network model based on adversarial training of the present application includes two stages. The first stage is the working condition division stage, which automatically identifies multiple working conditions of the time series data in the industrial process to obtain working condition labels, and then reconstructs the data to obtain the sampling reconstruction data. The second stage is the adversarial training modeling stage, which trains the required model based on the sampling reconstruction data and the feature extractor, predictor, domain discriminator and target loss function in the model architecture. The working condition data is preferably offline data, which refers to the time series data collected based on the historical operation of the industrial process before model deployment, covering process variables, control parameters and output indicators under multiple known working conditions. The feature extractor F is constructed to input the sampling reconstruction data into the feature extractor F to learn the deep features in the data that can represent the process, and obtain the feature invariants. The feature invariants refer to input features that are stable in different working conditions and can be used to predict target variables, such as the coupling mode between reactor pressure and condenser efficiency.
[0062] Step S12, predicting the key data in the working condition data from the feature invariants by the predictor; In this regard, the predictor C is constructed to model the soft measurement of the industrial process according to the feature invariants obtained by the feature extractor F to predict the target variables, wherein the target variables are the key data in the working condition data, which refers to the key variables in the industrial process that need to be predicted or soft measured, such as reactor temperature, product concentration, etc.
[0063] Step S13, the sampling reconstruction data and the feature invariants are input into the domain discriminator after passing through the gradient reversal layer, and the domain label of the field where the predicted working condition data is located is determined; here, the domain discriminator is constructed, the input data is input into the domain discriminator to determine the domain label, and the corresponding predicted domain label is obtained, wherein the input data includes the sampling reconstruction data input into the feature extractor and the feature invariants output by the feature extractor. A gradient reversal layer (GRL) is added in front of the domain discriminator to make the gradient update of the domain discriminator in the back propagation process update in the direction of the maximum error, the forward propagation process is constant change, and the gradient is reversed in the back propagation process, so that the model learns in the direction of the maximum error of the domain discriminator during the training process.
[0064] Step S14, constructing a target loss function according to the predicted key data and the domain label to complete the adversarial training of the model, and obtaining a neural network model based on adversarial training, wherein the neural network model based on adversarial training includes a feature extractor, a predictor, a domain discriminator and a target loss function. Here, the target loss function of the neural network model is constructed, which can be constructed and optimized based on the predicted key data and the domain label, and then the adversarial training of the model is completed, and the required neural network model based on adversarial training is obtained, such as the model framework shown in Figure 2 The working condition data of different labels is input into the feature extractor, the predictor, the gradient reversal layer and the domain discriminator to train the model, and then the loss function is optimized to obtain an optimized model; for the data distribution offset scene after the model is put into operation, a model with high precision and good generalization is constructed based on limited offline data, the data in the process is analyzed and processed to realize accurate prediction of key indicators, and the model has high prediction precision and fast running efficiency.
[0065] In an embodiment of the present application, the reconstructed data is obtained by the following steps: using an encoder to classify the acquired working condition data to obtain a plurality of working condition label data, wherein the encoder comprises different length convolution kernels; using a decoder to sample the plurality of working condition label data, and reconstructing data to obtain sampling reconstructed data. Here, a time-based Gaussian mixture variational autoencoder (Time-GMVAE) is proposed in the working condition division stage to extract the time sequence mode information in the working condition data, and then classify to obtain a plurality of working condition label data; the decoder down-samples the working condition label data, and then completes data reconstruction. Wherein, the offline data is divided into a plurality of sequence units according to a set time window, each sequence unit is taken as a minimum modeling unit, and then the Time-GMVAE is used to classify the working condition of different sequence data to obtain the working condition label corresponding to each sequence unit, and each sequence unit is regarded as belonging to a working condition category. Wherein, the working condition classification refers to dividing the data into several different operating states (i.e. "working condition") according to the change mode of the industrial process data, and each working condition represents the state of the equipment under a certain specific operating condition. For example, in the Tennessee Eastman (TE) data set, the working condition classification can be divided into: working condition 1 normal operation, working condition 2 condenser efficiency reduction, working condition 3 catalyst activity decline, etc.
[0066] Specifically, the time sequence mode information in the acquired working condition data is extracted using different length convolution kernels to obtain Gaussian mixture distribution parameters, wherein the Gaussian mixture distribution parameters include the mean and variance of each domain; according to the Gaussian mixture distribution parameters, sampling is performed according to the corresponding Gaussian distribution to obtain sampling variables under each Gaussian distribution; the sampling variables are weighted and summed to obtain latent variables of the working condition label. Here, the encoder uses different length convolution kernels to extract the time sequence mode information in the data, and the convolution kernel length can be 1, 3, 5, 7, etc. to effectively capture the sequence features under different time scales, thereby improving the accuracy of working condition classification.
[0067] As shown in Figure 3 , for the working condition classification network Q φ (g|x) and the latent variable encoding network Q φ (z|x,g) in the model encoder part, the Time-GMVAE uses different length convolution kernels to extract the time sequence mode information in the data to better divide different working conditions. After obtaining the mean and variance of each domain, sampling is performed according to the corresponding Gaussian distribution to obtain sampling variables z i under each Gaussian, and the latent variables z obtained by the encoder are obtained by weighted sum according to the probability under each Gaussian distribution. Wherein, the probability calculation formula of each Gaussian component corresponding to the input data is:
[0068] P(g|x)=softmax(fc(ReLU(x★c 1×2 ||x★c 1×3 ||x★c 1×6 ||x★c 1×7 )))
[0069] Where fc represents a fully connected neural network, x is the given input data, c 1×i Represents a convolution kernel of size 1×i, * is the convolution calculation, and || represents the connection operation of the vector.
[0070] Similar Q φ (z|x,g) represents the distribution of the corresponding latent variable given the input data x and the corresponding domain label g. The mean of each domain of the distribution is calculated as:
[0071] μ i =fc μ (ReLU(x★c 1×2 ||x★c 1×3 ||x★c 1×6 ||x★c 1×7 ))
[0072]
[0073] The formula for calculating the variance of each domain of its distribution is:
[0074] σ i =fc σ (ReLU(x★c 1×2 ||x★c 1×3 ||x★c 1×6 ||x★c 1×7 ))
[0075]
[0076] In one embodiment of the present application, the decoder includes two stacked fully connected layers, which can be used to downsample the potential variables of the working condition labels to obtain the mean and variance of the reconstructed data under each Gaussian distribution; data is reconstructed according to the mean and variance of the reconstructed data under each Gaussian distribution to obtain sampled reconstructed data. Here, the decoder network structure uniformly samples each Gaussian distribution in the Gaussian mixture distribution to obtain the sampled variable z i , and then through the network structure p x Get the downsampled and reconstructed data of each Gaussian distribution parameter The mean and variance of Afterwards Perform weighted summation to obtain the final reconstructed output The network structure p xis achieved by a two-layer stacked fully connected network, and the distance calculation between different distributions is symmetric, so the symmetric KL divergence SKL is used as the distance measurement index of Time-GMVAE. The mean calculation formula of the reconstructed data is:
[0077]
[0078] where fc 1,μ is the first layer fully connected neural network, fc 2,μ is the second layer fully connected neural network, ReLU is a nonlinear function, and z represents the latent variable obtained by the encoder coding.
[0079] The variance calculation formula of the reconstructed data is:
[0080] The final reconstruction output formula is:
[0081]
[0082] The distance measurement index calculation formula is:
[0083]
[0084] where P is the probability of the Gaussian component, and Q is the distribution of the latent variable.
[0085] The corresponding closed solution is to calculate the KL divergence in the latent variable inference and the working condition posterior probability term in the model training process using a closed solution form. The closed solution is mainly used for training loss function optimization and working condition label generation. The corresponding closed solution expression calculation formula is:
[0086]
[0087] In an embodiment of the present application, the method further comprises: taking the variational evidence lower bound as the objective function, and jointly optimizing the encoder and the decoder, wherein the variational evidence lower bound includes the reconstruction error and the KL divergence, and the KL divergence is used to calculate the distance between different distributions. Here, the variational evidence lower bound (ELBO) is taken as the objective function in the model training process, and the encoder and the decoder are jointly optimized. ELBO contains two parts of reconstruction error and KL divergence, and its output result is used as the working condition label in subsequent adversarial training, realizing domain alignment and feature extraction; and the corresponding evidence lower bound calculation formula can be updated as:
[0088]
[0089] In an embodiment of the present application, in step S11, a prior topological graph structure is constructed according to the variable relationship between the sample reconstruction data to obtain a feature extractor; and a characteristic invariant in the working condition process is extracted from the sample reconstruction data according to the feature extractor. Here, the feature extractor is constructed, the model receives time series data under multiple working conditions as input, extracts deep features that can represent process states through dynamic graph modeling and attention mechanism, and is used for subsequent prediction tasks. The calculation formula is:
[0090] z = F DGRKAT (x, A st );
[0091] wherein A st is a prior topological graph structure constructed according to the relationship between variables, and the corresponding deep feature z is a splicing vector of the last layer output of the two-way graph recurrent neural network KAGRU in the dynamic graph neural network model DGRKAT.
[0092] In an embodiment of the present application, a predictor C is constructed, and a soft measurement model of the industrial process is established according to the characteristic invariant obtained by the feature extractor to predict the target variable; the predictor includes an output layer network, and the structure of the output layer network satisfies the following formula:
[0093] y = fc out (dropout(fc in (z)));
[0094] wherein the input dimension of fc in is the dimension of the deep feature |z|, and the output dimension is The input dimension of fc out is and the output dimension is 1, and dropout() represents an anti-overfitting probability, which can be set to 0.2.
[0095] In an embodiment of the present application, the domain discriminator includes a first fully connected layer and a second fully connected layer, the input dimension of the first fully connected layer is the dimension of the deep feature |z|, and the output dimension is The input dimension of the second fully connected layer is and the output dimension is the number of categories of working condition classification.
[0096] The domain discriminator is constructed to discriminate the domain label of the deep features output by the feature extractor, and obtain the predicted label of the working condition to which the sample belongs. The structure is based on the design of the adversarial training neural network DANN, and a gradient reversal layer (GRL) is introduced in front of the domain discriminator to realize the adversarial optimization mechanism. The gradient reversal layer does not change the data flow in the forward propagation process, and only exists as an identity mapping; while in the backward propagation process, the gradient direction is reversed, so that the feature extractor is updated in the direction of maximizing the domain discriminator loss. Through this mechanism, the feature extractor is driven to learn the domain-invariant features, and the generalization ability of the model under different working conditions is enhanced. The calculation formula of the GRL is:
[0097] G(x)=x
[0098]
[0099] Two-layer fully connected neural networks are used on the structure of the domain discriminator to reduce the dimension of the deep features, wherein fc1 is the input dimension of the deep feature dimension |z|, and the output dimension is |z| / 2, fc2 is the input dimension of |z| / 2, and the output dimension is the category number obtained by the Time-GMVAE classifying the data, and ReLU is used as the activation function, and softmax is used as the output layer of the multi-domain classification. The calculation formula of the corresponding predicted label d is:
[0100]
[0101] In an embodiment of the present application, in step S14, a regularization term of graph structure learning is introduced in the feature extractor; a first loss function is constructed according to the predicted key data and the feature invariants extracted by the feature extractor; a loss function of the domain discriminator is constructed according to the predicted domain label and the cross-entropy function; and a target loss function is constructed according to the first loss function, the loss function of the domain discriminator and the regularization term of graph structure learning. Here, the predictor C performs regression prediction according to the deep features extracted by the feature extractor F, and the regularization term L F and L S respectively limit the sparsity and smoothness of the graph. The loss function used in the overall framework of the predictor and the feature extractor is used as the first loss function MSE, and the specific calculation formula is:
[0102]
[0103] Wherein N is the total number of samples, K is the number of source domains, n k is the number of samples in the kth source domain, φ C and φ F are the parameters in the predictor and the feature extractor respectively, y k,i is the true value.
[0104] The cross entropy is used as the loss function of the domain discriminator, and then an adaptive weighting method is used to adjust the weight parameters of different loss terms. The cross entropy loss function calculation formula is:
[0105]
[0106] wherein l ce is the cross entropy function, φ D is the parameter of the domain classifier, d k,i is the domain label corresponding to the input data. According to the above embodiment, the target loss function satisfies the following formula:
[0107] L total = L MSE + αL D + βL F + γL S ;
[0108] wherein, L total represents the target loss function, L MSE represents the first loss function, L D represents the loss function of the domain discriminator, L F and L S represent the regularization terms of graph structure learning, and α, β, γ are the learnable weight parameters corresponding to each regularization term. Since there are many weight terms, the specific form of the adaptive weighting method is:
[0109]
[0110] At the beginning of training, α, β, γ are initialized in the range of (0, 1]. The regularization term ln(1+1 / (2α)) of the weight α can effectively prevent the weight from decaying to 0.
[0111] Figure 4 A flowchart of a two-stage dynamic graph neural network construction based on adversarial training under distribution shift in an embodiment of the present application is shown, wherein,
[0112] S1. The model includes two stages: a working condition division stage and an adversarial training modeling stage. In the working condition division stage, a time-based Gaussian mixture variational autoencoder (Time-GMVAE) is proposed, which uses different length convolution kernels to extract time sequence mode information in the data. The convolution kernel length can be 1, 3, 5, 7, etc. to effectively capture sequence features at different time scales and improve the accuracy of working condition classification.
[0113] S2. The model decoder network structure part uniformly samples each Gaussian distribution in the Gaussian mixture distribution to obtain a sampling variable, and then obtains the mean and variance of the sampling reconstruction data under each Gaussian distribution parameter through the decoder network structure.
[0114] S3. A dynamic graph structure graph neural network (DA-DGRKAT) based on confrontation is proposed, a feature extractor F is constructed, and deep features capable of representing the process are learned through the feature extractor.
[0115] S4. A predictor C is constructed, and a soft measurement model of the industrial process is established according to the feature invariants obtained by the feature extractor, so as to predict the target variable.
[0116] S5. A domain discriminator is constructed to discriminate the input data to obtain the corresponding prediction label, wherein the "adversarial training" in the present application refers to the adversarial optimization relationship between the feature extractor and the domain discriminator.
[0117] S6. A two-layer fully connected neural network is used on the structure of the domain discriminator to reduce the dimension of the deep features, and ReLU is used as the activation function and softmax is used as the output layer of multi-domain classification.
[0118] S7. An optimization objective of the overall network framework is proposed, the predictor performs regression prediction according to the deep features extracted by the feature extractor, and a regularization term L F and L S are introduced into the feature extractor to limit the sparsity and smoothness of the graph respectively.
[0119] S8. Cross entropy is used as the loss function of the domain discriminator, and then an adaptive weighting method is used to adjust the weight parameters of different loss terms.
[0120] Through the above steps S1-S8, the model prediction accuracy is improved, and the feasibility and effectiveness of the proposed method are evaluated through the industrial process data set.
[0121] Based on the adversarial training, the domain invariants z of the data under each working condition are learned using DGRKAT as the feature extractor, and then the learned domain invariants are used for downstream task prediction. Finally, in order to verify the effectiveness of the proposed method, the Tennessee Eastman process data set with real working condition labels, the debutanizer device data set without working condition labels and the fluidized catalytic cracking data set are used for experimental verification, and the specific process is as follows:
[0122] The two-stage modeling method proposed in the present application is verified through the Tennessee Eastman (TE), debutanizer device (DC) and fluidized catalytic cracking (FCC) three process data sets.
[0123] Wherein, the Tennessee process is a typical chemical process, and the case is based on the Matlab simulation platform to generate the data sets of four different working conditions of working condition 1, working condition 3, working condition 4 and working condition 5 by initializing the TE process device parameters, wherein each working condition data is sampled at a sampling time interval of 0.01 hours for 72 hours to obtain a data set of 7200 samples. In this case, the first 90% of the first 70% of the data of the working condition 1, 3 and 5 is selected as the training set, and the last 10% is selected as the validation set. On the test set, the last 30% of all working condition data is used as the test set to ensure that the test set of the model contains different distribution data samples outside the training set.
[0124] The TE process is classified into working conditions as shown in Figure 5 The results of using Time-GMVAE to classify the TE process offline data set into working conditions are shown in Figure 5 (A) is a correlation heat map between samples sorted according to working condition classification labels, from which it can be seen that the data is almost equally divided into three working conditions, which is consistent with the actual generated data working condition, and the correlation between the data of the same working condition is obviously higher than that between the data of different working conditions, indicating that the data between the same working conditions has similar operation mode, which confirms the effectiveness of Time-GMVAE in working condition classification. As shown in Figure 5 (B) shows the topological relationship of different working condition data, and the Fruchterman-Reongold layout algorithm is used to draw the connection relationship between different working condition data points. The connected nodes are pulled close by the edges, and the nodes that are not connected are pushed away by the repulsive force between the nodes. From the figure, it can be seen that the data between the same working conditions has more connection relationship and is clustered into a cluster, while the data between different working conditions has only sparse connection relationship, and the data samples are well classified. From the prediction results on the whole test set, except for LSTM and AGCRN in the non-migration method, the rest of the models have high prediction accuracy. From Figure 6 From the fitting effect of the predicted value and the true value of each model under different working conditions, LSTM and AGCRN have a large prediction error because they cannot effectively generalize the new working condition 4 data, so the overall prediction performance is poor. From the prediction effect of each model on the new working condition 4 in the test set, the models based on the migration method have better prediction accuracy than the models based on the non-migration method because they can learn the domain invariants of different working conditions in the training data and better generalize the data with different distributions.
[0125] The depropanizer device (DC) is mainly used to reduce the content of butane C4 at the bottom of the butane tower, and is an important component of the naphtha desulfurization device in the chemical process. The case mainly predicts the butane C4 at the bottom of the depropanizer. The catalytic cracking device (FCC) is a key equipment in the oil refining process to convert heavy oil into light hydrocarbons. Catalysis is used to crack long-chain hydrocarbon molecules at high temperatures, so that they are broken into shorter carbon chain molecules. The case mainly predicts the diesel product yield of the catalytic cracking device. Figure 7 and Figure 8 are the results of using Time-GMVAE to classify the working conditions of the DC process and the FCC process two data sets respectively. As shown in Figure 7 (A), the DC process is divided into two working conditions, and there is high similarity between the samples in each working condition, while there is certain difference between the samples in different working conditions. Figure 7 (B) is the sample topology relationship diagram constructed by using the Fruchterman-Reongold algorithm after 100 sample sampling of the data in different working conditions of the DC process and using the correlation between different samples as the threshold value. From the figure, it can be seen that the connection relationship between different working condition samples is relatively sparse, while the data connection relationship between the same working condition is more dense, and there is a more similar operation mode. In addition, from the FCC working condition classification result shown in Figure 8 , it can be seen that the offline data of the FCC is divided into four different working conditions. Figure 8 (A) is a data correlation heat map, Figure 8 (B) is a topology relationship diagram constructed by sampling 100 samples of each working condition of the FCC and using the correlation 0.01 as the sample connection relationship threshold. Different from the working condition classification results of the DC and TE processes, the connection relationship between different working conditions of the FCC is more dense, which may be related to the fact that the device does not exist in the TE process similar to the intermittent start and stop when the working condition is switched, and there is a certain working condition switching transition, so there is still a certain correlation between the data of different working conditions.
[0126] In the embodiments of the present application, Figure 9 and Figure 10 show the prediction results of the model on the Tennessee Eastman (TE), depropanizer device (DC) and fluid catalytic cracking (FCC) three process data sets. From Figure 9 , it can be seen that the prediction performance of the model based on the non-transfer learning method has a large degree of attenuation when facing new working condition data, and the R 2All are less than 0. Among the models based on the migration method, the method proposed in the application has the highest prediction accuracy. Compared with WAVENet-DA which also uses an adversarial training based method to learn the invariance of different distribution data fields, since the feature extractor DGRKAT can more accurately characterize the industrial process, the learned deep features can retain deeper and more accurate process information, which helps the downstream prediction task of the model, and thus can better generalize the data of the new working condition and has higher prediction accuracy.
[0127] From Figure 10 It can be seen that, unlike the TE process, since the two processes have no real working condition label, the prediction results of the model on the overall working condition are directly analyzed when analyzing the results. From the prediction results of the DC process, since the process is relatively simple and has fewer variables, the overall prediction accuracy of the model is high, and only LSTM and AGCRN in the non-migration method have relatively low prediction accuracy compared with other models because the structure of the model cannot adaptively adjust the data distribution characteristics of different working conditions. In addition, in the migration learning method, NS-Trans based on the structure of the Transformer encoder and decoder can fully capture the correlation between different time data and the current prediction task for attention weighting, and can sequence the stationary module to sequence the stationary data of different distribution working conditions. Compared with the rest of the migration comparison model, the model structure is more complex, and therefore has higher prediction accuracy. The method proposed in the application has the highest accuracy among all comparison models, which may be due to the fact that compared with the migration method model, the feature extraction network of the model proposed in the application uses DGRKAT based on the dynamic graph structure to represent the relationship between variables, so the information contained in the extracted deep features is more representative.
[0128] Figure 11 and Figure 12 The fitting effect of the prediction value and the true value of each model under different working conditions is shown. From the analysis of the experimental results, the method proposed in the application has the highest accuracy among all comparison models, which may be due to the fact that compared with the migration method model, the feature extraction network of the model proposed in the application uses DGRKAT based on the dynamic graph structure to represent the relationship between variables, so the information contained in the extracted deep features is more representative. Compared with the rest of the non-migration method model, it can learn the invariance of different working conditions of data, and improve the generalization of the data under multiple working conditions.
[0129] The application uses Time-GMVAE to divide the offline data into different distributions according to different working conditions. After obtaining the working condition labels corresponding to the offline data, DGRKAT is used as a feature extractor to extract deep features with more process representation of data under different working conditions. Then, based on the adversarial training, the domain invariant learning of data under different working conditions is carried out, and the learned domain invariant is used for prediction output, so as to improve the prediction accuracy of the model under different data distributions. Finally, the TE process data set with real working condition labels and the DC and FCC process data set without real working condition labels are used to verify the effectiveness of the proposed model, and the features of different working conditions and different distribution data after domain invariant learning are visualized. The experimental results show that the proposed method has higher prediction accuracy and generalization when modeling and predicting the data set with multiple distributions and new working condition data.
[0130] Figure 13 A system block diagram of an apparatus for constructing a neural network model based on adversarial training is shown in an embodiment of the application. Referring to Figure 13 The apparatus for constructing a neural network model based on adversarial training 500 can include an internal communication bus 501, a processor 502, a read-only memory (ROM) 503, a random access memory (RAM) 504, a communication port 505, and a hard disk 507. The internal communication bus 501 can realize data communication between the components of the apparatus for constructing a neural network model based on adversarial training. The processor 502 can make judgments and issue prompts. In some embodiments, the processor 502 can be composed of one or more processors.
[0131] The communication port 505 can realize data transmission and communication between the apparatus for constructing a neural network model based on adversarial training and external input / output devices. In some embodiments, the apparatus for constructing a neural network model based on adversarial training can send and receive information and data from the network through the communication port 505. In some embodiments, the apparatus for constructing a neural network model based on adversarial training can perform data transmission and communication with external input / output devices in wired form through the input / output port 506.
[0132] The apparatus for constructing a neural network model based on adversarial training can also include different forms of program storage units and data storage units, such as the hard disk 507, the read-only memory (ROM) 503 and the random access memory (RAM) 504, which can store various data files used by the computer processing and / or communication, and possible program instructions executed by the processor 502. The processor 502 executes these instructions to realize the main part of the method. The results processed by the processor 502 are transmitted to external output devices through the communication port 505 and displayed on the user interface of the output devices.
[0133] For example, the implementation process file of the above-mentioned device for constructing a neural network model based on adversarial training can be a computer program stored in the hard disk 507 and can be loaded into the processor 502 for execution to implement the method for constructing a neural network model based on adversarial training of the present application.
[0134] The present application also provides a computer readable medium having computer instructions stored thereon, wherein the computer readable instructions can be executed by a processor to implement a method for constructing a neural network model based on adversarial training as described above.
[0135] When the method for constructing a neural network model based on adversarial training is implemented as a computer program, it can also be stored in a computer readable storage medium as an article of manufacture. For example, the computer readable storage medium can include, but is not limited to, a magnetic storage device (e.g., a hard disk, a floppy disk, a magnetic strip), an optical disk (e.g., a compact disk (CD), a digital versatile disk (DVD)), a smart card, and a flash memory device (e.g., an electrically erasable programmable read-only memory (EPROM), a card, a stick, a key drive). In addition, the various storage media described herein can represent one or more devices and / or other machine-readable media for storing information. The term "machine-readable medium" can include, but is not limited to, a wireless channel and various other media (and / or storage media) that can store, include, and / or carry code and / or instructions and / or data.
[0136] It should be understood that the above-described embodiments are only illustrative. The embodiments described herein can be implemented in hardware, software, firmware, middleware, microcode, or any combination thereof. For hardware implementation, the processor can be implemented within one or more application specific integrated circuits (ASICs), digital signal processors (DSPs), digital signal processing devices (DSPDs), programmable logic devices (PLDs), field programmable gate arrays (FPGAs), processors, controllers, micro-controllers, microprocessors, and / or other electronic units designed to perform the functions described herein, or a combination thereof.
[0137] Aspects of the application can be implemented in, completely, in hardware, completely in software (including firmware, resident software, micro-code, etc.), or using combinations thereof. The foregoing hardware or software, or combinations thereof, can be referred to as a "data block", "module", "engine", "unit", "component", or "system". A processor can be one or more application specific integrated circuits (ASICs), digital signal processors (DSPs), digital signal processing devices (DAPDs), programmable logic devices (PLDs), field programmable gate arrays (FPGAs), processors, controllers, micro-controllers, microprocessors, or combinations thereof. Furthermore, aspects of the application can be implemented as a computer program product tangibly embodied in one or more computer readable media, including program code coupled to a processor for execution. The computer readable media can include, but is not limited to, magnetic storage devices (e.g., hard disk; floppy disk; magnetic strips...), optical disks (e.g., compact disk (CD); digital versatile disk (DVD)...), smart cards, and flash memory devices (e.g., card; stick; key drive...).
[0138] A computer readable medium can include a propagated data signal with computer program code embodied therein, for example, in baseband or as part of a carrier wave. Such a propagated signal can take any of a variety of forms, including, but not limited to, electro-magnetic, optical, or any combination thereof. Computer readable media can be any media that can be accessed by a computer. Such computer- readable media can include, but are not limited to, storage media such as magnetic storage media (e.g., hard disk; floppy disk; magnetic strips...), optical storage media (e.g., compact disk (CD); digital versatile disk (DVD)...), smart cards, and flash memory devices (e.g., card; stick; key drive...). The computer program product can also include computer readable media embodied in or transmitted through a carrier wave or any other transport medium transmitted over a data network, for example, Ethernet or the Internet, or a wireless transport medium, for example, microwave or satellite transmission.
[0139] Having described several aspects of the basic concepts, it is to be understood that the disclosure has been presented for purposes of example and illustration only, and is not intended to limit the scope of the application to the precise embodiments described. Numerous modifications, adaptations, and variations will be apparent to those skilled in the art in view of the above teachings without departing from the spirit and scope of the application. Therefore, obvious modifications, adaptations, and variations are covered by the application described herein.
[0140] Also, the use of "a" or "an" to describe elements of the application is merely for convenience and is not intended in a limiting sense unless otherwise indicated. Additionally, the various embodiments of the application can be used in combination with each other, as would be understood by one of ordinary skill in the art.
[0141] In some embodiments, numbers that describe amounts, dimensions, and so forth, are used in the description of the embodiments. It should be understood that such numbers are used to describe some embodiments and that such numbers, in some instances, are modified by the modifier "about" or "approximately." Unless otherwise specified, "about" or "approximately" means ±20% of the value of the measured quantity that the term describes. Accordingly, in some embodiments, the numerical parameters in the specification and claims are approximations that can vary depending upon the desired properties sought to be obtained by the individual embodiments. In some embodiments, numerical parameters are approximations that can vary from the stated numerical parameters. In some embodiments, numerical parameters are determined by the use of standard techniques with either an appropriately developed and identified model, or with an appropriately developed and identified standard. In some embodiments, numerical parameters are provided with a margin of error. Although the numerical ranges and parameters setting forth the broad scope of some embodiments of the application are approximations, the numerical values set forth in the specific examples are reported as precisely as practicable.
Claims
1. A method for constructing a neural network model based on adversarial training, applied to the prediction of working condition data, characterized in that: The method comprises: Extracting feature invariants of the working condition process from the sampled and reconstructed data through a feature extractor, wherein the sampled and reconstructed data is obtained by sampling and reconstructing the working condition data after working condition classification; Predicting key data in the operating condition data from the characteristic invariants using a predictor; The sampled reconstructed data and the feature invariant are input into the domain discriminator after passing through the gradient reversal layer to predict the domain label of the domain where the working condition data is located; A target loss function is constructed based on the predicted key data and domain labels to complete the adversarial training of the model and obtain a neural network model based on adversarial training, wherein the neural network model based on adversarial training includes a feature extractor, a predictor, a domain discriminator, and a target loss function.
2. The method according to claim 1, characterized in that The reconstructed data is obtained by the following steps: Using an encoder to classify the acquired working condition data to obtain a plurality of working condition label data, wherein the encoder includes convolution kernels of different lengths; A decoder is used to sample the plurality of operating condition label data, and data is reconstructed on the sampling results to obtain sampled and reconstructed data.
3. The method according to claim 2, characterized in that Use the encoder to classify the acquired working condition data and obtain multiple working condition label data, including: Using convolution kernels of different lengths to extract temporal pattern information from the acquired operating condition data to obtain Gaussian mixture distribution parameters, wherein the Gaussian mixture distribution parameters include the mean and variance of each domain; Sampling is performed according to the corresponding Gaussian distribution according to the Gaussian mixture distribution parameters to obtain sampling variables under each Gaussian distribution; The sampled variables are weighted and summed to obtain potential variables of the working condition labels.
4. The method according to claim 3, characterized in that The decoder includes two stacked fully connected layers, uses the decoder to sample the multiple working condition label data, and reconstructs the sampling results to obtain sampled and reconstructed data, including: Use two stacked fully connected layers to downsample the latent variables of the working condition labels to obtain the mean and variance of the reconstructed data under each Gaussian distribution; Data is reconstructed according to the mean and variance of the reconstructed data under each Gaussian distribution to obtain sampled reconstructed data.
5. The method according to claim 1, wherein The sampled and reconstructed data is passed through the feature extractor to extract the characteristic invariants of the working condition, including: Constructing a priori topological graph structure based on the variable relationship between the sampled and reconstructed data to obtain a feature extractor; The feature invariants of the working condition are extracted from the sampled and reconstructed data according to the feature extractor.
6. The method according to claim 1, characterized in that The predictor includes an output layer network, and the structure of the output layer network satisfies the following formula: y=fc out (dropout(fc in (from))); Among them, fc in The input dimension is the deep feature dimension |z|, and the output dimension is fc out The input dimension is The output dimension is 1, and dropout() indicates the probability of preventing overfitting.
7. The method according to claim 1, characterized in that The domain discriminator includes: a first fully connected layer and a second fully connected layer, wherein the input dimension of the first fully connected layer is the deep feature dimension |z|, and the output dimension is The input dimension of the second fully connected layer is The output dimension is the number of categories of working condition classification.
8. The method according to claim 1, characterized in that Construct the target loss function based on the predicted key data and domain labels, including: Introducing a regularization term for graph structure learning in the feature extractor; Constructing a first loss function based on the predicted key data and the feature invariants extracted by the feature extractor; Construct the loss function of the domain discriminator based on the predicted domain label and cross entropy function; The target loss function is constructed based on the first loss function, the loss function of the domain discriminator, and the regularization term of graph structure learning.
9. The method according to claim 8, characterized in that The objective loss function satisfies the following formula: L total =L MSE +αL D +βL F +γL S ; Among them, L total represents the target loss function, L MSE Represents the first loss function, L D represents the loss function of the domain discriminator, L F and L S represents the regularization term for graph structure learning, and α, β, and γ are the learnable weight parameters corresponding to each regularization term.
10. The method according to claim 2, characterized in that The method further comprises: The encoder and decoder are jointly optimized with a variational evidence lower bound as the objective function, where the variational evidence lower bound includes the reconstruction error and the KL divergence, which is used to calculate the distance between different distributions.
11. A device for constructing a neural network model based on adversarial training, characterized in that: The device comprises: one or more processors; and A memory storing computer readable instructions which, when executed, cause the processor to perform the operations of the method of any one of claims 1 to 10.
12. A computer-readable medium having computer instructions stored thereon, wherein the computer-readable instructions can be executed by a processor to implement the method according to any one of claims 1 to 10.