Query-Enhanced Adaptive Semantic Path Reasoning for Inductive Knowledge Graph Completion

Kai Sun, Jiapu Wang, Huajie Jiang, Yongli Hu, Baocai YinarXiv 2024 · DOI

Abstract

Inductive Knowledge Graph Completion (KGC) is a critical task for maintaining dynamic AI systems, requiring models to reason about entities that were not present during the initial training phase. Existing methods often struggle with two primary hurdles: structural noise in dense graphs and a "local bias" that prevents models from capturing long-range semantic dependencies along reasoning paths. We present QASPR (Query-Enhanced Adaptive Semantic Path Reasoning), a framework that introduces query-dependent edge masking and a global semantic scoring mechanism. By adaptively filtering irrelevant structural information and evaluating reasoning paths as evolving sequences, QASPR achieves state-of-the-art results on standard inductive benchmarks like WN18RR and FB15k237.

Introduction

Knowledge Graphs (KGs) serve as the backbone for numerous AI applications, from recommendation engines to question-answering systems. However, KGs are inherently incomplete and constantly evolving. While traditional KGC methods perform well on static graphs, they fail in inductive scenarios where new entities emerge post-training.

Recent research into inductive KGC has identified two major bottlenecks. First, structural noise arises because KGs are often "small-world" networks where most nodes are only a few hops away from each other. This density leads to many irrelevant edges that can mislead a reasoning model. Second, local bias occurs when models (particularly GNN-based ones) focus solely on immediate neighbors, ignoring the broader semantic context of the entire path traveled. QASPR is designed to overcome these limitations by making the reasoning process both query-aware and globally contextualized.

Conceptual overview of query-dependent masking and path reasoning. Irrelevant edges like 'spouse' or 'friend' are masked to focus on query-relevant paths.

Methodology

The QASPR framework consists of two innovative modules that work in tandem to refine the reasoning process:

1. Query-Dependent Masking

Rather than treating the graph as a fixed structure, QASPR employs a data-driven masking strategy. The model calculates the "confidence" of logical rules—for instance, determining if a 'work_at' relation is statistically relevant to a 'president_of' query. Using a Bernoulli distribution, the model adaptively masks noisy or irrelevant edges for each specific query. This effectively "cleans" the local neighborhood, allowing the reasoner to focus on high-probability logical paths.

2. Global Semantic Scoring

Standard path-based reasoners often aggregate information from immediate neighbors in a Markovian fashion. QASPR breaks this local dependency by treating the reasoning path as an evolving sequence. It maintains a historical score of the path and integrates it with the current node's information. This global scoring allows the model to evaluate the collective impact of all relations along a path, capturing long-range dependencies that are often lost in local aggregators.

The complete QASPR framework pipeline, illustrating the iterative process of query-dependent masking and global semantic scoring across multiple neighbor orders.

To ensure efficiency, QASPR utilizes a Greedy Algorithm to select the Top-$k$ highest-scoring paths. These paths are then used to generate embeddings for emerging entities, which facilitate the final prediction of missing facts.

Experimental Evaluation

The researchers evaluated QASPR on standard inductive benchmarks derived from two prominent datasets:

  • WN18RR: A lexical relation dataset based on WordNet.
  • FB15k237: A real-world fact dataset based on Freebase.

Each dataset was split into four versions (v1 through v4), creating eight distinct experimental subsets with varying levels of entity overlap and graph density.

Key Results

QASPR achieved state-of-the-art (SOTA) performance across nearly all tested subsets. Notably, on the WN18RR(v1) dataset, QASPR reached a Mean Reciprocal Rank (MRR) of 79.4, significantly outperforming established baselines such as A*Net (72.7) and AdaProp (73.3).

Ablation studies confirmed the necessity of both core modules. Removing the masking module led to a significant performance drop, proving that filtering structural noise is as vital as the reasoning logic itself. Similarly, removing the global scoring module hindered the model's ability to handle complex, multi-hop relational paths.

Discussion and Insights

  • Contextual Relevance: QASPR demonstrates that relevance is query-specific. An edge that is vital for a biographical query may be noise for a professional one. Adaptive sparsity allows the model to navigate dense KGs without being overwhelmed.
  • Holistic Path Reasoning: The success of Global Semantic Scoring suggests that the semantic meaning of a path is emergent—it arises from the sequence of relations rather than just the final destination node.

Conclusion and Future Work

QASPR represents a significant step forward in inductive KGC by addressing the dual challenges of noise and local bias. While the current model relies on single-rule relevance for masking, future work could explore multi-hop logical rules to further refine the filtering process. Additionally, scaling the framework to industrial-sized KGs with millions of nodes remains an important frontier for future research.

Summary updated

BibTeX
@misc{sun2024query,
  author = {Kai Sun and Jiapu Wang and Huajie Jiang and Yongli Hu and Baocai Yin},
  title = {{Query-Enhanced Adaptive Semantic Path Reasoning for Inductive Knowledge Graph Completion}},
  year = {2024},
  eprint = {2406.02205},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2406.02205},
}
Figure