Knowledge Graph Query Generation via Iterative Metarule Search

Resolve Bottlenecks,
Find Innovative Solutions
Generate Solutions

Solution Overview

Problem

Writing a query for selecting data from a knowledge graph is a time-consuming and error-prone task due to the complexity of finding the optimal solution in the NP-hard problem space of inductive logic programming (ILP) algorithms, which requires exhaustive search and lacks efficient methods to reduce the search space effectively.

Innovation Solution

A computer-implemented method that iteratively queries a knowledge graph using a test metarule, controlling its development based on responses to queries, to determine a knowledge graph query that conforms to training samples by reducing the search space through permutation reduction and heuristic prioritization, ultimately computing a query that matches positive samples and excludes negative samples.

Engineering Contradictions & Design Principles

VSEngineering Contradiction Analysis

1Measurement precision

If conventional ILP algorithms are used to compute knowledge graph queries, then the queries can be derived through exhaustive search, but the computational complexity becomes exponential and the process is time-consuming

Engineering Contradiction:
Improvequery accuracyVSAvoidquery computation time
Core Design Contradiction:
Measurement precisionVSLoss of time

Solution Approach 1:

The patent segments the exhaustive search space into multiple search buckets organized by depth levels. Instead of searching all possible queries simultaneously, the algorithm divides the search into manageable segments (buckets) that can be processed iteratively, reducing the computational burden at each step while maintaining completeness of the search.

Inventive Principle:
Principle #1Segmentation

Solution Approach 2:

The patent performs preliminary actions by pre-computing and storing search buckets before the actual query derivation. The search buckets are prepared in advance with organized depth levels and candidate queries, allowing the algorithm to efficiently retrieve and evaluate candidates without performing exhaustive search during the query computation phase.

Inventive Principle:
Principle #10Preliminary action

2Productivity

If the search space is reduced using combinatorial search, then the number of queries decreases, but the algorithm may miss optimal solutions

Engineering Contradiction:
Improvequery derivation efficiencyVSAvoidsolution optimality
Core Design Contradiction:
ProductivityVSReliability

Solution Approach 1:

The patent employs dynamic programming to maintain and update optimal sub-solutions as the search progresses through different depth levels. The algorithm dynamically adjusts the search state by storing the best queries found at each depth level and using this information to guide subsequent search steps, ensuring that optimality is preserved while reducing the search space.

Inventive Principle:
Principle #15Dynamics

Solution Approach 2:

The algorithm incorporates feedback mechanisms where the results from evaluating candidate queries at each depth level are fed back into the search process. This feedback guides the selection and generation of subsequent candidate queries, allowing the algorithm to learn from previous evaluations and focus the search on more promising regions of the search space while maintaining solution quality.

Inventive Principle:
Principle #23Feedback

3Measurement precision

If more queries are executed to ensure accuracy with training samples, then the conformance improves, but the computational resources and time required increase

Engineering Contradiction:
Improvetraining sample conformanceVSAvoidcomputational energy consumption
Core Design Contradiction:
Measurement precisionVSUse of energy by moving object

Solution Approach 1:

The patent applies partial action by evaluating only the necessary subset of candidate queries at each depth level rather than exhaustively evaluating all possible queries. The algorithm selectively processes queries that have the potential to improve conformance with training samples, avoiding the computational waste of evaluating queries that cannot contribute to the solution.

Inventive Principle:
Principle #16Partial or excessive action

Solution Approach 2:

The algorithm changes parameters by organizing the search space according to depth levels and using this parameterization to control the evaluation process. By structuring the search around depth parameters and using dynamic programming to track progress at each level, the algorithm efficiently determines when sufficient conformance has been achieved without requiring exhaustive evaluation of all possible queries.

Inventive Principle:
Principle #35Parameter changes

Data Source

PatentUS11841850B2Determining a knowledge graph query having a response conforming to training samples
Publication Date: 2023.12.12 SAP SE
  • US11841850B2 patent drawing
  • US11841850B2 patent drawing
  • US11841850B2 patent drawing

AI summary

Provided are a computer-implemented method, a computer program and a system for determining a knowledge graph query having a response conforming to a plurality of training samples. The method may comprise receiving a knowledge graph; receiving the training samples, wherein each of the training samples is a relation, wherein each value in the training samples corresponds to one of the nodes of the knowledge graph, wherein the training samples include one or more positive training samples and one or more negative training samples; identifying one or more variables from the training samples. The method may further comprise determining a plurality of relations, wherein each of the relations includes a plurality of symbols, the symbols including the identified variables; determining a test metarule, the test metarule including a first relation from the plurality of relations; iteratively querying the knowledge graph using the test metarule and controlling development of the test metarule according to responses to the queries. Each of the responses may be one of the following: NOKP, which is returned when the test metarule does not match all of the positive training samples, OKP, which is returned when the test metarule matches all of the positive training samples but does not exclude all of the negative training samples; OKPN, which is returned when the test metarule matches all of the positive training samples and excludes all of the negative training samples. When the response to the querying is OKPN, the method may further comprise ending the querying and using the developed test metarule as a final metarule; and computing the knowledge graph query having a response conforming to the training samples from the final metarule.