Data processing method and system based on spectral decomposition, equipment and medium

Through the data processing method based on spectral decomposition, tensor decomposition and trajectory matching technology are used to compress a large amount of picture information into a small number of pictures, solving the problems of low data processing efficiency and information security risks in the existing technology, and realizing the distillation of neural networks. The final effect is consistent with the original data set and protects the privacy of the image.

CN118570608APending Publication Date: 2024-08-30UNIV OF ELECTRONICS SCI & TECH OF CHINA
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202410769595.0
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-06-14
Publication Date
2024-08-30

AI Technical Summary

Technical Problem

Existing data processing methods are inefficient in the sample distillation process, especially in pixel space, which limits the data processing effect, and there are information security risks when the original data is provided to model training.

Method used

Using a data processing method based on spectral decomposition, by compressing the information of a large number of pictures into a small number of pictures, the image training effect of the neural network after distillation is consistent with the original image training effect. Tensor decomposition is used to construct a synthetic data set, and through Trajectory matching and reverse synthesis operations ensure the consistency of the data set.

Benefits of technology

It maintains the integrity of data set information in a small storage space, improves data processing efficiency, effectively protects image privacy, and ensures that the training effect of the neural network after distillation is consistent with the original data set.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118570608A
    Figure CN118570608A
Patent Text Reader

Abstract

The invention relates to the technical field of computer vision, and discloses a data processing method and system based on spectral decomposition, and the method comprises the steps: S1, determining the information of an original data set, and constructing a synthetic data set through the spectral decomposition operation; s2, enabling the synthesized data set to learn the information of the original data set through a track matching method; and S3, obtaining a final data set through reverse synthesis operation, and comparing the final data set with the original data set for confirmation. The system comprises a construction unit, a learning unit and a comparison confirmation unit. The invention further discloses electronic equipment and a computer readable storage medium. According to the method, the information of a large number of pictures is compressed into at least a number of pictures by using tensor decomposition, so that the effect of the neural network after being trained on the distilled pictures is kept consistent with the effect after being trained on the original pictures.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of computer vision technology, and in particular to a data processing method and system, device, and medium based on spectral decomposition, which compresses the information of a large number of pictures into a small number of pictures by using tensor decomposition, so that the effect of a neural network after training on the distilled pictures is consistent with the effect after training on the original pictures. Background Art

[0002] In existing deep learning frameworks, large amounts of data bring significant benefits to model training. However, large amounts of data pose a storage space challenge. At the same time, providing raw data for model training also brings risks of information security and knowledge leakage. Therefore, distilling the information of the entire dataset into a form that can be expressed by a small number of images has become a recent trend in data processing methods.

[0003] Among the various existing data processing methods for sample distillation, algorithms based on core set selection select representative subsets from existing datasets, but this type of method performs poorly in datasets without outstanding samples. Subsequently, researchers proposed optimization-based methods, which are widely used due to their excellent performance. This type of method uses original samples and distilled samples (distilled dataset) to train two neural networks and records two trajectories of their optimization process. The core idea is that the original samples and distilled samples have the same effect, so the two trajectories should be consistent. The distilled samples are optimized by constructing an optimization target with consistent trajectories. However, this method is performed in pixel space, and the image pixel space is usually low-rank, so it is not efficient to learn distilled samples directly in pixel space, which limits the effect of this data processing method.

[0004] The present invention provides a data processing method and system, device, and medium based on spectral decomposition, which uses tensor decomposition to compress the information of a large number of pictures into a small number of pictures, so that the effect of the neural network after training on the distilled pictures is consistent with the effect after training on the original pictures. Summary of the invention

[0005] The present invention provides a data processing method and system, device, and medium based on spectral decomposition, which uses tensor decomposition to compress the information of a large number of pictures into a small number of pictures, so that the effect of the neural network after training on the distilled pictures is consistent with the effect after training on the original pictures.

[0006] The present invention is implemented by the following technical solution: A data processing method based on spectral decomposition comprises the following steps:

[0007] Step S1, determining information of the original data set and constructing a synthetic data set using a spectral decomposition operation;

[0008] Step S2, enabling the synthetic data set to learn information of the original data set by a trajectory matching method;

[0009] Step S3, obtaining a final data set through a reverse synthesis operation, and comparing and confirming the final data set with the original data set.

[0010] In order to better implement the present invention, further, determining the information of the original data set in step S1 includes: determining the four-dimensional information of the original data set and expressing it as N×C×H×W, where N represents the total number of images in the data set, C represents the number of channels of the images in the data set, and H and W represent the length and width of the image.

[0011] In order to better implement the present invention, further, the method of constructing a synthetic data set using a spectral decomposition operation in step S1 includes:

[0012] Define the two components that make up the synthetic data set, which are four-dimensional tensors The transformation matrix defined for each dimension The four-dimensional tensor Expressed as The transformation matrix Expressed as Among them, t1×t2×t3×t4 are the hyper parameters set;

[0013] The synthetic dataset is decomposed using spectral decomposition to set the hyperparameters.

[0014] In order to better implement the present invention, further, step S2 includes:

[0015] Step S21, using the same network structure and initialization method, defining two neural networks of the same arbitrary structure; Step S22, using the original data set and the synthetic data set to train the neural network respectively, saving the parameters of the training process, defining the network parameters of different update steps as trajectories, and obtaining two sets of training trajectories through training;

[0016] Step S23: Consistency constraints are imposed on the two sets of training trajectories. After the training is completed, the updated transformation matrix is ​​obtained. and a four-dimensional tensor The synthetic data set is updated through back propagation of the gradient, so that the synthetic data set learns the information of the original data set.

[0017] In order to better implement the present invention, further, step S22 includes:

[0018] During the training process, the loss function uses the L2 normalized loss function, and a part of the entire training process is randomly selected as the network initialization information and trajectory information;

[0019] Based on the L2 normalized loss function and combined with the distribution loss function, the neural network trained on the synthetic dataset is tested on the original dataset.

[0020] In order to better implement the present invention, further, the L2 normalized loss function is expressed as: in, represents the trajectory obtained by training the neural network with the synthetic data set, t represents the starting point, N represents the number of updates of the trajectory, represents the trajectory obtained by training the network using the original data set, M represents the number of updates, and the value of N is less than M;

[0021] The distribution loss function is expressed as: in, represents the original data set, L represents the cross entropy classification function; the above is expressed as follows based on the L2 normalized loss function combined with the distribution loss function:

[0022]

[0023] In order to better implement the present invention, further, step S3 includes: transforming the updated transformation matrix and a four-dimensional tensor Perform matrix multiplication to obtain And we get a new synthetic dataset, whose shape is defined as u1×u2×u3×u4. By comparing it with the original dataset, we get u1×u2×u3×u4=M×C×H×W.

[0024] The present invention also provides a data processing system based on spectral decomposition, comprising a construction unit, a learning unit and a comparison and confirmation unit, wherein:

[0025] A construction unit, for determining information of an original data set and constructing a synthetic data set using a spectral decomposition operation;

[0026] A learning unit, configured to enable the synthetic data set to learn information of the original data set through a trajectory matching method;

[0027] The comparison and confirmation unit is used to obtain a final data set through a reverse synthesis operation, and compare and confirm the final data set with the original data set.

[0028] The present invention also provides an electronic device, which includes a processor and a memory; the processor includes the data processing system based on spectral decomposition recorded in the second aspect above.

[0029] The present invention also provides a computer-readable storage medium, which includes instructions; when the instructions are executed on the electronic device described in the third aspect, the electronic device executes the method described in the first aspect.

[0030] Compared with the prior art, the present invention has the following advantages and beneficial effects:

[0031] (1) The present invention provides a data processing method and system, device, and medium based on spectral decomposition, which uses tensor decomposition to compress the information of a large number of images into a small number of images, so that the effect of the neural network after training on the distilled images is consistent with the effect after training on the original images;

[0032] (2) The present invention provides a data processing method, system, device, and medium based on spectral decomposition, so that the processed data set is very different from the original data set, which can well protect the privacy of the image and at the same time make the visual effect richer. BRIEF DESCRIPTION OF THE DRAWINGS

[0033] The present invention is further described in conjunction with the following drawings and embodiments, and all the concepts and innovations of the present invention should be regarded as the disclosed contents and the protection scope of the present invention.

[0034] Figure 1 A schematic diagram of a method flow in a data processing method based on spectral decomposition and a system, device, and medium provided in an embodiment of the present application;

[0035] Figure 2 A data processing method based on spectral decomposition and a schematic diagram of a data processing pipeline in a system, device, and medium provided in an embodiment of the present application;

[0036] Figure 3 A schematic diagram of the visualization effect of a distillation sample in a data processing method and system, device, and medium based on spectral decomposition provided in an embodiment of the present application;

[0037] Figure 4 A data display diagram of the effect of using synthetic data sets to train a network at different compression ratios in a data processing method and system, device, and medium based on spectral decomposition provided in an embodiment of the present application. DETAILED DESCRIPTION

[0038] In order to more clearly illustrate the technical solutions of the embodiments of the present invention, the technical solutions in the embodiments of the present invention will be clearly and completely described below in conjunction with the drawings in the embodiments of the present invention. It should be understood that the described embodiments are only part of the embodiments of the present invention, not all of the embodiments, and therefore should not be regarded as limiting the scope of protection. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technical personnel in this field without making creative work are within the scope of protection of the present invention.

[0039] In the description of the present invention, it should be noted that, unless otherwise clearly specified and limited, the terms "disposed", "connected", and "connected" should be understood in a broad sense, for example, fixed connection, detachable connection, or integrated connection; mechanical connection, electrical connection; direct connection, indirect connection through an intermediate medium, and internal communication between two components. For ordinary technicians in this field, the specific meanings of the above terms in the present invention are understood according to specific circumstances.

[0040] Embodiment 1:

[0041] A data processing method, system, device, and medium based on spectral decomposition in this embodiment, such as Figure 1 As shown in the figure, we propose a data processing method based on spectral decomposition, which is a general processing framework for data sample distillation. The purpose of this framework is to obtain a synthetic dataset with fewer samples than the original data, so that it contains all the information of the original dataset. We propose to regard the entire dataset as a four-dimensional tensor, and it is low-rank in each dimension. Therefore, we learn a set of spectral tensors and transformation matrices to reconstruct the data distribution in four dimensions through simple matrix multiplication. Specifically, a spectral tensor is mapped back to the image space through a transformation matrix, and efficient information sharing is achieved through pairwise combinations of different spectral vectors and transformation matrices during the distillation learning process. Similar to low-rank reconstruction, the storage space occupied by the spectral tensor and transformation matrix is ​​much smaller than that of the original sample set. In addition, we integrate a trajectory matching optimization method guided by the true distribution, so that the processed distilled samples can achieve more advanced performance.

[0042] Embodiment 2:

[0043] This embodiment is further optimized on the basis of embodiment 1. First, the storage space required for the original data set is determined. Usually, a data set is represented as a tensor, and the shape of the tensor represents the size of the data set. For example, if the shape of the data set is N×C×H×W, its size is represented as NCHW. N represents the total number of data sets, C represents the number of channels of the images in the data set, and H and W represent the length and width of the images. Then we construct a synthetic data set. We define two components that constitute the synthetic data set, a four-dimensional tensor And define a transformation matrix for each dimension This transformation matrix will The number of dimensions is changed. Among them, t1×t2×t3×t4 is a set hyperparameter, which is related to the size of the compression rate. Among them, t1×t2×t3×t4 is also expressed as the parameters after compression compared to the four-dimensional information N×C×H×W of the original data set. Taking one of the dimensions t1 as an example, the transformation matrix Map the t1 latitude to u1. The operation of decomposing the entire synthetic data set is called spectral decomposition.

[0044] The other parts of this embodiment are the same as those of Embodiment 1, and thus will not be described in detail.

[0045] Embodiment 3:

[0046] This embodiment is further optimized on the basis of the above-mentioned embodiment 1 or 2, and the purpose of using the trajectory matching method is to make the information of the synthetic data consistent with the information of the original data. We use the same network structure and initialization method to define two identical neural networks of arbitrary structure. Then, use these two data sets to train the network respectively, and save the parameters of the training process. We call the network parameters of different update steps trajectories. In this way, we get two sets of training trajectories. We constrain the two sets of trajectories for consistency, and update the synthetic data set through the back propagation of gradients. During the training process, the loss function adopts the L2 standardized loss, and the network initialization and trajectory randomly select a part of the entire training process. On the basis of L2 loss, we also add distribution loss, that is, the network trained on synthetic data should be tested on the original data, and the effect should be equally good. After the training is completed, we get the updated and

[0047] The specific trajectory matching loss function is written as follows: in, represents the trajectory obtained by training the network with the synthetic dataset, t represents the starting point, and N represents the number of updates of the trajectory. represents the trajectory obtained by training the network using the original data set, and M represents the number of updates. Generally speaking, the value of N is smaller than M, because the synthetic data contains more information, so fewer times are required to achieve the same effect.

[0048] Another distribution loss function is written as follows: in, represents the original data set, and L represents the cross entropy classification function. The loss function means that the network trained with synthetic data can also classify correctly on the original data set. Therefore, the total loss function is written as follows:

[0049]

[0050] The other parts of this embodiment are the same as any of the above embodiments 1-2, so they are not repeated here.

[0051] Embodiment 4:

[0052] This embodiment is further optimized based on any one of the above embodiments 1-3.

[0053] The updated tensor and the transformation matrix Perform matrix multiplication to obtain Then a new synthetic data set is obtained, and its shape is defined as u1×u2×u3×u4=M×C×H×W. At this time, the storage space required for the new synthetic data set is t1t2t3t4+t1u1+t2u2+t3u3+t4u4, and the compression ratio is (t1t2t3t4+t1u l +t2u2+t3u3+t4u4) / NCHW.

[0054] The other parts of this embodiment are the same as any one of the above embodiments 1-3, so they are not repeated here.

[0055] Embodiment 5:

[0056] This embodiment is further optimized on the basis of any one of the above embodiments 1-4, and the updated and Then, we use matrix multiplication again to and Multiply them together to get the final processed data and the final data set. Using this spectral decomposition method, the storage space is greatly reduced, while the stored information remains unchanged, so that the effect of training the neural network on the processed data is consistent with that on the original data. Taking the CIFAR10 data set as an example, the entire data training set has 50,000 images. After using our data processing method, only the storage space of 10 images can reach a level close to the information content of the entire training set.

[0057] like Figure 3 As shown in the figure, the results on the public dataset ImageNet show the visualization effect of the distilled samples in the case of large-resolution images. From the figure, we can see that the processed synthetic dataset is very different from the original dataset, which well protects the privacy of the image and has a richer visual effect.

[0058] like Figure 4 The following is a graph showing the effect of using synthetic data to train the network at different compression ratios. Using the original data to train the classification network, the top1 accuracy is 84.8. However, using only 0.02 times the storage space of the original data, the top1 accuracy of the network trained with synthetic data reached 68.5, which shows the effectiveness of our data processing method.

[0059] The other parts of this embodiment are the same as any one of the above embodiments 1-4, so they are not repeated here.

[0060] Embodiment 6:

[0061] The present invention also provides a data processing system based on spectrum decomposition matching the method, comprising a construction unit, a learning unit and a comparison and confirmation unit.

[0062] The present invention also provides an electronic device, which includes a processor and a memory; the processor includes the above-mentioned data processing system based on spectral decomposition.

[0063] Embodiment 7:

[0064] The present invention also provides a computer-readable storage medium, which includes instructions; when the instructions are executed on the electronic device described in the above embodiment, the electronic device executes the method described in the above embodiment. Optionally, the computer-readable storage medium is a memory.

[0065] The processor involved in the embodiments of the present application is a chip, for example, a field programmable gate array (FPGA), an application specific integrated circuit (ASIC), a system on chip (SoC), a central processor unit (CPU), a network processor (NP), a digital signal processor (DSP), a microcontroller unit (MCU), a programmable logic device (PLD), or other integrated chips.

[0066] The memory involved in the embodiments of the present application is a volatile memory or a non-volatile memory, or may include both volatile and non-volatile memories. Among them, the non-volatile memory is a read-only memory (ROM), a programmable read-only memory (PROM), an erasable programmable read-only memory (EPROM), an electrically erasable programmable read-only memory (EEPROM), or a flash memory. The volatile memory is a random access memory (RAM), which is used as an external cache. By way of example and not limitation, many forms of RAM are available, such as static RAM (SRAM), dynamic RAM (DRAM), synchronous DRAM (SDRAM), double data rate SDRAM (DDR SDRAM), enhanced SDRAM (ESDRAM), synchlink DRAM (SLDRAM), and direct rambus RAM (DRRAM). It should be noted that the memory of the systems and methods described herein is intended to include, but is not limited to, these and any other suitable types of memory.

[0067] It should be understood that in the various embodiments of the present application, the size of the serial numbers of the above-mentioned processes does not mean the order of execution. The execution order of each process should be determined by its function and internal logic, and should not constitute any limitation on the implementation process of the embodiments of the present application.

[0068] Those of ordinary skill in the art will appreciate that the modules and algorithm steps of each example described in conjunction with the embodiments disclosed herein can be implemented in electronic hardware, or a combination of computer software and electronic hardware. Whether these functions are performed in hardware or software depends on the specific application and design constraints of the technical solution. Professional and technical personnel use different methods to implement the described functions for each specific application, but such implementation should not be considered to be beyond the scope of this application.

[0069] Those skilled in the art will clearly understand that, for the convenience and brevity of description, the specific working processes of the systems, devices and modules described above refer to the corresponding processes in the aforementioned method embodiments and will not be repeated here.

[0070] In the several embodiments provided in the present application, it should be understood that the disclosed systems, devices and methods are implemented in other ways. For example, the device embodiments described above are only schematic. For example, the division of the modules is only a logical function division. There are other division methods in actual implementation, such as combining or integrating multiple modules or components into another device, or ignoring or not executing some features. Another point is that the mutual coupling or direct coupling or communication connection shown or discussed is an indirect coupling or communication connection of some interfaces, devices or modules, which is electrical, mechanical or other forms.

[0071] The modules described as separate components are or are not physically separated, and the components shown as modules are or are not physical modules, that is, located in one device or distributed on multiple devices. Some or all of the modules can be selected according to actual needs to achieve the purpose of the present embodiment.

[0072] In addition, the functional modules in the various embodiments of the present application are integrated into one device, and each module exists physically separately, or two or more modules are integrated into one device.

[0073] In the above embodiments, all or part of the implementation is by software, hardware, firmware or any combination thereof. When implemented using a software program, all or part of the implementation is in the form of a computer program product. The computer program product includes one or more computer instructions. When loading and executing a computer program instruction on a computer, all or part of the process or function described in the embodiment of the present application is generated. The computer is a general-purpose computer, a special-purpose computer, a computer network, or other programmable devices. The computer instructions are stored in a computer-readable storage medium, or transmitted from one computer-readable storage medium to another computer-readable storage medium, for example, the computer instructions are transmitted from a website site, a computer, a server or a data center by wired (e.g., coaxial cable, optical fiber, digital subscriber line (Digital Subscriber Line, DSL)) or wireless (e.g., infrared, wireless, microwave, etc.) mode to another website site, computer, server or data center. The computer-readable storage medium is any available medium that a computer can access or contains one or more servers, data centers and other data storage devices integrated with a medium. The available medium is a magnetic medium (eg, a floppy disk, a hard disk, a magnetic tape), an optical medium (eg, a DVD), or a semiconductor medium (eg, a solid state disk (SSD)).

[0074] The above description is only a preferred embodiment of the present invention and does not limit the present invention in any form. Any simple modification or equivalent change made to the above embodiment based on the technical essence of the present invention shall fall within the protection scope of the present invention.

Claims

1. A data processing method based on spectral decomposition, characterized in that: The following steps are involved: Step S1, determining information of the original data set and constructing a synthetic data set using a spectral decomposition operation; Step S2, enabling the synthetic data set to learn information of the original data set by a trajectory matching method; Step S3, obtaining a final data set through a reverse synthesis operation, and comparing and confirming the final data set with the original data set.

2. A data processing method based on spectral decomposition according to claim 1, characterized in that: The information of the original data set determined in step S1 includes: The four-dimensional information of the original data set is determined and expressed as N×C×H×W, where N represents the total number of images in the data set, C represents the number of channels of the images in the data set, and H and W represent the length and width of the image.

3. The data processing method based on spectral decomposition according to claim 1, characterized in that: The method of constructing a synthetic data set using a spectral decomposition operation in step S1 includes: Define the two components that make up the synthetic data set, which are four-dimensional tensors The transformation matrix defined for each dimension The four-dimensional tensor Expressed as The transformation matrix Expressed as Among them, t1×t2×t3×t4 are the hyper parameters set; The synthetic dataset is decomposed using spectral decomposition to set the hyperparameters.

4. The data processing method based on spectral decomposition according to claim 1, characterized in that: The step S2 comprises: Step S21, using the same network structure and initialization method, defining two identical neural networks of arbitrary structure; Step S22, respectively using the original data set and the synthetic data set to train the neural network, saving the parameters of the training process, defining the network parameters of different update steps as trajectories, and obtaining two sets of training trajectories through training; Step S23: Consistency constraints are imposed on the two sets of training trajectories. After the training is completed, the updated transformation matrix is ​​obtained. and a four-dimensional tensor The synthetic data set is updated through back propagation of the gradient, so that the synthetic data set learns the information of the original data set.

5. The data processing method based on spectral decomposition according to claim 4, characterized in that: The step S22 includes: during the training process, the loss function uses the L2 standardized loss function, and a part of the entire training process is randomly selected as the network initialization information and trajectory information; Based on the L2 normalized loss function and combined with the distribution loss function, the neural network trained on the synthetic dataset is tested on the original dataset.

6. The data processing method based on spectral decomposition according to claim 5, characterized in that: include: The L2 normalized loss function is expressed as: in, represents the trajectory obtained by training the neural network with the synthetic data set, t represents the starting point, N represents the number of updates of the trajectory, represents the trajectory obtained by training the network using the original data set, M represents the number of updates, and the value of N is less than M; The distribution loss function is expressed as: in, represents the original data set, L represents the cross entropy classification function; the above is expressed as follows based on the L2 normalized loss function combined with the distribution loss function:

7. The data processing method based on spectral decomposition according to claim 4, characterized in that: The step S3 comprises: and a four-dimensional tensor Perform matrix multiplication to obtain And we get a new synthetic dataset, whose shape is defined as u1×u2×u3×u4. By comparing it with the original dataset, we get u1×u2×u3×u4=M×C×H×W.

8. A data processing system based on spectral decomposition, characterized in that: It includes construction units, learning units and comparison and confirmation units, among which: A construction unit, for determining information of an original data set and constructing a synthetic data set using a spectral decomposition operation; A learning unit, configured to enable the synthetic data set to learn information of the original data set through a trajectory matching method; The comparison and confirmation unit is used to obtain a final data set through a reverse synthesis operation, and compare and confirm the final data set with the original data set.

9. An electronic device, characterized in that: The system comprises a processor and a memory; the processor is used to run the data processing system based on spectral decomposition as claimed in claim 8.

10. A computer-readable storage medium, characterized in that: The computer-readable storage medium includes instructions; when the instructions are executed on the electronic device as claimed in claim 9, the electronic device is caused to execute the method as claimed in any one of claims 1 to 7.