Data generation method and device, equipment and storage medium

By simultaneously training the teacher model and the student model in a multi-level architecture, and using the prediction results of the teacher model and the student model for correction, the problem of time-consuming multi-modal generative model inference process is solved, and the efficiency of model training and data processing are improved. acceleration.

CN118709749APending Publication Date: 2024-09-27BEIJING QINGYANG ZHIWEI TECHNOLOGY CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202310308473.7
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2023-03-27
Publication Date
2024-09-27

AI Technical Summary

Technical Problem

The complete inference process of existing multi-modal generative models takes a lot of time. How to speed up the inference process of the model while ensuring the model inference effect has become a technical challenge.

Method used

Using a multi-level architecture, the teacher model that has completed training and the student model to be trained are used for synchronous training. The prediction results of the teacher model are used to correct the student model, and the prediction results of the student model are used to correct the data generation model, gradually reducing the sampling steps. number to improve model training efficiency.

Benefits of technology

By training the model synchronously, the efficiency of model training is greatly improved, the time required for training is reduced, the problem of overfitting is avoided, and the speed and accuracy of data processing are improved.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118709749A
    Figure CN118709749A
Patent Text Reader

Abstract

The invention provides a data generation method and device, equipment and a storage medium, and the method comprises the steps: obtaining to-be-processed first modal information, and generating second modal data corresponding to the first modal information based on a trained data generation model; wherein the multi-level architecture where the data generation model is located at least comprises a trained teacher model and at least one to-be-trained first student model located between the teacher model and the data generation model; in any training round of model training based on a training sample, a first prediction result output by the teacher model for the training sample is used for correcting the first student model, and a prediction result output by the first student model for the training sample is used for correcting the data generation model. According to the technical scheme provided by one or more embodiments of the invention, the data generation efficiency can be improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present disclosure relates to the field of data processing technology, and in particular to a data generation method, device, equipment and storage medium. Background Art

[0002] At present, in the process of generating data based on multimodal generative models, in order to improve data processing efficiency, knowledge distillation can usually be used to use a teacher model with more sampling steps to guide the training of a student model with fewer sampling steps, so as to distill the features learned by the teacher model to the student model, thereby improving the training effect of the student model. The trained student model has fewer sampling steps and can process data quickly.

[0003] However, the complete reasoning process of the current multimodal generative model usually takes a long time. How to speed up the reasoning process of the model while ensuring the model reasoning effect has become a technical problem that needs to be solved. Summary of the invention

[0004] One or more embodiments of the present disclosure provide a data generation method, apparatus, device, and storage medium, which can improve the efficiency of data generation.

[0005] On the one hand, the present disclosure provides a data generation method, which includes: obtaining first modal information to be processed, and generating second modal data corresponding to the first modal information based on a trained data generation model; wherein the multi-level architecture in which the data generation model is located includes at least a teacher model that has been trained, and at least one first student model to be trained located between the teacher model and the data generation model; in any training round of model training based on training samples, the first prediction result output by the teacher model for the training sample is used to correct the first student model, and the prediction result output by the first student model for the training sample is used to correct the data generation model.

[0006] On the other hand, the present disclosure also provides a data generating device, which includes: a prediction unit, used to obtain first modal information to be processed, and generate second modal data corresponding to the first modal information based on a trained data generation model; a construction unit, used to set at least a trained teacher model and at least one first student model to be trained between the teacher model and the data generation model in a multi-level architecture where the data generation model is located; wherein, in any training round of model training based on training samples, the first prediction result output by the teacher model for the training sample is used to correct the first student model, and the prediction result output by the first student model for the training sample is used to correct the data generation model.

[0007] On the other hand, the present disclosure further provides an electronic device, which includes a memory and a processor, wherein the memory is used to store a computer program, and when the computer program is executed by the processor, the above-mentioned data generation method is implemented.

[0008] On the other hand, the present disclosure further provides a computer-readable storage medium, wherein the computer-readable storage medium is used to store a computer program, and when the computer program is executed by a processor, the above-mentioned data generation method is implemented.

[0009] The technical solution provided by one or more embodiments of the present disclosure may include a teacher model that has completed training and at least one first student model located between the teacher model and the data generation model in the multi-level architecture where the data generation model is located, wherein the data generation model and the first student model are both models that need to be trained. In the present disclosure, the data generation model and the first student model can be trained synchronously. Specifically, in each training round, the first prediction result output by the teacher model for the training sample can be used to correct the first student model of the next level, and the prediction result output by the first student model for the training sample can be used to correct the data generation model of the next level. In this way, in addition to the teacher model, models of other levels can be trained synchronously in the same training round, without the need to train the model of the next level after completing the training of the model of the previous level, thereby greatly improving the efficiency of model training.

[0010] In addition, after each round of training, the prediction accuracy of the first student model will gradually improve. Since the data generation model will perform model correction based on the prediction results output by the first student model in each training round, the improvement process of the prediction accuracy of the first student model will also be learned by the data generation model, making the training process of the data generation model more efficient, thereby improving the efficiency of model training. BRIEF DESCRIPTION OF THE DRAWINGS

[0011] The features and advantages of the embodiments of the present disclosure may be more clearly understood by referring to the accompanying drawings, which are schematic and should not be construed as limiting the present disclosure in any way. In the accompanying drawings:

[0012] Figure 1 A schematic diagram of a multi-level architecture in a related technical book is shown;

[0013] Figure 2 A schematic diagram showing a multi-level architecture in one embodiment of the present disclosure is shown;

[0014] Figure 3 A schematic diagram of the steps of a model training method in one embodiment of the present disclosure is shown;

[0015] Figure 4 A schematic diagram showing calculation of comprehensive error information through different branches in one embodiment of the present disclosure is shown;

[0016] Figure 5 A schematic diagram showing a multi-level architecture including at least two first student models in one embodiment of the present disclosure is shown;

[0017] Figure 6 A schematic diagram of functional modules of a data generating device in one embodiment of the present disclosure is shown;

[0018] Figure 7 A schematic structural diagram of an electronic device in one embodiment of the present disclosure is shown. DETAILED DESCRIPTION

[0019] In order to make the purpose, technical solutions and advantages of the embodiments of the present disclosure clearer, the technical solutions in the embodiments of the present disclosure will be clearly and completely described below in conjunction with the drawings in the embodiments of the present disclosure. Obviously, the described embodiments are part of the embodiments of the present disclosure, not all of the embodiments. Based on the embodiments of the present disclosure, all other embodiments obtained by those skilled in the art without creative work are within the scope of protection of the present disclosure.

[0020] See also Figure 1 In the relevant technical solution, the multi-level architecture of knowledge distillation may include a teacher model and multiple student models. As the training level goes deeper, the number of sampling steps of the model will gradually decrease. For example, the teacher model can output the final prediction result after 1,000 sampling steps. The student model at the bottom level only needs 5 sampling steps to output the prediction result. Through the step-by-step knowledge distillation process, the number of sampling steps can be greatly compressed while ensuring the prediction accuracy, thereby improving the data processing efficiency of the model.

[0021] In practical applications, the teacher model and the student model can be diffusion models, and the sampling steps of the teacher model and the student model can be the time steps in the diffusion model. When generating data based on the diffusion model, it is possible to start from the time step S and gradually infer until the time step decreases to 1. In this way, after inferring for S time steps, the required data can be finally generated.

[0022] In the actual training process, a large-scale training sample can be used to train the teacher model first. After the training accuracy of the teacher model reaches the requirement, the next-level student model A can be trained. During the training of the student model A, the prediction results of the teacher model can be used to guide the student model A to output the correct prediction results. After the training of the student model A is completed, the prediction results of the student model A can be used to guide the student model B to output the correct prediction results.

[0023] According to the above scheme, after completing the training of the bottom-level student model, the student model with the least sampling steps can be used as the prediction model for actual online use, thereby improving the efficiency of data processing while ensuring the prediction accuracy.

[0024] However, in the above-mentioned related technical solutions, it is often necessary to complete the training of the model of the current level before starting to train the model of the next level. That is to say, for the student model of each level, it is necessary to separately determine whether the student model of that level has been trained to a state where the accuracy meets the requirements. Only after determining that the accuracy of the student model of the current level meets the requirements, will the student model of the next level be trained based on the student model of the current level, so as to ensure that the student model of the last level can achieve better accuracy. As the number of levels of the model increases, the time required for training will also increase accordingly, which will undoubtedly reduce the efficiency of model training.

[0025] In addition, in the above-mentioned related technical solutions, if the student model of the current level that has completed training is overfitted, then the student model of the next level that is distilled based on the student model of the current level will also be overfitted. By analogy, overfitting will also exist in the student model of the last level. It can be seen that the above-mentioned method of completing the training of the current level model before training the next level model has certain defects.

[0026] In view of this, an embodiment of the present disclosure provides a method for model training, see Figure 2 and Figure 3 , the method may include the following steps.

[0027] S11: Acquire a multimodal training data set, wherein the multimodal training data set includes multiple groups of multimodal samples, and the multimodal samples include matching first modality samples and second modality samples.

[0028] In this embodiment, depending on the application scenario, the matching first modality samples and second modality samples in the multimodal data set may have different forms of expression. For example, the matching text samples and image samples in the graphic training data set can be used as the first modality samples and the second modality samples, respectively. Of course, with the different application scenarios, the above-mentioned matching first modality samples and second modality samples may also be matching audio samples and image samples. The present disclosure does not limit the specific implementation form of the multimodal data set. In some of the following embodiments, the multimodal training data set can be represented by a graphic training data set. Accordingly, the data generation model can be used as an image generation model, the multimodal samples can be represented by graphic samples, the first modality samples can be represented by text samples, and the second modality samples can be represented by image samples.

[0029] In this embodiment, the purpose of training the model is to obtain a matching predicted image based on the input text description information. The text description information can be used to describe the content contained in the predicted image to be generated. For example, the text description information can be "two men sitting at a white round table". The model can generate a predicted image that matches the text description information by extracting features and predicting the text description information.

[0030] In this embodiment, the multimodal training data set required for the model training process may include several groups of multimodal samples, and the multimodal samples may include matching first modality samples and second modality samples. The multimodal training data set may be an existing data set, or a data set obtained by expanding samples of some multimodal samples. The present disclosure does not limit the method for obtaining the multimodal training data set.

[0031] S13: When using the multimodal training data set to perform model training, for the target multimodal samples used in any training round, a first prediction result of a target first modality sample in the target multimodal samples is generated based on the teacher model that has completed training.

[0032] See also Figure 2In this embodiment, the multi-level architecture may include a teacher model, a first student model and a data generation model, wherein the data generation model may be used as the student model at the bottom layer. In the multi-level architecture, as the levels continue to go deeper, the scale of the model can be gradually compressed, and the speed at which the model infers the data will also gradually increase. For example, in some embodiments, as the levels continue to go deeper, the network levels of the model can be gradually compressed, and the speed of data inference can be improved by reasoning the data through the compressed network. In some embodiments, as the levels continue to go deeper, the sampling steps of the model can also be gradually compressed. Taking the diffusion model as an example, the above-mentioned sampling steps can be the time steps in the diffusion model. For example, the teacher model can be a 1000-step model, the first student model can be a 20-step model, and the data generation model can be a 10-step model. Of course, in practical applications, the number of first student models in the multi-level architecture can be more than one. For example, there may be two first student models between the teacher model and the bottom-level data generation model in a multi-level architecture, wherein the first first student model may compress the number of sampling steps to 20 steps, and the second first student model may compress the number of sampling steps to 10 steps, so that the number of sampling steps of the data generation model may be further compressed to 5 steps. In the present disclosure, a first student model is used as an example to illustrate the scheme, and other multi-level architectures including multiple first student models may be deduced in the same way.

[0033] In this embodiment, since the teacher model has a large number of sampling steps, the teacher model can be trained using a multimodal training data set to obtain a trained teacher model. Subsequently, the remaining student models can be trained synchronously based on the trained teacher model.

[0034] In practical applications, when a model is trained using a multimodal training data set, multiple training rounds may be included. In each training round, at least one multimodal sample may be selected from the multimodal training data set to train the model. In each training round, the multimodal sample used to train the model may be used as a target multimodal sample. In these multiple training rounds, the model parameters may be continuously corrected so that the prediction results output by the model match the target multimodal sample. In any training round, each student model in the multi-level architecture may be trained synchronously. Specifically, taking the current training round as an example, the target first modality sample in the target multimodal sample may be first input into the teacher model that has completed the training, and the teacher model may output the first prediction result of the target first modality sample. In particular, when the second modality sample in the target multimodal sample is an image sample, correspondingly, the first prediction result may be a predicted image corresponding to the target first modality sample, or may be image information that can characterize the predicted image. In particular, the image information may be, for example, a quantized feature matrix, and a corresponding predicted image may be generated by decoding the feature matrix.

[0035] S15: Obtain a second prediction result output by the first student model to be trained for the target first modality sample, and compare the second prediction result with the first prediction result to correct the first student model based on the comparison result.

[0036] S17: Obtain a third prediction result output by the data generation model to be trained for the target first modality sample, and compare the third prediction result with the prediction result output by the first student model for the target first modality sample, so as to correct the data generation model based on the comparison result.

[0037] In this embodiment, in the current training round, the target first modality sample can be input into the first student model and the data generation model at the same time. In this way, the first student model can output the corresponding second prediction result by processing the target first modality sample, and the data generation model can output the corresponding third prediction result by processing the target first modality sample.

[0038] Since neither the first student model nor the data generation model has been trained, the second prediction results and the third prediction results mentioned above will have certain errors. For the first student model, the first prediction result output by the teacher model can be provided to the first student model as label information to be referenced, so that the second prediction result output by the first student model can be compared with the first prediction result to determine the error between the two, and the first student model can be corrected based on the comparison result. Among them, using the first prediction result as label information to train the first student model can allow the first student model to learn the generalization ability of the teacher model. Similarly, subsequently using the prediction result output by the first student model as label information for the data generation model can allow the data generation model to learn the generalization ability of the first student model.

[0039] In this embodiment, the prediction result output by the first student model for the target first modal sample can be used as the label information of the data generation model. Among them, the prediction result output by the first student model can have different meanings in different application scenarios. In a specific application scenario, the above-mentioned second prediction result output by the uncorrected first student model can be directly used as the label information of the data generation model. In this way, the prediction result output by the first student model can be directly used to train the data generation model. Although the second prediction result is not necessarily accurate, this processing method can improve the efficiency of model training. At the same time, the processing process of the first student model on the data during the training process can also be more comprehensively learned by the data generation model. In addition, in another specific application scenario, the prediction result output by the corrected first student model for the target first modal sample can be used as the label information of the data generation model. Compared with the second prediction result, the prediction result output by the corrected first student model will be more accurate. Correcting the data generation model based on the more accurate prediction result can improve the training accuracy of the data generation model. In actual application scenarios, the prediction result output by the first student model can be flexibly selected according to different needs.

[0040] By comparing the error between the third prediction result output by the data generation model and the prediction result output by the first student model, the data generation model can be corrected. It should be noted that in the initial stage of training, the prediction result output by the first student model is often an inaccurate prediction result. As the number of training rounds increases, the prediction result output by the first student model will tend to be an accurate prediction result. In each training round, the data generation model will be corrected with the prediction result output by the first student model as label information. Therefore, the improvement process of the prediction ability of the first student model from poor to good will also be learned by the data generation model. In the related art, the first student model will use the prediction result output by the first student model as the label information of the next-level student model after the training is completed. In this way, the next-level student model will directly learn the prediction result of the first student model after the training is completed, which will cause the correction process of the next-level student model to be relatively long and have low training efficiency. At the same time, as mentioned above, in the related art, only after determining that the accuracy of the student model of the current level meets the requirements, will the student model of the next level be trained based on the student model of the current level, so as to ensure that the student model of the last level can achieve good accuracy. However, in the above-mentioned implementation of the present disclosure, the student models of each level are synchronously distilled during the training process, and it is not necessary to judge whether the accuracy of the student models of each level meets the requirements one by one, but only to confirm whether the prediction accuracy of the data generation model of the last level meets the requirements, which will undoubtedly greatly improve the training efficiency of the model.

[0041] In addition, in order to solve the problem of overfitting, in the above-mentioned embodiment of the present disclosure, the prediction results of the model of the current level can be used as the label information of the model of the next level. Specifically, the target second modal sample represents the "standard answer" (groundtruth), and the prediction result output by the model represents the "reasonable answer" that has a certain error with the standard answer (the model after training can ensure that the error is within the allowable range). By using the reasonable answer as the label information for reference of the student model, overfitting can be avoided.

[0042] In one embodiment, when the third prediction result output by the data generation model is compared with the prediction result output by the first student model, the error information between the third prediction result and the prediction result output by the first student model can be calculated. According to the requirements of the actual application scenario, the error information can be represented by cross entropy, for example. Through the error information, the network weights in the data generation model can be updated, so that the prediction result output by the data generation model after the network weights are updated can be close to the prediction result output by the first student model.

[0043] Similarly, when the second prediction result output by the first student model is compared with the first prediction result output by the teacher model, the error information between the two can also be calculated, and the network weights in the first student model can be updated based on the calculated error information.

[0044] In one embodiment, in order to reduce the number of training rounds required in the model training process and improve the speed of model training, when the network weights in the model are updated using error information, sample information of the target second modality sample in the target multimodal sample can be introduced. When the second modality sample is an image sample, the sample information can be image information.

[0045] Specifically, see Figure 4 , in any training round, the error information of the data generation model can be calculated by two branches. Among them, the first branch can calculate the first error information between the third prediction result and the second prediction result in the aforementioned manner. The second branch can use the image information of the target image sample as label information to calculate the second error information between the third prediction result and the image information. Among them, both the first error information and the second error information can be cross entropy. The image information of the target image sample can be consistent with the type of the third prediction result output by the image generation model. For example, the third prediction result can be the encoded feature matrix output by the image generation model for the target text sample, then the image information can also be the feature matrix after encoding the target image sample.

[0046] In this embodiment, after calculating the first error information and the second error information, the first error information and the second error information may be weighted and summed to generate comprehensive error information. The weight coefficients of the first error information and the second error information may be flexibly set according to actual needs. For example, in order to avoid overfitting, the weight coefficient of the second error information may be adjusted to be appropriately lower. After generating the comprehensive error information, the network weights in the image generation model may be updated using the comprehensive error information.

[0047] Similarly, for the first student model, two branches can also be used to calculate the final error information. Among them, the first branch can be used to calculate the error information between the second prediction result and the first prediction result, and the second branch can be used to calculate the error information between the prediction result output by the first student model and the sample information of the target second modality sample. The specific process is similar to the description in the aforementioned implementation method, and will not be repeated here.

[0048] In one embodiment, when the number of first student models is at least two, refer to Figure 5, taking two first student models as an example, the prediction results output by the teacher model can be used as the label information of the first first student model, so as to calibrate the first first student model; the prediction results output by the first first student model can be used as the label information of the second first student model, so as to calibrate the second first student model. Finally, the prediction results output by the second first student model can be used as the label information of the bottom-level data generation model, so as to calibrate the data generation model. In each training round, by passing the prediction results layer by layer, the small model of the lower layer can learn the generalization ability of the large model of the upper layer, and the improvement process of the prediction accuracy of the upper model will also be learned by the lower model, making the training process of the bottom-level data generation model more efficient, thereby improving the efficiency of model training.

[0049] In one embodiment, in order to further improve the training speed of the data generation model and optimize the training effect of the data generation model, the sampling network in the data generation model can be aligned with the sampling network in the first student model, and the sampling features output by the sampling networks can be compared one by one to see if they are consistent. Specifically, for any first sampling network in the data generation model, the first sampling feature output by the first sampling network can be obtained. A plurality of sampling networks can be included in the data generation model, and each sampling network can output corresponding sampling features. Generally speaking, the number of sampling networks is consistent with the number of sampling steps of the model.

[0050] Since the sampling steps of the data generation model and the first student model are different, the sampling networks in the data generation model and the first student model are not one-to-one corresponding. In view of this, the second sampling network corresponding to the first sampling network can be determined in the first student model based on the sampling step ratio between the data generation model and the first student model. Specifically, the first network identifier of the first sampling network can be identified, and the first network identifier can characterize the position of the first sampling network in the data generation model. For example, the first network identifier can be the network number of the first sampling network in the data generation model. Then, according to the sampling step ratio and the first network identifier, the second network identifier can be calculated. For example, assuming that the sampling step of the first student model is 10 steps and the sampling step of the data generation model is 5 steps, then the above sampling ratio can be 10 / 5=2. If the first network identifier is 3, it means that the first sampling network is the third sampling network in the data generation model, and the product of the first network identifier and the sampling ratio is 6, then 6 can be used as the above second network identifier.

[0051] After determining the second network identifier, a second sampling network at the position represented by the second network identifier can be determined in the first student model. Taking the second network identifier as 6 as an example, the second sampling network can be the 6th sampling network in the first student model.

[0052] In this embodiment, after determining the second sampling network corresponding to the first sampling network in the first student model, the second sampling feature output by the second sampling network can be obtained. In theory, after the sampling step number is compressed, the first sampling feature and the second sampling feature should be matched, and the meaning of matching here can mean that the error between the first sampling feature and the second sampling feature is within the allowable range. However, during the model training process, since the network weights are not necessarily accurate, the first sampling feature and the second sampling feature may be inaccurate. At this time, the first sampling feature and the second sampling feature can be compared, and the first sampling network can be corrected based on the comparison result, so that the sampling feature output by the corrected first sampling network matches the sampling feature output by the second sampling network. Among them, the comparison result between the first sampling feature and the second sampling feature can still be represented by error information, and the error information can be, for example, cross entropy.

[0053] In this way, for any sampling network in the data generation model, the corresponding sampling network can be determined in the first student model. By comparing the sampling features output by the sampling network, adjustments can be made from the level of the sampling network in the data generation model, which can further improve the training speed of the data generation model and optimize the training effect of the data generation model.

[0054] In addition, the above-mentioned sampling feature matching process is also applicable to the case where there are at least two first student models. Specifically, for any two adjacent student models (including the bottom-level data generation model), the two adjacent student models can be called upper student models and lower student models. For any first sampling network in the lower student model, the first sampling feature output by the first sampling network can be obtained. Then, according to the sampling step ratio between the lower student model and the upper student model, the second sampling network corresponding to the first sampling network can be determined in the upper student model, and the second sampling feature output by the second sampling network can be obtained. Then, the first sampling feature and the second sampling feature can be compared, and the first sampling network can be corrected based on the comparison result, so that the sampling feature output by the corrected first sampling network matches the sampling feature output by the second sampling network. Among them, the specific implementation process can be referred to the description in the aforementioned embodiment, which will not be repeated here.

[0055] After training a data generation model that meets the requirements in the above manner, the present disclosure can provide a data generation method. Specifically, the data generation model has fewer sampling steps and higher sampling accuracy. The trained data generation model is used to process the text description information to be processed, and a predicted image of the text description information can be quickly generated. From the above description, it can be seen that the multi-level architecture where the data generation model is located includes at least a teacher model that has been trained and a first student model to be trained at the upper level of the data generation model. In any training round of model training based on training samples, the first prediction result output by the teacher model for the training sample is used to correct the first student model, and the second prediction output by the first student model for the training sample is used to correct the data generation model.

[0056] The technical solution provided by one or more embodiments of the present disclosure may include a teacher model that has completed training and a first student model located at the previous level of the data generation model in the multi-level architecture where the data generation model is located, wherein the data generation model and the first student model are both models that need to be trained. In the present disclosure, the data generation model and the first student model can be trained synchronously. Specifically, in each training round, the first prediction result output by the teacher model for the training sample can be used to correct the first student model of the next level, and the second prediction result output by the first student model for the training sample can be used to correct the data generation model of the next level. In this way, in addition to the teacher model, models of other levels can be trained synchronously in the same training round, without the need to train the next level model after completing the training of the previous level model, thereby greatly improving the efficiency of model training.

[0057] In addition, when using a large-scale training data set for multiple training rounds, the prediction accuracy of the first student model will gradually improve. Since the data generation model will perform model correction based on the prediction results output by the first student model in each training round, the improvement process of the prediction accuracy of the first student model will also be learned by the data generation model, making the training process of the data generation model more efficient, thereby improving the efficiency of model training.

[0058] See also Figure 6 In one embodiment of the present disclosure, a data generating device is provided, the device comprising:

[0059] The prediction unit 100 is used to obtain the first modal information to be processed, and generate the second modal data corresponding to the first modal information based on the trained data generation model;

[0060] A construction unit 200 is used to set at least a teacher model that has completed training and at least one first student model to be trained between the teacher model and the data generation model in the multi-level architecture where the data generation model is located; wherein, in any training round of model training based on training samples, the first prediction result output by the teacher model for the training sample is used to correct the first student model, and the prediction result output by the first student model for the training sample is used to correct the data generation model.

[0061] Among them, the specific processing logic of each functional module can be found in the description of the aforementioned method implementation method, which will not be repeated here.

[0062] See also Figure 7 The present disclosure also provides an electronic device, which includes a memory and a processor, wherein the memory is used to store a computer program, and when the computer program is executed by the processor, the above-mentioned data generation method is implemented.

[0063] Each unit described in the above embodiments may be implemented by a computer chip or a product having a certain function. A typical implementation device is a computer. Specifically, the computer may be, for example, a personal computer, a laptop computer, a cellular phone, a camera phone, a smart phone, a personal digital assistant, a media player, a navigation device, an email device, a game console, a tablet computer, a wearable device, or a combination of any of these devices.

[0064] For the convenience of description, the above devices are described in terms of functions and are described separately in various units. Of course, when implementing the present application, the functions of each unit can be implemented in the same or multiple software and / or hardware.

[0065] The present disclosure also provides a computer-readable storage medium, wherein the computer-readable storage medium is used to store a computer program, and when the computer program is executed by a processor, the above-mentioned data generation method is implemented.

[0066] The processor may be a central processing unit (CPU). The processor may also be other general-purpose processors, digital signal processors (DSP), application-specific integrated circuits (ASIC), field-programmable gate arrays (FPGA) or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, or a combination of the above chips.

[0067] As a non-transitory computer-readable storage medium, the memory can be used to store non-transitory software programs, non-transitory computer executable programs and modules, such as program instructions / modules corresponding to the method in the embodiment of the present disclosure. The processor executes various functional applications and data processing of the processor by running the non-transitory software programs, instructions and modules stored in the memory, that is, implementing the method in the above method embodiment.

[0068] The memory may include a program storage area and a data storage area, wherein the program storage area may store an operating system, an application required for at least one function; the data storage area may store data created by the processor, etc. In addition, the memory may include a high-speed random access memory, and may also include a non-transitory memory, such as at least one disk storage device, a flash memory device, or other non-transitory solid-state storage device. In some embodiments, the memory may optionally include a memory remotely disposed relative to the processor, and these remote memories may be connected to the processor via a network. Examples of the above-mentioned network include, but are not limited to, the Internet, an intranet, a local area network, a mobile communication network, and combinations thereof.

[0069] Those skilled in the art can understand that all or part of the processes in the above-mentioned embodiments can be implemented by instructing the relevant hardware through a computer program, and the program can be stored in a computer-readable storage medium, and when the program is executed, it can include the processes of the embodiments of the above-mentioned methods. Among them, the storage medium can be a 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), etc.; the storage medium can also include a combination of the above-mentioned types of memory.

[0070] Each embodiment in this specification is described in a progressive manner, and the same or similar parts between the embodiments can be referred to each other, and each embodiment focuses on the differences from other embodiments. In particular, for the embodiments of the device, equipment, and storage medium, since they are basically similar to the method embodiments, the description is relatively simple, and the relevant parts can be referred to the partial description of the method embodiments.

[0071] The above is only an embodiment of the present application and is not intended to limit the present application. For those skilled in the art, the present application may have various changes and variations. Any modification, equivalent replacement, improvement, etc. made within the spirit and principle of the present application should be included in the scope of the claims of the present application.

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

Claims

1. A data generation method, characterized in that: The method comprises: Acquire first modal information to be processed, and generate second modal data corresponding to the first modal information based on the trained data generation model; The multi-level architecture of the data generation model includes at least a teacher model that has been trained, and at least one first student model to be trained between the teacher model and the data generation model; In any training round of model training based on training samples, the first prediction result output by the teacher model for the training sample is used to correct the first student model, and the prediction result output by the first student model for the training sample is used to correct the data generation model.

2. The method according to claim 1, characterized in that: The data generation model is specifically trained in the following manner: Acquire a multimodal training data set, wherein the multimodal training data set includes multiple groups of multimodal samples, and the multimodal samples include matching first modality samples and second modality samples; When using the multimodal training data set for model training, for a target multimodal sample used in any training round, generating a first prediction result of a target first modality sample in the target multimodal sample based on the trained teacher model; Obtaining a second prediction result output by the first student model to be trained for the target first modality sample, and comparing the second prediction result with the first prediction result to calibrate the first student model based on the comparison result; Obtain a third prediction result output by the data generation model to be trained for the target first modal sample, and compare the third prediction result with the prediction result output by the first student model to be trained for the target first modal sample, so as to correct the data generation model based on the comparison result.

3. The method according to claim 2, characterized in that Comparing the third prediction result with the prediction result output by the first student model to be trained for the target first modality sample to correct the data generation model based on the comparison result includes: Calculate error information between the third prediction result and the prediction result output by the first student model to be trained for the target first modality sample, and update the network weights in the data generation model according to the error information.

4. The method according to claim 2, characterized in that: Comparing the third prediction result with the prediction result output by the first student model to be trained for the target first modality sample to correct the data generation model based on the comparison result includes: Calculating first error information between the third prediction result and the prediction result output by the first student model to be trained for the target first modality sample; Acquire sample information of a target second modality sample in the target multimodal sample, and calculate second error information between the third prediction result and the sample information; Comprehensive error information is generated according to the first error information and the second error information, and the network weights in the data generation model are updated using the comprehensive error information.

5. The method according to claim 2, characterized in that: The first modality sample includes an audio sample or a text sample, and the second modality sample includes an image sample.

6. The method according to claim 1, characterized in that When the data generation model processes the training sample, the method further includes: For any first sampling network in the data generation model, obtaining a first sampling feature output by the first sampling network; According to the sampling step ratio between the data generation model and the first student model, determining a second sampling network corresponding to the first sampling network in the first student model, and obtaining a second sampling feature output by the second sampling network; The first sampling feature and the second sampling feature are compared, and the first sampling network is corrected based on the comparison result, so that the sampling feature output by the corrected first sampling network matches the sampling feature output by the second sampling network.

7. The method according to claim 6, characterized in that Determining a second sampling network corresponding to the first sampling network in the first student model includes: identifying a first network identifier of the first sampling network, where the first network identifier is used to characterize a position of the first sampling network in the data generation model; Calculating a second network identifier according to the sampling step ratio and the first network identifier; In the first student model, a second sampled network is determined at a location represented by the second network identification.

8. A data generating device, characterized in that: The device comprises: A prediction unit, configured to obtain first modal information to be processed, and generate second modal data corresponding to the first modal information based on the trained data generation model; A construction unit is used to set at least a teacher model that has completed training and at least one first student model to be trained between the teacher model and the data generation model in the multi-level architecture where the data generation model is located; wherein, in any training round of model training based on training samples, the first prediction result output by the teacher model for the training sample is used to correct the first student model, and the prediction result output by the first student model for the training sample is used to correct the data generation model.

9. An electronic device, characterized in that: The electronic device comprises a memory and a processor, wherein the memory is used to store a computer program, and when the computer program is executed by the processor, the method according to any one of claims 1 to 7 is implemented.

10. A computer-readable storage medium, characterized in that: The computer-readable storage medium is used to store a computer program, and when the computer program is executed by a processor, the method according to any one of claims 1 to 7 is implemented.