A deep dataset distillation and lightweight method using GAN prior enhancement
Through the data set distillation method that deeply utilizes GAN prior enhanced, the hidden space of GAN is optimized layer by layer and the optimal hidden encoding is selected, which solves the problem of low distillation performance of existing data sets, and achieves more efficient data set distillation and optimization of generated data sets.
Patent Information
- Application Number
- CN202410287597.6
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-03-13
- Publication Date
- 2025-02-25
- Estimated Expiration
- 2044-03-13
AI Technical Summary
The dataset distillation method of existing dataset distillation methods has low distillation performance and requires the deployment of a large number of pre-experiments to select specific hidden spaces for different dataset distillation functions and datasets, losing the guidance provided by the front part of the GAN.
By sending the initialized mean noise into the GAN network, the hidden encoding is obtained, and the hidden encoding is converted into a real picture through the GAN network, the distillation loss of the generated data set and the real data set is calculated, the hidden encoding is optimized, and the preset hidden encoding is selected according to the characteristic distance, and the hidden space of the GAN layer by layer is sent to the GAN for optimization. Finally, the generated data set with the best performance is selected as the optimal solution.
The performance of data set distillation is improved, and the data sets are optimized for the generation using GAN's multi-level guidance information, and the generated data set corresponding to the optimal layer is automatically selected as the result, reducing the dependence and experiment volume on different data sets.
Smart Images

Figure CN118378078B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of electronic communication technology, and in particular to a data set distillation and lightweight method that deeply utilizes GAN prior enhancement. Background Art
[0002] Dataset distillation is a promising approach to address the problems of large datasets and long training time required to train neural networks. This approach achieves its goal by generating a more compact generated dataset where each data point contains a higher concentration of task-specific information than the real dataset. When trained on the generated dataset, the neural network can achieve performance comparable to that of training with the original dataset. By significantly reducing the size of the training dataset, training a neural network with the generated dataset obtained by dataset distillation can achieve significant reductions in training cost and memory consumption. To improve the performance of the generated dataset, an existing class of improved dataset distillation methods indirectly optimizes the generated dataset by deploying a pre-trained GAN as a data prior and optimizing the hidden code required by the GAN to generate images.
[0003] The existing GLaD method uses GAN as a dataset prior and disassembles GAN, selecting different latent spaces as the optimization space for latent coding for different dataset distillation loss functions. This method requires a large number of pre-experiments to select specific latent spaces for different dataset distillation functions and even different datasets, and loses the guidance information that can be provided by the front part of the intermediate layer of GAN.
[0004] Therefore, the prior art needs to be improved. Summary of the invention
[0005] The technical problem to be solved by the present invention is that, in view of the defects of the prior art, the present invention provides a dataset distillation and lightweight method that deeply utilizes GAN prior enhancement to solve the problem of low dataset distillation performance of the existing dataset distillation method.
[0006] The technical solution adopted by the present invention to solve the technical problem is as follows:
[0007] In a first aspect, the present invention provides a data set distillation and lightweight method using GAN prior enhancement in depth, including:
[0008] Send the initialized mean noise into the GAN network to obtain the hidden code;
[0009] Converting the latent code into a real picture through the GAN network;
[0010] According to the combination of the real images, calculating the distillation loss of the generated data set and the real data set;
[0011] Optimizing the latent code by an optimizer, and selecting a preset latent code according to the calculated feature distance;
[0012] All datasets generated using the preset latent code of the intermediate layer are evaluated, and the datasets that meet the conditions are selected as solutions.
[0013] In one implementation, the step of sending the initialized mean noise into the GAN network to obtain a hidden code includes:
[0014] By randomly initializing a plurality of noise inputs, calculating an average value of the plurality of noises, and obtaining the initialized average noise;
[0015] The initialized mean noise is sent to the GAN network, and transmitted through the matching network of the GAN network to obtain the initial hidden code z0.
[0016] In one implementation, converting the latent code into a real picture through the GAN network includes:
[0017] The pre-trained GAN network is decomposed, and for each layer G provided by the GAN network i (·), through each layer G i (·) The corresponding residual generation network G K-1 ,…,G i (·) Convert the latent code to a real image.
[0018] In one implementation, the step of calculating the distillation loss of the generated data set and the real data set according to the combination of the real images includes:
[0019] Based on the distillation method, the distillation loss is calculated using a real dataset and a generated dataset consisting of the real images.
[0020] In one implementation, optimizing the latent code by an optimizer and selecting a preset latent code according to the calculated feature distance includes:
[0021] Optimizing the latent code by an optimizer, wherein the optimization process lasts for a predetermined fixed number of steps;
[0022] Calculating the characteristic distance;
[0023] Evaluate all latent codes generated during the optimization process according to the feature distance, and record the best latent code of the current layer according to the evaluation result;
[0024] The optimal hidden code is passed to the next layer to obtain the initial hidden code of the next layer .
[0025] In one implementation, the calculating the characteristic distance includes:
[0026] The feature distance between the generated data set and the real data set in a certain feature space is extracted by presetting a matching objective function φ(·) to obtain the feature distance.
[0027] In one implementation, evaluating all data sets generated using preset implicit coding of the intermediate layer and selecting data sets that meet the conditions as solutions includes:
[0028] When the optimization space reaches the final pixel domain, the hidden codes of each layer are preset , using the corresponding residual generation network G K-1 ,…,G i (·) Generate the corresponding generated data set S;
[0029] The hierarchical feature distance D(S,T) is used as the search index to evaluate the generated data set S and select the final optimal solution z * .
[0030] In a second aspect, the present invention provides a data set distillation and lightweight device that deeply utilizes GAN prior enhancement, including:
[0031] The initial latent coding module is used to send the initialized mean noise into the GAN network to obtain the latent code;
[0032] A latent code conversion module, used to convert the latent code into a real picture through the GAN network;
[0033] A distillation loss calculation module, used to calculate the distillation loss of the generated data set and the real data set according to the combination of the real images;
[0034] A preset latent code selection module, used for optimizing the latent code through an optimizer, and selecting a preset latent code according to the calculated feature distance;
[0035] The latent coding evaluation module is used to evaluate all data sets generated using the preset latent coding of the intermediate layer and select the data sets that meet the conditions as the solution.
[0036] In a third aspect, the present invention provides a terminal, comprising: a processor and a memory, wherein the memory stores a data set distillation and lightweight program for deep level GAN a priori enhancement, and the data set distillation and lightweight program for deep level GAN a priori enhancement is used to implement the operation of the data set distillation and lightweight method for deep level GAN a priori enhancement as described in the first aspect when executed by the processor.
[0037] In a fourth aspect, the present invention further provides a medium, which is a computer-readable storage medium, and which stores a deep-level dataset distillation and lightweight program using GAN prior enhancement. When the deep-level dataset distillation and lightweight program using GAN prior enhancement is executed by a processor, it is used to implement the operation of the deep-level dataset distillation and lightweight method using GAN prior enhancement as described in the first aspect.
[0038] The present invention adopts the above technical solution to achieve the following effects:
[0039] The present invention sends the hidden code layer by layer into the hidden space of GAN for optimization, implicitly selects the preset hidden code in each layer according to the feature distance between the generated data set and the original data set, and sends the preset hidden code to the next layer as the optimization starting point, and finally selects the generated data set with the best actual performance in the whole process as the optimal solution. The present invention provides a method for further enhancing the distillation of data sets by using GAN priors, and uses layer-by-layer search of the intermediate layer space of GAN to optimize the generated data set using the multi-level guidance information of GAN, and automatically selects the generated data set corresponding to the optimal layer as the result, thereby improving the performance of data set distillation. BRIEF DESCRIPTION OF THE DRAWINGS
[0040] In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on the structures shown in these drawings without paying creative work.
[0041] Figure 1 It is a flowchart of the data set distillation and lightweight method using GAN prior enhancement in depth in the present invention.
[0042] Figure 2 This is the overall architecture diagram of the dataset distillation and lightweighting that deeply utilizes GAN prior enhancement in the present invention.
[0043] Figure 3 It is a schematic diagram comparing the performance of the generated dataset provided by the present invention and that obtained by previous GLaD work on the same model.
[0044] Figure 4 It is a functional principle diagram of a terminal in one implementation of the present invention.
[0045] The purpose, features and advantages of the present invention will be further described with reference to the accompanying drawings in conjunction with the embodiments. DETAILED DESCRIPTION
[0046] In order to make the purpose, technical solution and advantages of the present invention clearer and more specific, the present invention is further described in detail below with reference to the accompanying drawings and examples. It should be understood that the specific embodiments described herein are only used to explain the present invention and are not used to limit the present invention.
[0047] Exemplary Methods
[0048] The existing GLaD method uses GAN as a dataset prior and disassembles GAN, selecting different latent spaces as the optimization space for latent coding for different dataset distillation loss functions. This method requires a large number of pre-experiments to select specific latent spaces for different dataset distillation functions and even different datasets, and loses the guidance information that can be provided by the front part of the intermediate layer of GAN.
[0049] In response to the above technical problems, an embodiment of the present invention provides a data set distillation and lightweight method that deeply utilizes GAN prior enhancement. This method sends the hidden code layer by layer into the hidden space of GAN for optimization. In each layer, a preset hidden code is implicitly selected according to the feature distance between the generated data set and the original data set, and the preset hidden code is sent to the next layer as the optimization starting point. Finally, the generated data set with the best actual performance in the whole process is selected as the optimal solution.
[0050] Therefore, the embodiment of the present invention provides a method for further utilizing GAN priors to enhance dataset distillation (H-GLaD). Based on the existing GLaD, the intermediate layer space of GAN is searched layer by layer to achieve the optimization of the generated dataset using the multi-level guidance information of GAN, and the generated dataset corresponding to the optimal layer is automatically selected as the result, thereby improving the performance of dataset distillation.
[0051] like Figure 1 As shown, an embodiment of the present invention provides a data set distillation and lightweight method using GAN prior enhancement in depth, including the following steps:
[0052] Step S100, sending the initialized mean noise into the GAN network to obtain the hidden code.
[0053] In this embodiment, different from the existing method of selecting a fixed layer provided by GAN as the hidden code optimization space, the method of using GAN prior to enhance the distillation of the data set proposed in this embodiment does not need to select a fixed intermediate layer as the optimization space according to different data set distillation loss functions and different data sets, and at the same time includes all the guidance information that the pre-trained GAN can provide. Compared with the existing method, the generated data set obtained by the H-GLaD proposed in this embodiment can achieve better performance in various settings.
[0054] Specifically, in an implementation of this embodiment, step S100 includes the following steps:
[0055] Step S101, randomly initializing multiple noise inputs, calculating the average of the multiple noises, and obtaining the initialized average noise;
[0056] Step S102, sending the initialized mean noise into the GAN network, passing it through the matching network of the GAN network, and obtaining an initial latent code z0.
[0057] In this example, dataset distillation requires a real large-scale dataset. and aims to create a smaller generative dataset To reduce the performance gap between the models trained on the two datasets. To achieve this goal, a well-designed matching objective function φ(·) is needed to extract the feature distance between the generated dataset and the real data in a certain feature space, representing the performance gap between the real and generated datasets. The optimization process involves initializing the generated dataset with the real dataset and iteratively updating the generated dataset by minimizing the feature distance, which can be expressed by the following formula:
[0058]
[0059] Here, M(·,·) represents the matching metric. Based on this, the method of parameterizing the generated dataset using differentiable operations can transfer the optimization space from the pixel domain to the low-dimensional feature domain to improve performance. For example, the GAN prior-based method can be uniformly expressed as follows:
[0060]
[0061] Among them, z∈Z represents the pre-trained generative model G w (·) Hidden codes in specific feature domains. Under the guidance of generative adversarial networks, dataset distillation shows significant performance improvements.
[0062] In the H-GLaD method proposed in this embodiment, firstly, in order to obtain a better initial starting point, a novel average initial hidden code method is proposed. Specifically, by randomly initializing multiple noise inputs, calculating their averages, and passing them through the matching network of GAN, an initial hidden code z0 with reduced bias is obtained.
[0063] like Figure 1 As shown, in one implementation of the embodiment of the present invention, the deep-level data set distillation and lightweight method using GAN prior enhancement also includes the following steps:
[0064] Step S200, converting the latent code into a real picture through the GAN network.
[0065] In this embodiment, after obtaining the initial latent code z0 with reduced bias, in order to fully utilize the information guidance in the hierarchical feature field, it is necessary to train the pre-trained GAN G w (·) is decomposed to transform the latent code into a real picture through the GAN network.
[0066] Specifically, in an implementation of this embodiment, step S200 includes the following steps:
[0067] Step S201, decomposing the pre-trained GAN network, for each layer G i (·), through each layer G i (·) The corresponding residual generation network G K-1 ,…,G i (·) Convert the latent code into a real image.
[0068] In this embodiment, the pre-trained GAN G w When (·) is decomposed, a hierarchical search is performed, which can be expressed as:
[0069] G w (·)=G K-1 ,G K-2 ,…,G1,G0(·)
[0070] For each layer G provided by GAN i (·), first, only the remaining generation network G corresponding to this layer is used K-1 ,…,G i (·) Generate an image, that is, through each layer G i (·) The corresponding remaining generative network converts the latent code into a real picture, thereby obtaining a generated data set composed of the real picture; In this embodiment, the intermediate layer space of GAN is searched layer by layer, so as to realize the optimization of the generated data set using the multi-level guidance information of GAN.
[0071] like Figure 1 As shown, in one implementation of the embodiment of the present invention, the deep-level data set distillation and lightweight method using GAN prior enhancement also includes the following steps:
[0072] Step S300, calculating the distillation loss of the generated data set and the real data set according to the combination of the real images.
[0073] Specifically, in an implementation of this embodiment, step S300 includes the following steps:
[0074] Step S301, based on the distillation method, using the real data set and the generated data set composed of the real images to calculate the distillation loss.
[0075] In this embodiment, after obtaining the generated data set composed of the real images, a distillation method (for example, the MTT method) can be used to calculate the distillation loss. The method calculates the distillation loss based on the real data set and the generated data set composed of the generated images, and uses an optimizer to optimize z i , so as to realize the optimization of the hidden code layer by layer into the hidden space of GAN.
[0076] like Figure 1 As shown, in one implementation of the embodiment of the present invention, the deep-level data set distillation and lightweight method using GAN prior enhancement also includes the following steps:
[0077] Step S400, optimizing the latent code by an optimizer, and selecting a preset latent code according to the calculated feature distance.
[0078] In this embodiment, during the optimization process of the optimizer, the generated data set corresponding to the optimal layer can be automatically selected as the result, thereby improving the performance of data set distillation.
[0079] Specifically, in an implementation of this embodiment, step S400 includes the following steps:
[0080] Step S401, optimizing the latent code by an optimizer, and the optimization process continues for a predetermined fixed number of steps;
[0081] Step S402, calculating the characteristic distance;
[0082] Step S402a, extracting the feature distance between the generated data set and the real data set in a certain feature space by using a preset matching objective function φ(·) to obtain the feature distance.
[0083] Step S403, evaluating all latent codes generated in the optimization process according to the feature distance, and recording the best latent code of the current layer according to the evaluation result;
[0084] Step S404: pass the optimal hidden code to the next layer to obtain the initial hidden code of the next layer.
[0085] In this embodiment, after calculating the distillation loss based on the real data set and the generated data set composed of generated images, the hidden code z in the current layer can be optimized using the optimizer according to the calculated distillation loss. i ; where the optimization process lasts for a predetermined fixed number of steps. After the optimization process for a specific layer is completed, all latent codes generated during the optimization process are implicitly evaluated using the feature distance and The record is the best hidden code of the current layer (i.e., the preset hidden code); wherein, the feature distance is obtained by using a well-designed matching objective function φ(·) to extract the feature distance between the generated data set and the real data set in a certain feature space; the feature distance represents the performance gap between the real and generated data sets.
[0086] Finally, the best hidden code Passed to the next layer of GAN to obtain the initial hidden code of the next layer
[0087] The H-GLaD proposed in this embodiment sends the hidden code layer by layer into the hidden space of GAN for optimization. In each layer, a preset hidden code is implicitly selected and sent to the next layer as the optimization starting point according to the feature distance between the generated data set and the original data set. Finally, the generated data set with the best actual performance in the whole process is selected as the optimal solution.
[0088] In one implementation of the embodiment of the present invention, the deep-level method for data set distillation and lightweight enhancement using GAN priors also includes the following steps:
[0089] Step S500, evaluate all data sets generated using the preset latent coding of the intermediate layer, and select the data set that meets the conditions as the solution.
[0090] Specifically, in an implementation of this embodiment, step S500 includes the following steps:
[0091] Step S501: When the optimization space reaches the final pixel domain, the hidden codes of each layer are preset. Use the corresponding residual generation network G K-1 ,…,G i (·) Generate the corresponding generated data set S;
[0092] Step S502: Using the hierarchical feature distance D(S,T) as a search index, the generated data set S is evaluated to select the final optimal solution z * .
[0093] In this embodiment, the pre-trained GAN G w (·) During the hierarchical optimization process, when the optimization space reaches the final pixel domain, the optimal hidden code of each layer is recorded. (i.e. preset hidden code), use the corresponding residual generation network G K-1 ,…,G i (·) Generate the corresponding generated data set S, and select the final optimal solution z according to the actual performance of the generated data set *,In this way, all feature domains of GAN can be fully explored, and the rich guidance information therein can be utilized.
[0094] In the exploration process, the loss function value is initially used as the optimal hidden code for searching the current layer. . However, as the optimization space continues backward to the later feature domain, the loss function value has entered an oscillating state even though the performance of the generated dataset has not yet stabilized. Therefore, using the loss function value as a potential hierarchical evaluation indicator often fails to produce the desired results; another option is to directly evaluate the true performance of the generated dataset as a search metric. However, this evaluation process is very time-consuming, taking 10 to 100 times the time of the distillation optimization itself, making it impractical to directly evaluate the true performance of the generated dataset. Therefore, in this embodiment, a new hierarchical feature distance D(S,T) is proposed as a search metric, which can be expressed as:
[0095]
[0096] Among them, F l (·) represents the features extracted by the lth layer of the neural network, K is the number of categories in the dataset, and M is the number of neural networks.
[0097] This embodiment provides a method for optimizing the generated dataset layer by layer in all feature spaces of GAN. After obtaining the optimal latent code of a feature space, the optimization is not stopped, but it is sent to the next layer of feature space. By exploring the guidance information provided by GAN in this way, the performance of the method of using GAN as a priori to enhance the performance of dataset distillation is improved, and the problems existing in the existing methods are effectively solved.
[0098] like Figure 2 As shown, in one implementation, an overall flow chart of a method for improving the performance of data set distillation by using GAN in depth provided by an embodiment of the present invention includes the components required in the entire training process, including a pre-trained GAN, a distillation loss optimizer, a feature distance calculator, and different data sets required for training.
[0099] The performance comparison of the generated datasets provided by the embodiment of the present invention with that obtained by previous GLaD work on the same model is as follows: Figure 3 shown; from Figure 3 It can be clearly seen that the technical solution of the embodiment of the present invention significantly improves the performance of the generated dataset obtained by the dataset distillation method on the same model architecture compared with the previous solution, where the Alg. column represents the dataset distillation loss function used, and the ImNet row represents different datasets.
[0100] This embodiment achieves the following technical effects through the above technical solution:
[0101] This embodiment sends the hidden code layer by layer into the hidden space of GAN for optimization, implicitly selects the optimal hidden code in each layer according to the feature distance between the generated data set and the original data set, and sends the optimal hidden code to the next layer as the optimization starting point, and finally selects the generated data set with the best actual performance in the whole process as the optimal solution. This embodiment provides a method for further enhancing the distillation of data sets by using GAN priors, and uses layer-by-layer search of the intermediate layer space of GAN to optimize the generated data set using the multi-level guidance information of GAN, and automatically selects the generated data set corresponding to the optimal layer as the result, thereby improving the performance of data set distillation.
[0102] Exemplary Devices
[0103] Based on the above embodiments, the present invention further provides a data set distillation and lightweight device that deeply utilizes GAN prior enhancement, including:
[0104] The initial latent coding module is used to send the initialized mean noise into the GAN network to obtain the latent code;
[0105] A latent code conversion module, used to convert the latent code into a real picture through the GAN network;
[0106] A distillation loss calculation module, used to calculate the distillation loss of the generated data set and the real data set according to the combination of the real images;
[0107] A preset latent code selection module, used for optimizing the latent code through an optimizer, and selecting a preset latent code according to the calculated feature distance;
[0108] The latent coding evaluation module is used to evaluate all data sets generated using the preset latent coding of the intermediate layer and select the data sets that meet the conditions as the solution.
[0109] This embodiment achieves the following technical effects through the above technical solution:
[0110] This embodiment sends the hidden code layer by layer into the hidden space of GAN for optimization, implicitly selects the optimal hidden code in each layer according to the feature distance between the generated data set and the original data set, and sends the optimal hidden code to the next layer as the optimization starting point, and finally selects the generated data set with the best actual performance in the whole process as the optimal solution. This embodiment provides a method for further enhancing the distillation of data sets by using GAN priors, and uses layer-by-layer search of the intermediate layer space of GAN to optimize the generated data set using the multi-level guidance information of GAN, and automatically selects the generated data set corresponding to the optimal layer as the result, thereby improving the performance of data set distillation.
[0111] Based on the above embodiment, the present invention further provides a terminal, whose principle block diagram can be as follows: Figure 4 shown.
[0112] The terminal includes: a processor, a memory, an interface, a display screen and a communication module connected through a system bus; wherein the processor of the terminal is used to provide computing and control capabilities; the memory of the terminal includes a storage medium and an internal memory; the storage medium stores an operating system and a computer program; the internal memory provides an environment for the operation of the operating system and the computer program in the storage medium; the interface is used to connect to external devices; the display screen is used to display corresponding information; and the communication module is used to communicate with a cloud server or other devices.
[0113] When the computer program is executed by a processor, it is used to implement the operation of a deep dataset distillation and lightweight method enhanced by GAN prior.
[0114] It can be understood by those skilled in the art that Figure 4 The principle block diagram shown in the figure is only a block diagram of a partial structure related to the scheme of the present invention, and does not constitute a limitation on the terminal to which the scheme of the present invention is applied. The specific terminal may include more or fewer components than those shown in the figure, or combine certain components, or have a different arrangement of components.
[0115] In one embodiment, a terminal is provided, comprising: a processor and a memory, wherein the memory stores a deep-level GAN-enhanced dataset distillation and lightweight program, and the deep-level GAN-enhanced dataset distillation and lightweight program, when executed by the processor, is used to implement the operations of the deep-level GAN-enhanced dataset distillation and lightweight method as described above.
[0116] In one embodiment, a storage medium is provided, wherein the storage medium stores a deep-level GAN-enhanced dataset distillation and lightweight program, and the deep-level GAN-enhanced dataset distillation and lightweight program, when executed by a processor, is used to implement the operations of the deep-level GAN-enhanced dataset distillation and lightweight method as described above.
[0117] Those skilled in the art can understand that all or part of the processes in the above-mentioned embodiments can be implemented by instructing related hardware through a computer program, and the computer program can be stored in a non-volatile storage medium. When the computer program is executed, it can include the processes of the embodiments of the above-mentioned methods. Among them, any reference to memory, storage, database or other media used in the embodiments provided by the present invention can include non-volatile and volatile memory.
[0118] In summary, the present invention provides a method for data set distillation and lightweighting that deeply utilizes GAN prior enhancement, the method comprising: sending the initialized mean noise into the GAN network to obtain a hidden code; converting the hidden code into a real picture through the GAN network; calculating the distillation loss of the generated data set and the real data set according to the combination of the real pictures; optimizing the hidden code through an optimizer, and selecting a preset hidden code according to the calculated feature distance; evaluating all data sets generated using the preset hidden code of the intermediate layer, and selecting the data set that meets the conditions as the solution. The present invention uses a layer-by-layer search of the intermediate layer space of GAN, realizes the optimization of the generated data set using the multi-level guidance information of GAN, and automatically selects the generated data set corresponding to the optimal layer as the result, thereby improving the performance of data set distillation.
[0119] It should be understood that the application of the present invention is not limited to the above examples. For ordinary technicians in this field, improvements or changes can be made based on the above description. All these improvements and changes should fall within the scope of protection of the claims attached to the present invention.
Claims
1. A deep dataset distillation and lightweight method using GAN prior enhancement, characterized in that: include: Send the initialized mean noise into the GAN network to obtain the hidden code; Converting the latent code into a real picture through the GAN network; According to the combination of the real images, calculating the distillation loss of the generated data set and the real data set; Optimizing the latent code by an optimizer, and selecting a preset latent code according to the calculated feature distance; Evaluate all datasets generated using the preset latent code of the middle layer and select the dataset that meets the conditions as the solution; The initialized mean noise is sent to the GAN network to obtain the hidden code, including: By randomly initializing a plurality of noise inputs, calculating an average value of the plurality of noises, and obtaining the initialized average noise; Sending the initialized mean noise into the GAN network, passing it through the matching network of the GAN network, and obtaining an initial latent code z0; The converting the latent code into a real picture through the GAN network includes: The pre-trained GAN network is decomposed, and for each layer G provided by the GAN network i (·), through each layer G i (·) The corresponding residual generation network G K-1 , …, G i (·) converting the latent code into a real picture; The step of optimizing the latent code by an optimizer and selecting a preset latent code according to the calculated feature distance includes: Optimizing the latent code by an optimizer, wherein the optimization process lasts for a predetermined fixed number of steps; Calculating the characteristic distance; Evaluate all latent codes generated during the optimization process according to the feature distance, and record the best latent code of the current layer according to the evaluation result; The optimal hidden code is passed to the next layer to obtain the initial hidden code of the next layer The method evaluates all data sets generated using the preset hidden code of the intermediate layer, and selects data sets that meet the conditions as solutions, including: When the optimization space reaches the final pixel domain, the hidden codes of each layer are preset Use the corresponding residual generation network G K-1 , …, G i (·) Generate the corresponding generated data set S; The hierarchical feature distance D(S, T) is used as the search index to evaluate the generated data set S and select the final optimal solution z * .
2. The method for deep dataset distillation and lightweighting using GAN prior enhancement according to claim 1, characterized in that: The step of calculating the distillation loss of the generated data set and the real data set according to the combination of the real images includes: Based on the distillation method, the distillation loss is calculated using a real dataset and a generated dataset consisting of the real images.
3. The method for deep dataset distillation and lightweighting using GAN prior enhancement according to claim 1, characterized in that: The calculating the characteristic distance comprises: The feature distance between the generated data set and the real data set in a certain feature space is extracted by presetting a matching objective function φ(·) to obtain the feature distance.
4. A deep-level GAN a priori enhanced data set distillation and lightweight device, used to implement the deep-level GAN a priori enhanced data set distillation and lightweight method as described in any one of claims 1-3, characterized in that: include: The initial latent coding module is used to send the initialized mean noise into the GAN network to obtain the latent code; A latent code conversion module, used to convert the latent code into a real picture through the GAN network; A distillation loss calculation module, used to calculate the distillation loss of the generated data set and the real data set according to the combination of the real images; A preset latent code selection module, used for optimizing the latent code through an optimizer, and selecting a preset latent code according to the calculated feature distance; The latent coding evaluation module is used to evaluate all data sets generated using the preset latent coding of the intermediate layer and select the data sets that meet the conditions as the solution.
5. A terminal, characterized in that: include: A processor and a memory, wherein the memory stores a deep-level GAN a priori-enhanced dataset distillation and lightweight program, and when the deep-level GAN a priori-enhanced dataset distillation and lightweight program is executed by the processor, it is used to implement the operation of the deep-level GAN a priori-enhanced dataset distillation and lightweight method as described in any one of claims 1-3.
6. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores a deep-level data set distillation and lightweight program using GAN prior enhancement, which, when executed by a processor, is used to implement the operation of the deep-level data set distillation and lightweight method using GAN prior enhancement as described in any one of claims 1-3.
Citation Information
Patent Citations
Data retrieval method and device based on Bayesian optimization
CN114880360A
Knowledge distillation method and device for generative adversarial network, equipment and storage medium
CN116383639A