Learning device, learning method, and program

The proposed learning device and method stabilize neural network learning by normalizing weight norms and setting average gradients to zero, addressing gradient explosion and maintaining high accuracy without activation normalization, thus enhancing neural network performance.

JP7564492B2Active Publication Date: 2024-10-09NIPPON TELEGRAPH & TELEPHONE CORP
View PDF 1 Cites 0 Cited by

Patent Information

Application Number
JP2023520726
Authority / Receiving Office
JP · JP
Patent Type
Patents
Current Assignee / Owner
Filing Date
2021-05-14
Publication Date
2024-10-09
Estimated Expiration
2041-05-14

AI Technical Summary

Technical Problem

Existing weight normalization methods in neural networks can cause gradient explosion during learning due to division by small standard deviations, leading to unstable learning and reduced accuracy, and combining these methods with activation normalization methods like BN loses the advantages of weight normalization.

Method used

A learning device and method that updates neural network weights by setting the average gradient to zero and normalizing the weight norm to a predetermined value, using a two-step update process to stabilize learning without relying on activation normalization.

Benefits of technology

Stable learning is achieved without increasing calculation cost, maintaining high accuracy comparable to activation normalization methods like BN, while avoiding gradient explosion and maintaining the benefits of weight normalization.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure 0007564492000011
    Figure 0007564492000011
  • Figure 0007564492000012
    Figure 0007564492000012
  • Figure 0007564492000013
    Figure 0007564492000013
Patent Text Reader

Abstract

This training device comprises a training unit that updates the weight of a neural network on the basis of a gradient of a loss function that calculates the error between output data obtained by inputting input data to the neural network, and correct data corresponding to the input data. The training unit comprises a first updating unit and a second updating unit. The first updating unit calculates gradients used in updating the weight of each channel of each layer of the neural network such that the average value of the gradients becomes zero, and updates the weight of each channel of each layer using the calculated gradients. The second updating unit updates the weights such that the norm of the weights updated by the first updating unit becomes a prescribed value.
Need to check novelty before this filing date? Find Prior Art

Description

[Technical field]

[0001] The present invention relates to a learning device, a learning method, and a program. [Background technology]

[0002] The progress of AI (artificial intelligence) technology has been remarkable. Image recognition technology is now capable of identifying thousands of objects. Many voice recognition technologies that are capable of stable recognition even in natural noisy environments have been put into practical use and can be easily used even on small devices such as smartphones. Machine translation is now available to everyone, and the barriers to international communication are falling dramatically.

[0003] These recent AI innovations are supported by a technology called deep learning, which trains deep neural networks. Since its emergence, recognition technology for various media such as images, sounds, and language has achieved extremely high levels of accuracy that exceed human capabilities.

[0004] There are many technical factors behind this success and widespread adoption. One of these factors is the invention or reinvention of deep learning technology itself, i.e., various learning techniques that enable effective learning of deep neural networks, which was previously difficult. Deep neural network learning is generally performed by optimizing network parameters (weights) to minimize some loss function L. However, if one tries to do this simply, one faces various problems such as unstable learning, long calculation times, and low accuracy. In response to this, various gradient-based optimization algorithms have been invented to enable efficient learning, such as mini-batch stochastic gradient decent (SGD), which enables parallel updates, and Adam, which automatically adjusts the appropriate update step size. In addition, neural network learning is highly dependent on initial values. Therefore, setting the initial values ​​often causes learning failures such as gradient vanishing. To address this problem, an initial value setting method that eliminates bias in the output distribution of each layer of the network has been developed, making stable learning possible.

[0005] Another important basic technical element is normalization. Normalization is an operation that converts the scale and average of variables so that their possible values ​​fall within a specific range, making them easier to handle. Normalization has the effect of stabilizing learning, accelerating convergence, and improving accuracy.

[0006] A representative method of normalization in neural network learning is batch normalization (BN) (see, for example, Non-Patent Document 1). In BN, in each layer of the network, each channel is standard normalized for each batch so that the mean is 0 and the variance is 1. BN has a very high effect of stabilizing learning and can increase the accuracy of the network. On the other hand, BN has some major weaknesses. First, since BN normalizes the input, it is necessary to perform normalization processing for each input. This increases the calculation cost. In addition, BN normalizes using the mean and variance within the batch during learning. Therefore, it is known that when the batch size (the number of samples in the batch) is small, the mean and variance do not become reliable values ​​and performance deteriorates. In addition, when the statistics of the data change significantly between learning and testing, there is also a problem that the accuracy deteriorates similarly.

[0007] In view of the problems with BNs as described above, attempts have been made to avoid the weaknesses of BNs by using weight normalization, which avoids directly normalizing the network input and normalizes the network weights. When weight normalization is used alone, there is an advantage in terms of computational complexity because once the weights are normalized, there is no need to normalize them every time, regardless of the input that is subsequently used. In addition, since it does not depend on the batch size, it is less susceptible to the effects of unreliable statistics or deviations.

[0008] So far, several weight normalization methods have been disclosed. For example, as shown in formula (1), there is a normalization method in which each weight (vector) v before normalization is decomposed into length g and direction v / ||v|| and updated individually to obtain the normalized weight w (see, for example, Non-Patent Document 2).

[0009]

number

[0010] Also, as shown in equation (2), the k-th element v of the weight v before normalization kis standard-normalized by the mean μ and standard deviation σ of the weights w, and the corresponding normalized weight element w k (For example, see Non-Patent Document 3).

[0011]

number

[0012] [Non-Patent Document 1] Sergey Ioffe and Christian Szegedy, "Batch Normalization: Accelerating Deep Network Training by Reducing Internal Covariate Shift", In Proceedings of the 32nd International Conference on Machine Learning, Volume 37, p. 448-456, 2015. [Non-Patent Document 2] Tim Salimans and Diederik P. Kingmam, "Weight Normalization: A Simple Reparameterization to Accelerate Training of Deep Neural Networks", In Proceedings of the 30th International Conference on Neural Information Processing Systems (NIPS), 2016. [Non-Patent Document 3] Siyuan Qiao, Huiyu Wang, Chenxi Liu, Wei Shen, Alan Yuille, "Weight standardization", arXiv preprint, arXiv:1903.10520v1, 2019. Summary of the Invention [Problem to be solved by the invention]

[0013] From a broad perspective, all existing inventions reparametrize the pre-normalized weights by subtracting the mean or dividing by the norm or standard deviation to obtain the post-normalized weights. However, this method has a fundamental weakness in that it can cause a problem called "gradient explosion" that collapses learning. When adopting such a weight normalization method based on reparametrization and trying to find the pre-normalized weights v by gradient-based optimization, the gradient ∇ for the weights v of the loss function L is v L is given by equation (3).

[0014]

number

[0015] Here, ∇ w L is the gradient of L with respect to the normalized weight w, 〈〉 is the dot product operation, and σ v is the standard deviation of the weight v before normalization, and m represents the dimension of the weight w after normalization. The problem here is that the gradient has a standard deviation σ v The point is that it involves division by σ v is the standard deviation of the weight v before normalization, so it can take any real value. If, during the learning process, σ v If x becomes very small, this gradient can diverge to infinity, i.e., a gradient explosion can occur, where the gradient diverges during the training process and training fails altogether.

[0016] As a result, the existing weight normalization methods described in Non-Patent Document 2 and Non-Patent Document 3 cannot be used alone, and are therefore always used in combination with an activity normalization method such as BN. However, by combining with BN, the advantage that can be obtained when the weight normalization method can be used alone, that is, the effect of avoiding the weaknesses of BN, is lost. Therefore, a weight normalization method that can obtain the original advantage is required.

[0017] In view of the above circumstances, an object of the present invention is to provide a learning device, a learning method, and a program capable of learning a neural network while suppressing an increase in calculation cost and a decrease in learning accuracy. [Means for solving the problem]

[0018] A learning device of one embodiment of the present invention includes a learning unit that updates weights of the neural network based on a gradient of a loss function that calculates an error between output data obtained by inputting input data into a neural network and ground truth data corresponding to the input data, and the learning unit includes a first update unit that calculates gradients used to update the weights of each channel of each layer of the neural network so that an average value of the gradients is 0, and updates the weights of each channel of each layer using the calculated gradients, and a second update unit that updates the weights so that the norm of the weights updated by the first update unit becomes a predetermined value.

[0019] A learning method according to one embodiment of the present invention includes a learning step of updating weights of the neural network based on a gradient of a loss function that calculates an error between output data obtained by inputting input data into a neural network and ground truth data corresponding to the input data, and the learning step includes a first updating step of calculating gradients used to update the weights of each channel of each layer of the neural network so that an average value of the gradients becomes 0, and updating the weights of each channel of each layer using the calculated gradients, and a second updating step of updating the weights so that the norm of the weights updated in the first updating step becomes a predetermined value.

[0020] A program according to one aspect of the present invention causes a computer to function as the learning device described above. Effect of the Invention

[0021] According to the present invention, it is possible to train a neural network while suppressing an increase in calculation cost and a decrease in training accuracy. [Brief description of the drawings]

[0022] [Figure 1] 1 is a block diagram showing a configuration of a learning device according to a first embodiment of the present invention. [Diagram 2] FIG. 2 is a diagram illustrating a hardware configuration of a learning device according to the embodiment. [Diagram 3] 4 is a flowchart showing a learning process executed by the learning device according to the embodiment. FIG. [Figure 4] 11 is a diagram for explaining weight calculation by the learning device according to the embodiment. FIG. [Diagram 5] 13A to 13C are diagrams showing the results of an evaluation experiment using the learning device according to the embodiment. [Figure 6] 13A to 13C are diagrams showing the results of an evaluation experiment using the learning device according to the embodiment. [Figure 7] FIG. 11 is a diagram showing the results of an evaluation experiment using the learning device according to the second embodiment. DETAILED DESCRIPTION OF THE PREFERRED EMBODIMENTS

[0023] Hereinafter, an embodiment of the present invention will be described in detail with reference to the drawings.

[0024] <First embodiment> The first embodiment is an example of an embodiment applied to image recognition.

[0025] <<Device configuration>> FIG. 1 is a block diagram showing the configuration of a learning device 100 according to this embodiment. The learning device 100 learns a deep neural network based on input learning data. The learning device 100 includes an input unit 120 and a calculation unit 140. The calculation unit 140 includes a storage unit 160 and a learning unit 180. The storage unit 160 may be located inside or outside the learning device 100. In this embodiment, the storage unit 160 is located inside the learning device 100.

[0026] The input unit 120 receives learning data. The learning data is information that associates input data with correct answer data.

[0027] The storage unit 160 stores weights, which are network parameters of the deep neural network. The learning unit 180 executes a learning process of the deep neural network using learning data. The learning unit 180 outputs the weights of the deep neural network obtained as a result of the learning process to the storage unit 160. The learning unit 180 includes a first update unit 181 and a second update unit 182.

[0028] The first updating unit 181 inputs input data to the deep neural network to obtain output data. The first updating unit 181 calculates the gradient of a loss function that calculates an error between the output data and correct answer data corresponding to the input data. At this time, the first updating unit 181 calculates the gradient so that the average value of the gradient used to update the weight of each element in each layer of the deep neural network becomes 0. The first updating unit 181 updates the weight using the calculated gradient. The second updating unit 182 updates the weight so that the norm of the weight updated by the first updating unit 181 becomes a predetermined value.

[0029] Fig. 2 is a diagram showing a hardware configuration of learning device 100. Learning device 100 is realized, as an example, by computer 200 shown in Fig. 2. Computer 200 includes CPU 210, memory 220, storage unit 230, input unit 240, and display unit 250. CPU 210, memory 220, storage unit 230, input unit 240, and display unit 250 are connected to each other via bus 260.

[0030] The storage unit 230 is realized by, for example, a hard disk drive (HDD), a solid state drive (SSD), a flash memory, or the like. The storage unit 230 stores a program 232 for causing the computer 200 to function as the study device 100. The CPU 210 reads the program 232 from the storage unit 230, expands it in the memory 220, and executes the program 232. The program 232 may be provided by being stored in a computer-readable medium. The input unit 240 includes a keyboard and a mouse. The display unit 250 includes a monitor.

[0031] <<Processing Overview>> In this embodiment, a case will be described in which the learning device 100 learns a Convolutional Neural Network (CNN), which is a type of deep neural network, for an image recognition task. When the learning unit 180 of the learning device 100 receives a group of learning data as input, the learning unit 180 learns and outputs the CNN.

[0032] <<<Configuration of CNN>>> When the CNN receives an image as input, it outputs the recognition result of the image. The configuration of the CNN can adopt any configuration as long as it can realize such an input-output relationship. For example, a 9-layer CNN with the convolutional layer Conv, average pooling layer AvgPool, global average pooling layer GAP (Global Average Pooling), and fully connected layer Linear connected as follows can be used.

[0033] Conv(3,64)-Conv(3,64)-Conv(3,64)-AvgPool(2)-Conv(3,128)-Conv(3,128)-Conv(3,128)-AvgPool(2)-Conv(3,256)-Conv(3,256)-Conv(3,256)-GAP-Linear

[0034] Conv(k,c) represents a convolutional layer with a convolutional kernel of size k×k and c channels. AvgPool(s) represents an average pooling layer with a stride of s.

[0035] The learning device 100 may use a CNN such as ResNet described in Reference 1 or WideResNet described in Reference 2 as the CNN.

[0036] [Reference 1] Kaiming He, Xiangyu Zhang, Shaoqing Ren, Jian Sun, "Deep Residual Learning for Image Recognition", in Proceedings of 2016 IEEE Conference on Computer Vision and Pattern Recognition (CVPR), 2016.

[0037] [References 2] Sergey Zagoruyko, Nikos Komodakis, "Wide Residual Networks", In Proceedings of British Machine Vision Conference, 2016.

[0038] <<<Learning process>>> Next, a description will be given of a learning process in which the learning device 100 learns the CNN. The learning process is a process for appropriately determining weights, which are parameters of the CNN, based on learning data.

[0039] In order for the learning device 100 to execute the learning process, it is necessary to prepare learning data D in advance. The learning data is configured by a set D={(x, y)} of pairs (x, y) of an image x and a class label y representing the class of the image. The class label y is a one hot vector in which only the element corresponding to the index of the corresponding class takes a value of 1, and the other elements take a value of 0. As long as this condition is satisfied, the means for configuring the learning data is irrelevant to the gist of this embodiment, and any means may be used to prepare the learning data. The learning data may be prepared manually or automatically.

[0040] 3 is a flow diagram showing an overview of the learning process executed by the learning device 100 in this embodiment. The learning device 100 executes the learning process by using the above-mentioned learning data D through the following steps.

[0041] First, in step S101, the learning unit 180 of the learning device 100 initializes all weights W={w} of the CNN. For convenience, the weight of each channel in each layer of the CNN is represented as w. The weight w is a d-dimensional vector. There are various initialization methods, but it is preferable to use a known method that makes the average value of the weights 0, such as Xavier initialization (Glorot initialization) or He initialization.

[0042] Next, in step S102, the first update unit 181 of the learning unit 180 acquires a pair of an image x and a class label y from the learning data D. The first update unit 181 inputs the image x to the CNN and obtains the output z of the CNN. Based on this output z and the class label y corresponding to the image x, the first update unit 181 calculates the gradient ∇ of the loss function L with respect to the weights w of each layer and each channel of the CNN. w Find L.

[0043] Any loss function L may be used as long as it is differentiable everywhere with respect to the weight w. In this embodiment, Softmax Cross Entropy is used as the loss function L. Softmax Cross Entropy is often used in image recognition. The loss function L is expressed as shown in Equation (4).

[0044]

number

[0045] y ik is the k-th element of the class label y corresponding to the i-th image x. ik is the k-th element of the CNN output z corresponding to the i-th image x. n is the total number of training data, i.e., the size of the set D.

[0046] Typically, in the training of a CNN (or a deep neural network in general), mini-batch learning is often introduced, in which the value of a loss function is calculated for each fixed number of samples of the training data D, and the gradient is obtained. In this step as well, the first update unit 181 may execute mini-batch learning.

[0047] Next, in step S103, the first update unit 181 updates the weight w of each layer and each channel of the CNN according to the following formula (5).

[0048]

number

[0049] Here, the bold vector 1 is a vector with all elements being 1, and α is the learning rate. α may be set to any positive real number. α is usually adjusted in accordance with various conditions, such as the learning data and the network structure. In addition, the first update unit 181 may change α as the learning progresses. For example, the first update unit 181 sets the initial value to α=0.2, and changes the value of α by cosine annealing in Reference 3. This makes it possible to achieve high performance. ∇ w L is the gradient of the loss function L with respect to the weight w. d is the batch size. That is, d is the number of samples that are simultaneously trained in one iteration. d is an arbitrary positive integer.

[0050] [Reference 3] Ilya Loshchilov, Frank Hutter, "SGDR: Stochastic Gradient Descent with Warm Restarts", In Proceedings of International Conference on Learning Representations, 2017.

[0051] Next, in step S104, the second update unit 182 updates the weights w of each layer and each channel of the CNN according to equation (6).

[0052]

number

[0053] Here, c is a constant. The second update unit 182 may assign any positive real number to the constant c, but preferably assigns c=√2. In this case, when the weights w of each layer and each channel are mutually independent, the input x is given as an independent and identically distributed sample, and further, the weights w and the image x are mutually independent, the variance of the weights of all layers can be set to 1.

[0054] The learning unit 180 repeats the above-mentioned processes of steps S102 to S104 a predetermined number of times. When the predetermined number of repetitions have been completed, the learning unit 180 determines in step S105 that a termination condition has been satisfied. In step S106, the second updating unit 182 outputs the finally learned weight W={w} to the storage unit 160, and the learning process in FIG. 3 ends. The storage unit 160 stores the weight W output from the second updating unit 182.

[0055] Mathematically, the above learning process is a procedure for minimizing the loss function L under the constraints that the average of the weights w of each layer and each channel is 0 and the norm is c. This procedure is equivalent to finding normalized weights from the beginning, rather than normalizing the weights. Specifically, it solves the constrained problem of the following equation (7).

[0056]

number

[0057] l is the index of a layer of the CNN, and i is the index of a channel within the layer. W (l) is the weight of the lth layer, w i (l) is the weight of the ith channel in the lth layer. (l) is a constant. (l) is any real number greater than 0, but is preferably 2. If certain conditions are met, the variance can be set to 1. i (l) ||2 2 =c (l) is a constraint to keep the variance of the weight constant. (T) w i (l) =0 is a constraint that the average of the weights is 0.

[0058] The gradient ∇ in equation (5) w L can be calculated in the same way as in the conventional technology. On the right side of equation (5), (1 / d)(1 T ∇ wIf there were no term A, it would be the same as a conventional gradient, but the presence of A causes the weights to be updated so that the average of the gradient is 0. Then, the norm of the weights is normalized to c by equation (6).

[0059] FIG. 4 is a diagram for explaining the calculation of weights by the learning device 100 in this embodiment. (t) is the weight w calculated in the tth learning process. (t) The norm of is c. That is, w (t) is c=||w||2 2 It is a point on the sphere Q represented by w (t) From -α∇ w The value obtained by subtracting L is w'. In other words, w (t) The direction from to w' is the original gradient ∇ w This corresponds to the value when there is no term A on the right side of equation (5). By using equation (5) including term A, w (t) The point w is the foot of the perpendicular line drawn from w' to the tangent plane P at - is calculated. Point w - corresponds to the updated weight w on the left side of equation (5). And, according to equation (6), w - The point where the perpendicular line drawn from w to the sphere Q intersects with the sphere Q (t+1) is required. Point w (t+1) is the updated weight w. (t+1) is a point on the sphere Q, so w (t+1) The norm of is c.

[0060] As described above, the loss function L is minimized under the constraint that the average of the weights w of each layer and each channel is 0 and the norm is c. Therefore, the final weights are normalized to have a mean of 0 and a constant variance, and the same effect as weight normalization can be obtained. Unlike the conventional weight normalization methods described in Non-Patent Documents 2 and 3, in this embodiment, σ is added to the gradient. v No division by occurs. Therefore, stable learning is possible without gradient explosion. Due to this advantage, this embodiment can learn without combining with BN, etc., and can achieve high accuracy comparable to BN.

[0061] <<<Linear conversion processing>>> Weight normalization standardizes the average value and variance of weights in all layers. Therefore, there is a possibility that the expressive ability of the CNN as a whole may be reduced. To avoid this problem, a scale parameter γ and a bias parameter β may be introduced for each layer and each channel, and a new output q may be output by linearly transforming the output p of each layer and each channel, as shown in the following formula (8). That is, the first update unit 181 performs the calculation of formula (8) on the output of each layer and each channel calculated when the input data x is input to the deep neural network, and inputs it to the next layer. The learning unit 180 may learn these parameters γ and β, in addition to the weight w, based on the gradient of the loss function in the same way as the weight w.

[0062]

number

[0063] This makes it easier to adjust the dynamic range of the output q of each layer and each channel than the original output p, making it possible to improve performance.

[0064] <<<Random number multiplication process>>> It is generally known that the final performance can be improved by introducing appropriate randomness when training a deep neural network. Typical examples include dropout, which randomly drops some of the network's outputs and connections, and data augmentation, which randomly transforms the training data. More recently, there is NoisyStudent, described in Reference 4. In addition, analytical results have been reported that suggest that the randomness brought about by the estimation bias of mini-batch statistics has the effect of improving the final performance in BN, an activation normalization method (see Reference 5, for example).

[0065] [Reference 4] Jiacheng Sun, Xiangyong Cao, Hanwen Liang, Weiran Huang, Zewei Chen, Zhenguo Li, "New Interpretations of Normalization Methods in Deep Learning", In Proceedings of The Thirty-Fourth AAAI Conference on Artificial Intelligence (AAAI-20), 2020.

[0066] [Reference 5] Cecilia Summers, Michael J. Dinneen, "Four things everyone should know to improve batch normalization", In Proceedings of the International Conference on Learning Representations, 2020.

[0067] Inspired by these findings, in this embodiment, randomness may be introduced into the output of each layer and each channel during learning. Specifically, only during learning, the output of each layer and each channel is determined by equation (9) instead of equation (8). According to equation (9), the output of each layer and each element of the neural network that has been linearly transformed is multiplied by a stochastic random number. The first update unit 181 performs the calculation of equation (9) on the output of each layer and each channel calculated when input data x is input to the deep neural network, and inputs it to the next layer.

[0068]

number

[0069] Here, ε has mean 0 and variance σ l 2 It is a normal random number with variance σ l 2 The value of can be any value as long as it is a positive real number. For example, σ l2 = 0.4. On the other hand, when training a CNN with a large number of layers, such as ResNet or WideResNet, changing the value for each layer may result in a greater performance improvement effect. When the total number of layers of the CNN is L, in this embodiment, the variance σ l Determine.

[0070]

number

[0071] Here, s is a constant having a positive real number, for example, s=0.4.

[0072] The details of the processing of the learning method according to this embodiment have been described above.

[0073] <<Evaluation Experiment>> The results of a performance evaluation experiment relating to the embodiment described above are shown below. In this experiment, data called CIFAR-10 and CIFAR-100, which are widely used for evaluating image recognition performance, are used as evaluation data. The 9-layer CNN, ResNet, and WideResNet shown above are used as CNNs to be trained. Data augmentation is often used when training CNNs, but in this experiment, standard data augmentation (Standard), which uses very common horizontal flipping and random cropping, and optimized data augmentation, Fast AutoAugment (FastAA), are used.

[0074] Under the above conditions, the performance of the weight normalization according to this embodiment is compared with that of existing activation normalization / weight normalization methods, BN (Non-Patent Document 1), GN (Reference 6), WS+BN (Non-Patent Document 2), and WS+GN (Non-Patent Document 2). WS+BN represents the combination of WS, which is a weight normalization method described in Non-Patent Document 2, with BN, and WS+GN represents the combination of WS with GN. Note that WS fails to learn by itself and cannot obtain sufficient performance, so the results are shown when it is used in combination with these activation normalization methods.

[0075] [Reference 6] Yuxin Wu, Kaiming He, "Group normalization", In Proceedings of European Conference on Computer Vision, 2018.

[0076] 5 and 6 are diagrams showing the results of an evaluation experiment using the learning device 100. The values ​​in the tables shown in Figs. 5 and 6 are error rates. The error rate is the rate of incorrect classification. The smaller the error rate, the better the performance. In addition, the value of the method that showed the best performance under the same conditions is underlined. The following facts can be observed from the results shown in Figs. 5 and 6.

[0077] (1) When comparing BN and WS+BN, or GN and WS+GN, there is almost no difference in performance, and performance may deteriorate depending on the conditions. In other words, it is possible to obtain sufficient performance by using BN or GN alone, and the benefits of combining WS are limited. (2) This embodiment demonstrates performance that is almost comparable to BN, which has the highest performance among existing methods, and in particular, in CIFAR-100, it achieves performance that exceeds it in most cases.

[0078] As described above, it can be confirmed that the present embodiment, while being a weight normalization method, can achieve performance equivalent to that of the BN, which is an activation value normalization method by itself. In other words, according to the present embodiment, it is possible to realize highly accurate learning that can enjoy the inherent merits of the weight normalization method.

[0079] <Second embodiment> The second embodiment is an example of the embodiment when applied to point cloud object recognition. In this embodiment, for the point cloud object recognition task of identifying the object measured by the point cloud, the case of learning a graph convolutional neural network (GCNN), which is a type of deep neural network for point clouds, will be described. This embodiment will be described centering on the differences from the embodiment when applied to image recognition.

[0080] <<Device Configuration>> As the learning device of this embodiment, the learning device 100 of the first embodiment shown in FIG. 1 can be used. When receiving a learning data group as an input, the learning device 100 learns the GCNN and outputs the learned GCNN.

[0081] <<Processing Outline>> <<<Configuration of GCNN>>> When receiving point cloud data as an input, the GCNN outputs the recognition result of the point cloud data. The configuration of the GCNN can adopt any configuration as long as it can realize such an input-output relationship. For example, in this embodiment, the GCNN described in Reference 7 is used.

[0082] [Reference 7] Yue Wang, Yongbin Sun, Ziwei Liu, Sanjay E. Sarma, Michael M. Bronstein, Justin M. Solomon, "Dynamic Graph CNN for Learning on Point Clouds", ACM Transactions on Graphics (TOG), 38(5):1-12, 2019.

[0083] <<<Learning Process>>> The learning process is the same as that in the case of image recognition in the first embodiment shown in Fig. 3. The input data format differs in that the first embodiment uses images, whereas the present embodiment uses point clouds. However, this difference is absorbed by changing the deep neural network used in the present embodiment, that is, by using GCNN instead of CNN. Therefore, the following processes, including linear transformation and random number multiplication, can all be applied in the same manner.

[0084] <<Evaluation Experiment>> The results of a performance evaluation experiment for one example of this embodiment are shown below. In this experiment, data called ModelNet40, which is widely used for point cloud object recognition performance evaluation, is used as evaluation data. As in the previous evaluation experiment for image recognition performance, the performance of weight normalization according to this embodiment is compared with the performance of BN, GN, WS+BN, and WS+GN.

[0085] Fig. 7 is a diagram showing the results of a performance evaluation experiment using the learning device 100 of this embodiment. The values ​​in the table shown in Fig. 6 are the recognition accuracy rates, and the higher the values, the better the performance. Unlike the results in the case of image recognition, no significant difference in performance was observed among the methods except for GN. However, considering that all of the existing methods use the activation value normalization method, the calculation cost required for recognition is greater than that of this embodiment, and in this respect, this embodiment has an advantage.

[0086] From the above, it has been shown that, even in an example of this embodiment, although it is a weight normalization method, it is possible to achieve performance comparable to that of BN, which is a single activation value normalization method.

[0087] The embodiments of the present invention have been described above in detail.

[0088] The learning method in the embodiment of the present invention may be configured by a computer or server equipped with a general-purpose arithmetic processing device, a storage device, etc., and each process may be executed by a program. This program is stored in a storage device, and can be recorded on a recording medium such as a magnetic disk, an optical disk, or a semiconductor memory, or can be provided through a network. Of course, any other components do not have to be realized by a single computer or server, and may be distributed and realized on multiple computers connected by a network.

[0089] According to the embodiment described above, the learning device includes a learning unit. The learning unit updates the weights of the neural network based on the gradient of a loss function that calculates an error between output data obtained by inputting input data into the neural network and correct answer data corresponding to the input data. The learning unit includes a first update unit and a second update unit. The first update unit calculates gradients such that the average value of the gradients used to update the weights of each channel in each layer of the neural network is 0, and updates the weights of each channel in each layer using the calculated gradients. The second update unit updates the weights such that the norm of the weights updated by the first update unit becomes a predetermined value.

[0090] The second update unit updates the weights by dividing the weights updated by the first update unit by the norm of the weights. The second update unit also updates the weights by dividing the weights updated by the first update unit by the norm of the weights and multiplying the weights by a constant.

[0091] The first update unit may perform a process of performing a linear transformation on an output of each layer and each element obtained by inputting the input data into the neural network, and a process of updating a parameter of the linear transformation based on a gradient of a loss function. Furthermore, the first update unit may multiply the output of each layer and each element of the neural network that has been subjected to the linear transformation by a stochastic random number.

[0092] According to the learning device, learning method, and program of the present embodiment, a normalization method can be provided that does not cause gradient explosion even when used alone, and that has the inherent advantages of weight normalization, such as low computational cost and no dependency on batch statistics. As a result, highly accurate learning can be achieved.

[0093] Although the embodiments of the present invention have been described in detail above with reference to the drawings, the specific configurations are not limited to these embodiments, and designs that do not deviate from the gist of the present invention are also included. [Explanation of symbols]

[0094] 100 Learning Device 120 Input section 140 Arithmetic section 160 Storage section 180 Learning Department 181 First update part 182 Second update part 200 Computers 210 CPU 220 Memory 230 Storage section 240 Input section 250 Display section

Claims

1. A learning unit that updates weights of the neural network based on a gradient of a loss function that calculates an error between output data obtained by inputting input data into the neural network and correct answer data corresponding to the input data, the learning unit is a first updating unit that calculates gradients used to update the weights of each channel of each layer of the neural network such that an average value of the gradients becomes 0, and updates the weights of each channel of each layer using the calculated gradients; a second update unit that updates the weights so that the norm of the weights updated by the first update unit becomes a predetermined value. Learning device.

2. The second update unit updates the weight by dividing the weight updated by the first update unit by a norm of the weight. The learning device according to claim 1 .

3. the second update unit updates the weight by dividing the weight updated by the first update unit by a norm of the weight and further multiplying the weight by a constant; The learning device according to claim 1 .

4. The first update unit performs a process of performing a linear transformation on an output of each layer and each element obtained by inputting the input data to the neural network, and a process of updating a parameter of the linear transformation based on a gradient of the loss function. The learning device according to claim 1 .

5. The first update unit multiplies the linearly transformed output of each layer and each element of the neural network by a stochastic random number. The learning device according to claim 4.

6. A computer comprising: A learning step of updating weights of the neural network based on a gradient of a loss function that calculates an error between output data obtained by inputting input data into the neural network and correct answer data corresponding to the input data, The learning step includes: a first updating step of calculating gradients used for updating the weights of each channel of each layer of the neural network such that an average value of the gradients is 0, and updating the weights of each channel of each layer using the calculated gradients; a second update step of updating the weights so that the norm of the weights updated in the first update step becomes a predetermined value. How to learn.

7. Computer, A program for causing the learning device according to any one of claims 1 to 5 to function.

Citation Information

Patent Citations

  • Attribute generation device, attribution generation method and attribute generation program

    WO2020144820A1