Deep neural network model compression
By pruning the deep neural network model using gradient-based saliency measurement technology, the problem of low operating efficiency of DNN on low-power devices is solved, reducing the model size and computing resources while maintaining efficient performance.
Patent Information
- Application Number
- CN202410186511.0
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Priority Date
- 2023-02-28
- Filing Date
- 2024-02-19
- Publication Date
- 2024-08-30
AI Technical Summary
Existing deep neural network (DNN) models in fields such as autonomous driving are difficult to run efficiently on low-power embedded devices due to size and computing resource requirements, and existing pruning technology cannot effectively reduce model size while maintaining accuracy.
Gradient-based saliency measurement technology is used to calculate the α values of different parts of the model, accumulate and sort them to determine the importance, and then prune the model, including pruning the channels, filters, kernels, etc. of the convolutional layer.
It achieves a significant reduction in model size and computing resource requirements without reducing model accuracy. It is suitable for low-power embedded devices and improves the performance of the model in applications such as autonomous driving.
Smart Images

Figure CN118569340A
Abstract
Description
Technical Field
[0001] Various exemplary embodiments disclosed herein generally relate to deep neural network model compression including the use of gradient-based saliency metrics. Background Art
[0002] Deep neural networks (DNNs) have achieved state-of-the-art results in different fields. For example, for autonomous driving, efficient DNNs are needed that can be assembled on tiny edge processors with extremely small size, weight, and power. One of the most common ways to reduce the size of DNN models is through pruning. Summary of the invention
[0003] An overview of various exemplary embodiments is presented below. Some simplifications and omissions may be made in the following overview, which is intended to highlight and introduce some aspects of various exemplary embodiments, rather than to limit the scope of the present invention. A detailed description of exemplary embodiments sufficient to allow a person of ordinary skill in the art to generate and use the inventive concept will be presented in a later section.
[0004] Various embodiments relate to a data processing system, comprising instructions embodied in a non-transitory computer-readable medium, the instructions for pruning a machine learning model in a processor, the instructions comprising: training the machine learning model using training input data; calculating alpha values for different parts of the machine learning model based on gradients used when training the machine learning model, wherein the alpha values are importance measures; accumulating the calculated alpha values in training iterations; and pruning the machine learning model based on the accumulated alpha values.
[0005] Various embodiments are described in which pruning the machine learning model includes: sorting the accumulated calculated alpha values; selecting the lowest predetermined number of sorted values; and pruning the machine learning model based on the selected number of values.
[0006] Various embodiments are described in which calculating alpha values for different parts of the machine learning model based on the gradients used when training the machine learning model includes summing the gradients of the different parts of the machine learning model over the different parts of the machine learning model.
[0007] Various embodiments are described wherein summing the gradients of the different portions of the machine learning model over the different portions comprises assigning importance scores to filters in the machine learning model at a class level.
[0008] Various embodiments are described wherein summing the gradients of the different portions of the machine learning model over the different portions includes weighting the gradients prior to summing.
[0009] Various embodiments are described wherein summing the gradients of the different portions of the machine learning model over the different portions comprises computing:
[0010]
[0011] in is the α value, Z = m′·n′·m·n, m′ and n′ are the final output , m and n are the positional indices of each element in the different parts, is the gradient, and is the k-th feature map activation of the i-th layer.
[0012] Various embodiments are described in which accumulating the calculated α values over training iterations includes accumulating the calculated α values over the training set. Perform the summation.
[0013] Various embodiments are described wherein accumulating the calculated α values across training iterations comprises calculating:
[0014]
[0015] where Ω represents the entire training set and category, and α ik is the importance measure of the i-th layer and k-th channel.
[0016] Various embodiments are described in which pruning the machine learning model includes pruning α ik The machine learning model is configured to sort the values, select the lowest predetermined number of sorted values, and prune the machine learning model based on the selected number of values.
[0017] Various embodiments are described wherein pruning the machine learning model based on the selected number of values comprises pruning one of categories, weights, kernels, features, layers, filters, units, and neurons.
[0018] Various embodiments are described wherein the machine learning model is one of a deep learning neural network and a convolutional neural network.
[0019] Various embodiments are described, in which training the machine learning model using training input data includes: initializing the machine learning model; inputting multiple training input data tensors into the machine learning model in multiple iterations; estimating gradient updates based on outputs of the machine learning model; and updating machine learning model weights based on the gradient updates using backpropagation.
[0020] Various additional embodiments relate to a method for pruning a machine learning model, comprising: training the machine learning model using training input data; calculating α values for different parts of the machine learning model based on the gradients used when training the machine learning model, wherein the α values are importance measures; accumulating the calculated α values in training iterations; and pruning the machine learning model based on the accumulated α values.
[0021] Various embodiments are described in which pruning the machine learning model includes sorting the accumulated calculated alpha values, selecting the lowest predetermined number of sorted values, and pruning the machine learning model based on the selected number of values.
[0022] Various embodiments are described in which calculating alpha values for different parts of the machine learning model based on the gradients used when training the machine learning model includes summing the gradients of the different parts of the machine learning model over the different parts of the machine learning model.
[0023] Various embodiments are described wherein summing the gradients of the different portions of the machine learning model over the different portions comprises assigning importance scores to filters in the machine learning model at a class level.
[0024] Various embodiments are described wherein summing the gradients of the different portions of the machine learning model over the different portions includes weighting the gradients prior to summing.
[0025] Various embodiments are described wherein summing the gradients of the different portions of the machine learning model over the different portions comprises computing:
[0026]
[0027] in is the α value, Z = m′.n′.mn, m′ and n′ are the final output The position index of each element in the feature map, m and n are the position index of each element in the feature map, is the gradient, and is the k-th feature map activation of the i-th layer.
[0028] Various embodiments are described in which accumulating the calculated α values over training iterations includes accumulating the calculated α values over the training set. Perform the summation.
[0029] Various embodiments are described wherein accumulating the calculated α values across training iterations comprises calculating:
[0030]
[0031] where Ω represents the entire training set, and α ik is the importance measure of the i-th layer and k-th channel.
[0032] Various embodiments are described in which pruning the machine learning model includes pruning α ik The machine learning model is configured to sort the values, select the lowest predetermined number of sorted values, and prune the machine learning model based on the selected number of values.
[0033] Various embodiments are described wherein pruning the machine learning model based on the selected number of values comprises pruning one of categories, weights, kernels, features, layers, filters, units, and neurons.
[0034] Various embodiments are described wherein the machine learning model is one of a deep learning neural network and a convolutional neural network.
[0035] Various embodiments are described, in which training the machine learning model using training input data includes: initializing the machine learning model; inputting multiple training input data tensors into the machine learning model in multiple iterations; estimating gradient updates based on outputs of the machine learning model; and updating machine learning model weights based on the gradient updates using backpropagation. BRIEF DESCRIPTION OF THE DRAWINGS
[0036] For a better understanding of various exemplary embodiments, reference is made to the accompanying drawings, in which:
[0037] Figure 1 An example DNN architecture for radar target classification or detection application is shown.
[0038] Figure 2 Showing the operation of the DNN during inference.
[0039] Figure 3 Shows how gradient-based pruning works.
[0040] FIG. 4A to FIG. 4D Shows the correlation between filters selected for pruning by gradient weight pruning and L1 norm pruning.
[0041] Figure 4C and Figure 4B Plots showing the first and second layers of a binary CFAR detection model without dilated convolutions, respectively.
[0042] Figure 5 A flow chart illustrating a gradient weight pruning method is shown.
[0043] Figure 6 Shown for implementation Figures 1 to 4DAn exemplary hardware diagram of the gradient weight pruning method described in .
[0044] To facilitate understanding, the same reference numerals have been used to designate elements having substantially the same or similar structure and / or substantially the same or similar function. DETAILED DESCRIPTION
[0045] Description and drawings illustrate the principles of the present invention. Therefore, it will be appreciated that those skilled in the art will be able to design various arrangements, although the arrangements are not explicitly described or illustrated herein, but the arrangements embody the principles of the present invention and are included within their scope. In addition, all examples cited herein are primarily intended to be explicitly used for teaching purposes to help readers understand the principles of the present invention and the concepts provided by the inventors to deepen the art, and all examples should be considered as not limited to such specific cited examples and conditions. In addition, as used herein, unless otherwise indicated (e.g., "or in addition" or "or in an alternative"), the term "or" refers to a non-exclusive or (i.e., and / or). Furthermore, the various embodiments described herein are not necessarily mutually exclusive, because some embodiments may be combined with one or more other embodiments to form new embodiments.
[0046] DNN models have achieved great success in different problem domains (e.g., in autonomous driving). The trend is to increase model size to achieve greater representation capabilities, but this comes at the expense of increased computational and memory resources, which is not suitable for real-time low-power embedded devices. Therefore, there is a need to develop techniques to reduce model size (and thereby reduce computation and memory) without reducing model accuracy metrics.
[0047] Small DNNs with low memory and computational footprint are critical for power-constrained systems such as autonomous driving. Many perception stack AI modules used in autonomous driving and other artificial intelligence (AI)-based systems are very large and require hardware processing that requires a lot of power to run. Low size, weight, and power embedded devices do not have the power budget to support such large models. Therefore, model compression is a common intermediate step in porting models on embedded hardware. There are three common techniques for reducing model size: structured pruning, unstructured pruning, and quantization.
[0048] Structural pruning involves removing all nodes (in a multilayer perceptron (MLP)) or all filters (in a convolutional neural network (CNN)), thereby reducing the number of parameters and the amount of computation in the model. This is suitable for vector processors because there are no non-uniform zeros in the computation pipeline.
[0049] Unstructured pruning involves removing a number of weights (in MLP) or some filter parameters (in convolutional neural networks (CNNs)). Although significant compression can be achieved with this technique, it is generally not suitable for vector processors because pruning results in a non-uniform distribution of weights.
[0050] Quantization involves reducing the bit precision of models and data, thereby enabling lower-precision math and reduced model size.
[0051] This article describes embodiments of a saliency metric that assesses the importance of feature maps for the final application and proposes a ranked list to enable the number of feature maps to be reduced. A technique for reducing the size of a machine learning model using a novel saliency metric, namely a pruning technique, is also described that uses class activation maps to quantify the importance of model parameters in different layers. Features of this gradient weight pruning technique include: a new data-dependent saliency metric that can rank model weights for pruning; and the ability to adjust the saliency metric based on class importance. For example, in a dense urban scene, detecting pedestrians and vehicles is more important, so more relevant car filters can be pruned compared to pedestrian filters.
[0052] CNNs typically consist of multiple layers stacked together, with each successive layer extracting more semantic information by reducing feature size and increasing receptive field. This is usually followed by a fully connected layer that selectively weights different combinations of features and generates a final score for regression or classification, depending on the application.
[0053] Figure 1 An example DNN architecture for radar target classification or detection applications is shown. More specifically, DNN 100 may be a CNN. Although the pruning technique is described herein in the context of this particular model, it can be generalized to any kind of DNN or other types of machine learning models with different architectures with slight modifications.
[0054] Figure 1A training procedure for the proposed DNN 100 is shown. The DNN 100 includes a layer of a plurality of first 2D convolutional filters 104 that processes an input data tensor 102 to produce a first multi-channel feature tensor 106. A plurality of second 2D convolutional filters 108 processes the first multi-channel feature tensor 106 to produce a second multi-channel feature tensor 110. A plurality of 1D convolutional filters 112 processes the second multi-channel feature tensor 110. A final layer 114 processes the outputs of the 1D convolutional filters 112, and the outputs are fed into a softmax layer 116. The output of the softmax layer 116 is a collection of a detection probability output 118 and a clutter noise probability output 120. In order to handle the extreme class imbalance between true target detections and background clutter or noise, a focal loss or a cross entropy loss is used during back-propagation to train the weights of the network 132. During training of the DNN 100, the weights of the first 2D convolution filter 104, the second 2D convolution filter 108, and the first 1D convolution filter 112 of the DNN 100 are updated using back propagation 130.
[0055] Figure 2 1 shows the operation of DNN 100 during inference. The operation is the same as the forward pass of DNN 100 during training with a batch size of 1. There are two ways to use the output of DNN 100. The output of softmax layer 116 can be used directly to classify the corresponding bin, or the raw scores before softmax layer 116 can be additionally processed to estimate thresholds through another fully connected layer or through classical clustering techniques. In this embodiment, bin-by-bin softmax is used to perform binary classification. The independent variable maximum function ARGMAX 134 is applied to each output bin to identify the output bin with the highest detection probability output 118 and clutter noise probability output 120.
[0056] The most popular structured pruning method is called L1-based pruning. It calculates the k-th convolution kernel in each layer i as follows The sum of the absolute values of
[0057]
[0058] Here m, n and s are kernels The height, width and number of channels of The kernels or channels are ranked and any number of kernels or channels can be removed based on a desired or set pruning ratio. Although the L1-based pruning method is straightforward and easy to use, the determination of the importance of the channel does not involve the decision process of the model. It is not clear how the kernels affect the predictive performance of the neural network based on their absolute sum, except for the basic intuition that the lower the norm of the filter, the less impact it has on the final output of the model. Therefore, a more decision-oriented and interpretable structured pruning method called gradient-based pruning is now described based on the Gradient-Based Class Activation Map (Grad CAM) technique, which is used in the literature for DNN interpretability.
[0059] GradCAM uses the gradients of any target concept (class labels in a classification network or word sequences in a captioning network or regions of interest (ROIs) in a network) flowing into the last or earlier convolutional layers to generate a localization map that highlights important regions in the input data tensor (e.g., an image) for the model to make predictions.
[0060] Based on the gradients in DNN 100 during training, an importance score assigned to each convolution for a particular prediction can be obtained. This importance score can then be used to prune channels with lower values within each convolution layer based on the scores accumulated across the entire training dataset.
[0061] Figure 3 Shows how the gradient-based pruning method works.
[0062] CNN 200 has an input feature map 202 that processes the input tensor. A gradient-based class activation map 210 is generated from the input map using a gradient flow that produces gradient information 204. The channel importance weights for the semantic segmentation model are obtained by summing the gradients of different parts of the model over different parts of the model as follows
[0063]
[0064] result can be interpreted as a significance measure to assign an importance score to each feature map, and therefore, it can also be used to determine the feature map and whether its corresponding convolution k in layer i should be pruned.
[0065] After the above process, we obtain the gradient weight of the kth channel in the convolutional layer i for an input image with class label c. is accumulated over the entire training set Ω and across all classes to obtain the global gradient weight α for each channel k in each convolutional layer i ik :
[0066]
[0067] Next, for the channels in layer i, ik The values are ranked and channels with values less than a certain threshold are pruned.
[0068] The gradient information 204 that flows from the output of the model back into the convolutional layers of the CNN is used to assign importance values to each channel for a particular prediction. The gradient information is called the gradient weight. For the constant false alarm rate (CFAR) detection (segmentation) task, a pixel-by-pixel class prediction is generated for each position of the image. Assuming there are l classes, the CFAR detection model will predict the vector y for each pixel. For each pixel position, The maximum value with index k (k∈[1,l]) in means that the model believes that this position belongs to category k. For an input image with shape [m,n], the detection model obtains m*n values from a tensor with shape [m,n,l] and assigns it to each position of the image as a pixel-wise class label.
[0069] Keeping the original notation consistent with the literature, we obtain the gradient weight of the kth channel in the i-th convolutional layer for pruning purposes, relative to the k-th feature map activation in convolutional layer i. The output is calculated across all pixels in the final output (segment map) The gradient of the score of category c (where m′, n′ are the position index of each pixel), that is,
[0070] In another embodiment, as mentioned above, importance scores can also be assigned to filters at the category level, without aggregating information across the categories. This will enable focusing on specific use cases. For example, one can focus on filters associated with a specific category c. The value of . Category c may be images with periodicity. Information from images that only include periodicity may be gathered. The model may then be pruned to better focus on periodicity.
[0071] In yet another embodiment, instead of accumulating the results across all bins, a weighted score may be calculated, where more weight is given to true positive pixels (as in this particular example) or false positives are penalized. This provides a simple way to incorporate a false alarm threshold into the pruning process.
[0072] The gradient weight-based pruning method disclosed in this article is a generalized pruning technique for all deep neural networks. It can be applied to any type of DNN. In addition, importance scores can be assigned based on convolutional filters, kernels, channels, or categories.
[0073] for Figure 1 and Figure 2 In the CFAR detection scenario described in Figure 1, gradient weight pruning is applied to the developed detection model. The pruning ratio can be set to . The pruning ratio can be determined by weighing the computational cost of the model and the performance of the model. The computational cost (FLOPS) and performance (mIoU) can be plotted to find the appropriate tradeoff of these two factors. The model can achieve more than 90% if the limitations of certain edge processors require it.
[0074] Experimental results show that neural networks pruned by gradient weights can have better performance in terms of evaluation metrics, while still being the same model size compared to other pruning methods. Table 1 below shows simulation results for five different examples. The first row (2D expansion-0%-pruning) shows the number of parameters and performance of the model without pruning. The next two rows show the number of parameters and performance of the model pruned to 50% and 70% using norm pruning. Finally, the last two rows show the number of parameters and performance of the model pruned to 50% and 70% using gradient weight-based pruning. By comparing the accuracy of different models (using the same pruning ratio but different pruning methods), gradient weight pruning achieves similar or slightly better performance than pruning. Due to the same pruning level, the L1 norm pruning case and the gradient weight pruning case have the same number of parameters, the same number of operations per frame and per second, and the same number of activations. The resulting accuracy of 50% gradient weight pruning is 78.31%, while the accuracy of 50% L1 norm pruning is 77.88%, which is slightly improved. Similarly, the resulting accuracy for 70% gradient weight pruning is 78.88%, while the accuracy for 70% L1 norm pruning case is 77.04%, which is a slight improvement.
[0075]
[0076] Table 1
[0077] Additional analysis of the results of the different methods was performed to determine the correlation between the filters selected for pruning by gradient weights and methods.
[0078] FIG. 4A to FIG. 4D Shows the correlation between filters selected for pruning by gradient weight pruning and L1 norm pruning. FIG. 4A to FIG. 4Dis a graph showing the L1 norm value and gradient weight value of each of the weights in the first layer and the second layer of the binary CFAR detection model. Each point in the scatter plot indicates a channel within a layer. The x-axis and y-axis show the normalized L1 norm value and the normalized gradient weight associated with the weight. The top and right histograms show the distribution of the normalized L1 norm value and the normalized gradient weight value within a layer accordingly. The correlation coefficient value and statistical significance value in each graph show the correlation coefficient of the normalized L1 norm of each channel and the weight based on the normalized gradient weight and whether the correlation is significant. Figure 4A and Figure 4B A sample of selected channel correlation values between the L1 norm and the gradient weight values is shown. Figure 4A and Figure 4B Plots showing the first and second layers of a binary CFAR detection model with dilated convolutions, respectively. Figure 4C and Figure 4B Graphs showing the first and second layers of a binary CFAR detection model without dilated convolutions, respectively. If the L1 norm and the gradient weight values are highly correlated, they will tend to have approximately the same value and will be near the line y=x. This is not the case. FIG. 4A to FIG. 4D In addition, the histograms along the top and left sides of the diagram show very different distributions of weight values. These results show that in most cases, the two pruning techniques rank the filters in very different ways, thereby showing that they look for different signals to evaluate pruned filters. This indicates that the two methods look for different significance measures when evaluating the pruning criteria. Therefore, the two methods can complement each other and be used as part of a unified pruning method.
[0079] Figure 5 A flow chart illustrating a gradient weight pruning method is shown. The gradient weight pruning method begins at step 502 and then initializes the model at step 504. Any known method of initializing a particular type of model being trained and then pruned may be used. Next, at step 506, the gradient weight pruning method 500 receives an input data tensor from a training data set. This training input data tensor is then input into the model. The gradient weight pruning method 500 then estimates a gradient update 510. This estimation may be accomplished using known gradient descent optimization techniques based on a particular loss model (e.g., focal loss or weighted cross entropy loss). At step 512, the gradient weight pruning method 500 updates the model using back propagation and the estimated gradient updates. At step 514, the gradient weight pruning method 500 then calculates the alpha value for the model. This may be the alpha value described above. Calculation of . At step 516, the gradient weight pruning method 500 also accumulates alpha values in multiple runs of the training process. Then at step 518, the gradient weight pruning method 500 determines whether the last training data has been used. If not, the gradient weight pruning method 500 returns to receiving the next training data input at step 506. If so, the gradient weight pruning method 500 prunes the model based on the accumulated alpha values at step 520. In this example, pruning involves first grading the alpha values calculated for different parts of the model through output classification. This then identifies the model parts that can then be pruned. This can be done using known pruning techniques for pruning weights, kernels, features, layers, filters, units, neurons, etc. In one embodiment, the lowest predetermined number of ranked values can be selected for pruning. The gradient weight pruning method 500 then ends at step 522.
[0080] In another embodiment, after gradient weight pruning is completed, another pruning technique may be additionally applied to the pruning mode. For example, L1 norm pruning may be applied to the model next. The use of two or more pruning methods including gradient weight pruning may result in a further reduction in model size while maintaining acceptable model accuracy.
[0081] Figure 6 Shown for implementation Figures 1 to 4D 600 is an exemplary hardware diagram of the gradient weight pruning method described in . As shown, the device 600 includes a processor 620, a memory 630, a user interface 640, a network interface 650, and a storage device 660 interconnected via one or more system buses 610. It should be understood that Figure 6 An abstract diagram is constructed in some respects, and the actual organization of components of device 600 may be more complex than shown.
[0082] Processor 620 may be any hardware device capable of executing instructions stored in memory 630 or storage device 660 or otherwise processing data. Thus, the processor may include a microprocessor, a microcontroller, a graphics processing unit (GPU), a neural network processor, a field programmable gate array (FPGA), an application specific integrated circuit (ASIC), or other similar devices.
[0083] Memory 630 may include various memories, such as L1, L2 or L3 cache memory or system memory. Thus, memory 630 may include static random access memory (SRAM), dynamic RAM (DRAM), flash memory, read-only memory (ROM) or other similar memory devices.
[0084] The user interface 640 may include one or more devices for implementing communication with a user. For example, the user interface 640 may include a display, a touch interface, a mouse and / or a keyboard for receiving user commands. In some embodiments, the user interface 640 may include a command line interface or a graphical user interface that may be presented to a remote terminal via the network interface 650.
[0085] The network interface 650 may include one or more devices for implementing communication with other hardware devices. For example, the network interface 650 may include a network interface card (NIC) configured to communicate according to the Ethernet protocol or other communication protocols (including wireless protocols). In addition, the network interface 650 may implement a TCP / IP stack to communicate according to the TCP / IP protocol. Various alternative or additional hardware or configurations for the network interface 650 will be apparent.
[0086] The storage device 660 may include one or more machine-readable storage media, such as read-only memory (ROM), random access memory (RAM), magnetic disk storage media, optical storage media, flash memory devices, or similar storage media. In various embodiments, the storage device 660 may store instructions for execution by the processor 620, or may store data on which the processor 620 may operate. For example, the storage device 660 may store a basic operating system 661 for controlling various basic operations of the hardware 600. The storage device 660 may store an implementation of the operating system 661. Figures 1 to 4D Instruction 662 of the gradient weight pruning method described in.
[0087] It will be apparent that various information described as being stored in storage device 660 may additionally or alternatively be stored in memory 630. In this regard, memory 630 may also be considered to constitute a "storage device," and storage device 660 may be considered to be a "memory." Various other arrangements will be apparent. Additionally, both memory 630 and storage device 660 may be considered to be "non-transitory machine-readable media." As used herein, the term "non-transitory" will be understood to exclude temporary signals but to include all forms of storage devices, including both volatile memory and non-volatile memory.
[0088] The system bus 610 allows communications between the processor 620 , memory 630 , user interface 640 , storage device 660 , and network interface 650 .
[0089] Although host device 600 is shown as including one of each described component, in various embodiments, various components may be repeated. For example, processor 620 may include multiple microprocessors configured to independently perform the methods described herein or configured to perform steps or subroutines of the methods described herein so that multiple processors cooperate to achieve the functionality described herein. In addition, when device 600 is implemented in a cloud computing system, various hardware components may belong to separate physical systems. For example, processor 620 may include a first processor in a first server and a second processor in a second server.
[0090] As used herein, the term "non-transitory machine-readable storage medium" should be understood to exclude transient propagating signals but include all forms of volatile and non-volatile memory. When the software is implemented on a processor, the combination of software and processor becomes a single specific machine. Although various embodiments have been described in detail, it should be understood that the invention is capable of other embodiments and its details are capable of modifications in various obvious respects.
[0091] Since the data processing implementing the present invention is largely composed of electronic components and circuits known to those skilled in the art, in order to understand and appreciate the basic concepts of the present invention and in order not to confuse or deviate from the teachings of the present invention, the circuit details will not be explained to any greater extent than deemed necessary as shown above.
[0092] Although the present invention is described herein with reference to specific embodiments, various modifications and changes may be made without departing from the scope of the present invention as set forth in the appended claims. Therefore, the specification and drawings should be regarded as illustrative rather than restrictive, and all such modifications are intended to be included within the scope of the present invention. It is not intended that any benefit, advantage, or solution to a problem described herein with respect to a specific embodiment be construed as a key, essential, or requisite feature or element of any or all claims.
[0093] In addition, as used herein, the terms "a" or "an" are defined as one or more than one. Moreover, the use of introductory phrases such as "at least one" and "one or more" in the claims should not be interpreted as implying that another claim element introduced by the indefinite article "a" or "an" limits any particular claim containing such introduced claim element to an invention containing only one such element, even when the same claim includes the introductory phrases "one or more" or "at least one" and an indefinite article such as "a" or "an". The same applies to the use of definite articles.
[0094] Unless otherwise stated, terms such as "first" and "second" are used to arbitrarily distinguish between the elements such terms describe. Therefore, these terms are not necessarily intended to indicate temporal priority or other priority of such elements.
[0095] Any combination of specific software running on a processor to implement embodiments of the invention constitutes a specific special purpose machine.
[0096] It should be appreciated by those skilled in the art that any block diagrams herein represent conceptual views of illustrative circuitry embodying the principles of the invention.
Claims
1. A data processing system, characterized in that: The data processing system includes instructions embodied in a non-transitory computer readable medium for pruning a machine learning model in a processor, the instructions comprising: training the machine learning model using training input data; Calculating alpha values for different parts of the machine learning model based on the gradients used when training the machine learning model, wherein the alpha values are importance measures; Accumulating the calculated α values across training iterations; and The machine learning model is pruned based on the accumulated alpha values.
2. The data processing system according to claim 1, characterized in that Pruning the machine learning model includes: Sort the accumulated calculated α values; selecting the lowest predetermined number of ranking values; and The machine learning model is pruned based on a selected number of values.
3. The data processing system according to claim 1, characterized in that: Calculating alpha values for different parts of the machine learning model based on the gradients used when training the machine learning model includes summing the gradients of the different parts of the machine learning model over the different parts of the machine learning model.
4. The data processing system according to claim 3, characterized in that: Summing the gradients of the different parts of the machine learning model over the different parts comprises computing: in is the α value, Z = m′·n′·m·n, m′ and n′ are the final output , m and n are the positional indices of each element in the different parts, is the gradient, and is the k-th feature map activation of the i-th layer.
5. The data processing system according to claim 1, characterized in that: Training the machine learning model using training input data includes: Initializing the machine learning model; Inputting a plurality of training input data tensors into the machine learning model in a plurality of iterations; estimating a gradient update based on an output of the machine learning model; and The machine learning model weights are updated based on the gradient updates using back-propagation.
6. A method for pruning a machine learning model, characterized in that include: training the machine learning model using training input data; Calculating alpha values for different parts of the machine learning model based on the gradients used when training the machine learning model, wherein the alpha values are importance measures; Accumulate the calculated α values in training iterations; as well as The machine learning model is pruned based on the accumulated alpha values.
7. The method according to claim 6, characterized in that Pruning the machine learning model includes sorting the accumulated calculated alpha values, selecting the lowest predetermined number of sorted values, and pruning the machine learning model based on the selected number of values.
8. The method according to claim 6, characterized in that Calculating alpha values for different parts of the machine learning model based on the gradients used when training the machine learning model includes: The gradients of the different parts of the machine learning model are summed over the different parts of the machine learning model.
9. The method according to claim 8, characterized in that Summing the gradients of the different parts of the machine learning model over the different parts comprises computing: in is the α value, Z = m′·n′·m·n, m′ and n′ are the final output The position index of each element in the feature map, m and n are the position index of each element in the feature map, is the gradient, and is the k-th feature map activation of the i-th layer.
10. The method according to claim 6, characterized in that Training the machine learning model using training input data includes: Initializing the machine learning model; Inputting a plurality of training input data tensors into the machine learning model in a plurality of iterations; estimating a gradient update based on an output of the machine learning model; and The machine learning model weights are updated based on the gradient updates using back-propagation.
