Information processing device, information processing method, program, and storage medium

JP7923631B2Active Publication Date: 2026-09-18CANON KK
View PDF 4 Cites 0 Cited by

Patent Information

Application Number
JP2022078954
Authority / Receiving Office
JP · JP
Patent Type
Patents
Current Assignee / Owner
Filing Date
2022-05-12
Publication Date
2026-09-18
Estimated Expiration
2042-05-12

AI Technical Summary

Benefits of technology

【0009】 量子化する演算を含むニューラルネットワークの中間層において、量子化パラメータを小さく設定しながら認識精度の劣化を抑える。

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure 0007923631000004
    Figure 0007923631000004
  • Figure 0007923631000005
    Figure 0007923631000005
  • Figure 0007923631000006
    Figure 0007923631000006
Patent Text Reader

Abstract

To suppress deterioration in recognition accuracy by setting a quantization parameter to be small in an intermediate layer of a neural network that includes quantization operations.SOLUTION: An information processing apparatus is configured to: obtain information indicating the magnitude of output from a first operation in a neural network that performs the first operation using a weighting coefficient on input data and a second operation quantizing a result of the first operation in order to obtain data of an intermediate layer; and control the first operation in the neural network to adjust the magnitude of the output based on the acquired information and the quantization parameter used for quantization.SELECTED DRAWING: Figure 4
Need to check novelty before this filing date? Find Prior Art

Description

[Technical Field]

[0001] This invention relates to an information processing device, an information processing method, a program, and a storage medium. [Background technology]

[0002] In recent years, image recognition technology using neural networks (NNs) has been researched and developed. While modern NNs often have a large number of layers and require significant computation, computing resources may be limited, necessitating more efficient computation methods.

[0003] One known efficient computation method involves quantizing the data of a neural network (NN) into low-precision numerical values ​​for computation. This quantization makes it easier to run the NN even on devices with limited computing resources.

[0004] Non-patent document 1 discloses a technique for determining the distribution of output values ​​for a neural network trained with high-precision numerical data, using a large amount of data for each layer, and selecting quantization parameters that minimize the loss of the distribution after quantization. [Prior art documents] [Non-patent literature]

[0005] [Non-Patent Document 1] 8-bit Inference with TensorRT Szymon Migacz, NVIDIA,May 8, 2017. [Non-Patent Document 2] Delving Deep into Rectifiers: Surpassing Human-Level Performance on ImageNet Classification, Kaiming He, Xiangyu Zhang, Shaoqing Ren, Jian Sun; Proceedings of the IEEE International Conference on Computer Vision (ICCV), 2015, pp. 1026-1034. [Overview of the Initiative] [Problems that the invention aims to solve]

[0006] However, generally, when quantizing the output of the hidden layers of a neural network (NN), reducing the quantization parameter tends to degrade the NN's recognition accuracy due to truncation or rounding of the output value. On the other hand, increasing the quantization parameter reduces the resolution of the output value, which can also degrade the NN's recognition accuracy. Furthermore, while setting individual quantization parameters for each layer can suppress the degradation of recognition accuracy, it often leads to a combinatorial explosion.

[0007] The present invention aims to suppress the degradation of recognition accuracy while setting small quantization parameters in the intermediate layer of a neural network that includes quantization operations. [Means for solving the problem]

[0008] To achieve the object of the present invention, for example, an information processing apparatus according to one embodiment comprises the following configuration: an acquisition means for acquiring information indicating the magnitude of the output of a neural network that performs a first operation using weight coefficients on input data and a second operation for quantizing the result of the first operation in order to obtain intermediate layer data; and a control means for controlling the first operation in the neural network to adjust the magnitude of the output based on the information and quantization parameters used for the quantization. The control means controls the first operation by controlling the weight coefficients of the neural network, thereby performing learning such that the loss increases when the magnitude of the output exceeds the quantization parameter. ru. Effects of the Invention

[0009] In an intermediate layer of a neural network including quantization computation, degradation of recognition accuracy is suppressed while quantization parameters are set to be small. Brief Description of the Drawings

[0010] [Figure 1] FIG. 1 is a diagram illustrating an example of a hardware configuration of an information processing apparatus according to Embodiment 1. [Figure 2] FIG. 2 is a diagram illustrating an example of a functional configuration of an information processing apparatus according to Embodiment 1. [Figure 3] FIG. 3 is a flowchart illustrating an example of output distribution calculation processing according to Embodiment 1. [Figure 4] FIG. 4 is a diagram illustrating an example of an NN model included in the information processing apparatus according to Embodiment 1. [Figure 5] FIG. 5 is a flowchart illustrating an example of weight determination processing according to Embodiment 1. [Figure 6] FIG. 6 is a diagram illustrating an example of a functional configuration of an information processing apparatus according to Embodiment 2. [Figure 7] FIG. 7 is a diagram for explaining weight correction of an NN model according to Embodiment 2. [Figure 8] FIG. 8 is a diagram illustrating an example of a functional configuration of an information processing apparatus according to Embodiment 3. Mode for Carrying Out the Invention

[0011] Hereinafter, embodiments will be described in detail with reference to the accompanying drawings. Note that the following embodiments do not limit the invention according to the claims. Although a plurality of features are described in the embodiments, not all of the plurality of features are essential to the invention, and the plurality of features may be combined arbitrarily. Furthermore, in the accompanying drawings, the same or similar configurations are denoted by the same reference numerals, and redundant description is omitted.

[0012] Figure 1 is a block diagram showing an example of the hardware configuration of the information processing device 1 according to this embodiment. The information processing device 1 according to this embodiment includes a CPU 11, ROM 12, RAM 13, storage 14, input / output unit 15, display unit 16, and connection bus 17.

[0013] The CPU 11 is a central processing unit that executes control programs stored in the ROM 12 and RAM 13, thereby performing various controls on the functional parts of the information processing device 1 described below. The CPU 11 also executes SIMD (Single Instruction, Multiple Data) instructions and processes 8-bit integer operations together in the inference process described later.

[0014] ROM12 is a non-volatile memory that stores data including the control program and various parameters. Here, the control program is executed by the CPU11 to perform various control processes. RAM13 is a volatile memory that temporarily stores images, as well as the control program and its execution results.

[0015] The memory unit 14 is a rewritable secondary storage device such as a hard disk or flash memory, and stores various data used in each process according to this embodiment. The memory unit 14 can store, for example, images used for calculating quantization parameters, as well as control programs and their processing results. This various information is output to the RAM 13, and the CPU 11 uses it to execute the program.

[0016] The input / output unit 15 functions as an interface to the outside world. The input / output unit 15 acquires user input, which may be, for example, a mouse and keyboard, or a touch panel. The display unit 16 is, for example, a monitor and can display program processing results or images. The display unit 16 may be implemented simultaneously with the input / output unit 15, for example, as a touch panel. The connection bus 17 connects each functional unit of the information processing device 1 in a communicative manner and enables the sending and receiving of data between them.

[0017] In this embodiment, the processes described below are explained assuming they are implemented in software using the CPU 11. However, some or all of the processes may be implemented in hardware if the same processing is possible. The hardware may include dedicated circuits (ASICs) or processors (reconfigurable processors or DSPs). Furthermore, the software that performs each process may be acquired via a network or various storage media and executed by a processing unit such as a personal computer.

[0018] Figure 2 is a block diagram showing an example of the functional configuration of the information processing device 1 according to this embodiment. The information processing device 1 according to this embodiment acquires information (output distribution) indicating the magnitude of the output of the first operation in a neural network (NN) that performs a first operation using weight coefficients on input data and a second operation to quantize the result of the first operation in order to obtain data for the intermediate layer of the NN. Next, the information processing device 1 controls the first operation in the NN to adjust the magnitude of the output of the first operation based on the acquired output distribution and the quantization parameters used for quantization. To this end, the information processing device 1 includes a data acquisition unit 201, a model acquisition unit 202, a distribution calculation unit 203, a weight determination unit 204, and a quantization unit 209. The weight determination unit 204 also includes a parameter acquisition unit 205, a regularization term calculation unit 206, a teacher acquisition unit 207, and a learning unit 208. Furthermore, the regularization term calculation unit 206 includes a coefficient calculation unit 210 and a correction amount calculation unit 211. A detailed explanation of the processing by each functional unit will be described later.

[0019] Figure 4 shows an example of a NN model used in this embodiment, illustrating three layers 401-403, including the NN's hidden layers. The layers shown in Figure 4 consist of a combination of a CNN layer, a normalization layer, a ReLU layer, and an FC layer. CNN (Convolutional Neural Network) is a type of NN that performs convolutional processing. FC (Fully Connected Layer) is a type of NN called a fully connected layer. ReLU (Rectified Linear Unit) is a type of activation function. The processing performed by each layer is basically the same as that performed in a general NN, so a detailed explanation is omitted.

[0020] Here, a set from the neural network (NN) to the activation function is considered one unit of a layer. For example, layer 401 has CNN layer 404, normalization layer 405, and ReLU layer 406 as one unit of a layer. Layer 402 is an intermediate layer with layers configured similarly to layer 401. Layer 403 has FC layer 410 and ReLU layer 411 as one unit of a layer. Hereafter, the output of a layer (intermediate layer) refers to the output of one unit of that layer. Also, when layer i (1≦i) is referred to below, i refers to the index of one unit of the layer. In the example in Figure 4, layer 1 corresponds to layer 401, layer 2 to layer 402, and layer 3 to layer 403.

[0021] Layer 401 is the input layer, which performs a convolution operation on the input image. Layer 403 is the output layer, which outputs a likelihood map of a specific object on the input image. This is just an example, and the number of layers may differ, and layers that perform different operations may be included. For example, the layers may include a pooling layer. In this example, the NN uses a pre-trained model, but a model initialized using a known NN weight initialization method, such as the one shown in Non-Patent Document 2, may be used instead.

[0022] The information processing device 1 according to this embodiment inputs input data to the NN and outputs the inference result. Here, when the distribution calculation unit 203 inputs input data to the NN, it performs a calculation using the weight coefficients (hereinafter simply referred to as weights) in each hidden layer as the first operation to obtain the output distribution. Here, the output distribution Y i This is information indicating the magnitude of the output in layer i, and may be, for example, the maximum value of the output in layer i, or the value corresponding to the top 99.9% when the output values ​​of layer i are arranged in ascending order. Also, the output distribution Y i This is the average μ of the output value. i and standard deviation σ i The value may be calculated using the following formula (1). Here, n can be set according to the desired conditions, for example, 4 or 5. Thus, in this embodiment, the output distribution is information calculated based on the distribution of outputs from the first operation, and in particular, it may be calculated as information indicating the upper limit excluding outliers of those outputs. In this embodiment, the number of minibatches of input data is N, and the number of output channels of the layer is M, and the output distribution is obtained from the N × M output values. Y i =μ i +nσ i Formula (1)

[0023] The information processing device 1 according to this embodiment can set quantization parameters and perform a second operation to quantize the NN data, including the result of the first operation (layer output). However, when quantizing the layer output, if the output is larger than the quantization parameters, a lot of truncation or rounding of the output value often occurs during quantization, which can reduce the recognition accuracy of the NN. From this perspective, the information processing device 1 controls the first operation to adjust the magnitude of the layer output based on the output distribution and the quantization parameters. In particular, by adjusting the weights of the NN so that the output distribution is small relative to the quantization parameters (for example, so that it is less than or equal to the quantization parameters), it is possible to reduce the degradation of recognition accuracy during quantization without increasing the quantization parameters.

[0024] The information processing apparatus 1 according to the present embodiment trains a neural network based on a quantization parameter such that an output distribution becomes smaller. Such an example will be described below.

[0025] FIG. 3 is a flowchart showing an example of processing performed by the information processing apparatus 1 according to the present embodiment until an output distribution is output. In S301, a model acquisition unit 202 acquires a neural network model.

[0026] In S302, a data acquisition unit 201 acquires a mini-batch of images. Here, a mini-batch is input data to a neural network composed of one or more images, and is a set of input images input to the neural network acquired in S301. For example, assume that a mini-batch is a set of 32 images (where N, the number of images included in the mini-batch, is N=32). In the present embodiment, a model that detects a recognition target from an image is used, but images included in the mini-batch may or may not include the recognition target.

[0027] In S303, a distribution calculation unit 203 inputs the mini-batch images acquired in S302 to the model acquired in S301, and performs inference processing. Here, the distribution calculation unit 203 outputs an output from each layer for input data through calculation using weight coefficients in layers of the neural network.

[0028] In S304, the distribution calculation unit 203 aggregates output values for each layer with respect to the inference processing performed in S303, and based on the aggregated output values, obtains an output distribution Y i . In S305, the distribution calculation unit 203 outputs a set {Y i} of output distribution values of each layer.

[0029] As described above, the information processing apparatus 1 according to the present embodiment uses such an output distribution Y iThe degradation of recognition accuracy due to quantization is reduced by learning (by determining the weights of the neural network) so that the loss becomes smaller. In other words, the information processing device 1 learns so that the loss increases when the output distribution exceeds the quantization parameters. Figure 5 shows the set {Y} determined by the weight determination unit 204 according to this embodiment. i This flowchart shows an example of the process for determining the weights of a neural network during a single training run, using}. For S501 to S511, since the training methods for well-known neural networks can be used, a detailed explanation is omitted.

[0030] In S501, the regularization term calculation unit 206 calculates the set of values ​​of the output distribution {Y i The parameter acquisition unit 205 acquires the quantization parameter q in S502. In this embodiment, the quantization parameter q is set in advance, and in the following, q = 4, but a value calculated according to other parameters may be used as the quantization parameter q.

[0031] In the example in Figure 4, each layer outputs through the ReLU layer, so the output value is greater than or equal to 0. For example, since q=4 in the information processing device 1, the upper limit of the output distribution in each layer may be set to 4 or less. In this case, the output range of each layer of the single-precision 32-bit NN is [0,4]. If the precision is set to 8 bits, the output value of the layer is quantized with (bin width) = 4 / 256 = 0.015625. For example, if the output value of a layer of the single-precision 32-bit NN is 3.1, the output when quantized to 8 bits will be 3.09375. Converting this value to an 8-bit integer in the range [0,255] gives 3.09375 × 256 / 4 = 198.

[0032] In S503, the coefficient calculation unit 210 calculates the acquired output distribution Y of layer i. i And using the quantization parameter q, the coefficient C in layer i is calculated. The C calculated here will be used in the loss calculation process in S508 described later. The coefficient C is Y iThe value is not particularly limited as long as it increases with an increase in Y, but it may be calculated by, for example, the following equation (2) or equation (3), where Y i Y instead i Exponents may also be used. C=Y i / q expression (2) C = exp(Y i / q) Formula (3)

[0033] In S504, the correction amount calculation unit 211 calculates the output distribution Y i And using the quantization parameter q, a correction amount D is calculated to correct the regularization term. This correction amount D is used in the loss calculation process of S508 described later. The correction amount D is Y i It is determined, for example, by equation (4) below, such that it becomes large when it exceeds the quantization parameter q.

number

[0034] In S505, the learning unit 208 acquires the NN model to be trained from the model acquisition unit 202. In S506, the teacher acquisition unit 207 acquires minibatches corresponding to the input images to be used as training data. In S507, the teacher acquisition unit 207 acquires the ground truth data of the minibatches acquired in S506 and combines them to form the training data. The ground truth data is data that includes information indicating the region to be detected in the minibatches. Here, it is assumed that the same image data as the minibatches used to calculate the output distribution in S302 is used, but this is not particularly limited, and different minibatches may be used.

[0035] In S508, the learning unit 208 uses the model acquired in S505 to perform inference processing with the mini-batch acquired in S506 as input, and calculates the loss (objective function) between the output and the ground truth data acquired in S507. Here, if the task of the NN is to detect regions, the loss function of the objective function may be the squared error or the cross-entropy error. Here, the learning unit 208 calculates a regularization term for each layer and adds it to the loss. The regularization term for layer i is calculated by using the weights of layer i as w i In that case, λ(w i ) 2 It may be given as (as the L2 regularization term). This regularization term may also be given as the L1 regularization term, or as a combination of these. λ is a coefficient applied to the regularization term and is set based on the coefficient C calculated in S503 and the correction amount D calculated in S504. λ may be implemented, for example, as shown in equation (5) below. Hereafter, when simply referred to as the "regularization term," it refers to the regularization term included in the loss function used by the learning unit 208.

number

[0036] Here, α and β are constants. With this configuration, Y i If the value exceeds q, the learning process is designed so that the larger the excess value, the greater the loss. This ensures that the NN's learning progresses so that the layer's output value does not exceed the quantization parameter, thereby suppressing the degradation of recognition accuracy due to quantization.

[0037] In S509, the learning unit 208 uses the loss calculated in S508 to calculate the gradient using backpropagation and to determine the amount to update the model weights. In S510, the learning unit 208 updates the NN weights. In S511, since S501 to S511 can basically be done using known NN learning methods, a detailed explanation is omitted. The model with updated weights is output and the process ends. By repeatedly applying this learning process until the learning loss or recognition accuracy converges (until the desired accuracy), the weights of the NN model can be determined.

[0038] Thus, the learning unit 208 processes the output distribution Y i It is possible to train the neural network such that the value becomes small with respect to the quantization parameter q. Note that the process described with reference to Figure 5 is just one example, Y i If the learning process is designed so that the loss increases when q exceeds q, then the loss calculation process is not particularly limited.

[0039] The quantization unit 209 quantizes the NN weights and output learned by the weight determination unit 204. Known techniques can be used for NN quantization, and a detailed explanation is omitted. In this embodiment, the quantization process assumes that 32-bit single-precision floating-point values ​​are quantized to 8-bit integer values; however, the type and value are not limited to these if quantization is performed.

[0040] With this configuration, the information processing device 1 first acquires information indicating the magnitude of the output of a first operation performed in the intermediate layer of the neural network (NN) using weight coefficients for the input data. Then, based on the acquired information and the quantization parameters used for quantizing the NN, which include the result of the first operation, the information processing device 1 can control the first operation to adjust the magnitude of the output. Therefore, by reducing the output of the operation in the intermediate layer without increasing the quantization parameters, the degradation of recognition accuracy due to quantization can be reduced. Furthermore, by setting the quantization parameters to common constants across layers, the processing load can be reduced compared to setting individual quantization parameters for each layer, and a combinatorial explosion of quantization parameters can be prevented.

[0041] [Embodiment 2] In Embodiment 1, an example was described in which the weights of the neural network (NN) are trained to adjust the output distribution based on the output distribution and quantization parameters. On the other hand, the information processing device 6 according to Embodiment 2 adjusts the output distribution by correcting the weights of the NN based on the output distribution and quantization parameters.

[0042] Figure 6 is a block diagram showing an example of the functional configuration of the information processing device 6 according to this embodiment. The information processing device 6 has the same configuration as the one described in Figure 2 of Embodiment 1, except that the weight determination unit 204 has a weight correction unit 601, and is capable of the same processing, so redundant explanations will be omitted. In this embodiment as well, the following explanation will be given assuming that the quantization parameter q is 4.

[0043] Figure 7 shows an example of a neural network (NN) model used in this embodiment. It is used to explain the output distribution from each layer included in the NN and the process of transforming that output distribution. In Figure 7, three layers 701 to 703, including the hidden layers of the NN, are shown. Since these layers have the same configuration as layers 401 to 403 in Figure 4, redundant explanations are omitted.

[0044] In this embodiment, since q=4, output values ​​exceeding 4 in each layer are rounded to 4 by quantization, resulting in a deterioration of recognition accuracy. Therefore, the weight correction unit 601 corrects the NN weights (without learning) so that the output distribution does not exceed the quantization parameter.

[0045] The weight correction unit 601 according to this embodiment corrects the weights of the NN so that the output distribution is less than or equal to the quantization parameter. In the example in Figure 7, the output distribution value of layer 701 is 15.3, which exceeds the quantization parameter of 4. In order to make this output distribution value less than or equal to the quantization parameter, the weight correction unit 601 corrects the weights of the NN to 1 / 4 times. This correction factor can be determined, for example, by sequentially multiplying the output distribution value by 1 / 1, 1 / 2, 1 / 3, ... by 1 / M (where M is an integer of 1 or more), and searching for the M at which the output distribution first becomes less than or equal to the quantization parameter. In the following,

[0046] The weight correction unit 601 may correct the weights of the convolutional layer (704) or the batch normalization layer (705). In this embodiment, if the layer includes a batch normalization layer, the weights of the batch normalization layer are corrected. The batch normalization layer in this embodiment processes the input as x i In that case, for example, the output y can be calculated using equation (6) below. i We can calculate μ. Here, μ B , σ B γ and δ are the mean and variance of the input values, respectively, and are updated by taking a moving average during training. γ and δ are weight parameters learned using backpropagation.

number

[0047] To reduce the output of layer 701 by 1 / 4, the weight parameters γ and δ in equation (6) should each be reduced by 1 / 4. In this case, the weight correction unit 601 reduces γ and β by 1 / 4 as corrections to the NN weights and outputs them as the weights of layer 701.

[0048] Next, the weight correction unit 601 similarly corrects the weights in subsequent layers such as layer 702. In the example in Figure 7, the output of layer 702 is 7.4, so the output distribution value needs to be halved. However, since the output value of layer 701 is 1 / 4, the weight correction unit 601 adjusts the μ of batch normalization layer 708. B and σ B It is necessary to scale the input by multiplying by 1 / 4. The weight correction unit 601 can halve the output value of layer 702 by multiplying the values ​​of β and γ by 1 / 2 from equation (6). Therefore, the weight correction unit 601 uses μ as the weight correction for the NN. B and σ B The values ​​of β and γ are scaled down by 1 / 4, and output as the weights for layer 702.

[0049] Furthermore, since the output of layer 703 is 3.5, there is no need to change the output distribution value. However, because the output distribution is halved in layer 702, the weights w and bias b of the teeth and FC layers need to be doubled to maintain the output value. Therefore, the weight correction unit 601 doubles the weights w and bias b of the FC layer as a correction for the NN weights and outputs them as the weights of layer 703.

[0050] The quantization unit 209 may quantize the NN model after the weight correction has been performed in this manner, or it may quantize the NN model that has been trained by the regularization term calculation unit 206 and the learning unit 208. Furthermore, the weight correction unit 601 may perform a correction process when the value of the output distribution exceeds a predetermined value (for example, a quantization parameter). In addition, for example, the weight correction unit 601 may perform a weight correction process when the NN model has undergone a certain number of training iterations.

[0051] Furthermore, the weight correction process performed by the weight correction unit 601 may be applied to a neural network (NN) that has been trained to reduce the output distribution values, as in Embodiment 1, but whose reduction of the output distribution through training is insufficient. In addition, this correction process may be applied to a NN that has not been trained as in Embodiment 1.

[0052] This process allows the output distribution to be adjusted so that it does not exceed the quantization parameters by correcting the weights of the neural network. Therefore, by reducing the output of the calculations in the hidden layer without increasing the quantization parameters, the degradation of recognition accuracy due to quantization can be reduced.

[0053] [Embodiment 3] The information processing device 8 according to this embodiment quantizes the weights of the neural network (NN) and corrects the regularization term used by the weight determination unit 204 based on the recognition accuracy of the detection target of each NN before and after quantization. For example, the information processing device 8 can evaluate the degree of deterioration in recognition accuracy due to the quantization of the NN and adjust the contribution of the regularization term during learning by correcting the regularization term according to the degree of deterioration.

[0054] Figure 8 is a block diagram showing an example of the functional configuration of the information processing device 8 according to this embodiment. The information processing device 8 has the same configuration as the information processing device described in Figure 2 or Figure 6, except that it has a real number inference unit 801, an evaluation data acquisition unit 802, a first evaluation unit 803, a quantization inference unit 804, a second evaluation unit 805, and a regularization term correction unit 806, and is capable of the same processing. The following description of the information processing device 8 according to this embodiment assumes that the NN has been trained according to the embodiment of Embodiment 1 or Embodiment 2, but it is not limited to this if a trained NN is used.

[0055] The evaluation data acquisition unit 802 acquires evaluation data, which is data used to evaluate the recognition accuracy of the detection target by the neural network (NN). Here, the evaluation data is prepared in advance and is a set of minibatches and ground truth data, similar to the training data used in Embodiment 1. The real number inference unit 801 uses the NN model trained by the learning unit 208 to perform inference processing (recognition of the detection target) using the minibatches included in the evaluation data as input.

[0056] The first evaluation unit 803 evaluates the recognition accuracy of the detection target by the neural network (NN). Here, the first evaluation unit 803 evaluates the value of the loss (E1) output by the inference process performed by the real number inference unit 801 as the recognition accuracy. However, the first evaluation unit 803 may also evaluate different information indicating the success rate of recognition, such as the accuracy or likelihood of recognizing the detection target, as the recognition accuracy. Hereafter, when simply referred to as "recognition accuracy," it refers to the recognition accuracy of the detection target.

[0057] The quantization inference unit 804 uses the NN model (used for inference by the real number inference unit 801), whose weights have been quantized by the quantization unit 209, to perform inference processing using the mini-batches included in the evaluation data as input.

[0058] The second evaluation unit 805 evaluates the recognition accuracy of the detection target by the weighted neural network used by the quantized inference unit 804. The evaluation of recognition accuracy by the second evaluation unit 805 is performed in the same manner as the evaluation by the first evaluation unit 803, and here the loss E2 output by inference is evaluated as the recognition accuracy.

[0059] The regularization term correction unit 806 corrects the regularization term based on the recognition accuracy evaluation by the first evaluation unit 803 and the recognition accuracy evaluation by the second evaluation unit 805. Here, the regularization term correction unit 806 may use the recognition accuracy evaluation by the first evaluation unit 803 and the recognition accuracy evaluation by the second evaluation unit 805 to evaluate the degree of deterioration of the recognition accuracy of the NN due to weight quantization, and use this evaluation to correct the regularization term.

[0060] In this embodiment, the regularization term correction unit 806 evaluates the degree of degradation F of the recognition accuracy of the NN due to weight quantization using the following equation (7). Since E1 and E2 are values ​​of the loss function, if F is greater than E1, the recognition accuracy has decreased due to quantization, and the larger F is, the greater this degradation. F=E1 / E2 formula (7)

[0061] The regularization term correction unit 806 may correct the regularization term using the degree of degradation, for example, by calculating the corrected regularization term λ' using the value of the degree of degradation F as a coefficient of the regularization term according to equation (8) below. In this way, the contribution of the regularization term during training can be corrected according to the degree of degradation of recognition accuracy. That is, if the degree of degradation is small, the contribution of the regularization term during training can be weakened, and if the degree of degradation is large, the contribution of the regularization term during training can be increased. λ´=Fλ Equation (8)

[0062] This correction process for the normalization term does not need to be performed every time the learning unit 208 updates the weights of the neural network; it may be performed, for example, after a predetermined number of learning iterations.

[0063] With this configuration, the regularization term during training can be corrected in accordance with the change in recognition accuracy before and after quantization of the neural network. Therefore, the contribution of the regularization term during training can be adjusted according to the degree to which the recognition accuracy of the neural network deteriorates due to quantization.

[0064] The disclosures herein include the following information processing devices, information processing methods, and programs.

[0065] (Item 1) In order to obtain data for the hidden layer, the neural network performs a first operation using weight coefficients on the input data and a second operation to quantize the result of the first operation, and the acquisition means acquires information indicating the magnitude of the output of the first operation. A control means for controlling the first operation in the neural network to adjust the magnitude of the output based on the aforementioned information and the quantization parameters used for the quantization, An information processing device characterized by comprising:

[0066] (Item 2) The information processing device according to item 1, characterized in that the information indicating the magnitude of the output is information calculated based on the distribution of the output values.

[0067] (Item 3) The information processing device according to item 2, characterized in that the information indicating the magnitude of the output is information indicating an upper limit, excluding outliers of the output.

[0068] (Item 4) The information processing device according to any one of items 1 to 3, characterized in that the control means controls the first operation by controlling the weight coefficients of the neural network by performing learning such that the loss increases when the magnitude of the output exceeds the quantization parameter.

[0069] (Item 5) The information processing apparatus according to item 4, characterized in that the loss is calculated by a loss function that includes a regularization term which increases when the magnitude of the output exceeds the quantization parameter.

[0070] (Item 6) A first evaluation means for evaluating the recognition accuracy of the target to be detected by the neural network, A quantization means for quantizing the weight coefficients of the neural network, A second evaluation means for evaluating the recognition accuracy of the detected target by the neural network with quantized weight coefficients, Correction means for correcting the regularization term included in the loss function based on the recognition accuracy evaluated by the first evaluation means and the recognition accuracy evaluated by the second evaluation means, The information processing device described in item 5, further comprising:

[0071] (Item 7) The system further comprises a third evaluation means for evaluating the degree of deterioration of the recognition accuracy of the detected target by the neural network due to the quantization of the weight coefficients, using the recognition accuracy evaluated by the first evaluation means and the recognition accuracy evaluated by the second evaluation means. The information processing device according to item 6, characterized in that the correction means corrects the regularization term using the degree of degradation.

[0072] (Item 8) The information processing device according to any one of items 1 to 7, characterized in that the control means adjusts the magnitude of the output by correcting the weight coefficient of the intermediate layer.

[0073] (Item 9) The information processing apparatus according to item 8, characterized in that the control means performs control of the first operation in the neural network when the magnitude of the output exceeds a predetermined value.

[0074] (Item 10) A step of obtaining information indicating the magnitude of the output of a neural network that performs a first operation using weight coefficients on input data and a second operation to quantize the result of the first operation in order to obtain data for the hidden layer, A step of controlling the first operation in the neural network to adjust the magnitude of the output based on the aforementioned information and the quantization parameters used for the quantization, An information processing method characterized by comprising:

[0075] (Item 11) A program to cause a computer to function as one of the means of an information processing device described in any one of items 1 through 9.

[0076] (Item 12) A storage medium for storing the program described in item 11.

[0077] (Other examples) The present invention can also be realized by supplying a program that implements one or more of the functions of the above-described embodiments to a system or device via a network or storage medium, and by having one or more processors in the computer of that system or device read and execute the program. It can also be realized by a circuit (e.g., an ASIC) that implements one or more functions.

[0078] The invention is not limited to the embodiments described above, and various modifications and variations are possible without departing from the spirit and scope of the invention. Accordingly, claims are attached to disclose the scope of the invention. [Explanation of Symbols]

[0079] 11: CPU, 12: ROM, 13: RAM, 14: Storage section, 15: Input / output section, 16: Display section

Claims

1. In order to obtain data for the hidden layer, the neural network performs a first operation using weight coefficients on the input data and a second operation to quantize the result of the first operation, and the acquisition means acquires information indicating the magnitude of the output of the first operation. A control means for controlling the first operation in the neural network to adjust the magnitude of the output based on the aforementioned information and the quantization parameters used for the quantization, Equipped with, The information processing apparatus is characterized in that the control means controls the first operation by controlling the weight coefficients of the neural network by performing learning such that the loss increases when the magnitude of the output exceeds the quantization parameter.

2. The information processing apparatus according to claim 1, characterized in that the information indicating the magnitude of the output is information calculated based on the distribution of the values ​​of the output.

3. The information processing apparatus according to claim 2, characterized in that the information indicating the magnitude of the output is information indicating an upper limit, excluding outliers of the output.

4. The information processing apparatus according to claim 1, characterized in that the loss is calculated by a loss function that includes a regularization term which increases when the magnitude of the output exceeds the quantization parameter.

5. A first evaluation means for evaluating the recognition accuracy of the target to be detected by the neural network, A quantization means for quantizing the weight coefficients of the neural network, A second evaluation means for evaluating the recognition accuracy of the target to be detected by the neural network with quantized weight coefficients, Correction means for correcting the regularization term included in the loss function based on the recognition accuracy evaluated by the first evaluation means and the recognition accuracy evaluated by the second evaluation means, The information processing apparatus according to claim 4, further comprising:

6. The system further comprises a third evaluation means for evaluating the degree of deterioration of the recognition accuracy of the detected target by the neural network due to the quantization of the weight coefficients, using the recognition accuracy evaluated by the first evaluation means and the recognition accuracy evaluated by the second evaluation means. The information processing apparatus according to claim 5, characterized in that the correction means corrects the regularization term using the degree of degradation.

7. The information processing apparatus according to claim 1, characterized in that the control means adjusts the magnitude of the output by correcting the weight coefficient of the intermediate layer.

8. The information processing apparatus according to claim 7, characterized in that the control means performs control of the first operation in the neural network when the magnitude of the output exceeds a predetermined value.

9. A step of obtaining information indicating the magnitude of the output of a neural network that performs a first operation using weight coefficients on input data and a second operation to quantize the result of the first operation in order to obtain data for the hidden layer, A step of controlling the first operation in the neural network to adjust the magnitude of the output based on the aforementioned information and the quantization parameters used for the quantization, Equipped with, An information processing method characterized in that the first operation is controlled by controlling the weight coefficients of the neural network by performing training such that the loss increases when the magnitude of the output exceeds the quantization parameter.

10. A program for causing a computer to function as one of the means of an information processing device according to any one of claims 1 to 8.

11. A storage medium for storing the program described in claim 10.

Citation Information

Patent Citations

  • Quantification processing method and device of neural network model, equipment and storage medium

    CN113255877A

  • Arithmetic processing device, information processing device, method, and program

    JP2018124681A

  • Method for automatic hybrid quantization of deep artificial neural networks

    US20210174172A1

  • Fast quantised training of trainable modules

    WO2021052677A1