Device and computer implemented method for determining link in knowledge graph
The method improves link prediction in knowledge graphs by employing hyperbolic space embeddings with learnable parameters for curvature, rotation, and translation, addressing the limitations of existing methods in representing poorly represented entities and relationships.
Patent Information
- Application Number
- JP2024080733
- Authority / Receiving Office
- JP · JP
- Patent Type
- Applications
- Current Assignee / Owner
- Priority Date
- 2023-05-19
- Filing Date
- 2024-05-17
- Publication Date
- 2024-11-29
AI Technical Summary
Existing knowledge graph embedding methods struggle to accurately predict links, especially for entities and relationships that are poorly represented in training data, limiting their effectiveness in low-dimensional spaces.
A computer-implemented method using hyperbolic space embeddings, where entities are decomposed into subvectors and rotated and translated based on relationships, allowing for improved link prediction by leveraging learnable parameters for curvature, rotation, and translation.
Enhances link prediction accuracy by effectively representing entities and relationships in low-dimensional spaces, supporting powerful synthesis and application in various technical systems.
Smart Images

Figure 2024167088000001_ABST
Abstract
Description
[Technical field]
[0001] background The present invention relates to an apparatus and computer-implemented method for determining links in a knowledge graph. Summary of the Invention [Problem to be solved by the invention]
[0002] Disclosure of the Invention The computer implemented methods and apparatus set forth in the independent claims provide improved prediction of unknown links in a knowledge graph.
[0003] A knowledge graph is a multi-relational graph that commonly represents facts in the form of triples (head entity h, relation r, and tail entity t). Knowledge graph embedding is a numerical representation of a knowledge graph in a metric space or neural network via link prediction, which enables the possibility of leveraging powerful machine learning for many downstream tasks such as query answering, entity classification. Knowledge graph embedding in hyperbolic space can achieve very good performance even in low dimensional embedding spaces. [Means for solving the problem]
[0004] A computer-implemented method for determining links in a knowledge graph, the links including a first entity, a second entity, and a relationship, the method including determining a first representation, the first representation representing an embedding of the first entity, the method including selecting a second representation from a set of representations of embeddings of entities of the knowledge graph, the second representation representing an embedding of the second entity, the selecting the second representation including determining a prediction for the second representation, and selecting the second representation dependent on the prediction for the second representation. The method includes determining links involving a first entity, a second entity, and a relationship, the first representation including a multi-dimensional vector, in particular a two-dimensional vector, in a hyperbolic space, in particular a two-dimensional hyperbolic space, determining the first representation includes partitioning an embedding of the first entity into a first set of multi-dimensional vectors, and mapping the vectors of the first set to the multi-dimensional vectors of the first representation depending on the relationship, and determining a prediction for the second representation includes rotating and translating the multi-dimensional vectors in the hyperbolic space depending on the relationship. The method provides a wide variety of extrapolations for unknown triples in training, for entities that are poorly represented in the training data, and for relationships that are poorly represented in the training data. The method improves link prediction in low-dimensional spaces. The method supports strong synthesis.
[0005] The link includes a leading or first entity and a trailing or second entity. The method decomposes an embedding of the leading entity in the manifold M into sub-vectors in a component space of the Cartesian product space P, performs translations and rotations on the sub-vectors that are specific to each relationship, and determines a prediction for the second representation. The second representation is selected based on the resulting translated and rotated sub-vectors.
[0006] In some embodiments, the prediction for the second representation comprises a multidimensional vector, in particular a two-dimensional vector, in a hyperbolic space, and the second representation comprises a multidimensional vector, in particular a two-dimensional vector, in a hyperbolic space, and selecting the second representation comprises determining a difference between the multidimensional vector of the second representation and the multidimensional vector of the prediction for the second representation, which are in the same hyperbolic space, determining a distance depending on the difference, and selecting the second representation depending on the distance. The distance is determined depending on the translated and rotated sub-vectors. The second representation may be a given ground truth or may be determined depending on the embedding or the second entity.
[0007] In some embodiments, determining the distance comprises concatenating a multi-dimensional vector of the prediction for the second representation, concatenating a multi-dimensional vector of the second representation, and determining a distance in dependence on the concatenated multi-dimensional vector of the prediction for the second representation and in dependence on the concatenated multi-dimensional vector of the second representation, for example the translated and rotated sub-vectors are concatenated and a distance to the concatenated vector representing an embedding of the second entity is determined.
[0008] In some embodiments, determining the first representation includes mapping the first set of vectors into different hyperbolic spaces.
[0009] In some embodiments, the curvature of at least one of the multiple hyperbolic spaces is defined by a relation, which means that the curvature is a learnable parameter.
[0010] In some embodiments, the degree of rotation in at least one of the multiple hyperbolic spaces is defined by a relation, which means that the degree of rotation is a learnable parameter.
[0011] In some embodiments, the degree of translation in at least one of the multiple hyperbolic spaces is defined by a relation, which means that the degree of translation is a learnable parameter.
[0012] In some embodiments, the method includes providing a relation, where the relation includes, for each hyperbolic space, a degree of rotation, a degree of translation, and / or one parameter that defines a curvature of the hyperbolic space. In inference, the relation, i.e., the at least one learned parameter, is provided to determine a second entity for a given first entity.
[0013] In some embodiments, the method includes determining a set of representations of embeddings of entities of the knowledge graph, where determining the set of representations of embeddings includes partitioning each embedding into a set of multidimensional vectors and mapping the vectors of each set to the multidimensional vectors of each representation, depending in particular on the relations. Other entities, including the second entity, are embedded, and each embedding is represented by mapping the respective set of multidimensional vectors into hyperbolic space.
[0014] In some embodiments, the method includes training a model to map a first entity to a first representation depending on the relationship, to map a second entity to a second representation depending on the relationship, to rotate and translate the first representation in hyperbolic space depending on the relationship, and to select a second entity depending on a prediction for the second representation and depending on the second representation, or to select a second entity by the model.
[0015] In some embodiments the method comprises determining a control signal for controlling a technical system, in particular a physical system, preferably a computer controlled machine, in particular a robotic system, a vehicle, a household appliance, a power tool, a manufacturing machine, a personal assistant or an access control system depending on the links, or classifying the sensor data, in particular to detect the presence of an object in the sensor data, or performing a semantic segmentation on the sensor data, preferably relating to traffic signs, road surfaces, pedestrians, vehicles depending on the links, or analysing data, in particular scalar time series data, preferably from a sensor depending on the links, or determining a state of the technical system depending on the links.
[0016] An apparatus for determining links in a knowledge graph includes at least one processor and at least one storage, the at least one processor configured to execute instructions that, when executed by the at least one processor, cause the at least one processor to perform the method.
[0017] The computer program comprises computer readable instructions which, when executed by a computer, cause the computer to perform the steps of the method.
[0018] Further embodiments can be derived from the following description and drawings. [Brief description of the drawings]
[0019] [Figure 1] FIG. 1 illustrates generally an apparatus for determining links in a knowledge graph. [Diagram 2] 1 is a flowchart of a computer-implemented method for determining links in a knowledge graph. DETAILED DESCRIPTION OF THE PREFERRED EMBODIMENTS
[0020] 1 shows a schematic diagram of an apparatus 100 for determining links in a knowledge graph. The links include, for example, a head entity, i.e., a first entity of a triplet in the knowledge graph, a tail entity, i.e., a second or last entity of a triplet in the knowledge graph, and a relationship between them.
[0021] The apparatus 100 includes at least one processor 102 and at least one storage 104 .
[0022] The at least one processor 102 is configured to execute instructions that, when executed by the at least one processor 102, cause the at least one processor 102 to perform a computer-implemented method for determining links in a knowledge graph.
[0023] The at least one storage 104 is configured to store these instructions.
[0024] In this example, at least one storage 104 is configured to store a knowledge graph.
[0025] The knowledge graph includes a plurality of entities and a plurality of relationships. The knowledge graph includes, for example, more than 1000, more than 10000, or more than 100000 entities. The knowledge graph includes a plurality of entities and a plurality of relationships. The knowledge graph includes, for example, more than 1000, more than 10000, or more than 100000 relationships.
[0026] The knowledge graph embedding model is an essential part of the link prediction task based on knowledge graph embedding. The use of this model specifically consists of two parts: first, this model can be used to train embeddings of entities and embeddings of relations in the data set of knowledge graphs. Second, this model can also be used to generate similarity between the predicted object (or subject) from <subject, relation> (or <object, relation>) and the true object (or subject). In the link prediction task, given a subject and a relation, the trained embeddings of entities and the trained embeddings of relations are fed into the model to calculate the predicted embedding of the object, and this predicted embedding of the object is compared with all entities in the data set. The entity with the embedding that is closest to the predicted embedding is selected as the predicted answer, i.e., the missing object.
[0027] A knowledge graph KG is a multi-relational graph denoted as G = (E, R, F), where given in the form of a triple (h, r, t) ∈ F ⊆ E × R × E, E is a set of entities, i.e., the set of nodes in the graph, R is a set of binary relations between entities, i.e., the set of types of edges in the graph, and F is a set of facts, i.e., the set of edges in the graph, where h denotes a head entity and t denotes a tail entity. A common formulation of the KGE problem aims to solve the link prediction problem: (h, r, ?) (or (?, r, t)), i.e., to find the most likely tail entity (or head entity) given a query between a head entity (or tail entity) and a relation.
[0028] Therefore, the KGE problem is a function KGE:(h,r)→t is defined as finding the
[0029] For simplicity, we denote queries in both directions as (h,r)→t.
[0030] Let (M,G,s) be an embedding space, where M is a metric space, G is a set of mappings with domain and range defined on M, and s is a scoring function s: M×G×M→R. The KGE problem aims to find an embedding from G=(E,R,F) to (M,G,s), which is defined by (i) mapping an entity h,t ∈ E to each point, i.e., a vector e h ,e t ∈M, and (ii) determine how likely it is that (h,r,t)∈F by s(e h ,g r ,e t ) ranks each relation r∈R by mapping g r ∈G.
[0031] 1 shows a schematic representation of a technical system 106. The technical system 106 may include sensors 108 and / or actuators 110.
[0032] The device 100 may be configured to determine a control signal 112 for controlling the technical system 106 depending on the link. The device 100 may be configured to receive data 114 from the sensor 108.
[0033] The technical system 106 is, for example, a physical system.
[0034] The technical system 106 is for example a computer-controlled machine, in particular a robotic system, a vehicle, a household appliance, a power tool, a manufacturing machine, a personal assistant or an access control system.
[0035] The technical system 106 may be configured to classify the sensor data 114 in order to detect the presence of an object in the sensor data 114 depending on the link.
[0036] The technical system 106 may be configured to classify the sensor data 114 in order to perform a semantic segmentation on the sensor data 114 depending on the links.
[0037] A link may, for example, provide a tail entity representing additional information about an object, where the tail entity has a given relationship to the head entity, where the head entity represents a class of object detected in a classification or semantic segmentation.
[0038] The technical system 106 may be configured to classify or perform semantic segmentation of the sensor data 114 relating to traffic signs, road surfaces, pedestrians and vehicles.
[0039] The technical system 106 may be configured to analyse data 114 depending on the link. The analysed data 114 may be scalar time series data. The scalar time series data may be measured by a sensor 108.
[0040] The technical system 106 may be configured to depend on the link to determine a state of the technical system 106 .
[0041] A link may, for example, provide a trailing entity representing the result or state of an analysis, where the trailing entity through the link has a given relationship to a leading entity representing the data 114 being analyzed.
[0042] The control signal 112 may be determined to control the technical system 106 depending on one or more objects or conditions detected based on the sensor data 114 and the link. The control signal 112 may be determined to control the technical system 106 to react to one or more objects or to avoid one or more objects or to change the state of the technical system 106, for example to a safe state or an off state.
[0043] FIG. 2 shows a flow chart of a computer-implemented method.
[0044] The method is described with respect to two-dimensional vectors. The method can use multi-dimensional vectors, i.e. vectors with three or more dimensions.
[0045] The method is described for a two-dimensional hyperbolic space. The method can use multidimensional hyperbolic spaces, i.e., hyperbolic spaces with three or more dimensions, in which case the vectors have the same dimensionality as the hyperbolic space.
[0046] The method includes step 202.
[0047] Step 202 includes providing a knowledge graph, the knowledge graph having a collection of entities including a first entity and a second entity.
[0048] The method includes step 204 .
[0049] Step 204 includes providing a first entity and a relationship.
[0050] For example, to determine a second entity that is linked to a first entity via a relationship, a query about the second entity is provided.
[0051] The relationship may include, for each hyperbolic space, a degree of rotation, a degree of translation, and / or one parameter that defines the curvature of the hyperbolic space.
[0052] The method includes step 206 .
[0053] Step 206 includes determining a set of representations of embeddings of entities of the knowledge graph, the set including the first representation and the second representation.
[0054] The first representation represents an embedding of the first entity. The first representation includes a two-dimensional vector in a two-dimensional hyperbolic space.
[0055] The second representation represents an embedding of the second entity. The second representation comprises a two-dimensional vector in a two-dimensional hyperbolic space.
[0056] Determining the first representation includes step 206-1.
[0057] Step 206-1 involves partitioning each embedding into a set of multi-dimensional vectors.
[0058] In the example where the embedding dimension is 32, the embedding is split into 16 two-dimensional vectors.
[0059] The vectors may be divided depending on the relationships.
[0060] This means that step 206-1 involves partitioning the embedding of the first entity into a first set of multi-dimensional vectors.
[0061] This means that step 206-1 involves partitioning the embedding of the second entity into a second set of multi-dimensional vectors.
[0062] Determining the first representation includes step 206-2.
[0063] Step 206-2 involves mapping the vectors of each set to multidimensional vectors of the respective representations.
[0064] The vectors may be mapped depending on the relationship.
[0065] This means that step 206-2 involves mapping vectors of the first set to multi-dimensional vectors of the first representation.
[0066] This means that step 206-2 involves mapping the vectors of the second set to multi-dimensional vectors of the second representation.
[0067] Determining the first representation may include mapping the first set of vectors to different hyperbolic spaces.
[0068] The curvature of at least one hyperbolic space of the plurality of hyperbolic spaces may be defined by a relationship.
[0069] The method includes step 208.
[0070] Step 208 includes selecting a second representation from the set of representations of embeddings of entities of the knowledge graph.
[0071] The second representation represents an embedding of the second entity.
[0072] The second representation involves a two-dimensional vector in a two-dimensional hyperbolic space.
[0073] Selecting the second representation includes step 208-1.
[0074] Step 208-1 involves determining a prediction for the second representation.
[0075] The prediction for the second representation involves a two-dimensional vector in a two-dimensional hyperbolic space.
[0076] Determining a prediction for the second representation includes step 208-11.
[0077] Step 208-11 involves rotating the multi-dimensional vector in hyperbolic space depending on the relation.
[0078] A degree of rotation within at least one of the multiple hyperbolic spaces may be defined by a relationship.
[0079] Determining a prediction for the second representation includes step 208-12.
[0080] Step 208-12 involves translating the multi-dimensional vector in the hyperbolic space depending on the relation.
[0081] A degree of translation in at least one of the multiple hyperbolic spaces may be defined by a relationship.
[0082] Selecting the second representation includes step 208-2.
[0083] Step 208-2 involves selecting a second representation dependent on the prediction about the second representation.
[0084] Selecting the second representation includes step 208-21.
[0085] Step 208-21 involves determining a difference between a multi-dimensional vector of the second representation and a multi-dimensional vector of a prediction for the second representation, which lie in the same hyperbolic space.
[0086] Selecting the second representation includes step 208-22.
[0087] Step 208-22 involves determining the distance depending on the difference.
[0088] Determining the distance may include steps 208-221.
[0089] Steps 208-221 involve concatenating the multi-dimensional vectors of predictions for the second representation.
[0090] Determining the distance may include steps 208-222.
[0091] Steps 208-222 involve concatenating the multi-dimensional vectors of the second representation.
[0092] Determining the distance may include steps 208-223.
[0093] Steps 208-223 include determining a distance in dependence on the concatenated multi-dimensional vector of the prediction for the second representation and in dependence on the concatenated multi-dimensional vector of the second representation.
[0094] Selecting the second representation includes step 208-23.
[0095] Step 208-23 involves selecting a second representation depending on the distance.
[0096] Example distance d p teeth,
number
number
number
number
[0097] For example, an entity in the knowledge graph is selected as the second entity having an expression that most closely resembles the predicted second expression.
[0098] The method includes step 210.
[0099] Step 210 includes determining links involving a first entity, a second entity, and a relationship.
[0100] The method may include step 212.
[0101] Step 212 involves using the link.
[0102] For example, the method includes determining a control signal 112 for controlling the technical system 106 depending on the link.
[0103] For example, the method includes classifying the sensor data 114 to detect the presence of objects in the sensor data 114 depending, among other things, on the links.
[0104] For example, the method includes performing link-dependent semantic segmentation on the sensor data 114, preferably relating to traffic signs, road surfaces, pedestrians, and vehicles.
[0105] For example, the method includes relying on links to analyze data 114, particularly scalar time series data.
[0106] For example, the method may include determining a state of the technical system 106 or the sensor 108 depending on the link.
[0107] The method may include receiving data 114 from the sensor 108 .
[0108] The method may include transmitting a control signal 112 to the actuator 110 .
[0109] The sensor 108 may be configured to sense data in the surroundings of the technical system 106 or data characterizing the state of the technical system 106 or the environment of the technical system 106. The sensor 108 is for example configured to capture data representative of a digital image, for example a video, radar, LiDAR, ultrasound or infrared image.
[0110] The actuator 110 may be configured to operate the technical system 106 or parts thereof.
[0111] The method may include training a model to map entities of the knowledge graph to representations of the entities in a two-dimensional hyperbolic space.
[0112] The method can include training a model to map entities to embeddings of the entities.The method can include training a model to map embeddings to a set of two-dimensional vectors.
[0113] The method may include training a model to map vectors of a collection of two-dimensional vectors into a two-dimensional hyperbolic space.
[0114] This means that a model can be constructed to map a first entity to a first representation.
[0115] This means that the model can be constructed to map a second entity to a second representation.
[0116] The method may include training a model to determine the outcome of the mapping depending on the relationship.
[0117] The method may include training a model to rotate and translate the first representation in hyperbolic space depending on the relation.
[0118] The method may include training a model to determine the second entity dependent on the prediction for the second representation and dependent on the second representation.
[0119] This means that the model can be configured to depend on a prediction about the second representation and to determine the second entity depending on the second representation.
[0120] The method may include training the model to select the second entity by the model.
[0121] This means that a model can be constructed to select a second entity depending on a first entity and a relationship.
[0122] The model may include a neural network, in particular a deep neural network.
Claims
1. 1. A computer-implemented method for determining links in a knowledge graph, comprising: the link includes a first entity, a second entity, and a relationship; In the method, The method includes determining (206) a first representation, the first representation representing an embedding of the first entity; The method includes selecting (208) a second representation from a set of representations of embeddings of entities of the knowledge graph, the second representation representing an embedding of the second entity; Selecting (208) the second representation comprises determining (208-1) a prediction for the second representation and selecting (208-2) the second representation in dependence on the prediction for the second representation; The method includes determining (210) the link involving the first entity, the second entity, and the relationship; said first representation comprises a multidimensional vector, in particular a two-dimensional vector, in a hyperbolic space, in particular a two-dimensional hyperbolic space; Determining (206) the first representation comprises partitioning (206-1) an embedding of the first entity into a first set of multi-dimensional vectors; and mapping (206-2) the vectors of the first set to the multi-dimensional vectors of the first representation depending on the relationship; Determining (208-1) the prediction for the second representation includes rotating (208-11) and translating (208-12) the multi-dimensional vector in the hyperbolic space depending on the relationship. A method comprising:
2. said prediction for said second representation comprises a multi-dimensional vector in said hyperbolic space, in particular a two-dimensional vector; said second representation comprises a multi-dimensional vector, in particular a two-dimensional vector, in said hyperbolic space; The step of selecting (208-2) the second representation comprises: Determining (208-21) a difference between the multi-dimensional vector of the second representation and the multi-dimensional vector of the prediction for the second representation, the difference being in the same hyperbolic space; determining a distance depending on said difference (208-22); selecting (208-23) said second representation in dependence on said distance; Including, The method of claim 1.
3. Determining the distance (208-22) may include: Concatenating (208-221) the multi-dimensional vectors of the predictions for the second representation; Concatenating (208-222) the multi-dimensional vectors of the second representation; and Determining the distance in dependence on the concatenated multi-dimensional vector of the prediction for the second representation and in dependence on the concatenated multi-dimensional vector of the second representation (208-223); Including, The method of claim 2.
4. Determining the first representation (206-1) includes mapping (206-2) the first set of vectors to different hyperbolic spaces.
4. The method according to claim 1 .
5. the curvature of at least one hyperbolic space of the plurality of hyperbolic spaces is defined by the relationship; 5. The method according to any one of claims 1 to 4.
6. a degree of rotation in at least one hyperbolic space of the plurality of hyperbolic spaces is defined by the relationship, 6. The method according to any one of claims 1 to 5.
7. a degree of translation in at least one hyperbolic space of the plurality of hyperbolic spaces is defined by the relationship, 7. The method according to any one of claims 1 to 6.
8. The method includes providing the relationship (204); the relationship includes, for each hyperbolic space, a degree of rotation, a degree of translation, and / or one parameter that defines the curvature of the hyperbolic space; 8. The method according to any one of claims 1 to 7.
9. The method includes determining (206) a set of embedding representations of entities of the knowledge graph; Determining 206 a set of representations of the embeddings may include: Partitioning each embedding into a set of multi-dimensional vectors (206-1); Mapping (206-2) each of the vectors of the set into a multidimensional vector of each of the representations, in particular depending on said relations; Including, 9. The method according to any one of claims 1 to 8.
10. The method comprises: mapping the first entity to the first representation depending on the relationship; mapping the second entity to the second representation in dependence on the relationship; rotating and translating said first representation in said hyperbolic space depending on said relationship; and determining the second entity in dependence on the prediction for the second representation and in dependence on the second representation, or selecting the second entity by a model; Including training the model, 10. The method according to any one of claims 1 to 9.
11. The method comprises: determining (212) a control signal (112) for controlling a technical system (106), in particular a physical system, preferably a computer-controlled machine, in particular a robotic system, a vehicle, a household appliance, a power tool, a manufacturing machine, a personal assistant or an access control system, depending on said link, or classifying (212) the sensor data (114) in particular to detect the presence of objects in the sensor data (114); or - performing (212) a semantic segmentation on the sensor data (114) depending on the link, preferably relating to traffic signs, road surfaces, pedestrians, vehicles, or - analyzing data (114), preferably from sensors (108), in particular scalar time series data, depending on said link; or determining (212) a state of the technical system (106) depending on said link; Including, 11. The method according to any one of claims 1 to 10.
12. An apparatus (100) for determining links in a knowledge graph, comprising: The device (100) comprises: At least one processor (102); At least one storage (104); Equipped with The at least one processor (102) is configured to execute instructions that, when executed by the at least one processor (102), cause the at least one processor (102) to perform a method according to any one of claims 1 to 11; The at least one storage (104) is configured to store the instructions.
1. An apparatus (100).
13. A computer program comprising computer readable instructions which, when executed by a computer, cause the computer to carry out the steps of the method according to any one of claims 1 to 12.
