Method, device, system and storage medium for generating augmented data generation model

By iterative optimization and adversarial training of the generative model, random noise and constraints are used to generate simulated data that is close to real data, which solves the problems of low efficiency and high cost of data collection and achieves efficient data augmentation.

CN114970342BActive Publication Date: 2025-09-16BEIJING INTENGINE TECH CO LTD
View PDF 1 Cites 0 Cited by

Patent Information

Application Number
CN202210559541.2
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2022-05-19
Publication Date
2025-09-16
Estimated Expiration
2042-05-19

AI Technical Summary

Technical Problem

In the existing technology, data collection efficiency is low and costly, especially in a multi-level model structure. When the output of the previous level model is used as the input of the next level model, it is more difficult to collect customized data, which affects the model training effect.

Method used

By obtaining the output data of the first model and the second model, using random noise and preconfigured constraints to generate simulated data, and combining the third and fourth models for iterative optimization and adversarial training, augmented data that approximates real data is generated.

Benefits of technology

It reduces the labor and economic costs of obtaining training data, increases the speed of data acquisition, and enhances the model's ability to generate simulated data that approximates real data.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN114970342B_ABST
    Figure CN114970342B_ABST
Patent Text Reader

Abstract

Embodiments of the present invention relate to the field of computer technology, and in particular to a method, device, system, and storage medium for generating an augmented data generation model. The method includes: obtaining the first output data of a first model, the j-th second output data of a second model, inputting the second output data into a third model, obtaining the j-th first loss function value, inputting the second output data and constraints into a fourth model, obtaining the j-th second loss function value, optimizing the second model based on the j-th first loss function value and the j-th second loss function value, determining the optimization result, and based on the optimization result, conducting adversarial training on the second model and the fourth model to obtain an augmented data generation model. Through the mutual confrontation between the second model and the fourth model, the data generated by the second model is made more realistic, thereby improving work efficiency.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] Embodiments of the present invention relate to the field of computer technology, and in particular to a method, device, system, and storage medium for generating an augmented data generation model. Background Art

[0002] In machine learning, data is needed to train the model. Generally speaking, the richer the data, the higher the accuracy of the trained model and the better the effect. Data is crucial to model training.

[0003] To increase the amount of training data, existing techniques often involve manual data collection. However, manual data collection is inefficient and costly. Alternatively, web search and downloading are often used, but this method struggles to batch-download data relevant to training purposes, resulting in inefficient data collection.

[0004] Especially for multi-level model structures, the output of the previous level model is the input of the next level model. When the training data of the next level model is some customized data, data collection is more difficult.

[0005] Therefore, a method for generating an augmented data generation model is needed to solve the above problems. Summary of the Invention

[0006] In view of this, in order to solve the above technical problems in the prior art, embodiments of the present invention provide a method, device, system and storage medium for generating an augmented data generation model.

[0007] In a first aspect, an embodiment of the present invention provides a method for generating an augmented data generation model, the method comprising:

[0008] Obtain first output data output by the first model and second output data output by the second model for the jth time, wherein the second output data is simulated data generated by the second model based on the pre-acquired jth set of random noise and pre-configured constraints, and the first output data is real data;

[0009] Input the second output data into the third model to obtain the j-th first loss function value;

[0010] Input the second output data and the constraint conditions into the fourth model to obtain the j-th second loss function value;

[0011] Iteratively optimize the second model according to the j-th first loss function value and the j-th second loss function value, and determine an iterative optimization result;

[0012] Based on the iterative optimization result and the first output data, the second model and the fourth model are adversarially trained, and the second model finally obtained is used as the augmented data generation model, where j is a positive integer.

[0013] In one possible implementation, performing iterative optimization on the second model according to the j-th first loss function value and the j-th second loss function value, and determining an iterative optimization result includes:

[0014] Determine the jth third loss function value based on the jth first loss function value, the jth second loss function value and a preset weight coefficient;

[0015] Based on the j-th third loss function value, the second model is iteratively optimized to determine the iterative optimization result.

[0016] In one possible implementation, adversarial training is performed on the second model and the fourth model based on the iterative optimization result and the first output data, and the second model finally obtained is used as the augmented data generation model, including:

[0017] When the proportion of true labels identified by the fourth model is greater than a first preset threshold and the accuracy of the third model is greater than a second preset threshold, pausing the iterative optimization of the second model, freezing all model parameters except the parameters in the fourth model, and iteratively optimizing the fourth model based on the first output data and the second output data;

[0018] When the accuracy of the fourth model in identifying the input data as real / simulated data is greater than a third preset threshold, pausing the iterative optimization of the fourth model, freezing all model parameters except the parameters in the second model, and repeating the iterative optimization of the second model;

[0019] Until the difference between the proportion of true labels identified by the fourth model and the accuracy of the third model is less than the preset fourth threshold and the preset stability condition is reached, the training of the second model and the fourth model is stopped, and the second model finally obtained is used as the augmented data generation model.

[0020] In one possible implementation, adversarial training is performed on the second model and the fourth model based on the iterative optimization result and the first output data, and the second model finally obtained is used as the augmented data generation model, including:

[0021] When the second model reaches a preset number of iterations, pausing the iterative optimization of the second model, freezing all model parameters except the parameters in the fourth model, and iteratively optimizing the fourth model based on the first output data and the second output data, obtaining a fourth loss function value generated during the iterative optimization process;

[0022] When the fourth model reaches the number of iterations, suspending the iterative optimization of the fourth model, freezing all model parameters except the parameters in the second model, and performing iterative optimization of the second model;

[0023] When the third loss function value and the fourth loss function value both reach the preset stability condition, the training of the second model and the fourth model is stopped, and the second model finally obtained is used as the augmented data generation model.

[0024] In one possible implementation, when the second model reaches a preset number of iterations, pausing the iterative optimization of the second model, freezing all model parameters except the parameters in the fourth model, and iteratively optimizing the fourth model based on the first output data and the second output data, obtaining a fourth loss function value generated during the iterative optimization process, including:

[0025] Inputting the first output data, the second output data, and the constraint condition into the fourth model to obtain a fourth loss function value;

[0026] Iteratively optimize the fourth model based on the number of iterations and the fourth loss function value.

[0027] In a second aspect, an embodiment of the present invention provides a device for generating an augmented data generation model, the device comprising:

[0028] an acquisition module, configured to acquire first output data output by the first model and second output data output by the second model for the jth time, wherein the second output data is simulated data generated by the second model based on the pre-acquired jth set of random noise and pre-configured constraints, and the first output data is real data;

[0029] a processing module, configured to input the second output data into the third model to obtain the jth first loss function value; input the second output data and the constraint conditions into the fourth model to obtain the jth second loss function value; iteratively optimize the second model based on the jth first loss function value and the jth second loss function value, and determine an iterative optimization result;

[0030] A generation module is used to perform adversarial training on the second model and the fourth model based on the iterative optimization result and the first output data, and use the second model finally obtained as the augmented data generation model, where j is a positive integer.

[0031] In one possible implementation, the processing module is configured to:

[0032] Determine the jth third loss function value based on the jth first loss function value, the jth second loss function value and a preset weight coefficient;

[0033] Based on the j-th third loss function value, the second model is iteratively optimized to determine the iterative optimization result.

[0034] In one possible implementation, a generation module is configured to:

[0035] When the proportion of true labels identified by the fourth model is greater than a first preset threshold and the accuracy of the third model is greater than a second preset threshold, pausing the iterative optimization of the second model, freezing all model parameters except the parameters in the fourth model, and iteratively optimizing the fourth model based on the first output data and the second output data;

[0036] When the accuracy of the fourth model in identifying the input data as real / simulated data is greater than a third preset threshold, pausing the iterative optimization of the fourth model, freezing all model parameters except the parameters in the second model, and repeating the iterative optimization of the second model;

[0037] Until the difference between the proportion of true labels identified by the fourth model and the accuracy of the third model is less than the preset fourth threshold and the preset stability condition is reached, the training of the second model and the fourth model is stopped, and the second model finally obtained is used as the augmented data generation model.

[0038] In a third aspect, the present application provides an electronic device comprising: at least one processor; and a memory communicatively connected to the at least one processor; wherein the memory stores instructions executable by the at least one processor, and the instructions are executed by the at least one processor to enable the at least one processor to perform the steps of any method in the first aspect.

[0039] In a fourth aspect, the present application provides a computer-readable storage medium having a computer program stored thereon, which implements the steps of any one of the methods in the first aspect when the computer program is executed by a processor.

[0040] An embodiment of the present invention provides a method for generating an augmented data generation model. In the above-described embodiment, simulated data is generated using random noise and preconfigured preset conditions. The simulated data is then input into a third model for prejudgment, determining the application of the simulated data, namely, the jth first loss function value. Simultaneously, the simulated data and constraints are input into a fourth model to generate the jth second loss function value, preparing for subsequent adjustments to the second model. The second model is then iteratively optimized based on the jth first and second loss function values ​​to ensure that the simulated data generated by the second model is closer to real data. Using the second and fourth models for adversarial training is intended to further enhance the fourth model's ability to distinguish simulated from real data while ensuring that the simulated data generated by the second model is closer to real data. This, in turn, assists the second model in improving its ability to generate simulated data closer to real data. This ensures that, even in the absence of a large amount of real data, random noise and corresponding constraints can be used to generate simulated data that is highly similar to real data, thereby augmenting real data. This approach can significantly reduce the labor and economic costs of acquiring sample data required for training and significantly increase the speed of sample data acquisition. BRIEF DESCRIPTION OF THE DRAWINGS

[0041] Figure 1 A schematic flow chart of a method for generating an augmented data generation model provided by an embodiment of the present invention;

[0042] Figure 2 A schematic diagram of adversarial training in a method for generating an augmented data generation model provided by an embodiment of the present invention;

[0043] Figure 3 A schematic flow chart of a method for generating an augmented data generation model provided by an embodiment of the present invention;

[0044] Figure 4 A schematic flow chart of a method for generating an augmented data generation model provided by an embodiment of the present invention;

[0045] Figure 5 A schematic diagram of the structure of an apparatus for generating an augmented data generation model provided by an embodiment of the present invention;

[0046] Figure 6 A schematic diagram of a system structure for generating an augmented data generation model is provided in accordance with an embodiment of the present invention. DETAILED DESCRIPTION

[0047] To make the objectives, technical solutions, and advantages of the embodiments of the present invention more clear, the technical solutions in the embodiments of the present invention will be clearly and completely described below in conjunction with the accompanying drawings in the embodiments of the present invention. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without making creative efforts shall fall within the scope of protection of the present invention.

[0048] To facilitate understanding of the embodiments of the present invention, specific embodiments will be further explained below with reference to the accompanying drawings. The embodiments do not limit the embodiments of the present invention.

[0049] Before executing the process, it should be noted that in one case, the first model and the third model have the following relationship, that is, the first model is a processing model. After receiving the real data, the first model will train itself according to the real data, and finally complete the training and output a certain amount of data. Under normal circumstances, these data are not enough to support the training of the third model. However, since there are only these data, the third model has to use these only data to complete its own initialization training and obtain a third model that has completed initialization training. In order to make the third model completely trained, it is necessary to use Figure 1 The method described in is used to generate augmented data and finally complete the training.

[0050] See Figure 1 As shown, Figure 1 A flow chart of a method for generating an augmented data generation model provided in an embodiment of the present invention, the method comprising the following steps:

[0051] Step S11, obtaining first output data output by the first model and second output data output by the second model for the jth time.

[0052] Specifically, the first model is a processing model. After receiving a real data set, the first model processes the data. Since the first model processes real data and completes the output, the first output data is considered to be real data. The second model is a generation model. The second output data is simulated data generated by the second model based on the jth set of pre-acquired random noise and pre-configured constraints. It is worth noting that in this embodiment, all j are positive integers and will not be repeated below. These real data will be used in various subsequent calculations.

[0053] It should be noted that in this example, the so-called processing model refers to the processing of data input into the third model and the fourth model. In actual applications, the first model itself has practical meaning, such as acoustic model, image model, etc., which is not limited here.

[0054] Step S12: input the second output data into the third model to obtain the j-th first loss function value.

[0055] Specifically, the third model is the application model. The third model has huge data requirements. When the data generated by the preprocessing model is not sufficient to support the use of the application model, it is necessary to generate the model to generate corresponding augmented data for use by the application model.

[0056] It should be noted that the acquisition of the first loss function value depends on the type of the third model. According to different third models, different forms of loss functions and corresponding loss function values ​​can be obtained, which are not limited here.

[0057] Among them, the constraints in the second model input are transformed to obtain the labels of the third model output, and the first loss function can be calculated based on this label. In one case, the label is equal to the constraint. In practical applications, the constraints can be converted into labels through any constraint conversion method, which is not limited here.

[0058] Step S13: input the second output data and the constraint conditions into the fourth model to obtain the j-th second loss function value.

[0059] Specifically, the fourth model is a discriminant model, which is used to determine whether the data input to the discriminant model is simulated data or real data.

[0060] Step S14: Iteratively optimize the second model according to the j-th first loss function value and the j-th second loss function value to determine an iterative optimization result.

[0061] Specifically, based on the jth first loss function value, the jth second loss function value and a pre-set weight coefficient, the jth third loss function value is determined, and based on the jth third loss function value, the second model is iteratively optimized to determine the iterative optimization result.

[0062] Optionally, in actual applications, the third loss function value can be calculated according to the following formula:

[0063] The third loss function value

[0064] = weight coefficient 1 × first loss function + weight coefficient 2 second loss function value

[0065] Among them, the weight coefficient 1 and the weight coefficient 2 represent the proportion of the first loss function and the second loss function in the total loss function. The larger the weight coefficient 1, the more emphasis is placed on learning the first loss function, and the larger the weight coefficient 2, the more emphasis is placed on learning the second loss function.

[0066] In practical applications, the weight coefficient 1 and the weight coefficient 2 can be obtained by, but not limited to, the following methods. Several possible weight coefficients 1 and weight coefficients 2 can be set and respectively substituted into the above formula to observe the final model output effect, and the weight coefficients 1 and weight coefficients 2 with the best effect can be selected as the final weight coefficients 1 and weight coefficients 2.

[0067] After the third loss function value is calculated according to the above formula, the relevant parameters in the second model are adaptively adjusted according to the third loss function value to improve the authenticity of the second output data output by the second model.

[0068] Step S15: Based on the iterative optimization result and the first output data, the second model and the fourth model are subjected to adversarial training, and the second model finally obtained is used as the augmented data generation model.

[0069] Specifically, adversarial training involves the second model generating simulated data, while the fourth model recognizes this simulated data. During this generation-recognition process, the two models compete with each other, gradually improving the fidelity of the simulated data generated by the second model and the recognition accuracy of the fourth model. Ultimately, the simulated data generated by the second model becomes sufficiently realistic that the fourth model cannot successfully recognize the data output by the second model as simulated data, mistaking it for real data. After the adversarial process is complete, the augmented data generation model is output.

[0070] For an alternative example, see Figure 2 As shown in the figure, assuming the existence of a first model, a second model, a third model, and a fourth model, and assuming the existence of noisy data and constraints, the relationship between the models is as follows: the first model outputs the first output data, which is input to the fourth model; the second model outputs the second output data, which are input to the fourth and third models respectively; the constraints input the second and fourth models respectively; and the noise data inputs the second model. Through these inputs, the corresponding loss function values ​​are generated, and adversarial training is completed, ultimately outputting the augmented data generation model.

[0071] An embodiment of the present invention provides a method for generating an augmented data generation model. In the above-described embodiment, simulated data is generated using random noise and preconfigured preset conditions. The simulated data is then input into a third model for prejudgment, determining the application of the simulated data, i.e., the jth first loss function value. Simultaneously, the simulated data and constraints are input into a fourth model to generate the jth second loss function value, preparing for subsequent adjustments to the second model. The second model is then iteratively optimized based on the jth first and second loss function values ​​to ensure that the simulated data generated by the second model more closely resembles real data. Using the second and fourth models for adversarial training is intended to further enhance the fourth model's ability to distinguish simulated from real data, while also ensuring that the simulated data generated by the second model more closely resembles real data. This, in turn, assists the second model in improving its ability to generate simulated data that closely resembles real data. This ensures that, even in the absence of a large amount of real data, random noise and corresponding constraints can be used to generate simulated data that is highly similar to real data, thereby augmenting real data. This approach can significantly reduce the labor and economic costs of acquiring sample data required for training and significantly increase the speed of sample data acquisition.

[0072] On the basis of the above embodiment, the embodiment of the present invention also provides another embodiment of a method for generating an augmented data generation model. For the sake of simplicity, the same or similar contents as the above embodiment are not repeated here. Only when the judgment basis for stopping the confrontation is the recognition accuracy of the fourth model, the second model and the fourth model are subjected to adversarial training based on the iterative optimization results, and the second model finally obtained is used as the augmented data generation model process. For details, see Figure 3 As shown, the method flow may include:

[0073] S21, based on the iterative optimization result, determine the relationship between the proportion of true recognition labels of the fourth model and the first preset threshold, and the relationship between the accuracy of the third model and the second preset threshold.

[0074] Specifically, the first preset value is a preset ratio of true identification tags, wherein the actual ratio of true identification tags can be calculated according to the following formula:

[0075]

[0076] In one example, there are 20 simulated data points. The so-called true recognition rate refers to the percentage of true recognition labels identified by the fourth model compared to the total number of data points. Assuming that the fourth model identifies 10 true recognition labels, the actual true recognition rate is 50%. The relationship between the true recognition rate and the first preset threshold determines whether to stop training the second model.

[0077] Furthermore, the accuracy of the third model is the judgment of the accuracy of the application model in the prior art, which will not be elaborated here.

[0078] S22: When the proportion of true recognition labels of the fourth model is greater than the first preset threshold and the accuracy of the third model is greater than the second preset threshold, the iterative optimization of the second model is suspended, all model parameters except the parameters in the fourth model are frozen, and the fourth model is iteratively optimized based on the first output data and the second output data.

[0079] Specifically, when the proportion of true labels recognized by the fourth model is greater than the first preset threshold and the accuracy of the third model is greater than the second preset threshold, it is obvious that the simulated data generated by the second model is real enough at this time, and the current recognition capability of the fourth model no longer supports successful recognition. The fourth model needs to be retrained to improve the recognition accuracy.

[0080] S23, when the accuracy of the fourth model in identifying the input data as real / simulated data is equal to or greater than the third preset threshold, suspend the iterative optimization of the fourth model, freeze all model parameters except the parameters in the second model, and repeat the iterative optimization of the second model.

[0081] Specifically, when the accuracy of the fourth model in identifying the input data as real / simulated data is greater than the third preset threshold, it is obvious that the recognition accuracy of the fourth model is high enough at this time, and the fourth model can successfully identify the input data. Obviously, the second output data of the second model at this time is not simulated enough for the fourth model, so the second model needs to be retrained.

[0082] S24, until the difference between the proportion of true labels identified by the fourth model and the accuracy of the third model is less than the preset fourth threshold and the preset stability condition is reached, stop training the second model and the fourth model, and use the second model finally obtained as the augmented data generation model.

[0083] Specifically, after multiple training sessions, if the difference between the percentage of true labels identified by the fourth model and the accuracy of the third model gradually decreases and becomes less than a preset fourth threshold, the second model training is considered complete. The second model can be used as the augmented data generation model.

[0084] Furthermore, in order to further improve the accuracy of the augmented data generation model, a preset stability condition is further added to the exit condition. It should be noted that the stability condition can be various conditions, such as the values ​​of each loss function remain stable and no longer show a significant decline, etc., which are not limited here.

[0085] In addition to the above-mentioned method of using the recognition accuracy of the fourth model as the basis for stopping the confrontation in the process of the augmented data generation model, the embodiment of the present invention also provides another method when the basis for stopping the confrontation is a preset number of iterations and a stable condition, based on the iterative optimization results, the second model and the fourth model are subjected to adversarial training, and the second model finally obtained is used as the augmented data generation model. For details, see Figure 4 As shown, Figure 4 In the embodiment of another method for generating an augmented data generation model provided by the present invention, for the sake of simplicity, the same or similar contents as the above embodiment will not be repeated here.

[0086] S31, when the second model reaches a preset number of iterations, suspend the iterative optimization of the second model, freeze all model parameters except the parameters in the fourth model, and iteratively optimize the fourth model based on the first output data and the second output data to obtain the fourth loss function value generated during the iterative optimization process.

[0087] Specifically, the first output data, the second output data, and the constraint conditions are input into the fourth model to obtain a fourth loss function value.

[0088] Furthermore, when the preset number of iterations and the stability condition are used as the conditions for exiting the confrontation, the accuracy of identifying whether the input data is real / simulated data is not referenced by the fourth model.

[0089] For example, in this step, assuming that the number of iterations is 6000, when the model is iteratively trained for 6000 times, regardless of the accuracy of the fourth model in identifying whether the input data is real / simulated data, the iterative optimization of the second model is suspended and the iterative optimization of the fourth model is performed.

[0090] S32, when the fourth model reaches the number of iterations, suspending the iterative optimization of the fourth model, freezing all model parameters except the parameters in the second model, and performing iterative optimization of the second model.

[0091] Furthermore, when the preset number of iterations and the stability condition are used as the conditions for exiting the confrontation, the accuracy of identifying whether the input data is real / simulated data is not referenced by the fourth model.

[0092] For example, in this step, assuming that the number of iterations is 6000, when the model is iteratively trained for 6000 times, regardless of the accuracy of the fourth model in identifying whether the input data is real / simulated data, the iterative optimization of the fourth model is suspended and the iterative optimization of the second model is performed.

[0093] S33: When the third loss function value and the fourth loss function value both reach a preset stability condition, the training of the second model and the fourth model is stopped, and the second model finally obtained is used as the augmented data generation model.

[0094] Specifically, step S31 and step S32 are repeated continuously until the third loss function value and the fourth loss function value both reach a preset stability condition.

[0095] Furthermore, the stability conditions may include but are not limited to the following situations: the sequence consisting of all loss function values ​​of the same type gradually converges to a certain interval, the difference between any two loss function values ​​of the same type is less than a predetermined error range, etc.

[0096] For example, the stability condition is that the sequence of all loss function values ​​of the same type gradually converges to a certain interval. Assuming that the third loss function value converges to the interval [1.1, 1.5] and the fourth loss function value converges to the interval [2.0, 2.1], the adversarial training is considered to be completed at this time, and the second model is used as the augmented data generation model.

[0097] By using the preset number of training times as the condition for iterative optimization, the training process time can be calculated. And because the final stopping condition is the preset stability condition, the stability condition can be flexibly adjusted to control the training duration, greatly improving work efficiency.

[0098] It should be noted that the present invention is not only used for data augmentation of one model, but can also be used for data augmentation of multiple models. These models can be connected in series or in parallel, which is not limited here.

[0099] Figure 5 An embodiment of the present invention provides a device for generating an augmented data generation model, which includes: an acquisition module 501, a processing module 502, and a generation module 503.

[0100] An acquisition module 501 is configured to acquire first output data output by the first model and second output data output by the second model for the jth time, wherein the second output data is simulated data generated by the second model based on the pre-acquired jth set of random noise and pre-configured constraints, and the first output data is real data;

[0101] Processing module 502 is configured to input the second output data into the third model to obtain the jth first loss function value; input the second output data and the constraint conditions into the fourth model to obtain the jth second loss function value; iteratively optimize the second model based on the jth first loss function value and the jth second loss function value, and determine an iterative optimization result;

[0102] The generation module 503 is used to perform adversarial training on the second model and the fourth model based on the iterative optimization result and the first output data, and use the second model finally obtained as the augmented data generation model, where j is a positive integer.

[0103] A processing module 502 is configured to determine a j-th third loss function value based on the j-th first loss function value, the j-th second loss function value, and a preset weight coefficient;

[0104] Based on the j-th third loss function value, the second model is iteratively optimized to determine the iterative optimization result.

[0105] A generation module 503 is configured to, when the proportion of true labels identified by the fourth model is greater than a first preset threshold and the accuracy of the third model is greater than a second preset threshold, suspend the iterative optimization of the second model, freeze all model parameters except the parameters in the fourth model, and iteratively optimize the fourth model based on the first output data and the second output data;

[0106] When the accuracy of the fourth model in identifying the input data as real / simulated data is equal to or higher than a third preset threshold, pausing the iterative optimization of the fourth model, freezing all model parameters except the parameters in the second model, and repeating the iterative optimization of the second model;

[0107] Until the difference between the proportion of true labels identified by the fourth model and the accuracy of the third model is less than the preset fourth threshold and the preset stability condition is reached, the training of the second model and the fourth model is stopped, and the second model finally obtained is used as the augmented data generation model.

[0108] a generation module 503 configured to suspend iterative optimization of the second model after the second model reaches a preset number of iterations, freeze all model parameters except for the parameters in the fourth model, iteratively optimize the fourth model based on the first output data and the second output data, and obtain a fourth loss function value generated during the iterative optimization process;

[0109] When the fourth model reaches the number of iterations, suspending the iterative optimization of the fourth model, freezing all model parameters except the parameters in the second model, and performing iterative optimization of the second model;

[0110] When the third loss function value and the fourth loss function value both reach the preset stability condition, the training of the second model and the fourth model is stopped, and the second model finally obtained is used as the augmented data generation model.

[0111] A generating module 503 is configured to input the first output data, the second output data, and the constraint conditions into a fourth model to obtain a fourth loss function value;

[0112] Iteratively optimize the fourth model based on the number of iterations and the fourth loss function value.

[0113] See also Figure 6 , Figure 6 is a structural diagram of an electronic device provided by an optional embodiment of the present invention, such as Figure 6 As shown, the electronic device may include: at least one processor 61, such as a CPU (Central Processing Unit), at least one communication interface 63, a memory 64, and at least one communication bus 62. The communication bus 62 is used to realize the connection and communication between these components. The communication interface 63 may include a display screen (Display), a keyboard (Keyboard), and the optional communication interface 63 may also include a standard wired interface and a wireless interface. The memory 64 may be a high-speed RAM memory (Random Access Memory, volatile random access memory) or a non-volatile memory (non-volatile memory), such as at least one disk memory. The memory 64 may optionally be at least one storage device located away from the aforementioned processor 61. The processor 61 may be combined with Figure 6 In the described apparatus, the memory 64 stores an application program, and the processor 61 calls the program code stored in the memory 64 to execute any of the above method steps.

[0114] The communication bus 62 may be a peripheral component interconnect (PCI) bus or an extended industry standard architecture (EISA) bus. The communication bus 62 may be divided into an address bus, a data bus, a control bus, etc. For ease of representation, Figure 6 Only one thick line is used in the diagram, but this does not mean that there is only one bus or one type of bus.

[0115] Among them, the memory 64 may include volatile memory (English: volatile memory), such as random-access memory (English: random-access memory, abbreviated: RAM); the memory may also include non-volatile memory (English: non-volatile memory), such as flash memory (English: flash memory), hard disk drive (English: hard disk drive, abbreviated: HDD) or solid-state drive (English: solid-state drive, abbreviated: SSD); the memory 64 may also include a combination of the above types of memory.

[0116] The processor 61 may be a central processing unit (CPU), a network processor (NP), or a combination of a CPU and a NP.

[0117] The processor 61 may further include a hardware chip. The hardware chip may be an application-specific integrated circuit (ASIC), a programmable logic device (PLD), or a combination thereof. The PLD may be a complex programmable logic device (CPLD), a field-programmable gate array (FPGA), a generic array logic (GAL), or any combination thereof.

[0118] Optionally, the memory 64 is further configured to store program instructions. The processor 61 may call the program instructions to implement a method for generating an augmented data generation model as shown in any embodiment of the present application.

[0119] An embodiment of the present invention further provides a non-transitory computer storage medium storing computer-executable instructions that can execute a method for generating an augmented data generation model in any of the above method embodiments. The storage medium can be a magnetic disk, an optical disk, a read-only memory (ROM), a random access memory (RAM), a flash memory, a hard disk drive (HDD), or a solid-state drive (SSD); the storage medium can also include a combination of the above types of memory.

[0120] Although the embodiments of the present invention have been described with reference to the accompanying drawings, those skilled in the art may make various modifications and variations without departing from the spirit and scope of the present invention. Such modifications and variations are all within the scope defined by the appended claims.

Claims

1. A method for generating an augmented data generation model, characterized in that: The method comprises: Obtaining first output data output by the first model and second output data output by the second model for the jth time, wherein the second output data is simulated data generated by the second model based on the jth set of pre-acquired random noise and pre-configured constraints, and the first output data is real data; wherein the data includes acoustic data or image data; Input the second output data into a third model to obtain the jth first loss function value; wherein the third model is an application model, which is used to process the second output data and output the first loss function value; Inputting the second output data and the constraint condition into the fourth model to obtain the j-th second loss function value; Iteratively optimize the second model according to the j-th first loss function value and the j-th second loss function value, and determine an iterative optimization result; Based on the iterative optimization result and the first output data, the second model and the fourth model are subjected to adversarial training, and the second model finally obtained is used as the augmented data generation model, where j is a positive integer; The iterative optimization of the second model according to the j-th first loss function value and the j-th second loss function value to determine the iterative optimization result includes: Determine a jth third loss function value based on the jth first loss function value, the jth second loss function value, and a preset weight coefficient; Based on the j-th value of the third loss function, the second model is iteratively optimized to determine an iterative optimization result.

2. The method according to claim 1, characterized in that The method of performing adversarial training on the second model and the fourth model based on the iterative optimization result and the first output data, and using the second model finally obtained as the augmented data generation model, includes: When the proportion of true labels identified by the fourth model is greater than a first preset threshold and the accuracy of the third model is greater than a second preset threshold, pausing the iterative optimization of the second model, freezing all model parameters except the parameters in the fourth model, and iteratively optimizing the fourth model based on the first output data and the second output data; When the accuracy of the fourth model in identifying the input data as real / simulated data is greater than a third preset threshold, pausing the iterative optimization of the fourth model, freezing all model parameters except the parameters in the second model, and repeating the iterative optimization of the second model; Until the difference between the proportion of true recognition labels of the fourth model and the accuracy of the third model is less than a preset fourth threshold and a preset stability condition is reached, the training of the second model and the fourth model is stopped, and the second model finally obtained is used as the augmented data generation model.

3. The method according to claim 1, characterized in that The method of performing adversarial training on the second model and the fourth model based on the iterative optimization result and the first output data, and using the second model finally obtained as the augmented data generation model, includes: When the second model reaches a preset number of iterations, pausing the iterative optimization of the second model, freezing all model parameters except the parameters in the fourth model, and iteratively optimizing the fourth model based on the first output data and the second output data, obtaining a fourth loss function value generated during the iterative optimization process; When the fourth model reaches the number of iterations, pausing the iterative optimization of the fourth model, freezing all model parameters except the parameters in the second model, and performing iterative optimization of the second model; When the third loss function value and the fourth loss function value both reach a preset stability condition, the training of the second model and the fourth model is stopped, and the second model finally obtained is used as the augmented data generation model.

4. The method according to claim 3, characterized in that When the second model reaches a preset number of iterations, pausing the iterative optimization of the second model, freezing all model parameters except the parameters in the fourth model, and iteratively optimizing the fourth model based on the first output data and the second output data, obtaining a fourth loss function value generated during the iterative optimization process, including: Inputting the first output data, the second output data, and the constraint condition into the fourth model to obtain a fourth loss function value; Iteratively optimize the fourth model based on the number of iterations and the fourth loss function value.

5. A device for generating an augmented data generation model, characterized in that: The device comprises: an acquisition module, configured to acquire first output data output by the first model and second output data output by the second model for the jth time, wherein the second output data is simulated data generated by the second model based on the pre-acquired jth set of random noise and pre-configured constraints, and the first output data is real data; wherein the data includes acoustic data or image data; a processing module, configured to input the second output data into a third model to obtain a j-th first loss function value; wherein the third model is an application model, configured to process the second output data and output the first loss function value; input the second output data and the constraint condition into a fourth model to obtain a j-th second loss function value; and iteratively optimize the second model based on the j-th first loss function value and the j-th second loss function value to determine an iterative optimization result; A generation module, configured to perform adversarial training on the second model and the fourth model based on the iterative optimization result and the first output data, and use the second model finally obtained as the augmented data generation model, where j is a positive integer; Wherein, the processing module is used to: Determine a jth third loss function value based on the jth first loss function value, the jth second loss function value, and a preset weight coefficient; Based on the j-th value of the third loss function, the second model is iteratively optimized to determine an iterative optimization result.

6. The device according to claim 5, characterized in that The generating module is used to: When the proportion of true labels identified by the fourth model is greater than a first preset threshold and the accuracy of the third model is greater than a second preset threshold, pausing the iterative optimization of the second model, freezing all model parameters except the parameters in the fourth model, and iteratively optimizing the fourth model based on the first output data and the second output data; When the accuracy of the fourth model in identifying the input data as real / simulated data is greater than a third preset threshold, pausing the iterative optimization of the fourth model, freezing all model parameters except the parameters in the second model, and repeating the iterative optimization of the second model; Until the difference between the proportion of true recognition labels of the fourth model and the accuracy of the third model is less than a preset fourth threshold and a preset stability condition is reached, the training of the second model and the fourth model is stopped, and the second model finally obtained is used as the augmented data generation model.

7. An electronic device, characterized in that: include: at least one processor; and a memory communicatively connected to the at least one processor; wherein the memory stores instructions executable by the at least one processor, and the instructions are executed by the at least one processor to enable the at least one processor to perform the steps of the method according to any one of claims 1 to 4.

8. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processor, the steps of the method according to any one of claims 1 to 4 are implemented.

Citation Information

Patent Citations

  • Model generating method and device

    CN108520220A