Information processing device, calculation method, and computer program
Patent Information
- Application Number
- JP2020164456
- Authority / Receiving Office
- JP · JP
- Patent Type
- Patents
- Current Assignee / Owner
- Filing Date
- 2020-09-30
- Publication Date
- 2024-08-21
- Estimated Expiration
- 2040-09-30
Smart Images

Figure 0007537213000007 
Figure 0007537213000005 
Figure 0007537213000006
Abstract
Description
[Technical field]
[0001] The present disclosure relates to an information processing device, a calculation method, and a computer program that use a machine learning model. [Background technology]
[0002] Patent Documents 1 and 2 disclose a machine learning model using vector neurons, called a capsule network. A vector neuron is a neuron whose input and output are vectors. A capsule network is a machine learning model in which vector neurons called capsules are nodes of the network. In a capsule network, when determining the output vector of each layer, internal parameters are searched for by repeating dynamic routing multiple times. [Prior art documents] [Patent documents]
[0003] [Patent Document 1] U.S. Patent No. 5,210,798 [Patent Document 2] International Publication No. 2019 / 083553 Summary of the Invention [Problem to be solved by the invention]
[0004] However, the capsule network has a problem in that the calculation speed is slow because dynamic routing needs to be repeated multiple times. [Means for solving the problem]
[0005] According to a first embodiment of the present disclosure, an information processing device is provided. The information processing device includes a memory that stores a vector neural network type machine learning model, and a processor that executes a calculation using the machine learning model. The machine learning model has a plurality of vector neuron layers each including a plurality of nodes, and when one of the plurality of vector neuron layers is called an upper layer and the vector neuron layer below the upper layer is called a lower layer, each node of the upper layer is configured to output one output vector using output vectors from a plurality of nodes of the lower layer as input. A target node, which is an arbitrary node of the upper layer, is configured to (a) obtain a prediction vector based on a product of an output vector of each node of the lower layer and a prediction matrix, (b) obtain a sum vector based on a linear combination of the prediction vectors obtained from each node of the lower layer, (c) obtain a normalization coefficient by normalizing the norm of the sum vector, and (d) obtain the output vector of the target node by dividing the sum vector by the norm and further multiplying by the normalization coefficient.
[0006] According to a second embodiment of the present disclosure, a computation method is provided for performing computation processing using a vector neural network type machine learning model. The machine learning model has a plurality of vector neuron layers each including a plurality of nodes, and when one of the plurality of vector neuron layers is called an upper layer and the vector neuron layer below the upper layer is called a lower layer, each node of the upper layer is configured to output one output vector using output vectors from a plurality of nodes of the lower layer as input. The step of obtaining the output vector of a target node, which is an arbitrary node of the upper layer, includes the steps of (a) obtaining a predicted vector based on a product of the output vector of each node of the lower layer and a prediction matrix, (b) obtaining a sum vector based on a linear combination of the predicted vectors obtained from each node of the lower layer, (c) obtaining a normalization coefficient by normalizing the norm of the sum vector, and (d) obtaining the output vector of the target node by dividing the sum vector by the norm and further multiplying by the normalization coefficient.
[0007] According to a third aspect of the present disclosure, there is provided a computer program for causing a processor to execute a computation process using a vector neural network type machine learning model. The machine learning model has a plurality of vector neuron layers each including a plurality of nodes, and when one of the plurality of vector neuron layers is called an upper layer and the vector neuron layer below the upper layer is called a lower layer, each node of the upper layer is configured to output one output vector using output vectors from a plurality of nodes of the lower layer as input. The computer program causes the processor to execute the following processes for obtaining the output vector of a target node, which is an arbitrary node of the upper layer: (a) a process for obtaining a predicted vector based on a product of the output vector of each node of the lower layer and a prediction matrix; (b) a process for obtaining a sum vector based on a linear combination of the predicted vectors obtained from each node of the lower layer; (c) a process for obtaining a normalization coefficient by normalizing the norm of the sum vector; and (d) a process for obtaining the output vector of the target node by dividing the sum vector by the norm and further multiplying the sum vector by the normalization coefficient. [Brief description of the drawings]
[0008] [Figure 1] FIG. 1 is a block diagram of an information processing apparatus according to an embodiment. [Diagram 2] FIG. 1 is an explanatory diagram showing the configuration of a machine learning model. [Diagram 3] 11 is a flowchart showing the procedure of a class classification process. [Figure 4] FIG. [Diagram 5] FIG. 4 is an explanatory diagram showing the configuration of a group of known feature spectra. DETAILED DESCRIPTION OF THE PREFERRED EMBODIMENTS
[0009] 1 is a block diagram showing the functions of an information processing device 100 according to an embodiment. The information processing device 100 includes a processor 110, a memory 120, an interface circuit 130, and an input device 140 and a display unit 150 connected to the interface circuit 130. For example, but not limited to, the processor 110 not only has a function of executing the processes described in detail below, but also has a function of displaying data obtained by the processes and data generated in the process of the processes on the display unit 150. The information processing device 100 can be realized by a computer such as a personal computer.
[0010] The processor 110 functions as a classifier 112 that executes classifier processing of input data. The classifier 112 is realized by the processor 110 executing a computer program stored in the memory 120. However, the classifier 112 may be realized by a hardware circuit. The term processor in this specification includes such a hardware circuit. The memory 120 stores a vector neural network type machine learning model 200, training data TD, a known feature spectrum group KSG, and classified data Di. The machine learning model 200 is used for calculations by the classifier 112. An example of the configuration and operation of the machine learning model 200 will be described later. The training data TD is labeled data used for learning the machine learning model 200. The known feature spectrum group KSG is a set of feature spectra obtained when the training data TD is input again to the trained machine learning model 200. The feature spectra will be described later. The classified data Di is new input data to be processed in the classifier processing. The teacher data TD is necessary only when the machine learning model 200 is trained, and is not necessary when executing the class classification process on the classified data Di. In addition, the classified data Di does not need to be stored in the memory 120 when the machine learning model 200 is trained.
[0011] As described above, the information processing device 100 has a function as a classifier that performs class classification processing. However, the information processing device 100 can also be configured to perform calculation processing other than class classification processing, and can be configured to execute evaluation value calculation processing that calculates continuous values that are evaluation values of input data. In general, the processor 110 functions as a calculation unit that executes calculations using the machine learning model 200.
[0012] 2 is an explanatory diagram showing the configuration of the machine learning model 200. The machine learning model 200 includes, in order from the input data IM side, a convolution layer 210, a primary vector neuron layer 220, a first convolution vector neuron layer 230, a second convolution vector neuron layer 240, and a classification vector neuron layer 250. Of these five layers 210 to 250, the convolution layer 210 is the lowest layer, and the classification vector neuron layer 250 is the highest layer. In the following description, the layers 210 to 250 are also referred to as the "Conv layer 210", the "PrimeVN layer 220", the "ConvVN1 layer 230", the "ConvVN2 layer 240", and the "ClassVN layer 250", respectively.
[0013] 2, two convolution vector neuron layers 230 and 240 are used, but the number of convolution vector neuron layers is arbitrary, and the convolution vector neuron layer may be omitted. However, it is preferable to use one or more convolution vector neuron layers.
[0014] 2 further includes a similarity calculation unit 260 that generates similarities. The similarity calculation unit 260 can calculate similarities S_ConvVN1, S_ConvVN2, and S_ClassVN, which will be described later, from the outputs of the ConvVN1 layer 230, the ConvVN2 layer 240, and the ClassVN layer 250. However, the similarity calculation unit 260 may be omitted.
[0015] The configuration of each of the layers 210 to 250 can be described as follows. <Description of each layer configuration> ·Conv layer 210: Conv[32,5,2] ·PrimeVN layer 220: PrimeVN[16,1,1] ·ConvVN1 layer 230:ConvVN1[12,3,2] ·ConvVN2 layer 240:ConvVN2[6,3,1] ·ClassVN layer 250:ClassVN[2,4,1] Vector dimension VD: VD=16 In the description of each of these layers 210 to 250, the character string before the parentheses is the layer name, and the numbers in the parentheses are, in order, the number of channels, the kernel size, and the stride. For example, the layer name of the Conv layer 210 is "Conv", the number of channels is 32, the kernel size is 5x5, and the stride is 2. In FIG. 2, these descriptions are shown under each layer. The hatched rectangles drawn in each layer represent the kernels used when calculating the output vector of the adjacent upper layer. Note that the parameter values used in the description of each of the layers 210 to 250 are merely examples and can be changed arbitrarily.
[0016] The Conv layer 210 is a layer composed of scalar neurons. The other four layers 220 to 250 are layers composed of vector neurons. A vector neuron is a neuron that takes a vector as input and output. In the above description, the dimension of the output vector of each vector neuron is constant at 16. In the following, the term "node" is used as a superordinate concept of scalar neurons and vector neurons.
[0017] In FIG. 2, for the Conv layer 210, a first axis x and a second axis y that define the planar coordinates of the node array, and a third axis z that represents the depth are shown. Also, it is shown that the sizes of the Conv layer 210 in the x, y, and z directions are 13, 13, and 32. The sizes in the x and y directions are called "resolutions". In this example, the resolutions in the x and y directions are equal, but may be different. The size in the z direction is the number of channels. These three axes x, y, and z are also used as coordinate axes indicating the position of each node in other layers. However, in FIG. 2, the illustration of these axes x, y, and z is omitted in layers other than the Conv layer 210.
[0018] As is well known, the resolution W1 after convolution is given by the following equation: W1 = Ceil{(W0 - Wk + 1) / S} (1) Here, W0 is the resolution before convolution, Wk is the kernel size, S is the stride, and Ceil{X} is a function that rounds up X. The resolution of each layer shown in Fig. 2 is an example in which the resolution of the input data IM is 29 x 29 pixels, and the actual resolution of each layer is changed appropriately according to the size of the input data IM. Note that, although the input data IM is two-dimensional array data in the example of Fig. 2, it may be one-dimensional array data or three or more dimensional array data.
[0019] Each node of the PrimeVN layer 220 regards the scalar output of the 1×1×32 nodes of the Conv layer 210 as a 32-dimensional vector, and obtains the vector output of the node by multiplying this vector by a transformation matrix. This transformation matrix is an element of a 1×1 kernel, and is updated by learning of the machine learning model 200. It is also possible to integrate the processing of the Conv layer 210 and the PrimeVN layer 220 and configure them as one primary vector neuron layer.
[0020] When the PrimeVN layer 220 is referred to as the "lower layer L" and the ConvVN1 layer 230 adjacent to it on the upper side is referred to as the "upper layer L+1", the output of each node in the upper layer L+1 is determined using the following formula.
number
[0021] As the normalization function F(X), for example, the following formula (4a) or (4b) can be used.
number
[0022] In the above formula (4a), the sum vector u j Norm of |u j The activation value a is normalized by the softmax function jOn the other hand, in equation (4b), the sum vector u j Norm of |u j | is the norm |u j Activation value a by dividing by the sum of | j It should be noted that the normalization function F(X) may be a function other than equation (4a) or (4b).
[0023] The ordinal number i in the above equation (3) is the output vector M L+1 j The integer n is a number that is conveniently assigned to the nodes in the lower layer L used to determine the output vector M L+1 j is the number of nodes in the lower layer L used to determine . Thus, the integer n is given by n = Nk × Nc (6) Here, Nk is the number of elements of the kernel, and Nc is the number of channels in the lower layer, the PrimeVN layer 220. In the example of FIG.
[0024] A kernel used to calculate the output vector of the ConvVN1 layer 230 has 3×3×16=144 elements, with the kernel size 3×3 as the surface size and the number of channels in the lower layer being 16 as the depth. Each of these elements is a prediction matrix W L ij In addition, 12 sets of this kernel are required to generate output vectors for the 12 channels of the ConvVN1 layer 230. Therefore, the prediction matrix W L ij The number of prediction matrices W is 144 × 12 = 1728. L ij is updated by learning of the machine learning model 200.
[0025] As can be seen from the above equations (2) to (5), the output vector M L+1 j is calculated by the following calculation: (a) The output vector M of each node in the lower layer L L i The prediction matrix W L ij Multiplying by the predicted vector v ij Seeking (b) Prediction vector v obtained from each node in the lower layer L ij The sum vector u is the sum, i.e., linear combination, of j Seeking (c) Sum vector u j Norm of |u j The activation value a, which is a normalization factor by normalizing | j Seeking (d) Sum vector u j The norm |u j Divide by | and then the activation value a j Multiply by.
[0026] In addition, the activation value a j is the norm |u j is the normalization factor obtained by normalizing |. Therefore, the activation value a j can be considered as an index showing the relative output strength of each node among all nodes in the upper layer L+1. The norm used in (4), (4a), (4b), and (5) is typically the L2 norm, which represents the vector length. In this case, the activation value a j is the output vector M L+1 j The activation value a corresponds to the vector length of j Since it is only used in the above equations (4) and (5), it does not need to be output from the node. However, the activation value a j It is also possible to configure the upper layer L+1 to output to the outside.
[0027] The configuration of a vector neural network is almost the same as that of a capsule network, and the vector neurons of a vector neural network correspond to the capsules of a capsule network. However, the calculations according to the above formulas (2) to (5) used in a vector neural network are different from those used in a capsule network. The biggest difference between the two is that in a capsule network, the predicted vector v ij Each of the vector neural networks in this embodiment is multiplied by a weight, and the weight is searched for by repeating dynamic routing multiple times. On the other hand, in the vector neural network of this embodiment, the output vector M L+1 j Since the above is obtained, there is no need to repeat dynamic routing, and the calculation speed is faster. In addition, the vector neural network of this embodiment has the advantage that the amount of memory required for calculation is smaller than that of a capsule network, and according to an experiment by the inventor of the present disclosure, the amount of memory required is about 1 / 2 to 1 / 3.
[0028] A vector neural network is the same as a capsule network in that it uses nodes that use vectors as input and output. Therefore, the advantage of using vector neurons is also common to capsule networks. In addition, the multiple layers 210-250 are the same as normal convolutional neural networks in that the higher the layer, the larger the area of the feature represented, and the lower the layer, the smaller the area of the feature represented. Here, "feature" means a characteristic part included in the input data to the neural network. In vector neural networks and capsule networks, the output vector of a certain node contains spatial information that represents the spatial information of the feature represented by the node, making them superior to normal convolutional neural networks. That is, the vector length of the output vector of a certain node represents the probability of the existence of the feature represented by the node, and the vector direction represents spatial information such as the direction and scale of the feature. Therefore, the vector direction of the output vectors of two nodes belonging to the same layer represents the positional relationship of each feature. Alternatively, it can be said that the vector direction of the output vectors of the two nodes represents the variation of the feature. For example, if a node corresponds to the feature of "eyes", the direction of the output vector can represent variations such as the thinness of the eyes and the way they are lifted. In a conventional convolutional neural network, it is said that spatial information of features is lost due to pooling processing. As a result, vector neural networks and capsule networks have the advantage of being superior in the performance of identifying input data compared to conventional convolutional neural networks.
[0029] The advantages of vector neural networks can also be considered as follows. That is, the advantage of vector neural networks is that the output vectors of nodes express the features of the input data as coordinates in a continuous space. Therefore, output vectors can be evaluated such that if the vector directions are close, the features are similar. Another advantage is that even if the features contained in the input data are not covered by the training data, the features can be determined by interpolation. On the other hand, normal convolutional neural networks have the disadvantage that the features of the input data cannot be expressed as coordinates in a continuous space because of the chaotic compression caused by the pooling process.
[0030] The output of each node in the ConvVN2 layer 240 and the ClassVN layer 250 is similarly determined using the above-mentioned formulas (2) to (5), and detailed explanations are omitted. The resolution of the top layer, the ClassVN layer 250, is 1×1, and the number of channels is 2. The number of channels in the ClassVN layer 250 is usually set to be equal to the number of labels used in the training data.
[0031] The method of obtaining the output of the nodes of each layer 210 to 250 can also be described as follows. By applying a 5×5 kernel with a stride of “2” to the input data IM, a partial range that gives an output to one node of the Conv layer 210 within the range of the input data IM is determined. The number of kernels applied to the input data IM is 32. As a result, the Conv layer 210 is configured to have 13 regions on the first axis x and the second axis x. In addition, the number of channels, which is the depth of the Conv layer 210, is configured to be 32, which is the same number as the number of kernels. A “partial range” is a region on the input data IM, and is one region specified by the position of the first axis x and the position of the second axis y. However, as will be clear from the following description, the size of the “partial range” differs depending on which of the vector neuron layers 220, 230, 240, and 250 the “partial region Rn” consisting of one or more nodes corresponding to the “partial range” or the one or more nodes corresponds to. On the other hand, a "partial region Rn" is a region specified by the position of the first axis x and the position of the second axis y in the vector neuron layer. Each "partial region Rn" in the vector neuron layer has a dimension of "Width" x "Height" x "Depth" corresponding to the first axis x, the second axis x, and the third axis z. In this embodiment, the number of nodes included in one "partial region Rn" is "1 x 1 x number of depths", that is, "1 x 1 x number of channels". In this specification, the subscript "n" of the partial region Rn is substituted with a numerical value of "220", "230", "240", or "250" according to the vector neuron layers 220, 230, 240, and 250. For example, the partial region R220 indicates a region in the PrimeVN layer 220.
[0032] By applying a 1×1×32 kernel with a stride of “1” to the Conv layer 210, a partial region R210 to be output to one node of the PrimeVN layer 220 is determined from the partial regions R210 of the Conv layer 210. Here, since 16 types of kernels with the same size and the same stride are used, the number of nodes corresponding to one partial region R210 of the Conv layer 210 in the PrimeVN layer 220 is 16. A transformation matrix is used to generate the output from the node of the Conv layer 210 to the node of the PrimeVN layer 220, and the output determination algorithm shown in the above formulas (2) to (5) is not used. Note that the dimension of the kernel for convolution in the vector neuron layer may be expressed as “Width”דHeight”דDepth”דNumber of vector elements” when the number of channels and the number of vector elements are also taken into consideration. According to this representation, the dimensions of the kernel used for the convolution from the Conv layer 210 to the PrimeVN layer 220 are 1×1×32×16.
[0033] By applying a 3×3×16 kernel with a stride of “2” to the PrimeVN layer 220, a partial region R220 that provides an output to a node included in one partial region R230 of the ConvVN1 layer 230 is determined from the partial region R220 of the PrimeVN layer 220. Here, since 12 types of kernels with the same size, same dimension, and same stride are used, the number of nodes included in the partial region R230 of the ConvVN1 layer 230 is 12. The output determination algorithm shown in the above formulas (2) to (5) is used to generate an output from a node in the PrimeVN layer 220 to a node in the ConvVN1 layer 230. Here, the kernel applied to the lower layer 220 can also be expressed as specifying 3×3×16 nodes in the lower layer 220 used to determine one node in the upper layer 230. This also applies to the following explanation.
[0034] By applying a 3×3×12 kernel with a stride of "1" to the ConvVN1 layer 230, a subregion R230 that provides an output to one subregion R240 of the ConvVN2 layer 240 is determined from among the subregions R230 of the ConvVN1 layer 230. Here, six types of kernels with the same size, same dimension, and same stride are used, so the number of nodes included in the subregion R240 of the ConvVN2 layer 240 is six. When generating nodes of the ConvVN2 layer 240 from the nodes of the ConvVN1 layer 230, the output determination algorithm shown in the above formulas (2) to (5) is used.
[0035] By applying a 4×4×6 kernel with a stride of "1" to the ConvVN2 layer 240, a subregion R240 that provides an output to one subregion R250 of the ClassVN layer 250 is determined from among the subregions R240 of the ConvVN2 layer 240. Since two types of kernels with the same size, same dimension, and same stride are used here, the number of nodes included in the subregion R250 of the ClassVN layer 250 is two. When generating nodes of the ClassVN layer 250 from the nodes of the ConvVN2 layer 240, the output determination algorithm shown in the above formulas (2) to (5) is used.
[0036] The topmost layer, the ClassVN layer 250, is composed of one partial region R250. The ClassVN layer 250 classifies the input data IM input to the machine learning model 200 into a predetermined label. In this embodiment, the predetermined labels are label "0" and label "1". In the ClassVN layer 250, the activation value a j The label corresponding to the node with the maximum is output. The label output from the ClassVN layer 250 is output by the display unit 150 under the control of the processor 110.
[0037] 2, one partial region R220 of the PrimeVN layer 220 corresponds to a partial range of 5×5 pixels of the input data IM. Also, one partial region R230 of the ConvVN1 layer 230 corresponds to a partial range of 9×9 pixels of the input data IM. Also, one partial region R240 of the ConvVN2 layer 240 corresponds to a partial range of 17×17 pixels of the input data IM. Also, one partial region R250 of the ClassVN layer 250 corresponds to a partial range of 29×29 pixels of the input data IM.
[0038] 3 is a flowchart showing the procedure of the class classification process. The first two steps S110 to S120 are a preparation step S100 in which the machine learning model 200 is trained using the teacher data TD, and the next three steps S210 to S230 are a classification step S200 in which the class of the classified data Di is determined using the trained machine learning model 200. It is not necessary to perform the preparation step S100 and the classification step S200 consecutively, and the classification step S200 can be performed at any timing after the preparation step S100.
[0039] 3, the classifying unit 112 executes learning of the machine learning model 200 using a plurality of pieces of training data TD. A label is assigned to each piece of training data TD in advance. In this embodiment, it is assumed that a label of either 0 or 1 is assigned to each piece of training data TD.
[0040] The output of the ClassVN layer 250 is converted into a number of judgment values for classes equal to the number of labels, but is not shown in FIG. 2. In this embodiment, the outputs of the two nodes of the ClassVN layer 250 are converted into judgment values for two classes corresponding to the two labels "0" and "1". These judgment values are usually normalized by a softmax function. Specifically, for example, the judgment values for the two classes can be obtained by performing an operation in which the vector length of the output vector of each node of the ClassVN layer 250 is calculated from the output vector of the node, and the vector lengths of the two nodes are further normalized by a softmax function. As described above, the activation value a obtained by the above formula (4) is j is the output vector M L+1 j The activation value a at each of the two nodes in the ClassVN layer 250 is a normalized value that corresponds to the vector length of j It is also possible to output the above and use it as the judgment value for the two classes.
[0041] When learning using the multiple pieces of training data TD is completed, the trained machine learning model 200 is stored in the memory 120. In step S120 of Fig. 3, the multiple pieces of training data TD are input again to the trained machine learning model 200 to generate a known feature spectrum group KSG. The known feature spectrum group KSG is a collection of feature spectra, which will be described below.
[0042] FIG. 4 is an explanatory diagram showing a feature spectrum Sp obtained by inputting arbitrary input data to the trained machine learning model 200. Here, the feature spectrum Sp obtained from the output of the ConvVN1 layer 230 will be described. The horizontal axis of FIG. 4 is a spectral position represented by a combination of an element number ND of an output vector of a node at one planar position (x, y) of the ConvVN1 layer 230 and a channel number NC. In this embodiment, since the vector dimension of the node is 16, the element number ND of the output vector is 16, ranging from 0 to 15. In addition, since the number of channels of the ConvVN1 layer 230 is 12, the channel number NC is 12, ranging from 0 to 11.
[0043] The vertical axis of Fig. 4 is the feature value C at each spectral position. V In this example, the feature value C V is the value of each element of the output vector V ND Note that the feature value C V The value of each element of the output vector V ND and the activation value of the node a j The value V multiplied by ND ×a j Alternatively, activation value a j In the latter case, the feature value C included in the feature spectrum Sp may be used as it is. V The number of is equal to the number of channels, which is 12.
[0044] The number of feature spectra Sp obtained from the output of the ConvVN1 layer 230 for one piece of input data is equal to the number of planar positions (x, y) of the ConvVN1 layer 230, and is therefore 6×6=36. Similarly, for one piece of input data, 16 feature spectra Sp are obtained from the output of the ConvVN2 layer 240, and one feature spectrum Sp is obtained from the output of the ClassVN layer 250.
[0045] When the training data TD is input again to the trained machine learning model 200, the similarity calculation unit 260 calculates the feature spectrum Sp shown in FIG. 4 and registers it in the known feature spectrum group KSG.
[0046] 5 is an explanatory diagram showing the configuration of the known feature spectrum group KSG. In this example, the known feature spectrum group KSG includes a known feature spectrum group KSG_ConvVN1 obtained from the output of the ConvVN1 layer 230, a known feature spectrum group KSG_ConvVN2 obtained from the output of the ConvVN2 layer 240, and a known feature spectrum group KSG_ConvVN1 obtained from the output of the ClassVN layer 250.
[0047] Each record of the known feature spectrum group KSG_ConvVN1 includes a record number, a layer name, a label Lb, and a known feature spectrum KSp. Each record may also include other items such as an individual data name of the training data TD and the upper left coordinate of a portion of the input data IM corresponding to the feature spectrum Sp. The known feature spectrum KSp is the same as the feature spectrum Sp in FIG. 4 obtained in response to the input of the training data TD. In the example of FIG. 5, by inputting a plurality of training data TD to the trained machine learning model 200, N1_0max known feature spectra KSp associated with the label Lb=0 and N1_1max known feature spectra KSp associated with the label Lb=1 are obtained and registered from the output of the ConvVN1 layer 230. N1_0max and N1_1max are integers equal to or greater than 2. As described above, the label Lb=0 and the label Lb=1 correspond to different classes. Therefore, it can be understood that each known-characteristic spectrum KSp in the known-characteristic spectrum group KSG_ConvVN1 is registered in association with one of a plurality of classes. The same is true for the other known-characteristic spectrum groups KSG_ConvVN2 and KSG_ConvVN1.
[0048] The multiple teacher data TD used in step S120 do not need to be the same as the multiple teacher data TD used in step S110. However, there is an advantage in that it is not necessary to prepare new teacher data if some or all of the multiple teacher data TD used in step S110 is used in step S120 as well.
[0049] In step S210 of FIG. 3, the class classification processing unit 112 inputs the classified data Di to the machine learning model 200 and executes the class classification processing of the classified data Di. In this embodiment, it is determined to which class of the two labels Lb=0 and Lb=1 the classified data Di is classified into. The two outputs from the ClassVN layer 250 are a first judgment value indicating the probability of falling into the class of label Lb=0 and a second judgment value indicating the probability of falling into the class of label Lb=1. The class classification processing unit 112 presents to the user, as a result of the class classification processing, the class corresponding to the judgment value larger than a predetermined threshold value out of these two judgment values.
[0050] 3, the similarity calculation unit 260 calculates similarities S_ConvVN1, S_ConvVN2, and S_ClassVN with the known feature spectrum group KSG from the outputs of the ConvVN1 layer 230, the ConvVN2 layer 240, and the ClassVN layer 250. A method for calculating the similarity S_ConvVN1 from the output of the ConvVN1 layer 230 will be described below.
[0051] The similarity calculation unit 260 can calculate either one of two types of similarity, a similarity image S_ConvVN1_M or a class-specific similarity S_ConvVN1_C, as the similarity S_ConvVN1 with the known feature spectrum group KSG. Note that the suffixes "_M" and "_C" of these symbols are omitted in FIG.
[0052] The similarity S(x, y) at each pixel position (x, y) of the similarity image S_ConvVN1_M can be calculated according to the following equation using the known feature spectrum group KSG shown in FIG. S(x,y)=max[G{Sp(x,y),KSp(j)}] (7) Here, G{a,b} is a function for calculating the similarity between a and b, Sp(x,y) is a feature spectrum at a planar position (x,y) of the ConvVN1 layer 230 obtained in response to the classified data Di, KSp(j) is all known feature spectra associated with the ConvVN1 layer 230, and max[X] is a logical operation that takes the maximum value of X. In other words, the similarity S(x,y) at each pixel position (x,y) is the maximum value of the similarities between the feature spectrum Sp(x,y) obtained in response to the classified data Di and all known feature spectra KSp(j) obtained in the same ConvVN1 layer 230.
[0053] As the function G{a,b} for calculating the similarity, for example, a formula for calculating cosine similarity or a formula for calculating similarity according to distance can be used. The pixel value at each position (x,y) is stored in a form including not only the similarity S(x,y) but also the label Lb associated with the known feature spectrum KSp(j) that gave the maximum value in the above formula (7). The similarity S(x,y) of the similarity image S_ConvVN1_M represents the probability that the feature of the class corresponding to the label Lb exists at the pixel position of the classified data Di corresponding to the position (x,y). In other words, the similarity S(x,y) is an index indicating the degree to which the feature at the planar position (x,y) of the layer is similar to the feature of any one of multiple classes.
[0054] On the other hand, the class-specific similarity S_ConvVN1_C can be calculated, for example, using the following formula. S_ConvVN1_C(Class)=max[G{Sp(i,j),KSp(Class,k)}] (8) Here, "Class" is an ordinal number for a plurality of classes, G{a,b} is a function for calculating the similarity between a and b, Sp(i,j) is a feature spectrum at all planar positions (i,j) obtained according to the classified data Di, KSp(Class,k) is all known feature spectra associated with the ConvVN1 layer 230 and a specific "Class", and max[X] is a logical operation for taking the maximum value of X. That is, the class-based similarity S_ConvVN1_C is the maximum value of the similarities calculated between each of the feature spectra Sp(i,j) at all planar positions (i,j) of the ConvVN1 layer 230 and each of all known feature spectra KSp(k) corresponding to a specific class. Such class-based similarity S_ConvVN1_C is calculated for each of a plurality of classes corresponding to a plurality of labels Lb. The class-based similarity S_ConvVN1_C represents the degree to which the classified data Di is similar to the features of the class.
[0055] Similarities S_ConvVN2 and S_ClassVN relating to the outputs of the ConvVN2 layer 240 and the ClassVN layer 250 are also generated in the same manner as the similarity S_ConvVN1. It is not necessary to generate all three similarities S_ConvVN1, S_ConvVN2, and S_ClassVN, but it is preferable to generate one or more of them. In this disclosure, the layer used to generate the similarity is also referred to as a "specific layer."
[0056] 3, the classification processing unit 112 presents the similarities S_ConvVN1, S_ConvVN2, and S_ClassVN with the known feature spectrum group KSG to the user, and the user confirms the result of the classification process in response to this. As described above, the similarities S_ConvVN1, S_ConvVN2, and S_ClassVN with the known feature spectrum group KSG represent the degree to which the classified data Di resembles the characteristics of a class corresponding to any of the labels, so that the quality of the result of the classification process can be confirmed from at least one of these similarities S_ConvVN1, S_ConvVN2, and S_ClassVN. Note that the three steps S210 to S230 of the classification process S200 are actually executed almost simultaneously.
[0057] As described above, in this embodiment, the output vector M L+1 j (a) The output vector M of each node in the lower layer L L i and the prediction matrix W L ij A predicted vector v based on the product ij (b) The predicted vector v obtained from each node in the lower layer L ij The sum vector u is a linear combination of j (c) find the sum vector u j Norm of |u j The activation value a, which is a normalization factor by normalizing | j (d) find the sum vector u j The norm |u j Divide by | and then the activation value a j Therefore, since there is no need to execute a dynamic routine multiple times as in the capsule network, there is an advantage that the calculation using the machine learning model 200 can be executed at a higher speed.
[0058] The method of generating the known spectrum set KSG and the method of generating output data of intermediate layers such as the ConvVN1 layer are not limited to the above embodiment, and for example, these data may be generated using the Kmeans method. Also, these data may be generated using transformations such as PCA, ICA, and Fisher. Also, the transformation methods of the known spectrum set KSG and the output data of the intermediate layers may be different.
[0059] Other embodiments: The present disclosure is not limited to the above-mentioned embodiment, and can be realized in various forms without departing from the spirit of the present disclosure. For example, the present disclosure can be realized in the following aspects. The technical features in the above-mentioned embodiments corresponding to the technical features in each aspect described below can be appropriately replaced or combined in order to solve some or all of the problems of the present disclosure, or to achieve some or all of the effects of the present disclosure. Furthermore, if the technical feature is not described as essential in this specification, it can be appropriately deleted.
[0060] (1) According to a first embodiment of the present disclosure, an information processing device is provided. The information processing device includes a memory that stores a vector neural network type machine learning model, and a processor that executes a calculation using the machine learning model. The machine learning model has a plurality of vector neuron layers each including a plurality of nodes, and when one of the plurality of vector neuron layers is called an upper layer and the vector neuron layer below the upper layer is called a lower layer, each node of the upper layer is configured to output one output vector using output vectors from a plurality of nodes of the lower layer as input. A target node, which is an arbitrary node of the upper layer, is configured to (a) obtain a prediction vector based on a product of an output vector of each node of the lower layer and a prediction matrix, (b) obtain a sum vector based on a linear combination of the prediction vectors obtained from each node of the lower layer, (c) obtain a normalization coefficient by normalizing the norm of the sum vector, and (d) obtain the output vector of the target node by dividing the sum vector by the norm and further multiplying by the normalization coefficient. According to this information processing device, since there is no need to execute dynamic routines multiple times as in a capsule network, calculations using machine learning models can be performed more quickly.
[0061] (2) In the information processing device, the normalization coefficient may be obtained by normalizing the norm with a normalization function such that a sum of the normalization coefficients in the upper layer becomes one. According to this information processing device, an appropriate normalization coefficient can be obtained by a simple calculation.
[0062] (3) In the above information processing device, a plurality of prediction matrices may be prepared, and a range of the plurality of nodes in the lower layer used to calculate the output vector of each node in the upper layer may be restricted by convolution using a kernel having the plurality of prediction matrices as a plurality of elements, and the plurality of prediction matrices may be determined by learning of the machine learning model. According to this information processing device, the range of calculations is limited by the kernel, so that the number of prediction matrices required is small, and an appropriate prediction matrix can be determined by learning.
[0063] (4) In the above information processing device, the memory may store a group of known feature vectors obtained from the output of at least one specific layer of the multiple vector neuron layers when multiple teacher data are input to the trained machine learning model, and the machine learning model may have a similarity calculation unit that calculates a similarity between a feature vector obtained from the output of the specific layer when new input data is input to the trained machine learning model and the group of known feature vectors. According to this information processing device, it is possible to check which of a plurality of training data sets the input data is similar to by utilizing the similarity between the feature vectors.
[0064] (5) In the above information processing device, the specific layer may have a configuration in which vector neurons arranged on a plane defined by two axes, a first axis and a second axis, are arranged as multiple channels along a third axis in a direction different from the two axes, and the feature vector may be any one of: (i) a first type of feature spectrum in which multiple element values of an output vector of a vector neuron at one planar position in the specific layer are arranged across the multiple channels along the third axis; (ii) a second type of feature spectrum obtained by multiplying each element value of the first type of feature spectrum by the normalization coefficient; and (iii) a third type of feature spectrum in which the normalization coefficient at one planar position in the specific layer is arranged across the multiple channels along the third axis. According to this information processing device, the feature vector can be easily obtained.
[0065] (6) According to a second embodiment of the present disclosure, a computation method is provided for performing computation processing using a vector neural network type machine learning model. The machine learning model has a plurality of vector neuron layers each including a plurality of nodes, and when one of the plurality of vector neuron layers is called an upper layer and the vector neuron layer below the upper layer is called a lower layer, each node of the upper layer is configured to output one output vector using output vectors from a plurality of nodes of the lower layer as input. The step of obtaining the output vector of a target node, which is an arbitrary node of the upper layer, includes: (a) obtaining a predicted vector based on a product of the output vector of each node of the lower layer and a prediction matrix; (b) obtaining a sum vector based on a linear combination of the predicted vectors obtained from each node of the lower layer; (c) obtaining a normalization coefficient by normalizing the norm of the sum vector; and (d) obtaining the output vector of the target node by dividing the sum vector by the norm and further multiplying by the normalization coefficient. According to this calculation method, since there is no need to execute dynamic routines multiple times as in the case of capsule networks, calculations using machine learning models can be performed more quickly.
[0066] (7) According to a third embodiment of the present disclosure, there is provided a computer program for causing a processor to execute a computation process using a vector neural network type machine learning model. The machine learning model has a plurality of vector neuron layers each including a plurality of nodes, and when one of the plurality of vector neuron layers is called an upper layer and the vector neuron layer below the upper layer is called a lower layer, each node of the upper layer is configured to output one output vector using output vectors from a plurality of nodes of the lower layer as input. The computer program causes the processor to execute, as a process for obtaining the output vector of a target node which is an arbitrary node of the upper layer, the following processes: (a) a process for obtaining a predicted vector based on a product of an output vector of each node of the lower layer and a prediction matrix; (b) a process for obtaining a sum vector based on a linear combination of the predicted vectors obtained from each node of the lower layer; (c) a process for obtaining a normalization coefficient by normalizing the norm of the sum vector; and (d) a process for obtaining the output vector of the target node by dividing the sum vector by the norm and further multiplying the sum vector by the normalization coefficient. This computer program can perform calculations using machine learning models faster because it does not require multiple executions of dynamic routines as with capsule networks.
[0067] The present disclosure may be realized in various forms other than those described above, such as a computer program for implementing the functions of a classification device, a non-transitory storage medium on which the computer program is recorded, and the like. [Explanation of symbols]
[0068] 100...information processing device, 110...processor, 112...classification processing unit, 120...memory, 130...interface circuit, 150...display unit, 200...machine learning model, 210...convolution layer, 220...primary vector neuron layer, 230...first convolution vector neuron layer, 240...second convolution vector neuron layer, 250...classification vector neuron layer, 260...similarity calculation unit
Claims
1. An information processing device, A memory for storing a vector neural network type machine learning model; A processor that executes a calculation using the machine learning model; Equipped with The machine learning model is a plurality of vector neuron layers each including a plurality of nodes; When one of the plurality of vector neuron layers is called an upper layer, and a vector neuron layer below the upper layer is called a lower layer, each node in the upper layer is configured to receive output vectors from a plurality of nodes in the lower layer as input and output one output vector; The target node, which is any node in the upper layer, (a) calculating a predicted vector based on a product of an output vector of each node in the lower layer and a prediction matrix; (b) calculating a sum vector based on a linear combination of the predicted vectors obtained from the nodes in the lower layer; (c) determining a normalization factor by normalizing the norm of the sum vector; (d) obtaining the output vector of the target node by dividing the sum vector by the norm and further multiplying the sum vector by the normalization factor; The information processing device is configured as follows.
2. 2. The information processing device according to claim 1, The normalization coefficient is obtained by normalizing the norm with a normalization function so that a sum of the normalization coefficients in the upper layer becomes 1.
3. 3. The information processing device according to claim 1, A plurality of the prediction matrices are prepared, a range of the plurality of nodes in the lower layer used for computing the output vector of each node in the upper layer is limited by convolution using a kernel having the plurality of prediction matrices as a plurality of elements; An information processing device, wherein the plurality of prediction matrices are determined by learning the machine learning model.
4. The information processing device according to any one of claims 1 to 3, the memory stores a group of known feature spectra obtained from an output of at least one specific layer among the plurality of vector neuron layers when a plurality of pieces of teacher data are input to the trained machine learning model; The information processing device, wherein the machine learning model has a similarity calculation unit that calculates a similarity between a feature spectrum obtained from an output of the specific layer when new input data is input to the trained machine learning model and the group of known feature spectra.
5. 5. The information processing device according to claim 4, The specific layer has a configuration in which vector neurons arranged on a plane defined by two axes, a first axis and a second axis, are arranged as a plurality of channels along a third axis in a direction different from the two axes, The characteristic spectrum is (i) a first type of feature spectrum in which a plurality of element values of an output vector of a vector neuron at one plane position of the specific layer are arranged across the plurality of channels along the third axis; (ii) a second type of feature spectrum obtained by multiplying each element value of the first type of feature spectrum by the normalization coefficient; and (iii) a third type of characteristic spectrum in which the normalization coefficients at one planar position of the specific layer are arranged across the multiple channels along the third axis; An information processing device,
6. A method for performing computational processing using a vector neural network type machine learning model, The machine learning model is a plurality of vector neuron layers each including a plurality of nodes; When one of the plurality of vector neuron layers is called an upper layer, and a vector neuron layer below the upper layer is called a lower layer, each node in the upper layer is configured to receive output vectors from a plurality of nodes in the lower layer as input and output one output vector; The step of determining the output vector of a target node which is an arbitrary node in the upper layer includes: (a) determining a predicted vector based on a product of an output vector of each node in the lower layer and a prediction matrix; (b) calculating a sum vector based on a linear combination of the predicted vectors obtained from each of the nodes in the lower layer; (c) determining a normalization factor by normalizing the norm of the sum vector; (d) determining the output vector for the target node by dividing the sum vector by the norm and multiplying by the normalization factor; A calculation method comprising:
7. A computer program for causing a processor to execute a computation process using a vector neural network type machine learning model, The machine learning model is a plurality of vector neuron layers each including a plurality of nodes; When one of the plurality of vector neuron layers is called an upper layer, and a vector neuron layer below the upper layer is called a lower layer, each node in the upper layer is configured to receive output vectors from a plurality of nodes in the lower layer as input and output one output vector; The computer program comprises: As a process for obtaining the output vector of a target node which is an arbitrary node in the upper layer, (a) a process of calculating a predicted vector based on a product of an output vector of each node in the lower layer and a prediction matrix; (b) calculating a sum vector based on a linear combination of the predicted vectors obtained from the nodes in the lower layer; (c) determining a normalization factor by normalizing the norm of the sum vector; (d) dividing the sum vector by the norm and multiplying it by the normalization factor to obtain the output vector of the target node; A computer program for causing the processor to execute the following:
Citation Information
Patent Citations
Characteristic vector normalization system and method, and characteristic vector-normalizing program
JP2006164063A
Prefetching weights for use in neural network processor
JP2020126662A
Image feature acquisition
JP2020522077A
Vector neural network for low signal-to-noise ratio detection of a target
US5210798A
Capsule neural networks
WO2019083553A1
