Calculation device, learning device, calculation method, learning method, calculation program, and learning program

The layer selection mechanism in DNN models dynamically adjusts the number of layers for inference processing, enhancing computational efficiency and memory usage while reducing retraining costs.

JP2026054271APending Publication Date: 2026-03-26KK TOSHIBA
View PDF 3 Cites 0 Cited by

Patent Information

Authority / Receiving Office
JP · JP
Patent Type
Applications
Current Assignee / Owner
Filing Date
2024-09-13
Publication Date
2026-03-26

AI Technical Summary

Technical Problem

Conventional DNN models face challenges in reducing inference processing calculations efficiently based on input data.

Method used

Implementing a layer selection mechanism using a layer selection neural network to dynamically select a specified number of layers from a DNN model based on input data, generating a layer reduction model, and specifying layers based on computation thresholds, while learning an optimal layer selection model for reduced computational load.

Benefits of technology

This approach reduces computational requirements during inference processing, optimizing memory usage and computation efficiency on edge devices, and lowers retraining costs for DNN models.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure 2026054271000001_ABST
    Figure 2026054271000001_ABST
Patent Text Reader

Abstract

Depending on the input data, the computational load of inference processing using the DNN model is reduced more appropriately during inference. [Solution] The computing device of the embodiment comprises an input unit, a selection unit, and a calculation unit. The input unit receives data to be processed by a first DNN (Deep Neural Network) model. The selection unit selects a specified number of layers from the first DNN model according to the data, such that the evaluation value of the processing result is higher. The calculation unit processes the data, executing the processing of the selected layers and not processing the unselected layers.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] Embodiments of the present invention relate to an arithmetic unit, a learning device, an arithmetic method, a learning method, an arithmetic program, and a learning program.

Background Art

[0002] In task processing such as image recognition, speech recognition, and natural language processing, a technique of inputting data into a DNN (Deep Neural Network) model and performing inference processing using the DNN model has been conventionally known.

Prior Art Documents

Patent Documents

[0003]

Patent Document 1

Patent Document 2

Patent Document 3

Summary of the Invention

Problems to be Solved by the Invention

[0004] However, in the conventional technology, it has been difficult to appropriately reduce the amount of calculation of the inference processing using the DNN model according to the input data at the time of inference. <000003​​​​​​​[Brief explanation of the drawing]

[0006] [Figure 1] A diagram showing an example of the functional configuration of the computing device of the first embodiment. [Figure 2] A diagram showing an example of the processing of the selection unit in the first embodiment. [Figure 3] A diagram illustrating an example of the processing of the selection unit in the first embodiment. [Figure 4A] A diagram showing an example of the layer selection process according to data in the first embodiment. [Figure 4B] A diagram showing an example of the layer selection process according to data in the first embodiment. [Figure 5] A flowchart showing an example of the calculation method of the first embodiment. [Figure 6] A diagram showing an example of the functional configuration of the computing device in the second embodiment. [Figure 7] A diagram showing an example of the functional configuration of the computing device of the third embodiment. [Figure 8] A diagram showing an example of the functional configuration of the learning device according to the fourth embodiment. [Figure 9] A diagram showing an example of the learning process according to the learning data of the fourth embodiment. [Figure 10] A diagram showing an example of the learning process in the fourth embodiment. [Figure 11] A diagram illustrating an example of the processing of the learning unit in the fourth embodiment. [Figure 12A] A diagram illustrating the fourth embodiment of Gumbel Softmax. [Figure 12B] A diagram illustrating the temperature parameter τ of the fourth embodiment. [Figure 13] A flowchart showing an example of the overall flow of the learning method in the fourth embodiment. [Figure 14] A flowchart illustrating an example of layer selection control during learning in the fourth embodiment (when Softmax is used). [Figure 15] A flowchart illustrating an example of layer selection control during training according to the fourth embodiment (when Gumbel Softmax is used). [Figure 16] A diagram for explaining a processing example of the selection part of Modification Example 1 of the fourth embodiment. [Figure 17] A diagram showing an example of the functional configuration of an arithmetic unit that performs the inference processing of Modification Example 2 of the fourth embodiment. [Figure 18] A diagram for explaining a processing example of the selection part of Modification Example 2 of the fourth embodiment. [Figure 19] A diagram for explaining a processing example of the selection part of Modification Example 3 of the fourth embodiment. [Figure 20] A diagram showing an example of the functional configuration of the learning device of the fifth embodiment. [Figure 21] A diagram showing an example of the hardware configuration of the arithmetic unit of the first to third embodiments and the learning devices of the fourth and fifth embodiments.

Modes for Carrying Out the Invention

[0007] Embodiments of an arithmetic unit, a learning device, an arithmetic method, a learning method, an arithmetic program, and a learning program will be described in detail below with reference to the accompanying drawings.

[0008] (First Embodiment) First, an example of the functional configuration of the arithmetic unit of the first embodiment will be described. [Example of Functional Configuration] FIG. 1 is a diagram showing an example of the functional configuration of the arithmetic unit 1 of the first embodiment. The arithmetic unit 1 of the first embodiment includes an input unit 11, a layer number specifying unit 12, a selection unit 13, and an arithmetic unit 14.

[0009] The input unit 11 receives the input of data to be processed by the DNN model.

[0010] The layer number specifying unit 12 receives the specification of the number of layers from the user. Note that an initial value (default value) may be specified in advance as the number of layers. When an initial value is specified for the number of layers, the layer number specifying unit 12 changes the number of layers according to the specification from the user.

[0011] The selection unit 13 selects a specified number of layers from the DNN model according to the data, in such a way that the evaluation value of the processing result is higher.

[0012] The calculation unit 14 processes the data by executing the processing of the selected layers, and not processing the layers that are not selected. The fewer layers selected, the smaller the amount of computation required by the calculation unit 14.

[0013] Figure 2 shows an example of processing in the selection unit 13 of the first embodiment. The example in Figure 2 shows the case where the DNN model is a Transformer model. In Figure 2, Attn represents the attention layer. MLP represents an MLP (Multilayer Perceptron) layer containing multiple Linear layers. Linear represents a Linear layer.

[0014] The selection unit 13 reduces the number of layers by selecting layers of the DNN model, for example, as shown in Figure 2. This speeds up the inference processing using the DNN model.

[0015] The selection unit 13 reduces the number of layers based on the combination that yields the highest evaluation value for all verification data.

[0016] The evaluation value indicates the degree to which the DNN model produces a desirable output. For example, the evaluation value is the degree of agreement between the output and the ground truth data. Specifically, the evaluation value is the degree of agreement between the processing result of the output data, after processing the layers selected by the selection unit 13 and not processing the layers not selected by the selection unit 13, and the ground truth data.

[0017] Figure 3 is a diagram illustrating an example of the processing of the selection unit 13 in the first embodiment. When inference processing of input data is performed, the selection unit 13 uses a layer selection NN (Neural Network) to select the layer to be used for inference processing according to the data. The evaluation value can be improved by changing the selected layer for each input data. For example, the evaluation value is the accuracy of the inference. Alternatively, for example, the evaluation value may be the classification accuracy in a classification problem.

[0018] The layer selection neural network (NN) estimates the priority of layers that will result in higher evaluation values ​​from the inference processing results of the DNN model. The selection unit 13 uses the layer selection NN to determine the priority of the layers according to the data. Then, if the number of layers specified by the layer number specification unit 12 is, for example, 4, the selection unit 13 selects 4 layers from the DNN model in order of priority.

[0019] Figures 4A and 4B illustrate an example of the layer selection process according to data in the first embodiment. Figure 4A shows an example of the layer selection process when the input data is images a to c. The layer selection NN outputs scalar values ​​corresponding to the number of layers in the DNN model, according to images a to c. Each of the output scalar values ​​corresponds to each of the layers included in the DNN model.

[0020] For example, the range of a scalar value is the range of values ​​from 0 to 1. A larger scalar value indicates a higher priority.

[0021] For example, in the examples in Figures 4A and 4B, in the case of image a, the scalar value corresponding to Attn-1 is 0.1, the scalar value corresponding to MLP-1 is 0.2, and the scalar value corresponding to Attn-2 is 0.4.

[0022] As shown in Figures 4A and 4B, when the top 5 layers are selected in order of priority, the selected layers will differ depending on the images a to c.

[0023] [Example of calculation method] Figure 5 is a flowchart illustrating an example of the calculation method in the first embodiment. First, the input unit 11 receives input of data to be processed by the DNN model (step S1). Next, the selection unit 13 selects a specified number of layers from the DNN model according to the data in such a way that the evaluation value of the processing result is higher (step S2). Next, the calculation unit 14 processes the data by executing the processing of the selected layers and not processing the unselected layers (step S3).

[0024] As described above, the computing device 1 of the first embodiment can reduce the amount of computation required for inference processing using the DNN model more appropriately during inference, depending on the input data. Furthermore, the computing device 1 of the first embodiment can determine whether or not to perform calculations on a layer before performing those calculations.

[0025] (Second Embodiment) Next, a second embodiment will be described. In the description of the second embodiment, explanations similar to those of the first embodiment will be omitted, and the differences from the first embodiment will be explained. In the second embodiment, the case in which a layer reduction model with fewer layers is generated will be described.

[0026] [Example of functional configuration] Figure 6 shows an example of the functional configuration of the arithmetic unit 1-2 of the second embodiment. The arithmetic unit 1-2 of the second embodiment includes an input unit 11, a layer number specification unit 12, a selection unit 13, an arithmetic unit 14, and a generation unit 15. In the arithmetic unit 1-2 of the second embodiment, the generation unit 15 is further added to the configuration of the arithmetic unit 1 of the first embodiment.

[0027] The generation unit 15 generates a layer reduction model (second DNN model) by deleting layers that were not selected by the selection unit 13 from the DNN model (first DNN model).

[0028] The calculation unit 14 processes the data by inputting it into the layer reduction model.

[0029] The layer reduction model requires less memory than the DNN model. Therefore, according to the computing device 1-2 of the second embodiment, a reduction in the memory used for computation can be expected when performing inference processing on edge devices with limited available resources.

[0030] (Third embodiment) Next, a third embodiment will be described. In the description of the third embodiment, explanations similar to those of the first embodiment will be omitted, and the differences from the first embodiment will be described. In the third embodiment, a case will be described in which the number of layers is specified by the user based on a threshold for the amount of computation used to execute the processing of the DNN model.

[0031] [Example of functional configuration] Figure 7 shows an example of the functional configuration of the arithmetic unit 1-3 of the third embodiment. The arithmetic unit 1-3 of the third embodiment includes an input unit 11, a selection unit 13, an arithmetic unit 14, and a calculation amount specification unit 16. In the arithmetic unit 1-3 of the third embodiment, the calculation amount specification unit 16 is further added to the configuration of the arithmetic unit 1 of the first embodiment.

[0032] The computation amount specification unit 16 receives a threshold value from the user for the amount of computation used to execute the processing of the DNN model.

[0033] The selection unit 13 determines (specifies) the number of layers to be selected so that the computation amount is less than or equal to a threshold specified by the user. For example, the selection unit 13 refers to table information that stores the expected computation amount for each layer, selects one or more layers in order of priority, and then ensures that the sum of the computation amounts of the selected layers is less than or equal to the threshold.

[0034] According to the computing device 1-3 of the third embodiment, the number of layers to be reduced is determined by a threshold of the amount of computation used to execute the processing of the DNN model. The third embodiment is a more suitable embodiment for, for example, general users who are unsure of the appropriate number of layers.

[0035] (Fourth Embodiment) In the fourth embodiment, a learning device for learning the layer selection NN (selection model) used in the selection unit 13 of the arithmetic units 1 to 1-3 of the first to third embodiments described above will be explained.

[0036] [Example of functional configuration] Figure 8 shows an example of the functional configuration of the learning device 2 of the fourth embodiment. The learning device 2 of the fourth embodiment includes a DNN model storage unit 21, a learning data storage unit 22, a selection unit 23, a calculation unit 24, an evaluation unit 25, and a learning unit 26.

[0037] The DNN model storage unit 21 stores the DNN model used for inference processing.

[0038] The training data storage unit 22 stores the training dataset used for training. For example, the training dataset is classified into multiple groups according to the characteristics of the training data.

[0039] The selection unit 23 selects layers from the DNN model using a layer selection model that selects a specified number of layers according to the training data. For example, the specified number of layers is the number of layers for which the amount of computation used to execute the DNN model's processing is below a threshold.

[0040] The calculation unit 24 processes the layers selected by the selection unit 23, and processes the training data without processing the layers not selected by the selection unit 23.

[0041] The evaluation unit 25 calculates an evaluation value of the processing results based on the processing results of the training data. For example, the evaluation value is the degree of agreement between the processing results of the training data output (after processing the selected layers and not the unselected layers) and the ground truth data.

[0042] The learning unit 26 updates the layer selection model to achieve a higher evaluation score.

[0043] Figure 9 shows an example of a learning process according to training data in the fourth embodiment. In the example in Figure 9, the training dataset is classified into three groups, datasets A to C. The classification into the three groups is performed by feature extraction and clustering of the data included in the training dataset. The feature extraction and clustering of the data may be performed by the learning unit 26, or by a device other than the learning device 2. Alternatively, for example, the feature extraction and clustering of the data may be performed using a DNN model.

[0044] The learning unit 26 learns the combination of layers that yields higher evaluation values ​​for each dataset A to C. For data where the difference in features is less than a threshold, the same combination of layers is suitable. In other words, the learning unit 26 learns the layers to be removed from the DNN model for each dataset A to C.

[0045] Specifically, when data is input, the learning unit 26 extracts the features of the data. Based on the features of the data, the learning unit 26 classifies the data into one of the datasets A to C. In the example in Figure 9, the data is classified into dataset C. The learning unit 26 switches the combination of layers used for learning to the combination of layers corresponding to dataset C.

[0046] The learning unit 26 performs data inference processing using a DNN model composed of a combination of layers corresponding to dataset C, and outputs the inference result. Based on this inference result, the learning unit 26 updates (trains) the DNN model for dataset C (a combination of layers corresponding to dataset C).

[0047] Figure 10 shows an example of the learning process in the fourth embodiment. Since the layer selection NN (layer selection model) cannot backpropagate the process of selecting layers, ingenuity is required in the learning process. The learning unit 26 performs sampling and normalization of the list of real values ​​output from the layer selection NN. For example, Gumbel Softmax, Softmax, and Sigmoid can be used for the sampling and normalization process.

[0048] Then, the learning unit 26 randomly switches between layer selection methods 1 to 3, for example, during the learning process.

[0049] In the example in Figure 10, layer selection method 1 is a method of controlling layer selection using continuous values. Layer selection method 2 is a method of controlling layer selection using Hard Sample (Straight-through trick). Layer selection method 3 is a method of controlling layer selection using TopK weight. The learning unit 26 uses continuous values, Hard Sample or TopK weight values ​​( Multiply the output of the layer corresponding to the value by (0.0 < α < 1.0).

[0050] Figure 11 is a diagram illustrating an example of processing by the learning unit 26 of the fourth embodiment. The example in Figure 11 shows the case where the DNN model is a Transformer model. The example in Figure 11 shows the case where the output of each of the eight layers from Attn-1 to MLP-4 is multiplied by the probability of selecting each layer (0.0 < α < 1.0).

[0051] The eight layers from Attn-1 to MLP-4 are layers that can be shortcutted by a shortcut structure. For example, if three layers, Attn-1, Attn-2, and MLP-3, are selected, the processing of the unselected layers, MLP-1, MLP-2, Attn-3, Attn-4, and MLP-4, is shortcutted using the shortcut structure.

[0052] Figure 12A is a diagram illustrating the fourth embodiment of Gumbel Softmax. Uniform(0,1) represents a uniform distribution of numbers from 0 to 1. U represents random numbers sampled from Uniform(0,1). g represents a Gumbel distribution, and g i and g j This shows values ​​sampled from the Gumbel distribution. The Gumbel Softmax includes the temperature parameter τ.

[0053] The learning unit 26 adjusts the temperature parameter τ during training. When training using Gumbel Softmax or Softmax, the learning unit 26 gradually decreases the temperature parameter τ.

[0054] Figure 12B is a diagram illustrating the temperature parameter τ of the fourth embodiment. Lowering the temperature parameter τ approaches a category selection (one hot). On the other hand, increasing the temperature parameter τ approaches a uniform distribution.

[0055] The upper panel a) of Figure 12B shows the output (estimation result) of the layer selection NN (selection model). The lower panel b) shows a sample of the target (ground truth) corresponding to the estimation result in the upper panel. For example, if the layer selection NN aims to select the three layers that yield the highest evaluation value in the estimation result, the temperature parameter τ is gradually adjusted to a smaller value so that the top three layers become selectable.

[0056] [Examples of learning methods] Figure 13 is a flowchart showing an example of the overall flow of the learning method in the fourth embodiment. First, the selection unit 23 reads the learning data from the learning data storage unit 22 (step S11).

[0057] Next, the selection unit 23 selects layers from the DNN model using a layer selection model that selects a specified number of layers according to the training data (step S12). The parameters of the layer selection model are updated as needed during the training process using multiple training data sets.

[0058] Next, the calculation unit 24 processes the training data, executing the processing of the layer selected in step S12, and skipping the processing of the unselected layers (step S13). Then, the evaluation unit 25 calculates an evaluation value of the processing result based on the training data processing result in step S13 (step S14).

[0059] Next, the learning unit 26 updates the parameters of the layer selection model so that the evaluation value becomes higher (step S15). After the processing up to step S15, the learning process for one training data is completed, and if there is any unprocessed training data, processing of the unprocessed training data starts from step S11.

[0060] Figure 14 is a flowchart showing an example of layer selection control during training in the fourth embodiment (when Softmax is used). First, the learning unit 26 obtains the output (logits) of the selection model (layer selection NN) (step S21). Next, the learning unit 26 calculates Softmax from the output (logits) (step S22).

[0061] Next, the learning unit 26 masks the logits from the Softmax result of step S22 (step S23). By masking the already selected logits components, it prevents those components from being selected again.

[0062] Next, the learning unit 26 determines whether the processes in steps S22 and S23 have been repeated k times (step S24). If the process has not been repeated k times (step S24, No), the process returns to step S22.

[0063] If the process is repeated k times (step S24, Yes), the learning unit 26 adds up the results of each Softmax (the results of the k Softmaxes) (step S25). The process in step S25 enables the layer selection model to control layer selection using continuous values.

[0064] Figure 15 is a flowchart showing an example of layer selection control during training in the fourth embodiment (when Gumbel Softmax is used). The difference from the flowchart in Figure 14 above, where Softmax is used, is the addition of step S32, which adds the Gumbel distribution to logits.

[0065] The processes in steps S31 and S33-S36 are the same as those in steps S21-S25 in Figure 14 above, so we will omit the explanation. In step S33, the Softmax is calculated from the logits to which the Gumbel distribution has been added by the process in step S32.

[0066] As explained above, the learning device 2 of the fourth embodiment can learn a selection model (layer selection NN) that can more appropriately reduce the computational load of inference processing using a DNN model depending on the input data. For example, by reducing the computational load of a Transformer model through learning a selection model (layer selection NN), it can be achieved with a lower retraining cost.

[0067] (Modification 1 of the fourth embodiment) Next, a modification 1 of the fourth embodiment will be described. In the description of modification 1, explanations similar to those of the fourth embodiment will be omitted, and the differences from the fourth embodiment will be described. The learning device 2 of the fourth embodiment and the arithmetic devices 1 to 1-3 of the first to third embodiments may be implemented using the same device.

[0068] Modification 1 describes a case in which the learning device 2 of the fourth embodiment also operates as a computing device and performs inference processing to select a reduction pattern model (a layer sequence containing multiple layers).

[0069] Figure 16 is a diagram illustrating an example of the processing of the selection unit 23 in Modification 1 of the fourth embodiment. Ln indicates the nth layer, and in the example in Figure 16, layers L0 to L23 are shown. When the selection unit 23 of Modification 1 receives input data to be inferred by the DNN model, it selects a column of layers containing multiple layers rather than selecting each layer individually.

[0070] In other words, in Modification 1, a specified number of layers are selected from the DNN model, but the DNN model having the specified number of layers is represented by a model of the pattern of layers to be removed from the DNN model.

[0071] For example, in the example in Figure 16, models of four layer columns with different layer reduction patterns are stored in the DNN model storage unit 21. In the example in Figure 16, one layer column contains 14 layers, but the combination of layers executed is different in each of the four layer columns.

[0072] The selection unit 23 selects a reduction pattern model from a plurality of reduction pattern models (four layer columns in the example in Figure 16) according to the input data. When the inference processing of the input data is performed, the selection unit 23 uses a layer selection NN to select the layer column (reduction pattern model) to be used for the inference processing according to the input data.

[0073] The processing of the layer selection NN for selecting reduction pattern models is the same as in the layer selection in the first embodiment. That is, it outputs a scalar value corresponding to the reduction pattern model to be selected, and selects the reduction pattern model with a larger scalar value. In the modified example 1, the evaluation of the scalar value is performed for each layer column (reduction pattern model).

[0074] (Modification 2 of the fourth embodiment) Next, a second modification of the fourth embodiment will be described. In the description of the second modification, explanations similar to those for the first modification of the fourth embodiment will be omitted, and the differences from the first modification will be explained. The second modification describes a case in which the learning device 2 of the fourth embodiment also operates as a computing device and performs inference processing.

[0075] The difference from Modification 1 of the fourth embodiment is that, among the layers from the first layer to the Nth layer into which the input data is first input, a predetermined layer is fixed and not subject to reduction, and the intermediate data processed by the predetermined layer is used to select the layer sequence (reduction pattern model) to be used for inference processing. Note that N can be any natural number as appropriate.

[0076] [Example of functional configuration] Figure 17 shows an example of the functional configuration of the arithmetic unit 1-4 that performs inference processing in Modification 2 of the fourth embodiment. The arithmetic unit 1-4 of Modification 2 includes an input unit 11, a selection unit 13, an arithmetic unit 14, and an intermediate data acquisition unit 17.

[0077] The input unit 11 accepts data to be processed by the DNN model.

[0078] The intermediate data acquisition unit 17 acquires intermediate data (intermediate output) that has been processed by the predetermined layer described above. In other words, the intermediate data is data that has been processed by utilizing some of the operations of the DNN model targeted for layer reduction. This allows the data input to the selection unit 13 to be processed without increasing the amount of computation. The intermediate data acquisition unit 17 inputs the intermediate data to the selection unit 13.

[0079] The selection unit 13 selects a reduction pattern model from a plurality of reduction pattern models according to the intermediate data based on the input data. When the inference processing of the input data is performed, the selection unit 23 uses a layer selection NN to select the layer sequence (reduction pattern model) to be used for inference processing according to the intermediate data.

[0080] The calculation unit 14 processes the data, executing the processing of the selected layer and not processing the unselected layer.

[0081] Figure 18 is a diagram illustrating an example of the processing of the selection unit in a modified example 2 of the fourth embodiment. In the example in Figure 18, layers L0, L1, and L3 are predetermined layers that are fixed and not subject to reduction. The intermediate data acquisition unit 17 acquires intermediate data processed by the predetermined layers (layers L0, L1, and L3) mentioned above, and inputs the intermediate data to the selection unit 13.

[0082] The selection unit 13 selects a layer column (reduction pattern model) to be used for inference processing from among multiple reduction pattern models (two layer columns in the example in Figure 18) according to the intermediate data based on the input data.

[0083] (Modification 3 of the fourth embodiment) Next, a third modification of the fourth embodiment will be described. In the description of the third modification, explanations similar to those for the second modification of the fourth embodiment will be omitted, and the differences from the second modification will be explained. The third modification describes a case in which the learning device 2 of the fourth embodiment also operates as a computing device and performs inference processing.

[0084] The difference from Modification 2 of the Fourth Embodiment is that, using intermediate data, the layers used for inference processing are selected in the same way as in the First Embodiment described above, rather than using a layer sequence (a model of reduction patterns). In other words, the difference from the First Embodiment described above is that layer selection is performed using intermediate data instead of input data.

[0085] Figure 19 is a diagram illustrating an example of the processing of the selection unit 13 in a modified example 3 of the fourth embodiment. The intermediate data acquisition unit 17 acquires intermediate data processed by the predetermined layers described above (Attn-1 and MLP-1 in the example of Figure 19) from the input data, and inputs the intermediate data to the selection unit 13. The selection unit 13 uses a layer selection NN to select the layer to be used for inference processing in the same manner as in the first embodiment, according to the intermediate data based on the input data.

[0086] As explained above, in Modification 3, the intermediate data acquisition unit 17 fixes certain layers from the layer where the input data is first input to the Nth layer (where N is any natural number) among the layers included in the DNN model, without removing them, and acquires intermediate data in which the input data has been processed by the predetermined layer. Then, the selection unit 13 selects a specified number of layers from the DNN model according to the intermediate data in such a way that the evaluation value of the processing result is higher.

[0087] (Fifth embodiment) Next, the fifth embodiment will be described. In the description of the fifth embodiment, explanations similar to those of the fourth embodiment will be omitted, and the differences from the fourth embodiment will be explained. In the fifth embodiment, the case of setting the initial value of the layer selection NN (selection model) will be described.

[0088] [Example of functional configuration] Figure 20 shows an example of the functional configuration of the learning device 2-2 of the fifth embodiment. The learning device 2-2 of the fifth embodiment includes a DNN model storage unit 21, a learning data storage unit 22, a selection unit 23, a calculation unit 24, an evaluation unit 25, a learning unit 26, a search unit 27, and a setting unit 28. In the learning device 2-2 of the fifth embodiment, the search unit 27 and the setting unit 28 are further added to the configuration of the learning device 2 of the fourth embodiment.

[0089] The search unit 27 searches for a combination of layers that minimizes the degradation of the evaluation value of the calculation result for multiple training data. Specifically, the search unit 27 uses greedy search to find a combination of layers that yields a good evaluation value for multiple training data.

[0090] The configuration unit 28 initializes the layer selection NN (selection model) to select the combination of layers found by the search unit 27. Specifically, the configuration unit 28 initializes the layer selection NN so that it outputs the result of the greedy search (combination of layers). In other words, the configuration unit 28 initializes the layer selection NN so that the layers remaining after the greedy search have a higher selection rate.

[0091] Finally, examples of the hardware configurations of the arithmetic units 1 to 1-3 of the first to third embodiments, and the learning devices 2 to 2-2 of the fourth and fifth embodiments will be described.

[0092] [Example hardware configuration] Figure 21 shows examples of the hardware configurations of the arithmetic units 1 to 1-3 of the first to third embodiments, and the learning devices 2 to 2-2 of the fourth and fifth embodiments. The arithmetic units 1 to 1-3 and the learning devices 2 to 2-2 each include a processor 201, a main memory 202, an auxiliary memory 203, a display device 204, an input device 205, and a communication device 206. The processor 201, the main memory 202, the auxiliary memory 203, the display device 204, the input device 205, and the communication device 206 are connected via a bus 210.

[0093] Furthermore, the arithmetic units 1 to 1-3 and the learning units 2 to 2-2 may not be equipped with some of the above configurations. For example, if the arithmetic units 1 to 1-3 and the learning units 2 to 2-2 can utilize the input and display functions of external devices, the display device 204 and the input device 205 may not be provided in the arithmetic units 1 to 1-3 and the learning units 2 to 2-2.

[0094] The processor 201 executes the program read from the auxiliary storage device 203 into the main memory device 202. The main memory device 202 is memory such as ROM and RAM. The auxiliary storage device 203 is such as an HDD and memory card.

[0095] The display device 204 is, for example, a liquid crystal display. The input device 205 is an interface for operating the arithmetic units 1 to 1-3 and the learning devices 2 to 2-2. The display device 204 and the input device 205 may be implemented by a touch panel or the like that has both display and input functions. The communication device 206 is an interface for communicating with other devices.

[0096] For example, programs executed by arithmetic units 1 to 1-3 and learning units 2 to 2-2 are provided as computer program products, recorded in installable or executable file format on computer-readable storage media such as memory cards, hard disks, CD-RWs, CD-ROMs, CD-Rs, DVD-RAMs, and DVD-Rs.

[0097] Alternatively, for example, the programs executed by the arithmetic units 1 to 1-3 and the learning devices 2 to 2-2 may be stored on a computer connected to a network such as the Internet, and provided by being downloaded via the network.

[0098] Alternatively, for example, the system may be configured to provide programs executed by arithmetic units 1-1-3 and learning units 2-2-2 via a network such as the Internet, without requiring downloads. Specifically, the system may be configured to execute processing by arithmetic units 1-1-3 and learning units 2-2-2 through a so-called ASP (Application Service Provider) type service, where the server computer does not transfer programs but only issues execution instructions and retrieves results.

[0099] Alternatively, for example, the programs for the arithmetic units 1 to 1-3 and the learning devices 2 to 2-2 may be pre-installed and provided in ROM or the like.

[0100] The programs executed by the arithmetic units 1 to 1-3 and the learning units 2 to 2-2 are modular in configuration, including functions that can also be implemented by programs, from the functional configuration described above. In actual hardware terms, each of these functions is loaded onto the main memory 202 when the processor 201 reads and executes a program from the storage medium. In other words, each of these functional blocks is generated on the main memory 202.

[0101] Furthermore, some or all of the above-mentioned functions may be implemented using hardware such as an IC (Integrated Circuit) instead of software.

[0102] Alternatively, multiple processors 201 may be used to implement each function, in which case each processor 201 may implement one of the functions, or two or more of the functions.

[0103] While several embodiments of the present invention have been described, these embodiments are presented as examples only and are not intended to limit the scope of the invention. These novel embodiments can be carried out in a variety of other forms, and various omissions, substitutions, and modifications can be made without departing from the spirit of the invention. These embodiments and their variations are included in the scope and spirit of the invention, as well as in the claims of the invention and its equivalents. [Explanation of symbols]

[0104] 1 Computing device 2 Learning device 11 Input section 12. Layer number specification section 13 Selection Section 14 Arithmetic section 15 Generation part 16 Computation amount specification section 17 Intermediate Data Acquisition Unit 21 DNN Model Memory Unit 22 Learning Data Storage Unit 23 Selection Section 24 Arithmetic section 25 Evaluation Department 26 Learning Department 27 Exploration Department 28 Settings Section 201 Processor 202 Main storage 203 Auxiliary storage device 204 Display device 205 Input device 206 Communication equipment 210 Bus

Claims

1. An input unit that accepts data to be processed by the first DNN (Deep Neural Network) model, A selection unit that selects a specified number of layers from the first DNN model according to the data such that the evaluation value of the processing result is higher, A calculation unit that processes the data while executing the processing of the selected layer and not the processing of the unselected layer, A computing device equipped with the following features.

2. The aforementioned evaluation value is the degree of agreement between the processing result of the output data, which is obtained by processing the selected layer but not the unselected layer, and the ground truth data. The computing device according to claim 1.

3. The system further includes a layer number specification unit that accepts the user's specification of the number of layers, The specified number of layers will be changed according to the user's specifications. The computing device according to claim 1 or 2.

4. The system further includes a generation unit that generates a second DNN model by deleting the unselected layers from the first DNN model, The calculation unit processes the data by inputting the data into the second DNN model. The computing device according to claim 1 or 2.

5. The system further includes a computation amount specification unit that accepts a threshold for the amount of computation used to execute the processing of the first DNN model from the user, The selection unit determines the number of layers to be selected such that the computation amount is less than or equal to a threshold specified by the user. The computing device according to claim 1 or 2.

6. The selected layer and the unselected layer are layers that are connected via shortcuts through a shortcut structure. The processing of the unselected layers is shortcutted using the shortcut structure. The computing device according to claim 1 or 2.

7. The selection unit determines the priority order of layers to be selected in order to increase the evaluation value, according to the data, and selects the specified number of layers from the first DNN model in order of decreasing priority. The computing device according to claim 1 or 2.

8. The first DNN model further includes an intermediate data acquisition unit that, among the layers included in the first DNN model, fixes certain layers from the layer into which the data is first input up to the Nth layer (where N is any natural number) without being subject to reduction, and acquires intermediate data processed by the predetermined layer. The selection unit selects the specified number of layers from the first DNN model in accordance with the intermediate data such that the evaluation value of the processing result is higher. The computing device according to claim 1 or 2.

9. The specified number of layers are represented by a model of the deletion pattern of layers to be removed from the first DNN model. The computing device according to claim 1 or 2.

10. A layer selection unit selects layers from a DNN (Deep Neural Network) model using a layer selection model that selects a specified number of layers according to the training data, A calculation unit that processes the training data, executing the processing of the selected layer and not the processing of the unselected layer, An evaluation unit calculates an evaluation value of the processing result based on the processing result of the learning data, A learning unit that updates the layer selection model so that the aforementioned evaluation value becomes higher, A learning device equipped with the following features.

11. The specified number of layers is the number of layers whose computational load used to execute the processing of the DNN model is less than or equal to a threshold. The learning device according to claim 10.

12. The aforementioned evaluation value is the degree of agreement between the processing result of the output training data and the ground truth data, after performing processing on the selected layer and not processing the unselected layer. The learning device according to claim 10 or 11.

13. A search unit searches for a combination of layers that suppresses the degradation of the evaluation value of the calculation result on average for multiple training data, A setting unit that initializes the layer selection model to select the aforementioned combination of layers, The learning device according to claim 10 or 11, further comprising the following:

14. The arithmetic unit receives input data to be processed by the first DNN (Deep Neural Network) model, The arithmetic unit selects a specified number of layers from the first DNN model in accordance with the data such that the evaluation value of the processing result is higher, The arithmetic unit performs processing on the selected layer, and processes the data without performing processing on the unselected layers. A calculation method that includes this.

15. The learning device selects layers from a DNN (Deep Neural Network) model using a layer selection model that selects a specified number of layers according to the training data, and The learning device performs processing on the selected layer, and does not perform processing on the unselected layers, and processes the learning data. The learning device performs the steps of calculating an evaluation value of the processing result based on the processing result of the learning data, The learning device updates the layer selection model so that the evaluation value becomes higher, Learning methods that include this.

16. Computers, An input unit that accepts data to be processed by the first DNN (Deep Neural Network) model, A selection unit that selects a specified number of layers from the first DNN model according to the data such that the evaluation value of the processing result is higher, A calculation unit that processes the data, executing the processing of the selected layer and not the processing of the unselected layer. A computational program designed to function as such.

17. Computers, A layer selection unit selects layers from a DNN (Deep Neural Network) model using a layer selection model that selects a specified number of layers according to the training data, A calculation unit that processes the training data, executing the processing of the selected layer and not the processing of the unselected layer, An evaluation unit calculates an evaluation value of the processing result based on the processing result of the learning data, A learning unit that updates the layer selection model so that the aforementioned evaluation value becomes higher. A learning program designed to function as such.

Citation Information

Patent Citations

  • Operational equipment, operation method, and program thereof

    JP2019159767A

  • Arithmetic unit, arithmetic method, and learning method

    JP2021047711A

  • Inference processing device and inference processing method

    JP7215572B2