Bidirectional generative adversarial network-based small sample data synthesis method
Through the small sample data synthesis method of two-way generative adversarial network, the diversity and authenticity balance of small sample data sets are solved. The generated data set is visually similar to the original data set and has higher diversity, improving the model and the quality of generated samples is ensured through automated evaluation mechanisms.
Patent Information
- Application Number
- CN202411331762.X
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-09-24
- Publication Date
- 2024-12-20
- Estimated Expiration
- 2044-09-24
AI Technical Summary
During the training of deep learning models, the scarcity and acquisition difficulty of small sample data sets lead to insufficient generalization capabilities of the model. Traditional data augmentation methods and generative adversarial networks are difficult to generate diverse and authentic samples in small sample scenarios. And there is a lack of effective automated evaluation mechanism.
Using a small sample data synthesis method based on a two-way generative adversarial network, two generators and two discriminators are built to optimize the authenticity and diversity of generated samples, introduce an adaptive noise introduction mechanism and an automated evaluation mechanism, and dynamically adjust the network. Parameters to balance the diversity and authenticity of generated samples.
The generated extended dataset is visually and statistically similar to the original dataset, with higher diversity, improving the generalization ability of the model, avoiding pattern crash problems, and ensuring that the quality of the generated samples is in line with expectations through an automated evaluation mechanism.
Smart Images

Figure CN119167091A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of small sample data technology, and in particular to a small sample data synthesis method based on a bidirectional generative adversarial network. Background Art
[0002] In the existing field of artificial intelligence and machine learning, especially in the training process of deep learning models, the scale and quality of the data set have a crucial impact on the performance of the model. However, in many practical application scenarios, obtaining sufficiently large and high-quality labeled data often faces great challenges, especially in the fields of medical image processing and industrial fault detection. Due to the scarcity and difficulty of obtaining samples, the data sets are usually small. The existence of such small sample data sets greatly limits the generalization ability of deep learning models, resulting in poor performance of deep learning models when facing unseen data.
[0003] Traditional data augmentation methods, including rotation, flipping, scaling, and noise injection, increase the diversity of data sets to a certain extent, but the transformation methods are relatively simple and cannot truly generate new samples with rich diversity, and therefore cannot fundamentally solve the problem of small sample data sets.
[0004] The introduction of generative adversarial networks provides a new solution for data synthesis. Through adversarial training of the generator and the discriminator, the generative adversarial network can generate samples with similar distribution to the real data. However, the application of traditional generative adversarial networks in small sample scenarios still faces many challenges. For example, it is difficult to strike a balance between diversity and authenticity of the generated samples, and mode collapse is prone to occur, that is, the generated samples lack diversity, or the generated samples have obvious differences in statistical characteristics from the real samples. In addition, the existing generative adversarial network methods lack an effective automated evaluation mechanism to balance the authenticity and diversity of the generated samples during the sample generation process, resulting in the optimization process of the generator being not accurate enough and it is difficult to dynamically adjust the parameters of the generated network, thus affecting the quality of the final generated data set. Summary of the invention
[0005] One object of the present invention is to propose a small sample data synthesis method based on a bidirectional generative adversarial network. The present invention finds the best balance between the diversity and authenticity of the generated samples, so that the expanded data set is visually similar to the original data set while having higher diversity.
[0006] A small sample data synthesis method based on a bidirectional generative adversarial network according to an embodiment of the present invention includes the following steps:
[0007] S1. Obtain a small sample data set and preprocess the small sample data set, including data cleaning, normalization, and noise filtering;
[0008] S2. Construct a bidirectional generative adversarial network with dual generators and dual discriminators:
[0009] A first generator, used to generate a first synthetic sample data set similar to the original small sample data set;
[0010] A second generator, used to generate a second synthetic sample dataset that is slightly different from the original small sample dataset;
[0011] a first discriminator, used to distinguish a first synthetic sample data set generated by the first generator from a real small sample data set, and to evaluate the authenticity of the first synthetic sample data set;
[0012] A second discriminator is used to distinguish the small sample data set generated by the second generator from the real small sample data set and evaluate the diversity of the second synthetic sample data set;
[0013] S3, initialize the parameters of the first generator, the second generator, the first discriminator and the second discriminator, and perform preliminary training on the first generator, the second generator, the first discriminator and the second discriminator;
[0014] S4, generating an initial synthetic sample data set through the first generator and the second generator, and inputting the sample data set into the first discriminator and the second discriminator for discrimination respectively, wherein the first discriminator evaluates the authenticity of the samples generated by the first generator, and the second discriminator evaluates the diversity of the samples generated by the second generator;
[0015] S5. According to the loss values output by the first discriminator and the second discriminator, the parameters of the first generator and the second generator are reversely updated respectively, where the first generator optimizes the authenticity of the generated samples and the second generator optimizes the diversity of the generated samples;
[0016] S6. Repeat S4 and S5 to continuously optimize the quality of the synthetic sample data set in the alternating training of the first generator and the second generator until the synthetic sample data set meets the predetermined requirements in terms of authenticity and diversity;
[0017] S7, optimize the input of the first generator and the second generator through the adaptive noise introduction mechanism and the data enhancement module to enhance the diversity of the small sample data set. The adaptive noise introduction mechanism dynamically adjusts the noise distribution according to the training stage;
[0018] S8, generating an extended small sample dataset, where the extended small sample dataset is generated by the first generator and the second generator, and is visually and statistically similar to the original small sample dataset, with higher diversity;
[0019] S9. The authenticity and diversity of the generated small sample data set are scored through an automated evaluation mechanism, and the parameters of the bidirectional generative adversarial network are dynamically adjusted according to the evaluation results.
[0020] Optionally, S1 includes the following sub-steps:
[0021] S11. Obtain an initial small sample data set D0. The initial small sample data set contains n samples, each sample x i Belongs to the data space X, that is, D0={x1,x2,…,x n}, where x i represents the i-th data sample;
[0022] S12: Perform data cleaning on the initial small sample data set D0, remove incomplete or abnormal data points, and generate a cleaned small sample data set D1, where The cleaning operation is expressed as:
[0023] D1={x i ∈D0|satisfies the cleaning condition};
[0024] S13, normalize the cleaned small sample data set D1, and normalize all sample data x i ∈D1 is mapped to the standard range [a, b] to obtain the normalized small sample data set D2;
[0025] S14, performing noise filtering on the normalized small sample data set D2, removing or suppressing the random noise components in the small sample data set, and generating the final preprocessed small sample data set D pre :
[0026] D pre ={x′ i ∈D2|filtered by noise}.
[0027] Optionally, S2 includes the following sub-steps:
[0028] S21, build the first generator G1 to generate the small sample data set D after final preprocessing pre Similar first synthetic sample dataset D gen1 , where the first generator G1 is fed with a noise vector Generate sample data and combine the feature distribution in the latent space Z1 to generate the first synthetic data sample x gen1 :
[0029]
[0030] Among them, W0 and w1 are the weight matrices of the first generator G1, b0 and b1 are the bias vectors of the first generator G1, σ is the activation function, w1 is the adjustable parameter in the first generator, z1 represents the noise vector, x gen1 Represents the generated first synthetic sample data;
[0031] S22, build the second generator G2 to generate the final preprocessed small sample data set D pre Different second synthetic sample dataset D gen2 , where the second generator G2 is fed with the input noise vector Generate sample data, and fine-tune the diversity adjustment parameter λ during the generation process, so that the generated second synthetic sample data set D gen2 Diversity in data space X:
[0032]
[0033] Among them, W1 and W2 are the weight matrices of the second generator G2, b1 and b2 are bias vectors, λ is the diversity adjustment parameter, z2 represents the noise vector, x gen2 Represents the generated second synthetic sample data;
[0034] S23, construct the first discriminator D1, used to distinguish the first synthetic sample data set D generated by the first generator G1 gen1 And the final preprocessed small sample data set D pre , and output about the first synthetic sample data set D gen1 Evaluation indicators of authenticity
[0035]
[0036] Among them, D1(x i ) represents the first discriminator D1 for the real sample x i The discriminant output of Represents the synthetic sample generated by the first generator G1 α is the regularization parameter, is the two-norm distance between the weight matrices of the first generator;
[0037] S24, construct a second discriminator D2 to distinguish the second synthetic sample data set D generated by the second generator G2 gen2 And the final preprocessed small sample data set D pre , and output about the second synthetic sample data set D gen2 Diversity evaluation indicators
[0038]
[0039] Among them, D2(x i ) represents the second discriminator D2 for the real sample x i The discriminant output of Represents the synthetic sample generated by the second generator G2 β is the regularization parameter, represents the variance of the generated samples.
[0040] Optionally, S3 includes the following sub-steps:
[0041] S31. Initialize the parameters of the first generator G1 and Parameters of the second generator G2 and Parameters of the first discriminator D1 Hehe And the parameters of the second discriminator D2 and
[0042] S32, select a learning rate η and a batch size m, and determine the initial training rounds T of the generator and the discriminator, where the learning rate η determines the step size of each parameter update, the batch size m affects the number of data samples used for each training, and the number of training rounds T determines the initial training intensity of the entire model;
[0043] S33, by random sampling from a small sample data set D pre Draw a small batch of samples x from (i) ∈D pre , while from the noise distribution and Extract the noise vectors and where i = 1, 2, ..., m, the noise vector and As the input of the first generator G1 and the second generator G2, respectively, to generate the corresponding synthetic samples, the distribution of the noise vector p z1 (z) and p z2 (z) determine the diversity of generated samples;
[0044] S34, using the extracted noise vector and Calculate the first synthetic data samples of the first generator G1 and the second generator G2 respectively and the second synthetic data sample And calculate the loss function through the first discriminator D1 and the second discriminator D2 and
[0045]
[0046] Among them, D1(x (i) ) and D2(x (i) ) represent the first discriminator D1 and the second discriminator D2 for the real sample x (i) The discriminant output of and Represents the discriminant output of the generated sample;
[0047] S35. Repeat steps S33 to S34 until the predetermined number of training rounds T is completed, and the generator and discriminator models after preliminary training are generated.
[0048] Optionally, S5 includes the following sub-steps:
[0049] S51, according to the output loss value of the first discriminator D1 Calculate the gradient of the first generator G1:
[0050]
[0051] in, represents the weight matrix of the first generator G1, represents the loss value of the i-th sample, The i-th synthetic sample generated by the first generator G1;
[0052] S52, update the parameters of the first generator G1 and To optimize the reality of the generated samples:
[0053]
[0054] in, and They are loss functions The weight matrix and the bias vector The gradient of
[0055] S53, according to the output loss value of the second discriminator D2 Calculate the gradient of the second generator G2:
[0056]
[0057] in, represents the weight matrix of the second generator G2, represents the loss value of the i-th sample, The i-th synthetic sample generated by the second generator G2;
[0058] S54. Update the parameters of the second generator G2 and To optimize the diversity of generated samples:
[0059]
[0060] in, and They are loss functions The weight matrix and the bias vector The gradient of
[0061] S55. Repeat steps S51 to S54 until the samples generated by the first generator G1 reach the predetermined authenticity standard and the samples generated by the second generator G2 reach the predetermined diversity standard, thus completing the reverse update process of the parameters of the bidirectional generative adversarial network.
[0062] Optionally, the S8 includes the following sub-steps:
[0063] S81. Generate an extended small sample dataset D using the optimized first generator G1 gen1 , where each generated sample By the noise vector generate:
[0064]
[0065] in, represents the jth noise vector, is the weight matrix of the first optimized generator, For the jth extended sample generated, the extended sample dataset D gen1 It consists of n1 generated samples, namely:
[0066]
[0067] S82. Generate extended small sample data D using the optimized second generator G2 gen2 , where each generated sample By the noise vector generate:
[0068]
[0069] in, represents the kth noise vector, is the weight matrix of the optimized second generator, λ is the diversity adjustment parameter, For the kth extended sample generated, the extended sample dataset D gen2 It consists of n2 generated samples, namely:
[0070]
[0071] S83, the extended sample data set D generated by the first generator G1 gen1 The extended sample dataset D generated by the second generator G2 gen2 Merge to generate the final expanded small sample dataset D exp :
[0072] D exp =D gen1 ∪D gen2 ;
[0073] Among them, D exp Contains all generated samples and is visually and statistically comparable to the original small sample dataset D pre resemblance;
[0074] S84. Generate an extended small sample data set D exp Verify the visual and statistical properties of the extended small sample dataset to make it visually similar to the original dataset D pre Similar, and statistical analysis is performed to ensure that the sample distribution of the extended dataset covers a wider sample space.
[0075] Optionally, S9 includes the following sub-steps:
[0076] S91. Generate an extended small sample data set D exp Perform authenticity scoring and use the first discriminator D1 to evaluate each sample To discriminate output And calculate the overall authenticity score
[0077]
[0078] Among them, n exp Represents the extended dataset D exp The total number of samples in is the lth extended sample, Reflects the overall performance of the generated dataset in terms of authenticity;
[0079] S92. Generate an extended small sample data set D exp Perform diversity scoring and use statistical methods to calculate the distribution characteristics of the generated samples to obtain the overall diversity score
[0080]
[0081] Among them, Var(D exp ) is the variance of the expanded data set, μ exp Represents the extended dataset D exp The mean vector of Used to evaluate the diversity of generated datasets;
[0082] S93. Combined authenticity scoring and diversity scores The comprehensive results are used to calculate the comprehensive score Used to dynamically adjust the parameters of the bidirectional generative adversarial network:
[0083]
[0084] Among them, α1 and β1 are weight coefficients, which are used to balance the impact of authenticity and diversity in the comprehensive score. Indicates the overall quality of the generated samples;
[0085] S94, based on comprehensive score As a result, the parameters of the first generator G1 and the second generator G2 are dynamically adjusted and
[0086] S95, repeat steps S91 to S94 until the comprehensive score S total By meeting the predetermined standards, the optimization adjustment of the parameters of the generative adversarial network is completed, ensuring that the generated small sample data set meets the requirements in terms of authenticity and diversity.
[0087] The beneficial effects of the present invention are:
[0088] (1) The present invention is based on a small sample data synthesis method based on a bidirectional generative adversarial network. Through the design of dual generators and dual discriminators, a significant technical breakthrough has been achieved in the expansion of small sample data sets. By constructing a first generator and a second generator, the present method can simultaneously generate synthetic sample data sets that are similar to and slightly different from the original small sample data set. The dual generator architecture effectively solves the contradiction between diversity and authenticity in traditional bidirectional generative adversarial networks. By optimizing the outputs of the two generators respectively, the optimal balance between the diversity and authenticity of the generated samples is found, so that the expanded data set is visually similar to the original data set while having a higher diversity.
[0089] (2) The dual discriminator mechanism proposed in the present invention greatly improves the quality of generated samples. The first discriminator focuses on evaluating the authenticity of the generated samples to ensure that the generated samples are consistent with the real samples in statistical characteristics. The second discriminator is used to evaluate the diversity of the generated samples. Through the two-way evaluation mechanism, the generator can more accurately optimize the data distribution of the generated samples, effectively avoiding the mode collapse problem, so that the generated samples not only cover the main features of the original samples, but also contain rich variation information, thereby improving the generalization ability of model training.
[0090] (3) The present invention introduces an automated evaluation mechanism in the generation process. By scoring the authenticity and diversity of the generated samples and dynamically adjusting the parameters of the generator and the discriminator, the bidirectional generative adversarial network has the ability to adaptively adjust during the training process, so that the generated samples are more in line with the expected quality requirements. The introduction of the comprehensive score not only significantly improves the overall quality of the generated samples, but also provides an effective feedback signal for the training process of the bidirectional generative adversarial network, avoiding the problem of unstable generation effect caused by the lack of an evaluation mechanism in traditional methods.
[0091] (4) The present invention also achieves continuous optimization of the quality of generated samples by dynamically adjusting the weight matrix and bias vector of the generator. During the training process, the network parameters can be adaptively adjusted according to the real-time performance of the generated samples to ensure that the generated samples achieve an optimal balance between diversity and authenticity. BRIEF DESCRIPTION OF THE DRAWINGS
[0092] The accompanying drawings are used to provide a further understanding of the present invention and constitute a part of the specification. Together with the embodiments of the present invention, they are used to explain the present invention and do not constitute a limitation of the present invention. In the accompanying drawings:
[0093] Figure 1 A flowchart of a small sample data synthesis method based on a bidirectional generative adversarial network proposed by the present invention;
[0094] Figure 2 This is a schematic diagram of the framework of a dual generator-dual discriminator structure in a small sample data synthesis method based on a bidirectional generative adversarial network proposed in the present invention. DETAILED DESCRIPTION
[0095] The present invention will now be described in further detail with reference to the accompanying drawings. These drawings are simplified schematic diagrams, which only illustrate the basic structure of the present invention in a schematic manner, and therefore only show the components related to the present invention.
[0096] refer to Figure 1-2 , a small sample data synthesis method based on a bidirectional generative adversarial network, comprising the following steps:
[0097] S1. Obtain a small sample data set and preprocess the small sample data set, including data cleaning, normalization, and noise filtering;
[0098] S2. Construct a bidirectional generative adversarial network with dual generators and dual discriminators:
[0099] A first generator, used to generate a first synthetic sample data set similar to the original small sample data set;
[0100] A second generator, used to generate a second synthetic sample dataset that is slightly different from the original small sample dataset;
[0101] a first discriminator, used to distinguish a first synthetic sample data set generated by the first generator from a real small sample data set, and to evaluate the authenticity of the first synthetic sample data set;
[0102] A second discriminator is used to distinguish the small sample data set generated by the second generator from the real small sample data set and evaluate the diversity of the second synthetic sample data set;
[0103] S3, initialize the parameters of the first generator, the second generator, the first discriminator and the second discriminator, and perform preliminary training on the first generator, the second generator, the first discriminator and the second discriminator;
[0104] S4, generating an initial synthetic sample data set through the first generator and the second generator, and inputting the sample data set into the first discriminator and the second discriminator for discrimination respectively, wherein the first discriminator evaluates the authenticity of the samples generated by the first generator, and the second discriminator evaluates the diversity of the samples generated by the second generator;
[0105] S5. According to the loss values output by the first discriminator and the second discriminator, the parameters of the first generator and the second generator are reversely updated respectively, where the first generator optimizes the authenticity of the generated samples and the second generator optimizes the diversity of the generated samples;
[0106] S6. Repeat S4 and S5 to continuously optimize the quality of the synthetic sample data set in the alternating training of the first generator and the second generator until the synthetic sample data set meets the predetermined requirements in terms of authenticity and diversity;
[0107] S7, optimize the input of the first generator and the second generator through the adaptive noise introduction mechanism and the data enhancement module to enhance the diversity of the small sample data set. The adaptive noise introduction mechanism dynamically adjusts the noise distribution according to the training stage;
[0108] S8, generating an extended small sample dataset, where the extended small sample dataset is generated by the first generator and the second generator, and is visually and statistically similar to the original small sample dataset, with higher diversity;
[0109] S9. The authenticity and diversity of the generated small sample data set are scored through an automated evaluation mechanism, and the parameters of the bidirectional generative adversarial network are dynamically adjusted according to the evaluation results.
[0110] In this implementation, S1 includes the following sub-steps:
[0111] S11. Obtain an initial small sample data set D0. The initial small sample data set contains n samples, each sample x i Belongs to the data space X, that is, D0={x1,x2,…,x n}, where x i represents the i-th data sample;
[0112] S12: Perform data cleaning on the initial small sample data set D0, remove incomplete or abnormal data points, and generate a cleaned small sample data set D1, where The cleaning operation is expressed as:
[0113] D1={x i ∈D0|satisfies the cleaning condition};
[0114] S13, normalize the cleaned small sample data set D1, and normalize all sample data x i ∈D1 is mapped to the standard range [a, b] to obtain the normalized small sample data set D2;
[0115] S14, performing noise filtering on the normalized small sample data set D2, removing or suppressing the random noise components in the small sample data set, and generating the final preprocessed small sample data set D pre :
[0116] D pre ={x′ i ∈D2|filtered by noise}.
[0117] In this implementation, S2 includes the following sub-steps:
[0118] S21, build the first generator G1 to generate the small sample data set D after final preprocessing pre Similar first synthetic sample dataset D gen1 , where the first generator G1 is fed with a noise vector Generate sample data and combine the feature distribution in the latent space Z1 to generate the first synthetic data sample x gen1 :
[0119]
[0120] Among them, W0 and w1 are the weight matrices of the first generator G1, b0 and b1 are the bias vectors of the first generator G1, σ is the activation function, w1 is the adjustable parameter in the first generator, z1 represents the noise vector, x gen1 Represents the generated first synthetic sample data;
[0121] S22, build the second generator G2 to generate the final preprocessed small sample data set D pre Different second synthetic sample dataset D gen2 , where the second generator G2 is fed with the input noise vector Generate sample data, and fine-tune the diversity adjustment parameter λ during the generation process, so that the generated second synthetic sample data set D gen2 Diversity in data space X:
[0122]
[0123] Among them, W1 and W2 are the weight matrices of the second generator G2, b1 and b2 are bias vectors, λ is the diversity adjustment parameter, z2 represents the noise vector, x gen2 Represents the generated second synthetic sample data;
[0124] S23, construct the first discriminator D1, used to distinguish the first synthetic sample data set D generated by the first generator G1 gen1 And the final preprocessed small sample data set D pre , and output about the first synthetic sample data set D gen1 Evaluation indicators of authenticity
[0125]
[0126] Among them, D1(x i ) represents the first discriminator D1 for the real sample x i The discriminant output of Represents the synthetic sample generated by the first generator G1 α is the regularization parameter, is the two-norm distance between the weight matrices of the first generator;
[0127] S24, construct a second discriminator D2 to distinguish the second synthetic sample data set D generated by the second generator G2 gen2 And the final preprocessed small sample data set D pre, and output about the second synthetic sample data set D gen2 Diversity evaluation indicators
[0128]
[0129] Among them, D2(x i ) represents the second discriminator D2 for the real sample x i The discriminant output of Represents the synthetic sample generated by the second generator G2 β is the regularization parameter, represents the variance of the generated samples.
[0130] In this implementation, S3 includes the following sub-steps:
[0131] S31. Initialize the parameters of the first generator G1 and Parameters of the second generator G2 and Parameters of the first discriminator D1 Hehe And the parameters of the second discriminator D2 and
[0132] S32, select a learning rate η and a batch size m, and determine the initial training rounds T of the generator and the discriminator, where the learning rate η determines the step size of each parameter update, the batch size m affects the number of data samples used for each training, and the number of training rounds T determines the initial training intensity of the entire model;
[0133] S33, by random sampling from a small sample data set D pre Draw a small batch of samples x from (i) ∈D pre , while from the noise distribution and Extract the noise vectors and where i = 1, 2, ..., m, the noise vector and As the input of the first generator G1 and the second generator G2, respectively, to generate the corresponding synthetic samples, the distribution of the noise vector and Determine the diversity of generated samples;
[0134] S34, using the extracted noise vector and Calculate the first synthetic data samples of the first generator G1 and the second generator G2 respectively and the second synthetic data sample And calculate the loss function through the first discriminator D1 and the second discriminator D2 and
[0135]
[0136] Among them, D1(x (i) ) and D2(x (i) ) represent the first discriminator D1 and the second discriminator D2 for the real sample x (i) The discriminant output of and Represents the discriminant output of the generated sample;
[0137] S35. Repeat steps S33 to S34 until the predetermined number of training rounds T is completed, and the generator and discriminator models after preliminary training are generated.
[0138] In this implementation, S5 includes the following sub-steps:
[0139] S51, according to the output loss value of the first discriminator D1 Calculate the gradient of the first generator G1:
[0140]
[0141] in, represents the weight matrix of the first generator G1, represents the loss value of the i-th sample, The i-th synthetic sample generated by the first generator G1;
[0142] S52, update the parameters of the first generator G1 and To optimize the reality of the generated samples:
[0143]
[0144] in, and They are loss functions The weight matrix and the bias vector The gradient of
[0145] S53, according to the output loss value of the second discriminator D2 Calculate the gradient of the second generator G2:
[0146]
[0147] in, represents the weight matrix of the second generator G2, represents the loss value of the i-th sample, The i-th synthetic sample generated by the second generator G2;
[0148] S54. Update the parameters of the second generator G2 and To optimize the diversity of generated samples:
[0149]
[0150] in, and They are loss functions The weight matrix and the bias vector The gradient of
[0151] S55. Repeat steps S51 to S54 until the samples generated by the first generator G1 reach the predetermined authenticity standard and the samples generated by the second generator G2 reach the predetermined diversity standard, thus completing the reverse update process of the parameters of the bidirectional generative adversarial network.
[0152] In this implementation, S8 includes the following sub-steps:
[0153] S81. Generate an extended small sample dataset D using the optimized first generator G1 gen1 , where each generated sample By the noise vector generate:
[0154]
[0155] in, represents the jth noise vector, is the weight matrix of the first optimized generator, For the jth extended sample generated, the extended sample dataset D gen1 It consists of n1 generated samples, namely:
[0156]
[0157] S82. Generate extended small sample data D using the optimized second generator G2 gen2 , where each generated sample By the noise vector generate:
[0158]
[0159] in, represents the kth noise vector, is the weight matrix of the optimized second generator, λ is the diversity adjustment parameter, For the kth extended sample generated, the extended sample dataset D gen2 It consists of n2 generated samples, namely:
[0160]
[0161] S83, the extended sample data set D generated by the first generator G1 gen1 The extended sample dataset D generated by the second generator G2 gen2 Merge to generate the final expanded small sample dataset D exp :
[0162] D exp =D gen1 ∪D gen2 ;
[0163] Among them, D exp Contains all generated samples and is visually and statistically comparable to the original small sample dataset D pre resemblance;
[0164] S84. Generate an extended small sample data set D exp Verify the visual and statistical properties of the extended small sample dataset to make it visually similar to the original dataset D pre Similar, and statistical analysis is performed to ensure that the sample distribution of the extended dataset covers a wider sample space.
[0165] In this implementation, S9 includes the following sub-steps:
[0166] S91. Generate an extended small sample data set D exp Perform authenticity scoring and use the first discriminator D1 to evaluate each sample To discriminate output And calculate the overall authenticity score
[0167]
[0168] Among them, n exp Represents the extended dataset D exp The total number of samples in is the lth extended sample, S real Reflects the overall performance of the generated dataset in terms of authenticity;
[0169] S92. Generate an extended small sample data set D expPerform diversity scoring and use statistical methods to calculate the distribution characteristics of the generated samples to obtain the overall diversity score
[0170]
[0171] Among them, Var(D exp ) is the variance of the expanded data set, μ exp Represents the extended dataset D exp The mean vector of Used to evaluate the diversity of generated datasets;
[0172] S93. Combined authenticity scoring and diversity scores The comprehensive results are used to calculate the comprehensive score Used to dynamically adjust the parameters of the bidirectional generative adversarial network:
[0173]
[0174] Among them, α1 and β1 are weight coefficients, which are used to balance the impact of authenticity and diversity in the comprehensive score. Indicates the overall quality of the generated samples;
[0175] S94, based on comprehensive score As a result, the parameters of the first generator G1 and the second generator G2 are dynamically adjusted and
[0176] S95, repeat steps S91 to S94 until the comprehensive score is By meeting the predetermined standards, the optimization adjustment of the parameters of the generative adversarial network is completed, ensuring that the generated small sample data set meets the requirements in terms of authenticity and diversity.
[0177] Embodiment 1:
[0178] In order to verify the feasibility and effectiveness of the present invention, verification was carried out in Example 1. From June 2023 to August 2023, the Medical Imaging Center of a large hospital conducted a study on CT imaging diagnosis of early lung cancer. The study aimed to improve the accuracy of early detection of lung cancer. However, due to the scarcity of early lung cancer cases, the Medical Imaging Center only collected CT imaging data of 120 confirmed patients. The imaging data of each patient contained 12 slice images, and the final initial data set totaled 1440 annotated images. Due to the limited number of samples, the training effect of the deep learning model on the data set was not ideal, and there was an obvious overfitting phenomenon. In order to improve the generalization ability of the model, the Medical Imaging Center decided to adopt the data synthesis method based on the bidirectional generative adversarial network of the present invention to expand the existing small sample data set.
[0179] The research team first preprocessed the initial small sample data set, including data cleaning, noise filtering and normalization, to obtain the processed data set. Subsequently, the team carried out data synthesis on the hospital's high-performance computing server using the method of the present invention. On July 15, 2023, the team officially launched the training process of the bidirectional generative adversarial network. The initial parameters required for training were set according to the characteristics of the processed data set. The initial learning rate was set to 0.0002 and the batch size was set to 64.
[0180] During the training process, the system first generated synthetic samples similar to the original CT images through the first generator. After the first training phase, on July 20, 2023, the team conducted a preliminary evaluation of the 1,000 synthetic images generated. The evaluation found that about 85% of the generated images were visually highly similar to the original images, but 15% of the images had distortion in details, especially at the edges of the images. For this reason, the research team fine-tuned the network parameters on July 21, 2023, especially focusing on the weights of the discriminator, and optimizing its ability to discriminate detail features.
[0181] Subsequently, the team used a second generator to generate synthetic samples that were slightly different from the original images to increase the diversity of the dataset. By July 25, 2023, the system had generated 1,200 diverse synthetic images. To ensure the quality of these images, the team introduced an automated evaluation mechanism to score the authenticity and diversity of the generated samples. The scoring results showed that 80% of the images had a significant improvement in diversity but a slight decrease in authenticity. For further optimization, the team again adjusted the weight parameters of the generator and reduced the learning rate to balance the diversity and authenticity of the images.
[0182] On August 1, 2023, after multiple rounds of iterative training, 6,000 high-quality synthetic CT images were finally generated. The synthetic CT images are visually highly similar to the original images and cover more sample variations in statistical characteristics. The team randomly selected 300 of them for comparison with the original images and found that 92% of the generated images are visually almost the same as the real images, and only 8% of the images have slight differences in some details. Experts scored the generated images through blind tests, and the average score was 8.8 / 10, which is smaller than the original image score of 9.2 / 10 and does not affect the accuracy of medical diagnosis.
[0183] To verify the effectiveness of the extended data set, the research team conducted comparative training on the 6,000 extended data sets and the original data set of only 1,440 images. The experiment was conducted in the hospital's computer laboratory from August 10, 2023 to August 15, 2023. The convolutional neural network model was used for training. The data comparison results are shown in Table 1 below:
[0184] Table 1 Experimental results comparison data
[0185]
[0186] By comparing the data, it can be seen that the extended data set generated by the method of the present invention significantly improves the validation set accuracy of the model from 83.6% to 91.3%, and the loss value is reduced from 0.42 to 0.28, indicating that the performance of the model on the extended data set is more stable. More importantly, the convergence time of the model is shortened from 5.2 hours to 3.7 hours, showing that the extended data set not only improves the accuracy of the model, but also accelerates the training process. In addition, the degree of overfitting of the model is significantly reduced, indicating that the generalization ability of the model is enhanced by expanding the data set.
[0187] During the experiment, the research team also found that the extended data set generated using the method of the present invention can cover more early characteristic areas of lung cancer. Through comparative analysis, about 18% of the 6,000 images generated contained tiny nodule features that were not labeled in the original data set, which is of great medical significance and can significantly improve the diagnosis rate of early lung cancer. The expert group further verified these features and confirmed that the generated images are not only highly realistic visually, but also can capture more potential lesion information, which provides great help for subsequent clinical applications.
[0188] In summary, the method of the present invention has demonstrated its excellent application effect in the field of medical image processing. By generating high-quality and diverse synthetic data sets, it has successfully solved the problems of insufficient diversity and poor authenticity in the expansion of small sample data sets, providing a solid data foundation for model training, and significantly improving the generalization ability and diagnostic accuracy of the model. It is of great significance in actual clinical applications and can help doctors detect early lesions of lung cancer earlier and more accurately, thereby improving the cure rate of patients.
[0189] The present invention is based on a small sample data synthesis method of a bidirectional generative adversarial network. Through the design of dual generators and dual discriminators, a significant technical breakthrough has been achieved in the expansion of small sample data sets. By constructing a first generator and a second generator, the method can simultaneously generate synthetic sample data sets that are similar to and slightly different from the original small sample data set. The dual generator architecture effectively solves the contradiction between diversity and authenticity in traditional bidirectional generative adversarial networks. By optimizing the outputs of the two generators respectively, the optimal balance between the diversity and authenticity of the generated samples is found, so that the expanded data set is visually similar to the original data set while having a higher diversity.
[0190] The dual discriminator mechanism proposed in the present invention greatly improves the quality of generated samples. The first discriminator focuses on evaluating the authenticity of the generated samples to ensure that the generated samples are consistent with the real samples in statistical characteristics. The second discriminator is used to evaluate the diversity of the generated samples. Through the two-way evaluation mechanism, the generator can more accurately optimize the data distribution of the generated samples, effectively avoiding the mode collapse problem, so that the generated samples not only cover the main features of the original samples, but also contain rich variation information, thereby improving the generalization ability of model training.
[0191] The present invention introduces an automated evaluation mechanism in the generation process. By scoring the authenticity and diversity of generated samples and dynamically adjusting the parameters of the generator and discriminator, the bidirectional generative adversarial network has the adaptive adjustment capability during the training process, so that the generated samples better meet the expected quality requirements. The introduction of the comprehensive score not only significantly improves the overall quality of the generated samples, but also provides an effective feedback signal for the training process of the bidirectional generative adversarial network, avoiding the problem of unstable generation effect caused by the lack of an evaluation mechanism in traditional methods.
[0192] The present invention also achieves continuous optimization of the quality of generated samples by dynamically adjusting the weight matrix and bias vector of the generator. During the training process, the network parameters can be adaptively adjusted according to the real-time performance of the generated samples to ensure that the generated samples achieve an optimal balance between diversity and authenticity.
[0193] The above description is only a preferred specific implementation manner of the present invention, but the protection scope of the present invention is not limited thereto. Any technician familiar with the technical field can make equivalent replacements or changes according to the technical scheme and inventive concept of the present invention within the technical scope disclosed by the present invention, which should be covered by the protection scope of the present invention.
Claims
1. A small sample data synthesis method based on a bidirectional generative adversarial network, characterized in that: The steps include: S1, obtaining a small sample data set and preprocessing the small sample data set; S2. Construct a bidirectional generative adversarial network with dual generators and dual discriminators; S3, initialize the parameters of the first generator, the second generator, the first discriminator and the second discriminator, and perform preliminary training; S4, generating an initial synthetic sample data set through the first generator and the second generator, and inputting the sample data set into the first discriminator and the second discriminator for discrimination respectively, wherein the first discriminator evaluates the authenticity of the samples generated by the first generator, and the second discriminator evaluates the diversity of the samples generated by the second generator; S5. According to the loss values output by the first discriminator and the second discriminator, reversely update the parameters of the first generator and the second generator respectively; S6. Repeat S4 and S5 to continuously optimize the quality of the synthetic sample data set in the alternating training of the first generator and the second generator until the synthetic sample data set meets the predetermined requirements in terms of authenticity and diversity; S7, optimizing the inputs of the first generator and the second generator through an adaptive noise introduction mechanism and a data augmentation module; S8, generating an extended small sample dataset, where the extended small sample dataset is generated by the first generator and the second generator and is visually and statistically similar to the original small sample dataset; S9. The authenticity and diversity of the generated small sample data set are scored through an automated evaluation mechanism, and the parameters of the bidirectional generative adversarial network are dynamically adjusted according to the evaluation results.
2. According to the small sample data synthesis method based on the bidirectional generative adversarial network of claim 1, it is characterized in that: The S1 comprises the following sub-steps: S11. Obtain an initial small sample data set D0. The initial small sample data set contains n samples, each sample x i Belongs to the data space X, that is, D0={x1,x2,…,x n }, where x i represents the i-th data sample; S12: Perform data cleaning on the initial small sample data set D0, remove incomplete or abnormal data points, and generate a cleaned small sample data set D1, where The cleaning operation is expressed as: D1={x i ∈D0|satisfies the cleaning condition}; S13, normalize the cleaned small sample data set D1, and normalize all sample data x i ∈D1 is mapped to the standard range [a, b] to obtain the normalized small sample data set D2; S14, performing noise filtering on the normalized small sample data set D2, removing or suppressing the random noise components in the small sample data set, and generating the final preprocessed small sample data set D pre : D pre ={x′ i ∈D2|filtered by noise}.
3. The small sample data synthesis method based on a bidirectional generative adversarial network according to claim 1 is characterized in that: The S2 comprises the following sub-steps: S21, build the first generator G1 to generate the small sample data set D after final preprocessing pre Similar first synthetic sample dataset D gen1 , where the first generator G1 is fed with a noise vector Generate sample data and combine the feature distribution in the latent space Z1 to generate the first synthetic data sample x gen1 : Among them, W0 and w1 are the weight matrices of the first generator G1, b0 and b1 are the bias vectors of the first generator G1, σ is the activation function, w1 is the adjustable parameter in the first generator, z1 represents the noise vector, x gen1 Represents the generated first synthetic sample data; S22, build the second generator G2 to generate the final preprocessed small sample data set D pre Different second synthetic sample dataset D gen2 , where the second generator G2 is fed with the input noise vector z2~ Generate sample data and fine-tune the diversity adjustment parameter λ during the generation process: Among them, W1 and W2 are the weight matrices of the second generator G2, b1 and b2 are bias vectors, λ is the diversity adjustment parameter, z2 represents the noise vector, x gen2 Represents the generated second synthetic sample data; S23, construct the first discriminator D1, used to distinguish the first synthetic sample data set D generated by the first generator G1 gen1 And the final preprocessed small sample data set D pre , and output about the first synthetic sample data set D gen1 Evaluation index of authenticity L1: Among them, D1(x i ) represents the first discriminator D1 for the real sample x i The discriminant output of Represents the synthetic sample generated by the first generator G1 α is the regularization parameter, is the two-norm distance between the weight matrices of the first generator; S24, construct a second discriminator D2 to distinguish the second synthetic sample data set D generated by the second generator G2 gen2 And the final preprocessed small sample data set D pre , and output about the second synthetic sample data set D gen2 Diversity evaluation indicators Among them, D2(x i ) represents the second discriminator D2 for the real sample x i The discriminant output of Represents the synthetic sample generated by the second generator G2 β is the regularization parameter, represents the variance of the generated samples.
4. The small sample data synthesis method based on a bidirectional generative adversarial network according to claim 1 is characterized in that: The S3 comprises the following sub-steps: S31. Initialize the parameters of the first generator G1 and Parameters of the second generator G2 and Parameters of the first discriminator D1 Hehe And the parameters of the second discriminator D2 and S32, select a learning rate η and a batch size m, and determine the initial training rounds T of the generator and the discriminator, where the learning rate η determines the step size of each parameter update, the batch size m affects the number of data samples used for each training, and the number of training rounds T determines the initial training intensity of the entire model; S33, by random sampling from a small sample data set D pre Draw a small batch of samples x from (i) ∈D pre , while from the noise distribution and Extract the noise vectors and where i = 1, 2, ..., m, the noise vector and As the input of the first generator G1 and the second generator G2, respectively, to generate the corresponding synthetic samples, the distribution of the noise vector and Determine the diversity of generated samples; S34, using the extracted noise vector and Calculate the first synthetic data samples of the first generator G1 and the second generator G2 respectively and the second synthetic data sample And calculate the loss function through the first discriminator D1 and the second discriminator D2 and Among them, D1(x (i) ) and D2(x (i) ) represent the first discriminator D1 and the second discriminator D2 for the real sample x (i) The discriminant output of and Represents the discriminant output of the generated sample; S35. Repeat steps S33 to S34 until the predetermined number of training rounds T is completed, and the generator and discriminator models after preliminary training are generated.
5. The small sample data synthesis method based on a bidirectional generative adversarial network according to claim 1 is characterized in that: The S5 comprises the following sub-steps: S51. Calculate the gradient of the first generator G1 based on the output loss value L1 of the first discriminator D1: in, represents the weight matrix of the first generator G1, represents the loss value of the i-th sample, The i-th synthetic sample generated by the first generator G1; S52, update the parameters of the first generator G1 and To optimize the reality of the generated samples: in, and They are loss functions The weight matrix and the bias vector The gradient of S53, according to the output loss value of the second discriminator D2 Calculate the gradient of the second generator G2: in, represents the weight matrix of the second generator G2, represents the loss value of the i-th sample, The i-th synthetic sample generated by the second generator G2; S54. Update the parameters of the second generator G2 and To optimize the diversity of generated samples: in, and They are loss functions The weight matrix and the bias vector The gradient of S55. Repeat steps S51 to S54 until the samples generated by the first generator G1 reach the predetermined authenticity standard and the samples generated by the second generator G2 reach the predetermined diversity standard, thus completing the reverse update process of the parameters of the bidirectional generative adversarial network.
6. The small sample data synthesis method based on a bidirectional generative adversarial network according to claim 1 is characterized in that: The S8 comprises the following sub-steps: S81. Generate an extended small sample dataset D using the optimized first generator G1 gen1 , where each generated sample By the noise vector generate: in, represents the jth noise vector, is the weight matrix of the first optimized generator, For the jth extended sample generated, the extended sample dataset D gen1 It consists of n1 generated samples, namely: S82. Generate extended small sample data D using the optimized second generator G2 gen2 , where each generated sample By the noise vector generate: in, represents the kth noise vector, is the weight matrix of the optimized second generator, λ is the diversity adjustment parameter, For the kth extended sample generated, the extended sample dataset D gen2 It consists of n2 generated samples, namely: S83, the extended sample data set D generated by the first generator G1 gen1 The extended sample dataset D generated by the second generator G2 gen2 Merge to generate the final expanded small sample dataset D exp : D exp =D gen1 ∪D gen2 ; Among them, D exp Contains all generated samples and is visually and statistically comparable to the original small sample dataset D pre resemblance; S84. Generate an extended small sample data set D exp Verify the visual and statistical properties of the extended small sample dataset to make it visually similar to the original dataset D pre resemblance.
7. The small sample data synthesis method based on a bidirectional generative adversarial network according to claim 1 is characterized in that: The S9 comprises the following sub-steps: S91. Generate an extended small sample data set D exp Perform authenticity scoring and use the first discriminator D1 to evaluate each sample To discriminate output And calculate the overall authenticity score Among them, n exp Represents the extended dataset D exp The total number of samples in is the lth extended sample, Reflects the overall performance of the generated dataset in terms of authenticity; S92. Generate an extended small sample data set D exp Perform diversity scoring and use statistical methods to calculate the distribution characteristics of the generated samples to obtain the overall diversity score Among them, Var(D exp ) is the variance of the expanded data set, μ exp Represents the extended dataset D exp The mean vector of Used to evaluate the diversity of generated datasets; S93. Combined authenticity scoring and diversity scores The comprehensive results are used to calculate the comprehensive score Used to dynamically adjust the parameters of the bidirectional generative adversarial network: Among them, α1 and β1 are weight coefficients, which are used to balance the impact of authenticity and diversity in the comprehensive score. Indicates the overall quality of the generated samples; S94, based on comprehensive score As a result, the parameters of the first generator G1 and the second generator G2 are dynamically adjusted and S95, repeat steps S91 to S94 until the comprehensive score is Reach the predetermined standards, thereby completing the optimization adjustment of the parameters of the generative adversarial network.
Citation Information
Patent Citations
Image generation method and device, computing equipment and storage medium
CN116664972A
Fuzzy test data generation method based on GAN
CN118013533A
Data Augmentation Method Based On Generative Adversarial Networks In Tool Condition Monitoring
US20210197335A1
Cited By
Gene text data amplification method based on generative adversarial network
CN119360978A
Genetic text data augmentation method based on generative adversarial network
CN119360978B
Multi-architecture feedback and collaborative big language model prompt data synthesis method, device and medium
CN121436189A
A method, device, and medium for synthesizing large language model prompts with multi-architecture feedback and collaboration.
CN121436189B
Marketing data synthesis and enhancement method and system based on generative adversarial network
CN121437043A
