Machine learning program, machine learning method, and information processing device
By applying constraints based on ontology, specifically through class pair and hierarchy methods, the machine learning method enhances vector representation accuracy in knowledge graphs, addressing the limitations of existing methods.
Patent Information
- Application Number
- JP2022541347
- Authority / Receiving Office
- JP · JP
- Patent Type
- Patents
- Current Assignee / Owner
- Filing Date
- 2020-08-03
- Publication Date
- 2024-10-16
- Estimated Expiration
- 2040-08-03
AI Technical Summary
Existing machine learning methods for knowledge graphs struggle with low accuracy in vector representation, particularly in unorganized graphs, as they fail to accurately apply constraints on relationship and entity abstraction levels, leading to poor learning accuracy.
Introduce constraints based on ontology, specifically through method 1 (restriction of implication judgment using class pairs) and method 2 (utilizing class hierarchies), to enhance the accuracy of vector representations by distinguishing more specific relationships and entities during machine learning.
Generates highly accurate vector representations by appropriately incorporating relationship and entity implications, improving learning accuracy in knowledge graphs.
Smart Images

Figure 0007567915000001 
Figure 0007567915000002 
Figure 0007567915000003
Abstract
Description
[Technical field]
[0001] The present invention relates to machine learning based on knowledge graphs. [Background technology]
[0002] A knowledge graph (KG) is embedded in a vector space, and the nodes (entities) and links (relationships) of the knowledge graph are represented by vectors. Such vector representation is also called an embedded representation. A knowledge graph is an example of knowledge data that is made up of ontology, which is a generalized level of knowledge (class) and has a hierarchical structure, and instances, which are knowledge at the level of specific examples and have a graph structure.
[0003] Then, by using machine learning with vector representation of such KG, relationships between entities are given as vector representation. For example, the vector (v h ,v r ,v t ) is "v h +v r =v t " is satisfied, and the entity vectors and relationship vectors are updated. Using the vectors generated by such machine learning, link prediction, relationship extraction, class prediction, etc. are performed.
[0004] For example, link prediction is an operation that predicts entities that have a relationship using entities and links, for example, inputting a vector "start point" and a vector "relationship" into a model to predict a vector "end point." Relationship extraction is an operation that predicts a relationship between two entities, for example, inputting a vector "start point" and a vector "end point" into a model to predict a vector "relationship." Type prediction is an operation that predicts a class to which two entities belong, for example, inputting a vector "start point" and a vector "end point" into a model to predict a vector "class."
[0005] In recent years, a machine learning method that introduces constraints using the implication of relationships into embedding calculations (vector calculations) has become known as a method for improving the accuracy of models. Specifically, when there is a relationship q between any entities e1 and e2, if there is always a relationship r (r implies q), then the vectors for each are updated so that the score of triple (e1,q,e2) is higher than the score of triple (e1,r,e2). [Prior art documents] [Non-patent literature]
[0006] [Non-Patent Document 1] Boyang Ding et al, “Improving Knowledge Graph Embedding Using Simple Constraints”, ACL 2018. Summary of the Invention [Problem to be solved by the invention]
[0007] However, in the above machine learning techniques, the accuracy of the vector representation obtained using the model is not necessarily high.
[0008] For example, the above machine learning method is a method that gives a high score to triples that include a relationship (target) with a low level of abstraction, but in a disorganized knowledge graph, the accuracy of the vector representation may decrease. For example, a target may be commonly used by entities of different classes, but the above machine learning method may not be able to find a relationship that implies the target and may not be able to apply constraints accurately, resulting in a decrease in learning accuracy. In addition, the above machine learning method handles the abstraction level of relationships, but cannot handle the abstraction level of entities, so the accuracy of the generated model may not be as high as expected.
[0009] In one aspect, an object of the present invention is to provide a machine learning program, a machine learning method, and an information processing device capable of generating highly accurate vector representations. [Means for solving the problem]
[0010] In a first proposal, the machine learning program causes a computer to execute a process of identifying a first triple and a second triple included in a knowledge graph. The machine learning program causes a computer to execute a process of determining which of the first triple and the second triple is associated with more specific information based on at least one of a comparison between a first relationship between two first entities included in the first triple and a second relationship between two second entities included in the second triple according to the occurrence status of each of a plurality of relationships between a plurality of entities of a pair of specific classes included in the knowledge graph, and a comparison between a first entity connected to any of the first two entities and a second entity connected to any of the second two entities. When the machine learning program determines that the first triple is associated with more specific information in the determination process, the computer executes a process of generating vectors indicating each of the first triples and vectors indicating each of the second triples by machine learning based on a constraint that a difference between vectors indicating each of the first triples is smaller than a difference between vectors indicating each of the second triples. Effect of the Invention
[0011] According to one embodiment, a highly accurate vector representation can be generated. [Brief description of the drawings]
[0012] [Figure 1] FIG. 1 is a diagram illustrating an information processing apparatus according to an embodiment. [Diagram 2] FIG. 2 is a diagram illustrating a knowledge graph. [Diagram 3] FIG. 3 is a diagram for explaining the reference technique. [Figure 4] FIG. 4 is a diagram for explaining the problem of the reference technology. [Diagram 5] FIG. 5 is a diagram for explaining the problem of the reference technology. [Figure 6]FIG. 6 is a functional block diagram of the information processing device according to the first embodiment. [Figure 7] FIG. 7 is a diagram illustrating an example of a knowledge graph. [Figure 8] FIG. 8 is a diagram for explaining vector generation according to the first embodiment. [Figure 9] FIG. 9 is a flowchart of the vector generation process according to the first embodiment. [Figure 10] FIG. 10 is a diagram illustrating vector generation according to the second embodiment. [Figure 11] FIG. 11 is a flowchart of the vector generation process according to the second embodiment. [Figure 12] FIG. 12 is a flowchart showing a general flow of vector generation processing using class pairs. [Figure 13] FIG. 13 is a flowchart showing a generalized flow of vector generation processing using a class hierarchy. [Figure 14] FIG. 14 is a diagram illustrating an example of a hardware configuration. DETAILED DESCRIPTION OF THE PREFERRED EMBODIMENTS
[0013] Hereinafter, the machine learning program, the machine learning method, and the information processing device according to the present invention will be described in detail with reference to the drawings. Note that the present invention is not limited to these embodiments. In addition, each embodiment can be appropriately combined within a range that does not cause a contradiction.
[0014] Fig. 1 is a diagram illustrating an information processing device 10 according to an embodiment. As illustrated in Fig. 1, the information processing device 10 is an example of a computer that generates a vector representation that accurately indicates a relationship between entities by expressing entities and relationships in a knowledge graph as vectors and performing machine learning using the generated vector representation.
[0015] A knowledge graph is an example of knowledge data having an ontology and an instance. FIG. 2 is a diagram illustrating a knowledge graph. As shown in FIG. 2, the ontology of a knowledge graph is a generalized level of knowledge and has a hierarchical structure. For example, the classes "Place" and "Person" are lower hierarchical levels (sub-concepts) of the class "Thing". In addition, the classes "City" and "Park" are lower hierarchical levels of the class "Place".
[0016] Moreover, an instance of a knowledge graph is knowledge at the level of a specific example, and has a graph structure. For example, the entity "Hanako" is connected to the entity "Kawasaki" through the relationship "residence", and the entity "Jiro" is connected to the entity "Hanako" through the relationship "friend". The entity "Ichiro" is connected to the entity "Kawasaki" through the relationship "birthplace", and is also connected to the entity "Jiro" through a brother relationship. Furthermore, the entity "Kawasaki" belongs to the class "Place", and therefore has a relationship "type" between the class "Place" and the entity "Kawasaki". Similarly, the entities "Hanako", "Jiro", and "Ichiro" belong to the class "Person", and each has a relationship "type" with the class "Person".
[0017] Here, in the reference technology that uses a technology called TransE, which is a type of translation-based model, the vector (v h ,v r ,v t ) is "v h +v r =v t " is satisfied, and the entity vectors and relationship vectors are updated. At this time, in the reference technology, a constraint using the implication relationship of the relationship is introduced into the vector calculation (embedding calculation).
[0018] FIG. 3 is a diagram for explaining the reference technology. Given the knowledge graph shown in FIG. 3, for example, the reference technology performs machine learning assuming that when there is a relationship "member" between any entities, there is also a relationship "affiliation" and that the relationship "affiliation" implies the relationship "member". Specifically, the reference technology updates each vector so that "v(Ichiro)+v(member) is closer to v(A Corp.) than v(Ichiro)+v(affiliation), and v(Jiro)+v(member) is closer to v(B Corp.) than v(Jiro)+v(affiliation)". In other words, the reference technology gives a higher score to a triple including a less abstract relationship. Note that v(Ichiro) is synonymous with vector(Ichiro), and to simplify the description, in this embodiment, vector(Ichiro) etc. may be written as v(Ichiro) etc.
[0019] This reference technology performs machine learning by giving a high score to triples that include relationships and targets with low abstraction, but in a disorganized knowledge graph, targets may be commonly used by entities of different classes. In this case, the reference technology may not find a relationship that implies the target, and the constraint may not be applied appropriately. Figure 4 is a diagram explaining the problems with the reference technology. In (a) of Figure 4, since the relationship is between a class and an attribute value that has the relationship "affiliation," a constraint using the implication relationship of the relationship can be introduced into vector calculation. On the other hand, in (b) of Figure 4, data that has the relationship "member" but does not have the relationship "affiliation" is included, so the above constraint cannot be applied, and therefore machine learning using such a vector representation may result in a decrease in learning accuracy.
[0020] In addition, the reference technology handles the abstraction level of relationships, but cannot handle the abstraction level of entities. For example, it is possible to consider a case where the fact that a baseball player and a basketball player are friends is more important than the fact that a certain person and another person are friends. FIG. 5 is a diagram for explaining the problems of the reference technology. In the knowledge graph shown in FIG. 5, the entity "Person A" and the entity "Person B" have a relationship "friend" (see FIG. 5(a)), and the entity "Baseball Player A" and the entity "Baseball Player B" have a relationship "friend" (see FIG. 5(b)). In this case, we want to perform machine learning assuming that "v(Baseball Player A)+v(friend)=v(Baseball Player B)" shown in FIG. 5(b) is more important than "v(Person A)+v(friend)=v(Person B)" shown in FIG. 5(a). However, in the reference technology, the abstraction levels of these entities cannot be accurately distinguished and reflected in the machine learning, so the machine learning does not progress to a degree that allows them to be distinguished, and the learning accuracy is not necessarily as high as expected.
[0021] Therefore, in the embodiment, in machine learning based on a knowledge graph, a constraint based on an ontology is introduced to improve the accuracy of vector calculation. Specifically, as shown in Fig. 1, in the embodiment, the accuracy of machine learning is improved by using either or both of (Method 1) restriction of implication judgment and (Method 2) use of a class hierarchy, and a highly accurate vector expression is generated. Note that in the embodiment 1, Method 1 is specifically described, and in the embodiment 2, Method 2 is specifically described.
[0022] First, an information processing device 10 using method 1 will be described. Fig. 6 is a functional block diagram showing a functional configuration of the information processing device 10 according to the first embodiment. When performing entailment determination for relationships belonging to each class pair, the information processing device 10 limits the scope of entailment determination by class pair, thereby realizing vector representation and machine learning that appropriately introduces entailment relationships of relationships between entities even in a disorganized knowledge graph.
[0023] 6, the information processing device 10 according to the first embodiment includes a communication unit 11, a storage unit 12, and a control unit 20. The communication unit 11 controls communication with other devices. For example, the communication unit 11 receives a knowledge graph, various information, and an instruction to start each process from an administrator terminal or the like, and displays a learning result, a prediction result, and the like on the administrator terminal.
[0024] The storage unit 12 stores various data and programs executed by the control unit 20. For example, the storage unit 12 stores a knowledge graph 13 and a model 14. The storage unit 12 can also store intermediate data generated in the process in which the control unit 20 executes processing.
[0025] The knowledge graph 13 is an example of a knowledge base having an ontology and an instance. Fig. 7 is a diagram showing an example of the knowledge graph 13. As shown in Fig. 7, the knowledge graph 13 has a class pair (Person, Company) and a class pair (Person, Sports Club).
[0026] The class "Person" includes the entities "Ichiro", "Jiro", "Hanako", and "Saburo". The class "Company" includes the entities "A Corp.", "B Corp.", and "C Corp.". The class "SportsClub" includes the entity "A Team".
[0027] The entity "Ichiro" is connected to entity "A Corp." through the relationship "affiliation" and to entity "A Corp." through the relationship "member". The entity "Jiro" is connected to entity "B Corp." through the relationship "affiliation" and to entity "B Corp." through the relationship "member". The entity "Hanako" is connected to entity "C Corp." through the relationship "affiliation". The entity "Sabro" is connected to entity "A Team" through the relationship "member".
[0028] Model 14 is a model used for machine learning of vector representations. For example, model 14 is a translation-based model for complementing knowledge graphs, and is a model for obtaining vectors of continuous values that indicate entities and relationships.
[0029] The control unit 20 is a processing unit that controls the entire information processing device 10, and includes an acquisition unit 21, a determination unit 22, a generation unit 23, and a prediction unit 24.
[0030] The acquisition unit 21 acquires the knowledge graph 13 and stores it in the storage unit 12. For example, the acquisition unit 21 acquires the knowledge graph 13 from a specified acquisition source, and acquires the knowledge graph 13 transmitted from an administrator terminal or the like.
[0031] When determining the entailment relationship of each class in the knowledge graph, the determination unit 22 performs the entailment determination by limiting the scope of the entailment determination by class pairs. Specifically, the determination unit 22 identifies a first triple and a second triple included in the knowledge graph. Then, the determination unit 22 compares a first relationship between first two entities included in the first triple according to the appearance status of each of a plurality of relationships between a plurality of entities of a specific class pair included in the knowledge graph 13 with a second relationship between second two entities included in the second triple. Then, the determination unit 22 determines which of the first triple and the second triple is associated with more specific information.
[0032] For example, the determination unit 22 lists triples belonging to a certain class pair, and for all relationships contained in the listed triples, lists pairs of subject and predicate having the relationship. Then, for each pair, the determination unit 22 determines that an implication relationship is established when a combination of subject and predicate in one relationship includes all combinations of subject and predicate in the other relationship.
[0033] 7 as an example, the determination unit 22 extracts (Ichiro, affiliation, A Corp.), (Ichiro, member, A Corp.), (Jiro, affiliation, B Corp.), (Ichiro, member, B Corp.), and (Hanako, affiliation, C Corp.) as triples belonging to (Person, Company). Next, the determination unit 22 generates "affiliation: (Ichiro, A Corp.), (Jiro, B Corp.), (Hanako, C Corp.)" and "member: (Ichiro, A Corp.), (Jiro, B Corp.)" as relationships included in the triples belonging to (Person, Company). As a result, the determination unit 22 determines that the relationship "affiliation" implies the relationship "member" because all of the (subject, predicate) included in the relationship "member" are included in the relationship "affiliation."
[0034] When it is determined that the first triple is associated with more specific information, the generation unit 23 performs machine learning based on the knowledge graph 13 and the model 14 in accordance with the constraint that the difference between the vectors representing each of the first triples is smaller than the difference between the vectors representing each of the second triples, to generate entity vectors and relationship vectors.
[0035] For example, if a relationship q exists between any entities e1 and e2 (e1 belongs to C1 and e2 belongs to C2) belonging to a certain class pair (C1, C2), and a relationship r exists (r implies q), the generation unit 23 updates each vector so that the score of the triple (e1.q, e2) is higher than the score of the triple (e1, r, e2).
[0036] Fig. 8 is a diagram for explaining vector generation according to the first embodiment. In Fig. 8, machine learning using the knowledge graph 13 explained in Fig. 7 is explained. As shown in Fig. 8, since it is determined that the relationship "affiliation" implies the relationship "member" for the class pair (Person, Company), the generating unit 23 executes machine learning that places importance on the relationship "member", which is a more specific relationship.
[0037] For example, the generation unit 23 updates the vectors for the triples (Ichiro, affiliation, A Corp.) and (Ichiro, member, A Corp.) so that "v(Ichiro)+v(member) is closer to v(A Corp.) than v(Ichiro)+v(affiliation)". Similarly, the generation unit 23 updates the vectors for the triples (Jiro, affiliation, B Corp.) and (Jiro, member, B Corp.) so that "v(Jiro)+v(member) is closer to v(B Corp.) than v(Jiro)+v(affiliation)".
[0038] In this way, the generation unit 23 executes machine learning for each triple of each class pair based on the knowledge graph 13 and the model 14 to generate entity vectors and relationship vectors. Note that various machine learning methods such as gradient methods can be used.
[0039] The prediction unit 24 executes link prediction, relationship extraction, class prediction, etc., using the model 14, etc. Specifically, the prediction unit 24 inputs a vector (start point) and a vector (relationship) to the model 14 and predicts a vector (end point). The prediction unit 24 also inputs a vector (start point) and a vector (end point) to the model and predicts a vector (relationship).
[0040] For example, when predicting an entity connected to the entity "Ichiro" through the relationship "brotherOf", the prediction unit 24 inputs the vector "v(Ichiro)" of the entity "Ichiro" and the vector "v(brotherOf)" of the relationship "brotherOf" into the model 14. Then, the prediction unit 24 acquires the result output by the model 14 executing a vector operation "v(Ichiro)+v(brotherOf)" or the like as a prediction result. Then, the prediction unit 24 stores the prediction result in the memory unit 12, displays it on a display or the like, or transmits it to an administrator terminal.
[0041] Fig. 9 is a flowchart showing the flow of the vector generation process according to the first embodiment. As shown in Fig. 9, the determination unit 22 initializes all vectors in the knowledge graph with random numbers (S101), and acquires all patterns of class pairs corresponding to the subject and object from the knowledge graph (S102). Next, the determination unit 22 executes an implication determination for the relations belonging to each class pair (S103).
[0042] Then, the generation unit 23 obtains a triple (e1, r, e2) from the knowledge graph (S104), and determines whether the magnitude of the vector of the triple, "||e1+r-e2||", is greater than a threshold (Margin) (S105).
[0043] Here, if "||e1+r-e2||" is greater than the threshold (S105: Yes), the generation unit 23 updates each of the vectors "e1, r, e2" so that the vector difference (e1+r-e2) approaches 0 (S106).
[0044] Then, after executing S106, or if "||e1+r-e2||" is less than the threshold (S105: No), the generation unit 23 acquires a relationship q that implies the relationship r or is implied by the relationship r (S107).
[0045] Here, if the relationship r implies the relationship q (S108: Yes), the generation unit 23 updates each of the vectors "e1, r, e2" so that the vector difference (e1+r-e2) is greater than the score of the vector difference (e1+q-e2) (S109).
[0046] On the other hand, if the relationship r does not imply the relationship q (S108: No), the generation unit 23 updates the vectors of "e1, r, e2" so that the vector difference (e1+r-e2) is smaller than the vector difference (e1+q-e2) (S110).
[0047] Thereafter, if there is no more vector update or if the process has been repeated a prescribed number of times (S111: Yes), the generation unit 23 ends the process. Note that if there is a vector to be updated or if the number of executions is less than the prescribed number of times (S111: No), the generation unit 23 repeats S104 and subsequent steps.
[0048] As described above, the information processing device 10 according to the first embodiment can appropriately distinguish the implication relationship between entities for a relationship that has a low level of abstraction but is used between multiple class pairs by determining the implication of the relationship for each class pair, and can reflect this in machine learning. As a result, the information processing device 10 can generate a highly accurate vector representation.
[0049] Next, in Example 2, a method 2 using a class hierarchy will be described. Note that the functional configuration of the information processing device 10 according to Example 2 is similar to that of Example 1, and therefore detailed description will be omitted. The information processing device 10 according to Example 2 executes application of constraints using a class hierarchy during machine learning of vector representation.
[0050] Specifically, the determination unit 22 determines which of the first triple and the second triple is associated with more specific information by comparing a first entity connected to one of the first two entities with a second entity connected to one of the second two entities.
[0051] Furthermore, when it is determined that the first triple is associated with more specific information, the generation unit 23 executes machine learning based on the knowledge graph 13 and the model 14 in accordance with a constraint that a difference between vectors indicating each of the first triples is smaller than a difference between vectors indicating each of the second triples. Specifically, when class C'1 is a subconcept of class C1 and class C'2 is a subconcept of class C2, the generation unit 23 updates the vectors of entity (e1, e2) belonging to (C1, C2) and entity (e1', e2') belonging to (C'1, C'2) such that the score of triple (e1', r, e2') is higher than the score of triple (e1, r, e2).
[0052] A specific description will be given with reference to Fig. 10. Fig. 10 is a diagram for explaining vector generation according to the second embodiment. The knowledge graph shown in Fig. 10 has a class "Person", a class "Teacher", and a class "Doctor" as an ontology. The class "Person" is in the upper hierarchy (upper class), and the class "Teacher" and the class "Doctor" are each in the lower hierarchy (lower class) of the class "Person".
[0053] The knowledge graph also has the following instances: entity "Taro", entity "Ichiro", entity "Hanako", and entity "Jiro". The entities "Taro" and "Ichiro" belong to the class "Person" and have the relationship "friend". The entities "Hanako" and "Jiro" belong to the class "Doctor" and have the relationship "friend".
[0054] In the case of FIG. 10, the determination unit 22 determines that the class "Teacher" of the entity "Hanako" is a subordinate concept of the class "Person" of the entity "Taro" and that the class "Doctor" of the entity "Jiro" is a subordinate concept of the class "Person" of the entity "Ichiro". For this reason, the generation unit 23 updates the vectors so that the score of the triple (Hanako, friend, Jiro) is higher than that of the triple (Taro, friend, Ichiro). In other words, the generation unit 23 updates the vectors so that "v(Hanako)+v(friend)=v(Jiro)" is higher than "v(Taro)+v(friend)=v(Ichiro)".
[0055] Fig. 11 is a flowchart showing the flow of a vector generation process according to the embodiment 2. As shown in Fig. 11, the determination unit 22 initializes all vectors in the knowledge graph with random numbers (S201), and performs upper / lower rank determination for each triple in the knowledge graph based on the class hierarchy (S202).
[0056] Then, the generation unit 23 obtains the triple t (e1, r, e2) from the knowledge graph (S203), and determines whether the magnitude of the vector of the triple t, ``||e1+r-e2||'', is greater than a threshold (Margin) (S204).
[0057] Here, if "||e1+r-e2||" is greater than the threshold (S204: Yes), the generation unit 23 updates each of the vectors "e1, r, e2" so that the vector difference (e1+r-e2) approaches 0 (S205).
[0058] Then, after executing S205, or if ``||e1+r-e2||'' is less than the threshold (S204: No), the generation unit 23 obtains triple t' (e1', r, e2') that is in a superior-subordinate relationship with triple t from the knowledge graph (S206).
[0059] Here, if triple t' is a superior triple of triple t (S207: Yes), the generation unit 23 updates each of the vectors "e1, e2, e1', e2'" so that the vector difference (e1'+r-e2') is greater than the score of the vector difference (e1+r-e2) (S208).
[0060] On the other hand, if triple t' is a subordinate triple of triple t (S207: No), the generation unit 23 updates the vectors of "e1, e2, e1', e2'" so that the vector difference (e1'+r-e2') is smaller than the score of the vector difference (e1+r-e2) (S209).
[0061] Thereafter, if there is no more vector update or if the process has been repeated a prescribed number of times (S210: Yes), the generation unit 23 ends the process. Note that if there is a vector to be updated or if the number of executions is less than the prescribed number of times (S210: No), the generation unit 23 repeats S203 and subsequent steps.
[0062] As described above, the information processing device 10 according to the second embodiment can generate a highly accurate vector expression by performing machine learning with emphasis on a more specific relationship between entities even if the relationship is the same.
[0063] Although the embodiments of the present invention have been described above, the present invention may be embodied in various different forms other than the above-described embodiments.
[0064] The knowledge graphs, entity examples, class examples, relationship examples, numerical example, thresholds, display examples, etc. used in the above embodiments are merely examples and can be changed as desired. In addition, the method 1 described in the first embodiment and the method described in the second embodiment can be used in combination.
[0065] In addition, in each of the above embodiments, the machine learning is performed using TransE, but the present invention is not limited to this, and other machine learning models can be adopted. Therefore, a flowchart when a general-purpose model is used will be described for the first and second embodiments.
[0066] Fig. 12 is a flowchart showing a general flow of vector generation processing using class pairs. The flow of processing shown in Fig. 12 differs from Fig. 9 of the first embodiment in that f(entity, relationship, entity) is used as the score function. Note that various known functions can be used as the score function.
[0067] Specifically, S301 to S304 in Fig. 12 are similar to S101 to S104 in Fig. 9, and therefore detailed description will be omitted. The generation unit 23 determines whether or not a score function (f(e1, r, e2)) using a vector of triples acquired from the knowledge graph is greater than a threshold value (Margin) (S305).
[0068] Here, if the score function (f(e1, r, e2)) is greater than the threshold (S305: Yes), the generation unit 23 updates the vectors of "e1, r, e2" so that the score function (f(e1, r, e2)) approaches 0 (S306).
[0069] Then, after executing S306, or if the score function (f(e1, r, e2)) is less than the threshold (S305: No), the generation unit 23 acquires a relationship q that implies the relationship r or is implied by the relationship r (S307).
[0070] Here, if the relationship r implies the relationship q (S308: Yes), the generation unit 23 updates each vector of “e1, r, e2” so that the score function (f(e1, r, e2)) is greater than the score function (f(e1, q, e2)) (S309).
[0071] On the other hand, if the relationship r does not imply the relationship q (S308: No), the generation unit 23 updates the vectors of “e1, r, e2” so that the score function (f(e1, r, e2)) is smaller than the score function (f(e1, q, e2)) (S310).
[0072] Thereafter, if there is no more vector update or if the process has been repeated a prescribed number of times (S311: Yes), the generation unit 23 ends the process. Note that if there is a vector to be updated or if the process has been repeated less than a prescribed number of times (S311: No), the generation unit 23 repeats S304 and subsequent steps.
[0073] Fig. 13 is a flowchart showing a general flow of vector generation processing using a class hierarchy. The flow of processing shown in Fig. 13 differs from Fig. 11 of the second embodiment in that f(entity, relationship, entity) is used as the score function. Note that various known functions can be used as the score function.
[0074] Specifically, S401 to S403 in Fig. 13 are similar to S201 to S203 in Fig. 11, and therefore detailed description will be omitted. The generation unit 23 determines whether or not a score function (f(e1, r, e2)) using a vector of triples acquired from the knowledge graph is greater than a threshold value (Margin) (S404).
[0075] Here, if the score function (f(e1, r, e2)) is greater than the threshold (S404: Yes), the generation unit 23 updates the vectors of "e1, r, e2" so that the score function (f(e1, r, e2)) approaches 0 (S405).
[0076] Then, after executing S405, or if the score function (f(e1, r, e2)) is less than the threshold (S404: No), the generation unit 23 obtains triple t'(e1', r, e2') that is in a superior-subordinate relationship with triple t from the knowledge graph (S406).
[0077] Here, if triple t' is a superior triple of triple t (S407: Yes), the generation unit 23 updates the vectors of each of "e1, e2, e1', e2'" so that the score function (f(e1', r, e2')) is greater than the score function (f(e1, r, e2)) (S408).
[0078] On the other hand, if triple t' is a subordinate triple of triple t (S407: No), the generation unit 23 updates the vectors of "e1, e2, e1', e2'" so that the score function (f(e1', r, e2')) is smaller than the score function (f(e1, r, e2)) (S409).
[0079] Thereafter, if there is no more vector update or if the process has been repeated a prescribed number of times (S410: Yes), the generation unit 23 ends the process. Note that if there is a vector to be updated or if the process has been repeated less than a prescribed number of times (S410: No), the generation unit 23 repeats S403 and subsequent steps.
[0080] As described above, the information processing device 10 can apply the above-mentioned methods 1 and 2 to a widely used machine learning model, and therefore can improve versatility.
[0081] The information including the processing procedures, control procedures, specific names, various data and parameters shown in the above documents and drawings can be changed arbitrarily unless otherwise specified.
[0082] In addition, each component of each device shown in the figure is a functional concept, and does not necessarily have to be physically configured as shown in the figure. In other words, the specific form of distribution and integration of each device is not limited to that shown in the figure. In other words, all or part of them can be functionally or physically distributed and integrated in any unit according to various loads, usage conditions, etc.
[0083] Furthermore, each processing function performed by each device may be realized, in whole or in part, by a CPU and a program analyzed and executed by the CPU, or may be realized as hardware using wired logic.
[0084] Fig. 14 is a diagram for explaining an example of a hardware configuration. As shown in Fig. 14, an information processing device 10 includes a communication device 10a, a hard disk drive (HDD) 10b, a memory 10c, and a processor 10d. The components shown in Fig. 14 are connected to each other via a bus or the like.
[0085] The communication device 10a is a network interface card or the like, and communicates with other devices. The HDD 10b stores programs and DBs that operate the functions shown in FIG.
[0086] The processor 10d reads out a program that executes the same processes as the respective processing units shown in FIG. 6 from the HDD 10b or the like and loads it in the memory 10c, thereby operating a process that executes each function described in FIG. 6 or the like. For example, this process executes a function similar to that of each processing unit possessed by the information processing device 10. Specifically, the processor 10d reads out a program having functions similar to those of the acquisition unit 21, the determination unit 22, the generation unit 23, the prediction unit 24, or the like from the HDD 10b or the like. Then, the processor 10d executes a process that executes the same processes as those of the acquisition unit 21, the determination unit 22, the generation unit 23, the prediction unit 24, or the like.
[0087] In this way, the information processing device 10 operates as an information processing device that executes a machine learning method by reading and executing a program. The information processing device 10 can also realize functions similar to those of the above-mentioned embodiment by reading the above program from a recording medium using a medium reading device and executing the read program. Note that the program in this other embodiment is not limited to being executed by the information processing device 10. For example, the present invention can be similarly applied to a case where another computer or server executes a program, or a case where these execute a program in cooperation with each other.
[0088] This program can be distributed via a network such as the Internet. This program can also be recorded on a computer-readable recording medium such as a hard disk, a flexible disk (FD), a CD-ROM, a magneto-optical disk (MO), or a digital versatile disk (DVD), and can be executed by being read out from the recording medium by a computer. [Explanation of symbols]
[0089] 10. Information processing device 11 Communications Department 12 Storage section 13. Knowledge Graph 14 Models 20 Control section 21 Acquisition Department 22 Judgment section 23 Generation part 24 Prediction Department
Claims
1. Identifying a first triple and a second triple contained in the knowledge graph; determining which of the first triple and the second triple is associated with more specific information based on a comparison between a first entity connected to one of the first two entities included in the first triple and a second entity connected to one of the second two entities included in the second triple; if it is determined in the determining process that the first triple is associated with more specific information, a vector indicating each of the first triples and a vector indicating each of the second triples are generated by machine learning based on a constraint that a difference between vectors indicating each of the first triples is smaller than a difference between vectors indicating each of the second triples; A machine learning program that causes a computer to execute processing.
2. The process of determining includes: As a comparison between the first entity and the second entity, a first class to which the first entity belongs and a second class to which the second entity belongs are identified based on a hierarchical structure between classes to which each entity included in the knowledge graph belongs; determining that the first triple is associated with more specific information when the first class is located at a lower level than the second class; 2. The machine learning program according to claim 1, further comprising:
3. Identifying a first triple and a second triple contained in the knowledge graph; determining which of the first triple and the second triple is associated with more specific information based on a comparison between a first entity connected to one of the first two entities included in the first triple and a second entity connected to one of the second two entities included in the second triple; if it is determined in the determining process that the first triple is associated with more specific information, a vector indicating each of the first triples and a vector indicating each of the second triples are generated by machine learning based on a constraint that a difference between vectors indicating each of the first triples is smaller than a difference between vectors indicating each of the second triples; A machine learning method characterized in that processing is executed by a computer.
4. Identifying a first triple and a second triple contained in the knowledge graph; determining which of the first triple and the second triple is associated with more specific information based on at least one of a comparison between a first entity connected to one of the first two entities included in the first triple and a second entity connected to one of the second two entities included in the second triple; if it is determined that the first triples are associated with more specific information, a vector indicating each of the first triples and a vector indicating each of the second triples are generated by machine learning based on a constraint that a difference between vectors indicating each of the first triples is smaller than a difference between vectors indicating each of the second triples; An information processing device comprising a control unit.
Citation Information
Patent Citations
CLACL2018.
