Devices, data structures, and computer-implemented methods for responding to primary logical queries based on a knowledge graph.

The method uses cone embeddings and rotation operations within a directed acyclic computation graph to address the challenge of complex logical queries in knowledge graphs, improving response accuracy and efficiency by defining and applying rotation operations.

JP2026069495APending Publication Date: 2026-04-23ROBERT BOSCH GMBH
View PDF 0 Cites 0 Cited by

Patent Information

Authority / Receiving Office
JP · JP
Patent Type
Applications
Current Assignee / Owner
ROBERT BOSCH GMBH
Filing Date
2025-10-10
Publication Date
2026-04-23

AI Technical Summary

Technical Problem

Existing technologies face challenges in efficiently responding to complex logical queries on incomplete knowledge graphs by accurately identifying relevant entities and relationships, and performing inference to generate responses.

Method used

A computer-implemented method utilizing cone embeddings and rotation operations in a complex embedding space, combined with a directed acyclic computation graph, to efficiently determine responses to logical queries by defining rotation operations and applying them in a specified order, along with training and testing mechanisms to refine embeddings.

Benefits of technology

This approach enhances the accuracy and efficiency of responding to logical queries by leveraging well-specified geometric representations and powerful algebraic operations, enabling precise identification of entities and relationships in knowledge graphs.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure 2026069495000001_ABST
    Figure 2026069495000001_ABST
Patent Text Reader

Abstract

This provides a computer-implemented method for responding to primary logical queries based on a knowledge graph. [Solution] The method includes supplying a knowledge graph and a primary logical query (302). The logical query defines logical operations on a first triplet and a second triplet. The method also includes, depending on the logical query, determining a directed acyclic computation graph in particular for the logical query (304). The computation graph defines the order in which rotation operations are performed. The method further includes determining a response to the logical query (306). Determining the response includes applying rotation operations to cone embeddings in the order defined by the computation graph.
Need to check novelty before this filing date? Find Prior Art

Description

[Technical Field]

[0001] The present invention relates to a device, data structure, and computer-implemented method for responding to primary logical queries based on a knowledge graph. [Background technology]

[0002] background A complex query response via an incomplete knowledge graph requires inference through the available information in the knowledge graph to generate a response to a complex logical query. The task includes identifying the relevant entities and relationships in the knowledge graph required for the response to the query, and performing inference about the connections between them. [Overview of the project] [Problems that the invention aims to solve]

[0003] Disclosure of the invention A device and a computer-implemented method for responding to primary logical queries based on a knowledge graph efficiently provide responses. [Means for solving the problem]

[0004] A computer-implemented method for responding to a primary logical query based on a knowledge graph comprises supplying a knowledge graph and a primary logical query, the logical query defining a logical operation on a first triplet and a second triplet, the first triplet comprising a cone embedding representing a first set containing at least one entity of the knowledge graph, a cone embedding representing a second set containing at least one entity of the knowledge graph, and an embedding of a rotation operation between the two cone embeddings of the first triplet into a complex embedding space, the second triplet representing a third set containing at least one entity of the knowledge graph The method includes a cone embedding, a cone embedding representing a fourth set containing at least one entity of the knowledge graph, and a second triplet embedding of a rotation operation between two cone embeddings into a complex embedding space, wherein one of the cone embeddings represents a response to a logical query, and, depending on the logical query, determines a directed acyclic computation graph for the logical query, the computation graph defining the order in which rotation operations are performed, and determining the response to the logical query, which includes applying rotation operations to the cone embedding in the order defined by the computation graph. This combines the advantages of cone embeddings as well-specified geometric representations for query embeddings with the advantages of rotation operations as powerful algebraic operations for pattern inference. The method defines each relation as a rotation from a source entity set to a response / intermediate entity set and performs neural logical operators on a selected set of entities in the complex vector space of the cone embeddings.

[0005] Regarding training, this method may include supplying a logical query along with cone embeddings of ground truth response entities, and training at least a portion of the embeddings depending on the distance between the cone embeddings of ground truth response entities and the cone embeddings representing the response to the logical query, in particular to minimize the distance.

[0006] Regarding training, this method may include supplying logical queries along with negative samples, and training at least a portion of the embeddings depending on the distance between the negative samples and the cone embeddings that represent the response to the logical queries, particularly in order to maximize the distance.

[0007] Regarding the testing, the method may include supplying a logical query that includes entity cone embeddings for a given entity in a knowledge graph; supplying a given ground truth cone embedding for a given response entity associated with a given entity; determining a response to the logical query that includes entity cone embeddings for a given entity; and testing the rotational embeddings depending on the distance between the response that includes entity cone embeddings for a given entity and the cone embedding of a given ground truth cone embedding for a given response entity, as determined for the logical query.

[0008] Determining a response involves determining one or more entities in the knowledge graph that are the response to the logical query, relying on cone embeddings that represent the response to the logical query. This means that the entities in the knowledge graph that are valid responses according to this method are supplied.

[0009] A device that responds to primary logical queries based on a knowledge graph comprises at least one processor and at least one memory, wherein the at least one memory is configured to store instructions for causing the device to perform a method when executed by at least one processor, and the at least one processor is configured to execute said instructions.

[0010] A computer program for responding to primary logical queries based on a knowledge graph includes instructions for causing a computer to perform a method when executed by the computer.

[0011] A data structure for responding to a primary logical query based on a knowledge graph includes at least one data field for the knowledge graph or an embedding of the knowledge graph, and at least one data field for the primary logical query or an embedding of the primary logical query, wherein the logical query defines a logical operation on a first triplet and a second triplet, the first triplet including a cone embedding representing a first set containing at least one entity of the knowledge graph, a cone embedding representing a second set containing at least one entity of the knowledge graph, and an embedding of a rotation operation between the two cone embeddings of the first triplet into a complex embedding space, the second triplet being the knowledge graph The cone embeddings include a third set representing at least one entity of a knowledge graph, a fourth set representing at least one entity of a knowledge graph, and a second triplet embedding of a rotation operation between two cone embeddings into a complex embedding space, one of which cone embeddings may include at least one data field representing a response to a logical query, and at least one data field for a directed acyclic computation graph to a logical query, in particular for a logical query, which depends on an embedding of a logical query or computation graph, the computation graph may include at least one data field defining the order in which rotation operations are performed, and at least one data field for the response to the logical query.

[0012] For training, the data structure may include at least one data field for cone embedding of ground truth response entities and at least one data field for the distance between the cone embedding of the ground truth response entity and the cone embedding representing the response to the logical query.

[0013] For a test, the data structure includes at least one data field for the result of testing the embedding of a rotation operation depending on the distance between a response determined for a logical query including the entity cone embedding of a given entity and the cone embedding of the given ground truth cone of a given response entity.

[0014] Further examples can be obtained from the following description and drawings. The drawings show the following.

Brief Description of the Drawings

[0015] [Figure 1] A diagram schematically showing an apparatus for responding to a first-order logical query based on a knowledge graph. [Figure 2a] A diagram schematically showing the modeling of a symmetric relationship. [Figure 2b] A diagram schematically showing the modeling of an inversion. [Figure 2c] A diagram schematically showing the modeling of a composition. [Figure 3] A flowchart showing the steps of a method for responding to a first-order logical query based on a knowledge graph. [Figure 4] A diagram schematically showing a data structure for responding to a first-order logical query based on a knowledge graph.

Modes for Carrying Out the Invention

[0016] In FIG. 1, an apparatus 100 for responding to a first-order logical query based on a knowledge graph is schematically shown.

[0017] The apparatus 100 includes at least one processor 102 and at least one memory 104.

[0018] At least one processor 102 is configured to execute instructions that, when executed by the at least one processor 102, cause the apparatus 100 to implement a method for responding to a first-order logical query based on a knowledge graph.

[0019] At least one memory 104 is configured to store each instruction. The at least one memory 104 is configured to store a knowledge graph.

[0020] The knowledge graph includes entities and relationships. An exemplary knowledge graph G includes a set V of entities (vertices) and a set E of relationships (edges).

[0021] An exemplary knowledge graph is defined as a set of fact triples

Number

Number

Number

Number

[0022] An exemplary first-order logical query q[V?] represents, respectively, a variable V? representing a response entity from the knowledge graph G, a variable V representing an entity from the knowledge graph G, or a variable V representing one entity from the knowledge graph G iEach example of a primary logical query q[V?] includes an entity constant representing an entity from the knowledge graph G, or an entity constant representing a single entity from the knowledge graph G. Each example of a primary logical query q[V?] includes a relation constant representing a relationship from the knowledge graph G, or a relation constant representing a single relationship from the knowledge graph G.

[0023] The first-order logical query q[V?] contains a triplet.

[0024] Each triplet in the primary logical query q[V?] may contain one constant representing a relationship from the knowledge graph G, a first variable representing an entity from the knowledge graph G, and a second variable representing an entity from the knowledge graph G.

[0025] A first-order logical query q[V?] contains a logical operation on a triplet. A first-order logical query q[V?] can, for example, define a logical operation on a triplet using existential quantification.

number

number

number

number

number

[0026] An example of representing a first-order logical query q[V?] is the disjunctive normal form (DNF) described in "Introduction to lattices and order" by Davey, BA and Priestley, HA, Cambridge University Press, 2002.

[0027] DNF represents a linear logical query q[V?] as a junction and disjunction. Here,

number

[0028] In disjunctive normal form, a first-order logical query q is:

number

number

number

[0029] Relational function

number

Number

Number

[0030] Responding to a first-order logic query q[V?] involves searching the entity set

Number

Number

[0031] The entity set

Number

[0032] Logical operators are mapped to the edges of the computational graph according to the following rules.

[0033] The entity set

Number

number

number

number

[0034] The merging operator is mapped to the intersection operator I. n entity sets {S1, S2, ..., S n Given}, the intersection operator I performs a set intersection,

number

[0035] The disjunction operator is mapped to the UNION operator U. n entity sets {S1, S2, ..., S n Given}, the UNION operator U performs a set union,

number

[0036] The negation operator is mapped to the complement operator C. Entity set

number

number

[0037] Responding to a primary logical query q[V?] is the entity set

number

[0038] Entity Set

number

number

[0039] Entity Set

number

number

number

number

number

[0040] Relationships within the Knowledge Graph G can form specific patterns. These relationships can be symmetrical or antisymmetrical. Some relationships may be inverses of others.

[0041] Responding to a linear logical query q[V?] involves modeling the linear logical query q[V?] as a rotation operation on a cone embedding, or as a continuous rotation operation on a cone embedding in complex space. An example of a rotation operation is described in "2019. Rotate: Knowledge graph embedding by relational rotation in complex space. CoRR, abs / 1902.10197" by Zhiqing Sun, Zhi-Hong Deng, Jian-Yun Nie, and Jian Tang.

[0042] An example of the first cone 200 is upper limit

number

number

[0043] Figure 2a shows the first cone 200 and the upper limit

number

number

[0044] Figure 2b shows a modeling of the inversion between the first cone 200 and the second cone 200'. The inversion is modeled by a first counterclockwise rotation r1 from the first cone 200 to the second cone 200'. The inversion is modeled by a second counterclockwise rotation r2 from the second cone 200' to the first cone 200.

[0045] Figure 2c shows a model of the synthesis from the first cone 200 and the second cone 200' to the third cone 200''. The synthesis is modeled by a first counterclockwise rotation r1 from the first cone 200 to the second cone 200'. The synthesis is modeled by a second counterclockwise rotation r2 from the second cone 200' to the third cone 200''. The synthesis is modeled by a third counterclockwise rotation r3 from the first cone 200 to the third cone 200''.

[0046] Figure 3 shows a flowchart that includes the steps of this method.

[0047] This method includes step 302.

[0048] Step 302 includes supplying a primary logical query q[V?] and a knowledge graph G.

[0049] This method is explained as an example of a linear logical query q[V?] including a logical operation between a first triplet (h1, r1, t1) and a second triplet (h2, r2, t2), such as a tangent, where h1 and h2 represent the respective cone embeddings at the heads of the respective triplets, r1 and r2 represent the respective rotation operations of the respective triplets, and t1 and t2 represent the respective rotated cone embeddings at the tails of the respective triplets.

[0050] The head of the first triplet (h1, r1, t1) contains a cone embedding of a single constant entity in the knowledge graph G.

[0051] The tail of the first triplet (h1, r1, t1) contains cone embeddings of variables V that represent entities in the knowledge graph G.

[0052] The head of the second triplet (h2, r2, t2) contains a cone embedding of a variable V? that represents the response entity of the knowledge graph G.

[0053] The tail of the second triplet (h2, r2, t2) contains cone embeddings of variables V that represent entities in the knowledge graph G.

[0054] The first-order logical query q[V?] defines a condition for the variable V?, which represents a response entity from the knowledge graph G. In this example, an entity from the knowledge graph G becomes a valid response entity when the condition is met.

[0055] The relationships between each triplet in the first-order logical query q[V?] define the respective rotation operations for the cone embeddings that represent each head of each triplet.

[0056] The relationships between each triplet include, for example, the embedding of each rotation operation.

[0057] This method includes step 304.

[0058] Step 304 involves determining the computation graph for the first-order logical query q[V?] based on logical operations.

[0059] The computation graph for the first-order logical query q[V?] defines the order in which rotation operations are performed.

[0060] According to an example of a linear logical query q[V?] that includes the confluence of the first triplet (h1,r1,t1) and the second triplet (h2,r2,t2), the computation graph defines that cone embedding t1 is determined by rotating cone embedding h1 by rotation operation r1, and cone embedding t2 is determined by rotating cone embedding h2 by rotation operation r2.

[0061] In this example, the computation graph is a directed acyclic graph tree. Logical operations are executed in the order defined by the directed acyclic graph tree.

[0062] This is explained as an example of the merging of a first triplet (h1, r1, t1) and a second triplet (h2, r2, t2), where the head h1 of the first triplet is a constant representing an entity in the knowledge graph G, the tail t1 of the first triplet is a variable V representing an entity in the knowledge graph G, the head h2 of the second triplet is a variable V? representing a response entity from the knowledge graph G, and the tail t2 of the second triplet is a variable V representing an entity in the knowledge graph G.

[0063] The computation graph is an acyclic graph tree containing an anchor node, intermediate nodes representing the variable V, and the head h1 of the first triplet as a response node representing the variable V?.

[0064] The computation graph includes tree relationships between anchor nodes and intermediate nodes that define rotations according to relation r1 or rotations according to relation r1 in the first triplet. The computation graph also includes tree relationships between intermediate nodes and response nodes that define rotations according to relation r2 in the second triplet. Each tree relationship defines, for example, a counterclockwise rotation for symmetry, inversion, or composition.

[0065] The result of the rotation according to relation r1 in the first triplet is a cone embedding representing the first set of entities from the knowledge graph G. The result of the rotation according to relation r2 in the second triplet is a cone embedding representing the second set of entities from the knowledge graph G. The tangent defines that the rotation according to relation r2 in the second triplet is performed on the cone embedding representing the first set of entities.

[0066] This method includes step 306.

[0067] Step 306 involves determining the response to the first logical query q[V?] by applying rotation operations to the cone embeddings in the order defined by the computation graph.

[0068] To determine the response to the first logical query q[V?], for example, a cone embedding is found for the head h2 of the second triplet representing the response entity, i.e., V?.

[0069] This method includes step 308.

[0070] Step 308 involves training.

[0071] For training, a primary logical query q[V?] is supplied along with a cone embedding of the ground truth response entity. The cone embedding of the ground truth response entity may be a cone with aperture Zero, i.e., identical to the upper and lower bounds of the cone embedding representing the response entity.

[0072] For training, the distance between the upper and lower limits of the found cone embeddings and the cone embeddings of the ground truth response entities is minimized.

[0073] This distance is minimized, for example, by embedding anchor node entities or rotation operations, i.e., by learning the parameters that define the rotation operations.

[0074] For example, a logical query is supplied along with cone embeddings of ground truth response entities. Then, at least a portion of the embeddings are learned depending on the distance between the cone embeddings of the ground truth response entities and the cone embeddings that represent the response to the logical query. Training includes, for example, learning the embeddings that minimize the distance.

[0075] Training may include supplying negative samples and maximizing the distance between the embedding representing the response and the negative samples.

[0076] This method includes step 310.

[0077] Step 310 involves testing.

[0078] For the test, a logical operator parameterized by parameters from training is executed along a computation graph that starts with learned embeddings of anchor node entities.

[0079] The training includes, for example, learning to respond to a first-order logical query q[V?] input, which includes a knowledge graph G and a first-order logical query q[V?]. The multilayer perceptron network can be trained to select a response entity from the knowledge graph G depending on the input.

[0080] A multilayer perceptron network is learned, for example, from a low-dimensional vector representation of the input.

[0081] The response entity for a primary logical query is determined, for example, by a multilayer perceptron network trained to select a response entity from a knowledge graph G depending on the input.

[0082] Figure 4 schematically shows a data structure 400 for responding to primary logical queries based on a knowledge graph.

[0083] Data structure 400 is, At least one data field 402 for the knowledge graph, At least one data field 402 for a primary logical query, In particular, at least one data field 402 for a directed acyclic computation graph, At least one data field 402 for the response to a logical query and / or its embedding, Includes.

[0084] The data structure 400 may include at least one data field 402 for cone embedding of ground truth response entities, and at least one data field 402 for the distance between the cone embedding of ground truth response entities and the cone embedding representing the response to the logical query.

[0085] The data structure 400 may include at least one data field 402 for the result of testing the rotational embeddings, depending on the distance between the response determined for a logical query that includes entity cone embeddings of a given entity and the cone embeddings of a given ground truth cone embedding of a given response entity.

[0086] The result is either pass, fail, or a digital indication thereof.

Claims

1. A computer-implemented method for responding to primary logical queries based on a knowledge graph, The aforementioned method, (302) Providing the knowledge graph and the primary logical query, wherein the logical query defines a logical operation on a first triplet and a second triplet, the first triplet includes a cone embedding representing a first set containing at least one entity of the knowledge graph, a cone embedding representing a second set containing at least one entity of the knowledge graph, and an embedding of a rotation operation between the two cone embeddings of the first triplet into a complex embedding space, the second triplet includes a cone embedding representing a third set containing at least one entity of the knowledge graph, a cone embedding representing a fourth set containing at least one entity of the knowledge graph, and an embedding of a rotation operation between the two cone embeddings of the second triplet into a complex embedding space, and one of the cone embeddings represents a response to the logical query. (304) A directed acyclic computation graph is determined depending on the logical query, in particular for the logical query, wherein the computation graph defines the order in which the rotation operations are performed. Determining a response to the logical query (306), wherein determining the response includes applying the rotation operation to the cone embedding in an order defined by the computation graph (306), including, A method characterized by the following:

2. The aforementioned method, The aforementioned logical query is supplied along with the cone embedding of the ground truth response entity, Training at least a portion of the embeddings, depending on the distance between the cone embedding of the ground truth response entity and the cone embedding representing the response to the logical query, particularly to minimize that distance, The method according to claim 1, including the method described in claim 1.

3. The aforementioned method, The aforementioned logical query is supplied along with negative samples, Training at least a portion of the embeddings, depending on the distance between the negative sample and the cone embedding that represents the response to the logical query, particularly to maximize that distance, The method according to claim 1 or 2, including the method described in claim 1 or 2.

4. The aforementioned method, To supply a logical query that includes embedding an entity cone for a given entity in the aforementioned knowledge graph, To provide a given ground truth cone embedding of a given response entity associated with the given entity, Determining the response to a logical query that includes the entity cone embedding of the given entity, Testing the rotational embeddings depending on the distance between the response, which includes the entity cone embedding of the given entity, and the cone embedding of the given ground truth cone embedding of the given response entity, determined for the logical query, The method according to claim 2 or 3, including the method described in claim 2 or 3.

5. The method according to any one of claims 1 to 4, wherein determining the response involves determining one or more entities in the knowledge graph that are the response to the logical query, depending on cone embeddings that represent the response to the logical query.

6. A device (100) for responding to primary logical queries based on a knowledge graph, The aforementioned device (100) At least one processor (102), At least one memory (104), Equipped with, The at least one memory (104) is configured to store instructions for causing the device (100) to perform the method according to any one of claims 1 to 5 when executed by the at least one processor (102), The at least one processor (102) is configured to execute the instruction. A device (100) characterized by the following.

7. A computer program for responding to primary logical queries based on a knowledge graph, The computer program, when executed by a computer, includes instructions to cause the computer to perform the method described in any one of claims 1 to 5. A computer program characterized by the following features.

8. A data structure (400) for responding to a primary logical query based on a knowledge graph, The aforementioned data structure (400) is A knowledge graph or at least one data field (402) for embedding a knowledge graph, At least one data field (402) for the primary logical query or for embedding the primary logical query, wherein the logical query defines a logical operation on a first triplet and a second triplet, the first triplet includes a cone embedding representing a first set containing at least one entity of the knowledge graph, a cone embedding representing a second set containing at least one entity of the knowledge graph, and an embedding of a rotation operation between the two cone embeddings of the first triplet into a complex embedding space, the second triplet includes a cone embedding representing a third set containing at least one entity of the knowledge graph, a cone embedding representing a fourth set containing at least one entity of the knowledge graph, and an embedding of a rotation operation between the two cone embeddings of the second triplet into a complex embedding space, and one of the cone embeddings includes at least one data field (402) representing the response to the logical query, A data field (402) for a directed acyclic computation graph for the logical query, which depends on the embedding of the logical query or computation graph, The calculation graph includes at least one data field (402) that defines the order in which rotation operations are performed, At least one data field (402) for the response to the logical query, including, A data structure (400) characterized by the following.

9. The aforementioned data structure (400) is At least one data field (402) for cone embedding of ground truth response entities, A data field (402) for the distance between the cone embedding of the ground truth response entity and the cone embedding representing the response to the logical query, The data structure (400) according to claim 8, including the above.

10. The aforementioned data structure (400) is The data structure (400) according to claim 8 or 9, comprising at least one data field (402) for the result of testing the embedding of the rotation operation, depending on the distance between the response determined for the logical query including the entity cone embedding of the given entity and the cone embedding of the given ground truth cone embedding of the given response entity.