Learning device, learning method, inference device, inference method, and program

By using a hyperbolic space to represent hierarchical class structures and calculate a hierarchical loss, the learning device achieves accurate classification with a small amount of data, addressing the cost inefficiency of traditional machine learning methods.

JP7568054B2Active Publication Date: 2024-10-16NEC CORP
View PDF 6 Cites 0 Cited by

Patent Information

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

AI Technical Summary

Technical Problem

Existing machine learning models require large amounts of data with correct answers to achieve high accuracy, which can be costly and inefficient.

Method used

A learning device and method that utilizes a hyperbolic space to represent hierarchical class structures, incorporating knowledge of the class hierarchy to convert input data into a feature representation, perform classification, and calculate a hierarchical loss to update parameters, enabling accurate classification with a small amount of data.

Benefits of technology

Enables the generation of a highly accurate machine learning model at a low cost by leveraging the exponential expansion of hyperbolic space to embed tree structures without distortion, facilitating efficient learning and inference with limited data.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure 0007568054000001
    Figure 0007568054000001
  • Figure 0007568054000002
    Figure 0007568054000002
  • Figure 0007568054000003
    Figure 0007568054000003
Patent Text Reader

Abstract

In this learning device, a feature extraction means converts input data into a first feature representation. A projection means converts the first feature representation into a second feature representation representing a point in a hyperbolic space. A classification means performs classification on the basis of the second feature representation, and outputs a score indicating the likelihood that the input data belongs to each class. A loss calculation means calculates a hierarchical loss on the basis of knowledge of the hierarchical structure to which each class belongs, a correct answer label assigned to the input data, and the score. An update means updates the parameters of the feature extraction means, the projection means, and the classification means on the basis of the hierarchical loss.
Need to check novelty before this filing date? Find Prior Art

Description

[Technical field]

[0001] The present disclosure relates to a method for training a machine learning model. [Background technology]

[0002] In recent years, recognition technologies based on machine learning have shown extremely high performance, especially in the field of image recognition. The high accuracy of such recognition technologies based on machine learning is supported by a large amount of data with correct answers. That is, high accuracy is achieved by preparing a large amount of data with correct answers and performing learning. For example, Patent Document 1 discloses a method for learning to distinguish categories having a hierarchical structure. [Prior art documents] [Patent documents]

[0003] [Patent Document 1] International Publication No. WO2006 / 073081 Summary of the Invention [Problem to be solved by the invention]

[0004] On the other hand, depending on the application of image recognition technology, there is a demand for achieving low-cost, highly accurate machine learning without preparing large amounts of data with correct answers.

[0005] One objective of the present disclosure is to generate machine learning models with high accuracy at low cost. [Means for solving the problem]

[0006] In one aspect of the present disclosure, a learning device includes: a feature extraction means for converting input data into a first feature representation; a projection means for transforming the first feature representation into a second feature representation representing points in a hyperbolic space; a classification means for performing classification based on the second feature representation and outputting a score indicating the likelihood that the input data belongs to each class; a loss calculation means for calculating a hierarchical loss based on knowledge of a hierarchical structure to which each of the classes belongs, a correct label assigned to the input data, and the score; an update means for updating parameters of the feature extraction means, the projection means, and the classification means based on the hierarchical loss; Equipped with 、 The classification means outputs a score for each of the terminal classes of the hierarchical structure; The loss calculation means integrates the scores of the leaf classes to calculate the loss of a layer above the layer of the leaf class, and calculates a weighted sum of the losses of each layer as the hierarchical loss.

[0007] In another aspect of the present disclosure, a method of learning comprises: Transforming the input data into a first feature representation using feature extraction means; converting said first feature representation into a second feature representation indicative of points in hyperbolic space using a projection means; using a classification means to perform classification based on the second feature representation and output a score indicating the likelihood that the input data belongs to each class; A hierarchical loss is calculated based on the knowledge of the hierarchical structure to which each class belongs, the correct label assigned to the input data, and the score. of calculation Do , Based on the hierarchical loss, parameters of the feature extraction means, the projection means and the classification means are updated. death, The classification is performed by outputting a score for each of the terminal classes of the hierarchical structure; The calculation of the hierarchical loss is performed by integrating the scores of the terminal classes to calculate the loss of the layer above the terminal class, and calculating the weighted sum of the losses of each layer as the hierarchical loss. .

[0008] In yet another aspect of the disclosure, a program includes: Transforming the input data into a first feature representation using feature extraction means; converting said first feature representation into a second feature representation indicative of points in hyperbolic space using a projection means; using a classification means to perform classification based on the second feature representation and output a score indicating the likelihood that the input data belongs to each class; A hierarchical loss is calculated based on the knowledge of the hierarchical structure to which each class belongs, the correct label assigned to the input data, and the score. of calculation Do , Based on the hierarchical loss, parameters of the feature extraction means, the projection means and the classification means are updated. death, The classification is performed by outputting a score for each of the terminal classes of the hierarchical structure; The calculation of the hierarchical loss is performed by integrating the scores of the terminal classes to calculate the loss of the layer above the terminal class, and calculating the weighted sum of the losses of each layer as the hierarchical loss. The processing is executed by a computer.

[0009] In yet another aspect of the present disclosure, a reasoning apparatus includes: a feature extraction means for converting input data into a first feature representation; a projection means for transforming the first feature representation into a second feature representation representing points in a hyperbolic space; and a classification means for performing classification based on the second feature representation and calculating, for each hierarchy, a score indicating the likelihood that the input data belongs to each class, using knowledge of the hierarchical structure to which each class belongs.

[0010] In yet another aspect of the present disclosure, a method of inference includes: Transforming the input data into a first feature representation; converting the first feature representation into a second feature representation representing points in a hyperbolic space; A classification is performed based on the second feature representation, and knowledge of the hierarchical structure to which each class belongs is used to calculate a score for each hierarchical level indicating the likelihood that the input data belongs to each class.

[0011] In yet another aspect of the present disclosure, program teeth, Transforming the input data into a first feature representation; converting the first feature representation into a second feature representation representing points in a hyperbolic space; A computer is caused to perform a process of performing classification based on the second feature representation, and calculating, for each hierarchy, a score indicating the likelihood that the input data belongs to each class, using knowledge of the hierarchical structure to which each class belongs. Effect of the Invention

[0012] According to the present disclosure, by using knowledge of class structure, it is possible to generate machine learning models with high accuracy at low cost. [Brief description of the drawings]

[0013] [Figure 1] 1 is a block diagram showing a hardware configuration of a learning device according to a first embodiment. [Diagram 2] FIG. 2 is a block diagram showing the functional configuration of the learning device of the first embodiment. [Diagram 3] Here is an example of a class hierarchy: [Figure 4] 4 is a flowchart of a learning process performed by the learning device of the first embodiment. [Diagram 5] 1 is a block diagram showing a functional configuration of an inference device according to a first embodiment. [Figure 6] 4 is a flowchart of an inference process performed by the inference device of the first embodiment. [Figure 7] FIG. 11 is a block diagram showing the functional configuration of a learning device according to a second embodiment. [Figure 8] 1 shows an example of sharing among multiple classifiers constituting a hierarchical hyperbolic classifier. [Figure 9] Another example of sharing of work among multiple classifiers constituting a hierarchical hyperbolic classifier is shown below. [Figure 10] 10 is a flowchart of a learning process performed by a learning device according to a second embodiment. [Figure 11] FIG. 11 is a block diagram showing the functional configuration of an inference device according to a second embodiment. [Figure 12] 13 is a flowchart of an inference process performed by the inference device of the second embodiment. [Figure 13] FIG. 13 is a block diagram showing the functional configuration of a learning device according to a third embodiment. [Figure 14] 1 shows a schematic configuration of a hierarchical hyperbolic projection unit. [Figure 15] FIG. 1 is a diagram conceptually explaining feature representation and difference. [Figure 16] 13 is a flowchart of a learning process performed by a learning device of a third embodiment. [Figure 17]FIG. 13 is a block diagram showing the functional configuration of an inference device according to a third embodiment. [Figure 18] 13 is a flowchart of an inference process performed by the inference device of the third embodiment. [Figure 19] FIG. 13 is a block diagram showing the functional configuration of a learning device according to a fourth embodiment. [Figure 20] 13 is a flowchart of a learning process performed by a learning device according to a fourth embodiment. [Figure 21] FIG. 13 is a block diagram showing the functional configuration of an inference device according to a fifth embodiment. [Figure 22] 13 is a flowchart of an inference process performed by the inference device of the fifth embodiment. DETAILED DESCRIPTION OF THE PREFERRED EMBODIMENTS

[0014] Hereinafter, preferred embodiments of the present disclosure will be described with reference to the drawings. <Concept explanation> As described above, a highly accurate recognition model can be obtained by performing learning using a large amount of learning data with correct answers, but there are cases where it is required to generate a highly accurate model at low cost from a small amount of data. In order to learn a highly accurate model from a small amount of data, it is essential to use information other than the learning data. When performing multi-class classification, knowledge regarding the hierarchical structure of classes is highly versatile and often easily available. Therefore, in the following embodiment, a learning method is provided that makes it possible to obtain a highly accurate classification model even with a small amount of data by using knowledge indicating the hierarchical structure of the classes to be classified.

[0015] First Embodiment [Learning device] First, the learning device of the first embodiment will be described. (Hardware configuration) 1 is a block diagram showing the hardware configuration of a learning device 100 according to a first embodiment. As shown in the figure, the learning device 100 includes an interface (I / F) 11, a processor 12, a memory 13, a recording medium 14, and a database (DB) 15.

[0016] The interface 11 inputs and outputs data to and from an external device. Specifically, data with correct answers used for learning is input through the interface 11.

[0017] The processor 12 is a computer such as a CPU (Central Processing Unit) and controls the entire learning device 100 by executing a program prepared in advance. The processor 12 may be a GPU (Graphics Processing Unit) or an FPGA (Field-Programmable Gate Array). The processor 12 executes a learning process, which will be described later.

[0018] The memory 13 is composed of a ROM (Read Only Memory), a RAM (Random Access Memory), etc. The memory 13 is also used as a working memory while the processor 12 is executing various processes.

[0019] Recording medium 14 is a non-volatile, non-temporary recording medium such as a disk-shaped recording medium or semiconductor memory, and is configured to be detachable from learning device 100. Recording medium 14 records various programs executed by processor 12. When learning device 100 executes various processes, the programs recorded on recording medium 14 are loaded into memory 13 and executed by processor 12. DB 15 stores data with correct answers for learning as necessary.

[0020] (Functional configuration) 2 is a block diagram showing the functional configuration of the learning device 100 according to the first embodiment. The learning device 100 includes a feature extraction unit 21, a hyperbolic projection unit 22, a hyperbolic classification unit 23, a hierarchical loss calculation unit 24, a gradient calculation unit 25, and an update unit 26.

[0021] The data with correct answers includes input data and a correct answer label corresponding to the input data. For example, when training an image recognition model, the input data is an image used for training, and the correct answer label is information indicating the class of an object contained in the image. Of the data with correct answers, the input data is input to the feature extraction unit 21, and the correct answer label is input to the hierarchical loss calculation unit 24.

[0022] The feature extraction unit 21 converts the input data into a pre-feature representation. The feature representation output by the feature extraction unit 21 is called the "pre-feature representation" to distinguish it from the feature representation output by the hyperbolic projection unit 22 described later. Both the "pre-feature representation" and the "feature representation" are information that represents the features of the input data. Specifically, when training an image recognition model, the feature extraction unit 21 is composed of a deep convolutional neural network (CNN) or the like, and outputs a sequence (vector) of real values ​​that indicates the features of the input image to the hyperbolic projection unit 22 as the pre-feature representation.

[0023] The hyperbolic projection unit 22 converts the previous feature representation into a feature representation. Here, a "feature representation" is a point on some manifold, and selecting a specific projection unit is equivalent to selecting a manifold (feature space) to which the feature representation belongs. In general, a linear space (Euclidean space) is used as the feature space, and a linear projection unit is used as the projection unit, or a high-dimensional hypersphere is used as the feature space, and a spherical projection unit is used as the projection unit. In contrast, this embodiment uses a hyperbolic space as the feature space.

[0024] As described above, this embodiment obtains a highly accurate model with a small amount of training data by utilizing knowledge of the hierarchical structure of classes, but the hierarchical structure (tree structure) has the property of expanding exponentially. Generally, Euclidean space or a hypersphere is used as a feature space, but since Euclidean space and a hypersphere only expand polynomially, they are not suitable for embedding a tree structure. That is, when a hierarchical structure is expressed on a Euclidean space or a hypersphere, distortion is unavoidable in low dimensions. Therefore, in order to express a hierarchical structure (tree structure) on a Euclidean space or a hypersphere without distortion, it is necessary to use a feature space that is exponentially high in terms of the number of classes.

[0025] From this point of view, in this embodiment, a hyperbolic space is used as the feature space. A tree structure can be embedded efficiently in the hyperbolic space. A tree structure can be embedded without distortion even in two dimensions in the exponentially expanding hyperbolic space. Therefore, the hyperbolic projection unit 22 converts the previous feature representation into a feature representation in the hyperbolic space and outputs it to the hyperbolic classification unit 23. The feature representation is also a sequence (vector) of real values ​​like the previous feature representation, but can be regarded as coordinate values ​​in the hyperbolic space, which is the feature space. The hyperbolic projection unit 22 can use Poincaré projection, Lorentz projection, etc., depending on the specific model of the hyperbolic space.

[0026] The hyperbolic classifier 23 performs classification from one feature representation in the hyperbolic space output by the hyperbolic projection unit 22, and outputs the score of each class obtained for the feature representation to the hierarchical loss calculator 24. The hyperbolic classifier 23 outputs only the scores of the terminal classes in the hierarchical structure of classes. A hyperbolic hyperplane classifier or a hyperbolic nearest neighbor classifier can be used as the hyperbolic classifier 23. The hyperbolic hyperplane classifier is a classifier that extends a linear classifier to the hyperbolic space and uses a hyperplane in the hyperbolic space as the discrimination plane. The hyperbolic nearest neighbor classifier is a classifier that follows the nearest neighbor rule in the hyperbolic space. The specific expression of the hyperbolic classifier 23 is determined by the model of the hyperbolic space selected by the hyperbolic projection unit 22.

[0027] The hierarchical loss calculation unit 24 calculates a loss function from the score of each class input from the hyperbolic classification unit 23 and the correct label included in the data with correct answers. At this time, the hierarchical loss calculation unit 24 uses knowledge of the hierarchical structure of the classes to be classified. Specifically, the hierarchical loss calculation unit 24 calculates a score for each layer from the score of each class output by the hyperbolic classification unit 23, and calculates a loss for each layer so that the score for each layer can predict the correct class in each layer. The hierarchical loss calculation unit 24 can use a general loss function for multi-value classification, such as cross-entropy loss.

[0028] Here, the loss calculation method by the hierarchical loss calculation unit 24 will be described with an example. FIG. 3 shows an example of a hierarchical structure of classes. This example shows a hierarchical structure (tree structure) with a root node of "product" and has first to third hierarchies. The first hierarchical structure includes three classes, "food", "drink", and "medicine", as child nodes of "product". The second hierarchical structure includes three classes, "lunch", "bread", and "rice ball", as child nodes of "food", and includes three classes, "tea", "juice", and "water", as child nodes of "drink". The third hierarchical structure includes "lunch A" to "lunch C" as child nodes of "lunch", includes "bread A" to "bread C" as child nodes of "bread", and includes "rice ball A" to "rice ball C" as child nodes of "rice ball". For convenience, the second and third hierarchical structures of medicine and the third hierarchical structure of beverages are omitted from the illustration.

[0029] As described above, the hyperbolic classifier 23 outputs only the scores of leaf classes in the hierarchical structure of classes. In the example of FIG. 3, the hyperbolic classifier 23 outputs only the scores of leaf classes such as "Lunchbox A" to "Lunchbox C", "Bread A" to "Bread C", and "Rice ball A" to "Rice ball C". Now, assume that some input data is input and its correct label is "Lunchbox B". In this case, the hierarchical loss calculator 24 calculates a loss for the third hierarchical layer, which is the layer of leaf classes, that maximizes the score of the correct class, "Lunchbox B", and sets this as the loss for the third hierarchical layer.

[0030] In addition, when calculating the loss of a hierarchy higher than a leaf class, the hierarchical loss calculation unit 24 integrates the scores of the leaf classes, which are descendants of each node, and uses the integrated scores for the loss calculation. Specifically, if the score output by the hyperbolic classification unit 23 is the probability of the leaf class, the score of each class in the higher hierarchy is the sum of the probabilities of the leaf classes, which are its descendants.

[0031] For example, in the example of Fig. 3, the score of "Lunch" in the second hierarchical layer is the sum of the scores of its child nodes "Lunch A" to "Lunch C". Similarly, the score of "Bread" in the second hierarchical layer is the sum of the scores of its child nodes "Bread A" to "Bread C", and the score of "Onigiri" in the second hierarchical layer is the sum of the scores of its child nodes "Onigiri A" to "Onigiri C". Then, the hierarchical loss calculation unit 24 calculates a loss for the second hierarchical layer that maximizes the score of "Lunch", which has the correct class "Lunch B" as a descendant node.

[0032] The score of "Food" in the first hierarchical layer is the sum of the scores of its grandchild nodes, which are the leaf classes "Lunchbox A" to "Lunchbox C," "Bread A" to "Bread C," and "Rice Ball A" to "Rice Ball C." Similarly, the scores of "Drinks" and "Medicine" in the first hierarchical layer are the sum of the scores of their grandchild nodes, which are the leaf classes. The hierarchical loss calculation unit 24 calculates a loss for the first hierarchical layer that maximizes the score of "Food" that has the correct class "Lunchbox B" as a descendant node. The hierarchical loss calculation unit 24 then calculates a weighted sum of the losses calculated for each hierarchical layer, and outputs the result to the gradient calculation unit 25 as the hierarchical loss.

[0033] The gradient calculation unit 25 calculates the gradient of the hierarchical loss input from the hierarchical loss calculation unit 24, and outputs it to the update unit 26. The update unit 26 updates parameters of the feature extraction unit 21, the hyperbolic projection unit 22, and the hyperbolic classification unit 23 using the gradient.

[0034] (Learning process) 4 is a flowchart of the learning process by the learning device 100 of the first embodiment. This process is realized by the processor 12 shown in FIG. 1 executing a program prepared in advance and operating as each element shown in FIG.

[0035] First, the feature extraction unit 21 converts the input data into a pre-feature representation (step S11). Next, the hyperbolic projection unit 22 converts the pre-feature representation into a feature representation in hyperbolic space (step S12). Next, the hyperbolic classification unit 23 calculates the score of each class from the feature representation (step S13). Next, the hierarchical loss calculation unit 24 calculates the hierarchical loss from the score of each class and the correct label using knowledge of the hierarchical structure of the classes (step S14). Next, the gradient calculation unit 25 calculates the gradient of the hierarchical loss (step S15). Next, the update unit 26 updates the parameters of the feature extraction unit 21, the hyperbolic projection unit 22, and the hyperbolic classification unit 23 based on the gradient (step S16). The above processes are repeated until a predetermined learning end condition is met, and the learning process ends.

[0036] As described above, the learning device 100 of the first embodiment makes it possible to learn a highly accurate model even with a small amount of learning data by utilizing knowledge of the hierarchical structure of classes.

[0037] [Inference device] Next, the inference device of the first embodiment will be described. (Hardware configuration) The hardware configuration of the inference device 200 of the first embodiment is similar to that of the learning device 100 shown in FIG. 1, and therefore a description thereof will be omitted.

[0038] (Functional configuration) 5 is a block diagram showing the functional configuration of an inference device 200 according to the first embodiment. The inference device 200 includes a feature extraction unit 21, a hyperbolic projection unit 22, and a hyperbolic classification unit 23. Note that the feature extraction unit 21, the hyperbolic projection unit 22, and the hyperbolic classification unit 23 are set with parameters obtained by the previous learning process.

[0039] Input data is input to the feature extraction unit 21. This input data is data such as an image that is actually the subject of class classification. The feature extraction unit 21 converts the input data into a pre-feature representation and outputs it to the hyperbolic projection unit 22. The hyperbolic projection unit 22 converts the pre-feature representation into a feature representation in hyperbolic space and outputs it to the hyperbolic classification unit 23. The hyperbolic classification unit 23 calculates scores for terminal classes in the hierarchical structure of classes and outputs them as inference results. In this manner, the input data is classified into classes.

[0040] (Inference processing) 6 is a flowchart of an inference process by the inference device 200 of the first embodiment. This process is realized by the processor 12 shown in FIG. 1 executing a program prepared in advance and operating as each element shown in FIG.

[0041] First, the feature extraction unit 21 converts the input data into a pre-feature representation (step S21). Next, the hyperbolic projection unit 22 converts the pre-feature representation into a feature representation in hyperbolic space (step S22). Next, the hyperbolic classification unit 23 calculates the score of each terminal class from the feature representation and outputs it as an inference result (step S23). The above process is performed for each input data.

[0042] <Second embodiment> Next, a second embodiment will be described. In the second embodiment, the hyperbolic classifier is also hierarchical using knowledge of the hierarchical structure of classes.

[0043] [Learning device] First, the learning device of the second embodiment will be described. (Hardware configuration) The hardware configuration of the learning device 100a of the second embodiment is similar to that of the learning device 100 shown in FIG. 1, and therefore will not be described.

[0044] (Functional configuration) 7 is a block diagram showing the functional configuration of a learning device 100a according to the second embodiment. As can be seen from a comparison with the learning device 100 according to the first embodiment shown in FIG. 2, the learning device 100a according to the second embodiment has a hierarchical hyperbolic classifier 23x instead of the hyperbolic classifier 23.

[0045] The hierarchical hyperbolic classifier 23x uses knowledge of the hierarchical structure of classes to output a score at each level of the hierarchical structure from one feature expression in the hyperbolic space input from the hyperbolic projection unit 22. FIG. 8 shows an example of a sharing method by a plurality of classifiers constituting the hierarchical hyperbolic classifier 23x. Each of the frames 91 to 93 shown by thick lines indicates a part corresponding to one classifier. In the example of FIG. 8, one classifier is provided for each level in the hierarchical structure of classes. That is, the hierarchical hyperbolic classifier 23x is composed of three classifiers corresponding to the first to third levels, respectively. Each classifier is a classifier that identifies nodes belonging to the same level across subtrees. In this example, the hierarchical hyperbolic classifier 23x outputs a classification result for each level by the three classifiers.

[0046] FIG. 9 shows another example of a sharing method by a plurality of classifiers constituting the hierarchical hyperbolic classifier 23x. Each of the frames 91 to 93 shown by thick lines indicates a portion corresponding to one classifier. In the example of FIG. 9, in the third layer, as shown by a frame 93, a plurality of classifiers for identifying sibling nodes belonging to the same parent node are provided. That is, one classifier is prepared corresponding to the nodes "Lunch A" to "Lunch C" belonging to the same parent node "Lunch", and one classifier is prepared corresponding to the nodes "Bread A" to "Bread C" belonging to the same parent node "Bread". Note that, for the third layer, one classifier is also prepared for sibling nodes belonging to all parent nodes other than "Lunch" and "Bread" in the second layer, but is omitted from the illustration for convenience. In this example, the hierarchical hyperbolic classifier 23x outputs the classification results by each of the plurality of classifiers. That is, the hierarchical hyperbolic classification unit 23x outputs a classification result corresponding to frame 91 for the first layer, outputs a classification result corresponding to frame 92 for the second layer, and outputs classification results corresponding to multiple frames 93 for the third layer.

[0047] With any of the above configurations, the hierarchical hyperbolic classifier 23x calculates a classification result (score) for each hierarchy and outputs it to the hierarchical loss calculator 24. The hierarchical loss calculator 24 calculates a loss for the classification result of each hierarchy input from the hierarchical hyperbolic classifier 23x, and outputs the weighted sum of the losses as the hierarchical loss to the gradient calculator 25. As described above, in the second embodiment, the hierarchical hyperbolic classifier 23x outputs not only the scores of the leaf classes but also the scores of the classes in the upper hierarchy, so that the hierarchical loss calculator 24 does not need to integrate the scores of the leaf classes to calculate the scores of the upper hierarchy as in the first embodiment.

[0048] The configurations and operations of the feature extraction unit 21, gradient calculation unit 25, and update unit 26 in the learning device 100a of the second embodiment are similar to those in the first embodiment, and therefore will not be described.

[0049] (Learning process) 10 is a flowchart of the learning process by the learning device 100a of the second embodiment. This process is realized by the processor 12 shown in FIG. 1 executing a program prepared in advance and operating as each element shown in FIG.

[0050] First, the feature extraction unit 21 converts the input data into a pre-feature representation (step S31). Next, the hyperbolic projection unit 22 converts the pre-feature representation into a feature representation in hyperbolic space (step S32). Next, the hierarchical hyperbolic classification unit 23x calculates the score of each class for each hierarchy from the feature representation using knowledge of the hierarchical structure of the classes (step S33). Next, the hierarchical loss calculation unit 24 calculates the hierarchical loss from the score of each class for each hierarchy and the correct label (step S34). Next, the gradient calculation unit 25 calculates the gradient of the hierarchical loss (step S35). Next, the update unit 26 updates the parameters of the feature extraction unit 21, the hyperbolic projection unit 22, and the hierarchical hyperbolic classification unit 23x based on the gradient (step S36). The above processing is repeated until a predetermined learning end condition is met, and the learning processing ends.

[0051] [Inference device] Next, an inference device according to a second embodiment will be described. (Hardware configuration) The hardware configuration of inference device 200 is similar to that of learning device 100 shown in FIG. 1, and therefore a description thereof will be omitted.

[0052] (Functional configuration) 11 is a block diagram showing the functional configuration of an inference device 200a according to the second embodiment. The inference device 200a includes a feature extraction unit 21, a hyperbolic projection unit 22, and a hierarchical hyperbolic classification unit 23x. Note that parameters obtained by the previous learning process are set in the feature extraction unit 21, the hyperbolic projection unit 22, and the hierarchical hyperbolic classification unit 23x.

[0053] Input data is input to the feature extraction unit 21. This input data is data such as an image that is actually the subject of class classification. The feature extraction unit 21 converts the input data into a pre-feature representation and outputs it to the hyperbolic projection unit 22. The hyperbolic projection unit 22 converts the pre-feature representation into a feature representation in hyperbolic space and outputs it to the hierarchical hyperbolic classification unit 23x. The hierarchical hyperbolic classification unit 23x uses knowledge of the hierarchical structure of classes to calculate a score for each class in each hierarchy and outputs it as an inference result. In this way, the input data is classified into classes.

[0054] (Inference processing) 12 is a flowchart of an inference process by the inference device 200a of the second embodiment. This process is realized by the processor 12 shown in FIG. 1 executing a program prepared in advance and operating as each element shown in FIG.

[0055] First, the feature extraction unit 21 converts the input data into a feature representation (step S41). Next, the hyperbolic projection unit 22 converts the feature representation into a feature representation in hyperbolic space (step S42). Next, the hierarchical hyperbolic classification unit 23x uses knowledge of the hierarchical structure of classes to calculate the score of each class for each hierarchy from the feature representation, and outputs it as an inference result (step S43). The above process is performed for each input data.

[0056] <Third embodiment> Next, a third embodiment will be described. In the third embodiment, the hyperbolic projection unit 22 is also hierarchicalized using knowledge of the hierarchical structure of classes.

[0057] [Learning device] First, the learning device of the third embodiment will be described. (Hardware configuration) The hardware configuration of the learning device 100b of the third embodiment is similar to that of the learning device 100 of the first embodiment shown in FIG. 1, and therefore a description thereof will be omitted.

[0058] (Functional configuration) Fig. 13 is a block diagram showing the functional configuration of a learning device 100b according to the third embodiment. As can be seen from a comparison with the learning device 100a according to the second embodiment shown in Fig. 7, the learning device 100b according to the second embodiment has a hierarchical hyperbolic projection unit 22x instead of the hyperbolic projection unit 22.

[0059] The hierarchical hyperbolic projection unit 22x uses knowledge of the hierarchical structure of classes to output feature representations at each level of the hierarchical structure from the previous feature representation input from the feature extraction unit 21. Fig. 14 shows a schematic configuration of the hierarchical hyperbolic projection unit 22x. The hierarchical hyperbolic projection unit 22x includes first to third embedded networks (NWs) and adders 31 and 32.

[0060] The first to third embedding networks receive the previous feature representation from the feature extraction unit 21. The first embedding network uses knowledge of the hierarchical structure of classes and outputs, as a feature representation C1, a vector indicating a point in the hyperbolic space of a class corresponding to a node in the first layer.

[0061] The second embedding network outputs, for a node in the second layer, a difference D1 between the characteristic representation C1 of the class corresponding to the parent node of the node and the characteristic representation of the node. Then, the adder 31 outputs the sum of the characteristic representation C1 of the parent node and the difference D1 as the characteristic representation C2 corresponding to the node in the second layer. Like the characteristic representation C1, the characteristic representation C2 is a vector indicating a point in hyperbolic space.

[0062] Similarly, for a node in the third layer, the third embedded network outputs a difference D2 between the characteristic representation C2 of the class corresponding to the parent node of the node and the characteristic representation of the node. The adder 32 then outputs the sum of the characteristic representation C2 of the parent node and the difference D2 as the characteristic representation C3 corresponding to the node in the third layer. Like the characteristic representation C1, the characteristic representation C3 is a vector indicating a point in hyperbolic space.

[0063] FIG. 15 is a diagram for conceptually explaining the characteristic expressions C1 to C3 and the differences D1 to D2. In FIG. 15, the hyperbolic space is shown as a two-dimensional space for convenience. Assuming the hierarchical structure of classes shown in FIG. 3, a circle (●) indicates the characteristic expression C1 of a class in the first layer, a square (■) indicates the characteristic expression C2 of a class in the second layer, and a triangle (▲) indicates the characteristic expression C3 of a class in the third layer. In this case, the difference D1 can be considered as a vector that points from the class "food" in the first layer shown by a circle to the classes "bento", "bread", and "onigiri" in the second layer shown by a square. Similarly, the difference D2 can be considered as a vector that points from the class "bread" in the second layer shown by a square to the classes "bread A" to "bread C" in the third layer shown by a triangle. Mathematically, the "difference" is a tangent vector of the hyperbolic space in the characteristic expression of the class of the parent node, and the "sum" is realized by an exponential map.

[0064] In this way, the hierarchical hyperbolic projection unit 22x outputs the feature representations C1 to C3 for each layer for one input data to the hierarchical hyperbolic classification unit 23x. The hierarchical hyperbolic classification unit 23x receives the feature representations for each layer, classifies them for each layer, and outputs the classification result to the hierarchical loss calculation unit 24.

[0065] The configurations and operations of the feature extraction unit 21, gradient calculation unit 25, and update unit 26 in the learning device 100b of the third embodiment are similar to those in the first embodiment, and therefore will not be described.

[0066] (Learning process) Fig. 16 is a flowchart of the learning process by the learning device 100b of the third embodiment. This process is realized by the processor 12 shown in Fig. 1 executing a program prepared in advance and operating as each element shown in Fig. 13.

[0067] First, the feature extraction unit 21 converts the input data into a previous feature representation (step S51). Next, the hierarchical hyperbolic projection unit 22x converts the previous feature representation into a feature representation in the hyperbolic space for each layer (step S52). Next, the hierarchical hyperbolic classification unit 23x calculates the score of each class for each layer from the feature representation for each layer input from the hierarchical hyperbolic projection unit 22x (step S53). Next, the hierarchical loss calculation unit 24 calculates the hierarchical loss from the score of each class for each layer and the correct label (step S54). Next, the gradient calculation unit 25 calculates the gradient of the hierarchical loss (step S55). Next, the update unit 26 updates the parameters of the feature extraction unit 21, the hierarchical hyperbolic projection unit 22x, and the hierarchical hyperbolic classification unit 23x based on the gradient (step S56). The above processing is repeated until a predetermined learning end condition is met, and the learning processing ends.

[0068] [Inference device] Next, an inference device 200b according to the third embodiment will be described. (Hardware configuration) The hardware configuration of inference device 200b is similar to that of learning device 100 shown in FIG. 1, and therefore will not be described.

[0069] (Functional configuration) 17 is a block diagram showing the functional configuration of an inference device 200b according to the third embodiment. The inference device 200b includes a feature extraction unit 21, a hierarchical hyperbolic projection unit 22x, and a hierarchical hyperbolic classification unit 23x. Note that parameters obtained by the previous learning process are set in the feature extraction unit 21, the hierarchical hyperbolic projection unit 22x, and the hierarchical hyperbolic classification unit 23x.

[0070] Input data is input to the feature extraction unit 21. This input data is data such as an image that is actually the subject of class classification. The feature extraction unit 21 converts the input data into a pre-feature representation and outputs it to the hierarchical hyperbolic projection unit 22x. The hierarchical hyperbolic projection unit 22x uses knowledge of the hierarchical structure of classes to convert the pre-feature representation into a feature representation in hyperbolic space for each layer and outputs it to the hierarchical hyperbolic classification unit 23x. The hierarchical hyperbolic classification unit 23x calculates a score for each class in each layer based on the feature representation for each layer and outputs it as an inference result. In this way, the input data is classified into classes.

[0071] (Inference processing) 18 is a flowchart of an inference process by the inference device 200b of the third embodiment. This process is realized by the processor 12 shown in FIG. 1 executing a program prepared in advance and operating as each element shown in FIG.

[0072] First, the feature extraction unit 21 converts the input data into a pre-feature representation (step S61). Next, the hierarchical hyperbolic projection unit 22x converts the pre-feature representation into a feature representation in the hyperbolic space for each hierarchy (step S62). Next, the hierarchical hyperbolic classification unit 23x calculates the score of each class for each hierarchy from the feature representation for each hierarchy, and outputs it as an inference result (step S63). The above process is performed for each input data.

[0073] <Fourth embodiment> 19 is a block diagram showing the functional configuration of a learning device of the fourth embodiment. The learning device 70 includes a feature extraction unit 71, a projection unit 72, a classification unit 73, a loss calculation unit 74, and an update unit 75.

[0074] FIG. 20 is a flowchart of the learning process by the learning device 70 of the fourth embodiment. First, the feature extraction means 71 converts the input data into a first feature representation (step S71). Next, the projection means 72 converts the first feature representation into a second feature representation indicating a point on a hyperbolic space (step S72). Next, the classification means 73 performs classification based on the second feature representation and outputs a score indicating the possibility that the input data belongs to each class (step S73). Next, the loss calculation means 74 calculates a hierarchical loss based on knowledge of the hierarchical structure to which each class belongs, the correct label given to the input data, and the score (step S74). Next, the update means 75 updates the parameters of the feature extraction means, the projection means, and the classification means based on the hierarchical loss (step S75). According to the fourth embodiment, by using knowledge of the hierarchical structure of the classes, it is possible to generate a highly accurate model even with a small amount of input data.

[0075] <Fifth embodiment> 21 is a block diagram showing the functional configuration of an inference device of the fifth embodiment. The inference device 80 includes a feature extraction unit 81, a projection unit 82, and a classification unit 83.

[0076] FIG. 22 is a flowchart of an inference process by the inference device 80 of the fifth embodiment. First, the feature extraction means 81 converts input data into a first feature representation (step S81). Next, the projection means 82 converts the first feature representation into a second feature representation indicating a point on a hyperbolic space (step S82). Next, the classification means 83 performs classification based on the second feature representation, and calculates a score indicating the possibility that the input data belongs to each class for each hierarchy using knowledge of the hierarchical structure to which each class belongs (step S83). According to the fourth embodiment, it is possible to perform inference with high accuracy using a model learned using knowledge of the hierarchical structure of classes.

[0077] A part or all of the above-described embodiments can be described as, but is not limited to, the following supplementary notes.

[0078] (Appendix 1) a feature extraction means for converting input data into a first feature representation; a projection means for transforming the first feature representation into a second feature representation representing points in a hyperbolic space; a classification means for performing classification based on the second feature representation and outputting a score indicating the likelihood that the input data belongs to each class; a loss calculation means for calculating a hierarchical loss based on knowledge of a hierarchical structure to which each of the classes belongs, a correct label assigned to the input data, and the score; an update means for updating parameters of the feature extraction means, the projection means, and the classification means based on the hierarchical loss; A learning device comprising:

[0079] (Appendix 2) The classification means outputs a score for each of the terminal classes of the hierarchical structure; The learning device according to claim 1, wherein the loss calculation means integrates the scores of the terminal classes to calculate the loss of a hierarchy above the hierarchy of the terminal class, and calculates a weighted sum of the losses of each hierarchy as the hierarchical loss.

[0080] (Appendix 3) The learning device according to claim 2, wherein the loss calculation means calculates a loss that maximizes the score of a correct class for a hierarchy of the leaf classes, and calculates a loss that maximizes the score of a class to which the correct class belongs among the classes in the hierarchy above the leaf classes.

[0081] (Appendix 4) The classification means uses knowledge of the hierarchical structure to output the score for each hierarchical level; 4. The learning device according to claim 1, wherein the loss calculation means calculates the hierarchical loss based on the score output for each hierarchy.

[0082] (Appendix 5) said projection means outputs said second feature representation for each hierarchical level based on knowledge of said hierarchical structure; 5. The learning device according to claim 4, wherein the classification means outputs the score for each hierarchy based on the second feature representation output for each hierarchy.

[0083] (Appendix 6) Transforming the input data into a first feature representation using feature extraction means; using a projection means to transform the first feature representation into a second feature representation indicative of points in hyperbolic space; using a classification means to perform classification based on the second feature representation and output a score indicative of the likelihood that the input data belongs to each class; Calculating a hierarchical loss based on knowledge of the hierarchical structure to which each of the classes belongs, the correct label assigned to the input data, and the score; A learning method that updates parameters of the feature extraction means, the projection means, and the classification means based on the hierarchical loss.

[0084] (Appendix 7) Transforming the input data into a first feature representation using feature extraction means; using a projection means to transform the first feature representation into a second feature representation indicative of points in hyperbolic space; using a classification means to perform classification based on the second feature representation and output a score indicative of the likelihood that the input data belongs to each class; Calculate a hierarchical loss based on knowledge of the hierarchical structure to which each class belongs, the correct label assigned to the input data, and the score; A recording medium having a program recorded thereon that causes a computer to execute a process of updating parameters of the feature extraction means, the projection means, and the classification means based on the hierarchical loss.

[0085] (Appendix 8) a feature extraction means for converting input data into a first feature representation; a projection means for transforming the first feature representation into a second feature representation representing points in a hyperbolic space; a classification means for performing classification based on the second feature representation, and calculating, for each hierarchy, a score indicating the likelihood that the input data belongs to each class, using knowledge of a hierarchical structure to which each class belongs; An inference device comprising:

[0086] (Appendix 9) said projection means outputs said second feature representation for each hierarchical level based on knowledge of said hierarchical structure; 5. The learning device according to claim 1, wherein the classification means outputs the score for each hierarchy based on the second feature representation output for each hierarchy.

[0087] (Appendix 10) Transforming the input data into a first feature representation; converting the first feature representation into a second feature representation representing points in a hyperbolic space; An inference method that performs classification based on the second feature representation, and calculates a score for each hierarchy indicating the likelihood that the input data belongs to each class using knowledge of the hierarchical structure to which each class belongs.

[0088] (Appendix 11) Transforming the input data into a first feature representation; converting the first feature representation into a second feature representation representing points in a hyperbolic space; A recording medium having a program recorded thereon that causes a computer to execute a process of performing classification based on the second feature representation, and calculating, for each hierarchy, a score indicating the likelihood that the input data belongs to each class, using knowledge of the hierarchical structure to which each class belongs.

[0089] Although the present disclosure has been described above with reference to the embodiments and examples, the present disclosure is not limited to the above-mentioned embodiments and examples. Various modifications that can be understood by a person skilled in the art can be made to the configuration and details of the present disclosure within the scope of the present disclosure. [Explanation of symbols]

[0090] 21 Feature Extraction Unit 22 Hyperbolic Projection Section 22x hierarchical hyperbolic projection part 23 Hyperbolic Classifier 23x Hierarchical Hyperbolic Classifier 24 Hierarchical loss calculation section 25 Gradient Calculation Unit 26 Update section 100, 100a, 100b Learning Device 200, 200a, 200b Reasoning device

Claims

1. a feature extraction means for converting input data into a first feature representation; a projection means for transforming the first feature representation into a second feature representation representing points in a hyperbolic space; a classification means for performing classification based on the second feature representation and outputting a score indicating the likelihood that the input data belongs to each class; a loss calculation means for calculating a hierarchical loss based on knowledge of a hierarchical structure to which each of the classes belongs, a correct label assigned to the input data, and the score; an update means for updating parameters of the feature extraction means, the projection means, and the classification means based on the hierarchical loss; Equipped with The classification means outputs a score for each of the terminal classes of the hierarchical structure; The loss calculation means is a learning device that integrates the scores of the end classes to calculate the loss of a hierarchy above the hierarchy of the end class, and calculates a weighted sum of the losses of each hierarchy as the hierarchical loss.

2. 2. The learning device according to claim 1, wherein the loss calculation means calculates a loss that maximizes the score of a correct class for the hierarchy of the terminal classes, and calculates a loss that maximizes the score of a class to which the correct class belongs in a hierarchy above the hierarchy of the terminal classes.

3. The classification means uses knowledge of the hierarchical structure to output the score for each hierarchical level; The learning device according to claim 1 or 2, wherein the loss calculation means calculates the hierarchical loss based on the score output for each hierarchy.

4. said projection means for outputting said second feature representation for each hierarchical level based on knowledge of said hierarchical structure; The learning device according to claim 3 , wherein the classification means outputs the score for each of the hierarchical layers based on the second feature representation output for each of the hierarchical layers.

5. Transforming the input data into a first feature representation using feature extraction means; using a projection means to transform the first feature representation into a second feature representation indicative of points in hyperbolic space; using a classification means to perform classification based on the second feature representation and output a score indicative of the likelihood that the input data belongs to each class; Calculating a hierarchical loss based on knowledge of the hierarchical structure to which each class belongs, the correct label assigned to the input data, and the score; updating parameters of the feature extraction means, the projection means and the classification means based on the hierarchical loss; The classification is performed by outputting a score for each of the terminal classes of the hierarchical structure; The hierarchical loss calculation is a learning method in which the scores of the terminal classes are integrated to calculate the loss of the hierarchy above the terminal class, and the weighted sum of the losses of each hierarchy is calculated as the hierarchical loss.

6. Transforming the input data into a first feature representation using feature extraction means; using a projection means to transform the first feature representation into a second feature representation indicative of points in hyperbolic space; using a classification means to perform classification based on the second feature representation and output a score indicative of the likelihood that the input data belongs to each class; Calculating a hierarchical loss based on knowledge of the hierarchical structure to which each class belongs, the correct label assigned to the input data, and the score; updating parameters of the feature extraction means, the projection means and the classification means based on the hierarchical loss; The classification is performed by outputting a score for each of the terminal classes of the hierarchical structure; The calculation of the hierarchical loss is a program that causes a computer to execute a process of integrating the scores of the terminal classes to calculate the loss of the hierarchy above the hierarchy of the terminal class, and calculating the weighted sum of the losses of each hierarchy as the hierarchical loss.

Citation Information

Patent Citations

  • Information processing apparatus, information processing method and program

    JP2020042403A

  • Learning method, learning system, and learning program

    JP2020053073A

  • Learning method for neural network, computer program and computer device

    JP2020091813A

  • Systems and methods for conversation-based ticket logging

    JP2020091846A

  • Discriminative data learning system, learning device, discriminating device, and learning method

    WO2006073081A1