Data enhancement method and device based on variational auto-encoder and generative adversarial network
By combining the variable autoencoder and the generative adversarial network in the data augmentation method, the problem that it is difficult to balance high quality and diversity in the generated samples in the prior art is solved, and a higher quality and diversity data augmentation effect is achieved.
Patent Information
- Application Number
- CN202510289250.X
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-03-11
- Publication Date
- 2025-05-23
AI Technical Summary
When the prior art uses generative adversarial networks and variational autoencoders for data augmentation, it is difficult for the generated samples to balance high quality and diversity, resulting in reduced authenticity and diversity of generated data and poor quality of data enhancement.
Using a data augmentation method based on variational autoencoder and generative adversarial network, key feature variables are extracted through the encoder and variational characterization layer, new samples are generated using the decoder and generator, and the variational autoencoder and dual adversarial generation network is updated through iteratively until the model converges, improving the data augmentation quality.
It significantly improves the authenticity and diversity of generated data, improves the quality of data enhancement, and solves the problem that the generated samples are difficult to balance in terms of high quality and diversity.
Smart Images

Figure CN120030352A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of data enhancement technology, and in particular to a data enhancement method and device based on variational autoencoder and generative adversarial network. Background Art
[0002] With the deep integration of artificial intelligence and industrial Internet of Things, collecting a large amount of industrial big data from equipment through industrial Internet of Things sensors, and using advanced artificial intelligence algorithms to monitor equipment status, optimize production processes and detect product quality to improve factory production efficiency, quality and safety has become one of the key development directions of intelligent manufacturing in my country. However, it is difficult for artificial intelligence algorithms to achieve good results in actual application. In many practical scenarios (such as equipment status, product quality detection, etc.), they face serious data imbalance problems, which greatly affects the accuracy of artificial intelligence algorithms.
[0003] At present, in order to alleviate the problem of data imbalance in actual scenarios, generative adversarial networks (GAN) and variational autoencoders (VAE) are often used to generate data for minority classes, and the generated new data is merged with the original data to balance the original data set. However, the above data augmentation methods have the problem that the generated samples are difficult to strike a balance between high quality and diversity, which reduces the authenticity and diversity of the generated data, and the quality of data augmentation is poor. Summary of the invention
[0004] In order to significantly improve the authenticity and diversity of data and the quality of data enhancement, the present application provides a data enhancement method and device based on variational autoencoder and generative adversarial network.
[0005] In the first aspect, the present application provides a technical solution adopted by a data enhancement method based on a variational autoencoder and a generative adversarial network:
[0006] A data enhancement method based on variational autoencoder and generative adversarial network, comprising:
[0007] Obtain unbalanced industrial big data as raw data set input;
[0008] Extracting key feature variables from samples of the original dataset using an encoder and a variational representation layer;
[0009] Inputting the key feature variables into a first decoder to obtain a reconstructed sample;
[0010] Input the random vector and sample label into the generator to obtain the generated feature variable;
[0011] The key feature variables and the generated feature variables are input into the first discriminator to obtain the estimated probabilities of the key feature variables and the generated feature variables. The loss function of discriminator 1 is for Among them, z' is the estimated probability of generating the feature variable;
[0012] Inputting the key feature variable into a second decoder to obtain a new sample;
[0013] Inputting the samples of the original data set, the reconstructed samples and the new samples into a second discriminator to obtain estimated probabilities of the samples of the original data set, the reconstructed samples and the new samples;
[0014] Iteratively updating the variational autoencoder and the dual adversarial generative network until the model converges to obtain a target data enhancement model, wherein the dual adversarial generative network is composed of the generator, the first discriminator, and the second discriminator;
[0015] The samples of the original data set, the random vectors and the labels of the samples are input into the target data enhancement model to generate a number of real new samples, and the number of real new samples are mixed with the samples of the original data set to obtain an enhanced data set.
[0016] Optionally, the extracting key feature variables from the samples of the original data set using an encoder and a variational representation layer includes:
[0017] The original data set is preprocessed by data cleaning and feature conversion to obtain a standard data sequence X, where X = {x 1 ,x 2 ,…,x n};
[0018] The encoder is used to extract the latent variable z of the sample x in the standard data sequence X, and the formula is: z=Encoder(x), where Encoder(*) represents a neural network function;
[0019] The latent variable z is input into the variational representation layer to generate the key feature variable z ′ , the formula is: ′ =υ(z), where υ(*) represents the variational Bayesian function.
[0020] Optionally, inputting the key feature variable into a first decoder to obtain a reconstructed sample includes:
[0021] The key feature variable z ′ Input the first decoder based on the neural network to obtain the reconstructed sample x ′ , where x ′The dimension of is the same as that of x, and the formula is: ′ =Decoder1(z ′ ).
[0022] Optionally, the generator is composed of two encoders, including a first encoder and a second encoder, and the random vector and the label of the sample are input into the generator to obtain the generated feature variable, including:
[0023] The random noise N and the label y of the sample x are encoded by the first encoder and the second encoder respectively, and the formula is:
[0024] N e =Encoder1(N)
[0025] y e =Encoder2(y)
[0026] Among them, Encoder1(*) and Encoder2(*) are two different encoders based on neural networks, N e and e have the same dimensions;
[0027] N e and e Fusion to generate feature variable z G , the formula is: G =f(N e ,y e ), where f(*) is the neural network function, z G and z' have the same dimension.
[0028] Optionally, the generator loss L G For L G =Entropy(D 1 (G(N,y)),1),
[0029] Among them, Entropy is the binary cross entropy loss function, D 1 (*) is a neural network-based discriminator 1, G(N,y) is the process of the generator generating data, where G(N,y) in the context of a generative adversarial network (GAN) represents a generator model that receives a noise vector N and a conditional vector y and outputs a generated sample.
[0030] Optionally, inputting the key feature variable into a second decoder to obtain a new sample includes:
[0031] The key feature variable z ′Input the second decoder to get a new sample x″, the specific formula is: x″=Decoder2(z ′ ), where Decoder2(*) is the second decoder.
[0032] Optionally, the loss function L of the first decoder is Dec1 and the loss function L of the second decoder Dec2 for:
[0033] L Dec1 =Entropy(D 2 (Decoder1(z')),1),
[0034] L Dec2 =Entropy(D 2 (Decoder2(z G )),1),
[0035] Among them, D 2 (*) is a neural network function.
[0036] Optionally, the loss function of the first discriminator is for The loss function L of the second discriminator D2 for Where α is a hyperparameter used to balance the loss between real samples and generated samples.
[0037] In a second aspect, the present application provides a data enhancement device based on a variational autoencoder and a generative adversarial network, wherein the data enhancement device based on a variational autoencoder and a generative adversarial network comprises:
[0038] A data acquisition module is used to acquire unbalanced industrial big data as raw data set input;
[0039] A key feature variable extraction module, used to extract key feature variables from samples of the original data set using an encoder and a variational representation layer;
[0040] A reconstructed sample building module, used for inputting the key feature variable into a first decoder to obtain a reconstructed sample;
[0041] The generated feature variable building module is used to input the random vector and the sample label into the generator to obtain the generated feature variable;
[0042] The estimated probability calculation module is used to input the key feature variables and the generated feature variables into the first discriminator to obtain the estimated probabilities of the key feature variables and the generated feature variables, and the loss function of the discriminator 1 for Among them, z' is the estimated probability of generating the feature variable;
[0043] A new sample construction module, used for inputting the key feature variable into a second decoder to obtain a new sample;
[0044] The estimated probability calculation module is used to input the samples of the original data set, the reconstructed samples and the new samples into the second discriminator to obtain the estimated probabilities of the samples of the original data set, the reconstructed samples and the new samples;
[0045] A model training module, used for iteratively updating a variational autoencoder and a dual adversarial generative network until the model converges to obtain a target data enhancement model, wherein the dual adversarial generative network is composed of the generator, the first discriminator, and the second discriminator;
[0046] A data enhancement module is used to input the samples of the original data set, the random vectors and the labels of the samples into the target data enhancement model to generate a number of real new samples, and mix the several real new samples with the samples of the original data set to obtain an enhanced data set.
[0047] Optionally, the key feature variable extraction module is used to pre-process the original data set by data cleaning and feature conversion to obtain a standard data sequence X, where X=
[0048] {x 1 ,x 2 ,…,x n};
[0049] The encoder is used to extract the latent variable z of the sample x in the standard data sequence X, and the formula is: z=Encoder(x), where Encoder(*) represents a neural network function;
[0050] The latent variable z is input into the variational representation layer to generate the key feature variable z ′ , the formula is: ′ =υ(z), where υ(*) represents the variational Bayesian function.
[0051] In summary, the present application includes the following beneficial technical effects:
[0052] The present application utilizes a back-propagation algorithm to iteratively update a variational autoencoder and a dual generative adversarial network until the model converges, utilizes an optimal data augmentation model to enhance an unbalanced industrial data set, extracts key features of minority class samples through an encoder and a variational representation layer, utilizes a first decoder module to reconstruct the extracted key features into samples, inputs the labels and random noise vectors of the minority class samples into a generator module to obtain fused feature variables, inputs the fused feature variables into a second decoder module, outputs generated new samples, mixes the reconstructed samples and the new samples with the original samples to obtain an enhanced data set, thereby improving the authenticity and diversity of the generated data and the quality of data augmentation. BRIEF DESCRIPTION OF THE DRAWINGS
[0053] Figure 1 It is a schematic diagram of the structure of a data enhancement device based on a variational autoencoder and a generative adversarial network in the hardware operating environment involved in the embodiment of the present application;
[0054] Figure 2 It is a flowchart of the first embodiment of the data enhancement method based on variational autoencoder and generative adversarial network of the present application;
[0055] Figure 3 It is a schematic diagram of a variational autoencoder and a dual generative adversarial network in the data enhancement method based on a variational autoencoder and a generative adversarial network in the present application;
[0056] Figure 4 It is a structural block diagram of the first embodiment of the data enhancement device based on variational autoencoder and generative adversarial network of the present application. DETAILED DESCRIPTION
[0057] In order to make the purpose, technical solution and advantages of the present application more clearly understood, the present application is further described in detail below through the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are only used to explain the present application and are not used to limit the present application.
[0058] Reference Figure 1 , Figure 1 A schematic diagram of the structure of a data enhancement device based on a variational autoencoder and a generative adversarial network in the hardware operating environment involved in an embodiment of the present application.
[0059] like Figure 1As shown, the data enhancement device based on the variational autoencoder and the generative adversarial network may include: a processor 1001, such as a central processing unit (CPU), a communication bus 1002, a user interface 1003, a network interface 1004, and a memory 1005. Among them, the communication bus 1002 is used to realize the connection and communication between these components. The user interface 1003 may include a display screen (Display), an input unit such as a keyboard (Keyboard), and the optional user interface 1003 may also include a standard wired interface and a wireless interface. The network interface 1004 may optionally include a standard wired interface and a wireless interface (such as a wireless fidelity (Wireless-Fidelity, Wi-Fi) interface). The memory 1005 may be a high-speed random access memory (Random Access Memory, RAM), or a stable non-volatile memory (Non-VolatileMemory, NVM), such as a disk storage. The memory 1005 may also be a storage device independent of the aforementioned processor 1001.
[0060] Those skilled in the art will understand that Figure 1 The structure shown in does not constitute a limitation on the data enhancement device based on variational autoencoder and generative adversarial network, and may include more or less components than shown in the figure, or combine certain components, or arrange the components differently.
[0061] like Figure 1 As shown, the memory 1005 as a storage medium may include an operating system, a network communication module, a user interface module, and a data enhancement program based on a variational autoencoder and a generative adversarial network.
[0062] exist Figure 1 In the data enhancement device based on variational autoencoder and generative adversarial network shown, the network interface 1004 is mainly used for data communication with the network server; the user interface 1003 is mainly used for data interaction with the user; the processor 1001 and the memory 1005 in the present application can be set in the data enhancement device based on variational autoencoder and generative adversarial network, and the data enhancement device based on variational autoencoder and generative adversarial network calls the data enhancement program based on variational autoencoder and generative adversarial network stored in the memory 1005 through the processor 1001, and executes the data enhancement method based on variational autoencoder and generative adversarial network provided in the embodiment of the present application.
[0063] The present application embodiment provides a data enhancement method based on a variational autoencoder and a generative adversarial network, referring to Figure 2 , Figure 2This is a flow chart of the first embodiment of the data enhancement method based on variational autoencoder and generative adversarial network of the present application.
[0064] In this embodiment, the data enhancement method based on variational autoencoder and generative adversarial network includes the following steps:
[0065] Step S10: Obtain unbalanced industrial big data as an original data set for input.
[0066] In this embodiment, the execution subject of this embodiment is a data enhancement device based on a variational autoencoder and a generative adversarial network, wherein the data enhancement device based on a variational autoencoder and a generative adversarial network has functions such as data processing, data communication and program running. The data enhancement device based on a variational autoencoder and a generative adversarial network can be a computer terminal device or other network device, and of course it can also be other devices with similar functions, and this embodiment does not limit this.
[0067] It should be noted that, in order to alleviate the problem of data imbalance in actual scenarios, data is often generated for minority classes through generative adversarial networks (GAN) and variational autoencoders (VAE), and the generated new data is merged with the original data to balance the original data set. However, the above data augmentation methods have the problem that the generated samples are difficult to strike a balance between high quality and diversity, which reduces the authenticity and diversity of the generated data, and the quality of data augmentation is poor.
[0068] In order to solve the above technical problems, this embodiment uses a back-propagation algorithm to iteratively update the variational autoencoder and the dual generative adversarial network until the model converges, and uses the optimal data enhancement model to enhance the unbalanced industrial data set. The key features of the minority class samples are extracted through the encoder and the variational representation layer, and the extracted key features are reconstructed into samples using the first decoder module. The labels and random noise vectors of the minority class samples are input into the generator module to obtain fused feature variables, and the fused feature variables are input into the second decoder module. The generated new samples are output, and the reconstructed samples and the new samples are mixed with the original samples to obtain an enhanced data set, thereby improving the authenticity and diversity of the generated data and the quality of data enhancement. Specifically, it can be implemented as follows.
[0069] In a specific implementation, in this embodiment, unbalanced industrial big data is first obtained as an original data set, and the original data set is input as an original sample.
[0070] Step S20: extract key feature variables from samples of the original data set using an encoder and a variational representation layer.
[0071] In the specific implementation, the original data set is first preprocessed by data cleaning and feature conversion to obtain a standard data sequence X, where X = {x 1 ,x 2 ,…,x n}. Then the encoder is used to extract the latent variable z of the above sample x, formula (1) is as follows:
[0072] z=Encoder(x) (1)
[0073] Among them, Encoder(*) represents a neural network function.
[0074] Then the latent variable z is input into the variational representation layer to generate the key feature variable z ′ , formula (2) is as follows:
[0075] z ′ =υ(z) (2),
[0076] Where υ(*) represents the variational Bayesian function.
[0077] Step S30: input the key feature variables into the first decoder to obtain reconstructed samples.
[0078] After obtaining the above key characteristic variable z ′ Afterwards, the key feature variable z ′ Input the first decoder based on the neural network (i.e. decoder 1) to obtain the reconstructed sample x ′ , where x ′ The dimension of is the same as that of x, and formula (3) is as follows:
[0079] x ′ =Decoder1(z ′ ) (3).
[0080] It should be noted that in order to maximize the retention of key information in z', the reconstruction loss L is constructed using the mean square error between the original sample x and the reconstructed sample x' rec , to optimize the variational autoencoder, formula (4) is as follows:
[0081] L rec =‖x-x'‖ 2 (4)
[0082] Step S40: Input the random vector and the sample label into the generator to obtain the generated feature variable.
[0083] It should be noted that see Figure 3 The dual adversarial generation network in is mainly composed of a generator and two discriminators to form a dual adversarial training process.
[0084] In a specific implementation, the first encoder and the second encoder are used to encode the random noise N and the label y of the sample x, respectively, and the formula is:
[0085] N e =Encoder1(N) (5)
[0086] y e =Encoder2(y) (6)
[0087] Among them, Encoder1(*) and Encoder2(*) are two different encoders based on neural networks, N e and e have the same dimensions.
[0088] Then N e and e Fusion to generate feature variable z G , the formula is:
[0089] z G =f(N e ,y e ) (7)
[0090] Where f(*) is the neural network function, z G and z' have the same dimension.
[0091] It should be noted that in the first and second adversarial training, the generated features or samples need to be as real as possible to deceive the discriminator, for example, G The difference between z and z' is as small as possible. The discriminator outputs a scalar that distinguishes whether the input is real data or generated data. The discriminator needs to improve its discriminative ability as much as possible to correctly distinguish generated features or samples from real features or samples. Using back propagation, iteratively train the generator and discriminator, the formula is as follows:
[0092]
[0093] Among them, E[*] is the expectation, D(*) is the discriminator, G(*) is the data generator, E[D(*)] is the expectation of the discriminator, and E[1-D(G(*))] is the expectation of the generator. On the one hand, it is hoped that by minimizing E[1-D(G(*))], the features or samples generated by the generator are as close as possible to the real features or samples; on the other hand, it is hoped that by maximizing E[D(*)], the discriminator can distinguish the generated features or samples from the real features or samples as accurately as possible.
[0094] Step S50: inputting the key feature variables and the generated feature variables into a first discriminator to obtain estimated probabilities of the key feature variables and the generated feature variables.
[0095] It should be noted that this is the first adversarial training, and the z generated by the generator G Input the first discriminator (discriminator 1) and get z G is the probability of real samples and generated samples. The purpose of the generator is to make the generated features as real as possible, so the loss of the generator L G It is expressed as follows:
[0096] L G =Entropy(D 1 (G(N,y)),1) (9)
[0097] Where Entropy is a binary cross entropy loss function, where G(N,y) in the context of a generative adversarial network (GAN) represents a generator model that receives a noise vector N and a conditional vector y and outputs a generated sample, D 1 (*) is the discriminator 1 based on the neural network, and G(N,y) is the process of the generator generating data, see formulas (5), (6) and (7). Alternately train the discriminator 1 to generate feature variables z G and key feature variable z' are input into discriminator 1 to obtain z G and z' is the estimated probability of the key feature variable and the generated feature variable. The purpose of discriminator 1 is to distinguish the real features from the generated features as much as possible. Therefore, the loss function of discriminator 1 is It is expressed as follows.
[0098]
[0099] Step S60: input the key feature variable into the second decoder to obtain a new sample.
[0100] It should be noted that the second adversarial training is carried out at this time, and the generated z G Input decoder 2 to get a new sample x", the specific formula is as follows:
[0101] x' = Decoder2(z') (11)
[0102] Among them, Decoder2(*) is the second decoder.
[0103] Step S70: Input the samples of the original data set, the reconstructed samples and the new samples into a second discriminator to obtain estimated probabilities of the samples of the original data set, the reconstructed samples and the new samples.
[0104] The new sample x″ and the reconstructed sample x ′ Input into discriminator 2 in sequence to obtain x″ and x ′ is the probability of real samples and generated samples. The purpose of decoder 1 and decoder 2 is to make the generated samples as real as possible. Therefore, the loss function L of decoder 1 is Dec1 And the loss function L of decoder 2 Dec2 It is expressed as follows:
[0105] L Dec1 =Entropy(D 2 (Decoder1(z ′ )),1) (12)
[0106] L Dec2 =Entropy(D 2 (Decoder2(z G )),1) (13)
[0107] Where D 2 (*) is a neural network function, Decoder1(*) is the process of generating reconstructed samples, see formula (3) for details, and Decoder2(*) is the process of generating new samples, see formula (11) for details.
[0108] Alternately train the discriminator 2, and transform x ′ , x″ and x are input into discriminator 2 in turn, and x ′ , x″ and x are the probabilities of real samples and generated samples. The purpose of discriminator 2 is to distinguish real samples from generated samples as much as possible. Therefore, the loss function L of discriminator 2 is D2 It is expressed as follows:
[0109]
[0110] Among them, α is a hyperparameter used to balance the loss between real samples and generated samples.
[0111] It should be noted that, according to this method, based on the dual adversarial generation network structure in this embodiment, in z G The first adversarial training is performed between and z', which allows the feature z generated by the generator to G The second adversarial training is performed between the data layers x, x' and x", which makes the data x' reconstructed by the variational autoencoder and the data x' generated by the dual adversarial generation network as real as possible.
[0112] Step S80: Iteratively update the variational autoencoder and the dual adversarial generative network until the model converges to obtain the target data enhancement model.
[0113] Step S90: Input the samples of the original data set, the random vectors and the labels of the samples into the target data enhancement model to generate a number of real new samples, and mix the several real new samples with the samples of the original data set to obtain an enhanced data set.
[0114] The back-propagation algorithm is used to iteratively update the variational autoencoder and the dual generative adversarial network until the model converges. The optimal data enhancement model is used to enhance the unbalanced industrial data set, and the target data enhancement model can be obtained through continuous iterative updates.
[0115] Furthermore, this embodiment uses the NSL-KDD dataset widely adopted in the industrial Internet of Things, and evaluates the data enhancement performance of our model in processing unbalanced datasets. NSL-KDD is commonly used for intrusion detection of industrial Internet of Things devices. It basically contains four main attack types, namely Dos, Probe, U2L and U2R. Normal in Table 1 belongs to normal network traffic, which is a benchmark, that is, there is no attack. Table 1 shows the statistics of various attacks. Among them, DoS is the most common attack type, with the largest number, accounting for 35.95% of the total, while Probe, R2L and U2R are less common attack types, accounting for 9.48%, 2.52% and 0.17% respectively.
[0116] category Sample size Proportion Normal 77054 51.88 DoS 53385 35.95 Probe 14077 9.48 R2L 3729 2.52 U2R 252 0.17
[0117] In order to evaluate and verify the performance of this model, we use advanced data enhancement models DAG-GNN, CAE, and RICE as benchmark comparison methods, select DNN as a general classifier, and use accuracy, precision, recall, and F1-score as evaluation indicators. The results of the model are shown in Table 2. Compared with the benchmark comparison method, the method of the present invention greatly improves the accuracy index and achieves higher performance in other evaluation indicators, proving the effectiveness of the method.
[0118]
[0119]
[0120] This embodiment uses a back-propagation algorithm to iteratively update a variational autoencoder and a dual generative adversarial network until the model converges, uses an optimal data enhancement model to enhance an unbalanced industrial data set, extracts key features of minority class samples through an encoder and a variational representation layer, uses a first decoder module to reconstruct the extracted key features into samples, inputs the labels and random noise vectors of the minority class samples into a generator module to obtain fused feature variables, inputs the fused feature variables into a second decoder module, outputs generated new samples, mixes the reconstructed samples and the new samples with the original samples to obtain an enhanced data set, thereby improving the authenticity and diversity of the generated data and the quality of data enhancement.
[0121] Reference Figure 4 , Figure 4 This is a structural block diagram of the first embodiment of the data enhancement device based on variational autoencoder and generative adversarial network in this application.
[0122] like Figure 4 As shown, the data enhancement device based on variational autoencoder and generative adversarial network proposed in the embodiment of the present application includes:
[0123] A data acquisition module 10 is used to acquire unbalanced industrial big data as an original data set for input;
[0124] A key feature variable extraction module 20, used to extract key feature variables from samples of the original data set using an encoder and a variational representation layer;
[0125] A reconstructed sample construction module 30, used to input the key feature variable into a first decoder to obtain a reconstructed sample;
[0126] A generated feature variable construction module 40 is used to input the random vector and the label of the sample into the generator to obtain a generated feature variable;
[0127] The estimated probability calculation module 50 is used to input the key feature variables and the generated feature variables into the first discriminator to obtain the estimated probabilities of the key feature variables and the generated feature variables. The loss function of the discriminator 1 for Among them, z' is the estimated probability of generating the feature variable;
[0128] A new sample construction module 60, used for inputting the key feature variable into a second decoder to obtain a new sample;
[0129] The estimated probability calculation module 50 is used to input the samples of the original data set, the reconstructed samples and the new samples into a second discriminator to obtain the estimated probabilities of the samples of the original data set, the reconstructed samples and the new samples;
[0130] A model training module 70, used for iteratively updating the variational autoencoder and the dual adversarial generative network until the model converges to obtain a target data enhancement model, wherein the dual adversarial generative network is composed of the generator, the first discriminator, and the second discriminator;
[0131] The data enhancement module 80 is used to input the samples of the original data set, the random vectors and the labels of the samples into the target data enhancement model to generate a number of real new samples, and mix the several real new samples with the samples of the original data set to obtain an enhanced data set.
[0132] This embodiment uses a back-propagation algorithm to iteratively update a variational autoencoder and a dual generative adversarial network until the model converges, uses an optimal data enhancement model to enhance an unbalanced industrial data set, extracts key features of minority class samples through an encoder and a variational representation layer, uses a first decoder module to reconstruct the extracted key features into samples, inputs the labels and random noise vectors of the minority class samples into a generator module to obtain fused feature variables, inputs the fused feature variables into a second decoder module, outputs generated new samples, mixes the reconstructed samples and the new samples with the original samples to obtain an enhanced data set, thereby improving the authenticity and diversity of the generated data and the quality of data enhancement.
[0133] It should be understood that the above is only an example and does not constitute any limitation on the technical solution of the present application. In specific applications, technicians in this field can make settings as needed, and the present application does not impose any restrictions on this.
[0134] It should be noted that the workflow described above is merely illustrative and does not limit the scope of protection of the present application. In practical applications, technicians in this field can select part or all of them according to actual needs to achieve the purpose of the present embodiment, and no limitation is made here.
[0135] In addition, for technical details not described in detail in this embodiment, please refer to the data enhancement method based on variational autoencoder and generative adversarial network provided in any embodiment of the present application, which will not be repeated here.
[0136] In addition, it should be noted that, in this article, the terms "include", "comprises" or any other variations thereof are intended to cover non-exclusive inclusion, so that a process, method, article or system including a series of elements includes not only those elements, but also includes other elements not explicitly listed, or also includes elements inherent to such process, method, article or system. In the absence of further restrictions, an element defined by the sentence "comprises a ..." does not exclude the existence of other identical elements in the process, method, article or system including the element.
[0137] The serial numbers of the above-mentioned embodiments of the present application are for description only and do not represent the advantages or disadvantages of the embodiments.
[0138] Through the description of the above implementation methods, those skilled in the art can clearly understand that the above-mentioned embodiment methods can be implemented by means of software plus a necessary general hardware platform, and of course by hardware, but in many cases the former is a better implementation method. Based on such an understanding, the technical solution of the present application, or the part that contributes to the prior art, can be embodied in the form of a software product, which is stored in a storage medium (such as a read-only memory (ROM) / RAM, a magnetic disk, or an optical disk), and includes a number of instructions for a terminal device (which can be a mobile phone, a computer, a server, or a network device, etc.) to execute the methods of each embodiment of the present application.
[0139] The above are only preferred embodiments of the present application, and are not intended to limit the patent scope of the present application. Any equivalent structure or equivalent process transformation made using the contents of the present application specification and drawings, or directly or indirectly applied in other related technical fields, are also included in the patent protection scope of the present application.
Claims
1. A data enhancement method based on variational autoencoder and generative adversarial network, characterized in that: include: Obtain unbalanced industrial big data as raw data set input; Extracting key feature variables from samples of the original dataset using an encoder and a variational representation layer; Inputting the key feature variables into a first decoder to obtain a reconstructed sample; Input the random vector and sample label into the generator to obtain the generated feature variable; The key feature variables and the generated feature variables are input into the first discriminator to obtain the estimated probabilities of the key feature variables and the generated feature variables. The loss function of discriminator 1 is for Among them, z' is the estimated probability of generating the feature variable; Inputting the key feature variable into a second decoder to obtain a new sample; Inputting the samples of the original data set, the reconstructed samples and the new samples into a second discriminator to obtain estimated probabilities of the samples of the original data set, the reconstructed samples and the new samples; Iteratively updating the variational autoencoder and the dual adversarial generative network until the model converges to obtain a target data enhancement model, wherein the dual adversarial generative network is composed of the generator, the first discriminator, and the second discriminator; The samples of the original data set, the random vectors and the labels of the samples are input into the target data enhancement model to generate a number of real new samples, and the number of real new samples are mixed with the samples of the original data set to obtain an enhanced data set.
2. The data enhancement method based on variational autoencoder and generative adversarial network according to claim 1, characterized in that: The extracting key feature variables from the samples of the original data set by using the encoder and the variational representation layer includes: The original data set is preprocessed by data cleaning and feature conversion to obtain a standard data sequence X, where X = {x1, x2, …, x n }; The encoder is used to extract the latent variable z of the sample x in the standard data sequence X, and the formula is: z=Encoder(x), where Encoder(*) represents a neural network function; The latent variable z is input into the variational representation layer to generate the key feature variable z ′ , the formula is: ′ =υ(z), where υ(*) represents the variational Bayesian function.
3. The data enhancement method based on variational autoencoder and generative adversarial network according to claim 2, characterized in that: The step of inputting the key feature variable into a first decoder to obtain a reconstructed sample comprises: The key feature variable z ′ Input the first decoder based on the neural network to obtain the reconstructed sample x ′ , where x ′ The dimension of is the same as that of x, and the formula is: ′ =Decoder1(z ′ ).
4. The data enhancement method based on variational autoencoder and generative adversarial network according to claim 1, characterized in that: The generator is composed of two encoders, including a first encoder and a second encoder. The random vector and the label of the sample are input into the generator to obtain the generated feature variable, including: The random noise N and the label y of the sample x are encoded by the first encoder and the second encoder respectively, and the formula is: N e =Encoder1(N) and e =Encoder2(y) Among them, Encoder1(*) and Encoder2(*) are two different encoders based on neural networks, N e and e have the same dimensions; N e and e Fusion to generate feature variable z G , the formula is: G =f(N e ,y e ), where f(*) is the neural network function, z G and z' have the same dimension.
5. The data enhancement method based on variational autoencoder and generative adversarial network according to claim 4, characterized in that: The generator loss L G For L G =Entropy(D1(G(N,y)),1), where Entropy is the binary cross entropy loss function, D1(*) is the neural network-based discriminator 1, and G(N,y) is the process of the generator generating data, where G(N,y) in the context of the Generative Adversarial Network (GAN) represents a generator model that receives a noise vector N and a conditional vector y and outputs a generated sample.
6. The data enhancement method based on variational autoencoder and generative adversarial network according to claim 3, characterized in that: The step of inputting the key feature variable into a second decoder to obtain a new sample comprises: The key feature variable z ′ Input the second decoder to get a new sample x″, the specific formula is: x″=Decoder2(z ′ ), where Decoder2(*) is the second decoder.
7. The data enhancement method based on variational autoencoder and generative adversarial network according to claim 6, characterized in that: The loss function L of the first decoder is Dec1 and the loss function L of the second decoder Dec2 for: L Dec1 =Entropy(D2(Decoder1(z')),1), L Dec2 =Entropy(D2(Decoder2(z G )),1), Where D2(*) is the neural network function.
8. The data enhancement method based on variational autoencoder and generative adversarial network according to claim 1, characterized in that: The loss function of the first discriminator for The loss function L of the second discriminator D2 for Where α is a hyperparameter used to balance the loss between real samples and generated samples.
9. A data enhancement device based on variational autoencoder and generative adversarial network, characterized in that: The data enhancement device based on variational autoencoder and generative adversarial network includes: A data acquisition module is used to acquire unbalanced industrial big data as raw data set input; A key feature variable extraction module, used to extract key feature variables from samples of the original data set using an encoder and a variational representation layer; A reconstructed sample building module, used for inputting the key feature variable into a first decoder to obtain a reconstructed sample; The generated feature variable building module is used to input the random vector and the sample label into the generator to obtain the generated feature variable; An estimated probability calculation module, used for inputting the key feature variable and the generated feature variable into a first discriminator to obtain estimated probabilities of the key feature variable and the generated feature variable; A new sample construction module, used for inputting the key feature variable into a second decoder to obtain a new sample; The estimated probability calculation module is used to input the samples of the original data set, the reconstructed samples and the new samples into the second discriminator to obtain the estimated probabilities of the samples of the original data set, the reconstructed samples and the new samples. The loss function of discriminator 1 for Among them, z' is the estimated probability of generating the feature variable; A model training module, used for iteratively updating a variational autoencoder and a dual adversarial generative network until the model converges to obtain a target data enhancement model, wherein the dual adversarial generative network is composed of the generator, the first discriminator, and the second discriminator; A data enhancement module is used to input the samples of the original data set, the random vectors and the labels of the samples into the target data enhancement model to generate a number of real new samples, and mix the several real new samples with the samples of the original data set to obtain an enhanced data set.
10. The data enhancement device based on variational autoencoder and generative adversarial network according to claim 9, characterized in that: The key feature variable extraction module is used to pre-process the original data set by data cleaning and feature conversion to obtain a standard data sequence X, where X = {x1, x2, ..., x n }; The encoder is used to extract the latent variable z of the sample x in the standard data sequence X, and the formula is: z=Encoder(x), where Encoder(*) represents a neural network function; The latent variable z is input into the variational representation layer to generate the key feature variable z ′ , the formula is: z ′ =υ(z), where υ(*) represents the variational Bayesian function.