NeurIPS 2026Coming to NeurIPS?Explore papers, orals & directions

Anchoring Path for Inductive Relation Prediction in Knowledge Graphs

Zhixiang Su, Di Wang, Chunyan Miao, Lizhen Cui

Abstract

Knowledge Graphs (KGs) are essential for structured data representation but frequently suffer from incompleteness. Traditional path-based reasoning methods rely on "Closed Paths" to infer missing relations, which often fail in sparse graphs or inductive settings where entities are previously unseen. This paper introduces the Anchoring Path Sentence Transformer (APST), a novel framework that leverages "Anchoring Paths"—logical chains anchored to a single entity—combined with rich external text descriptions retrieved via search. By transforming these paths into natural language and utilizing a pre-trained Sentence Transformer, APST treats relation prediction as a semantic similarity task. Experimental results demonstrate that APST achieves state-of-the-art performance in 30 out of 36 settings across standard benchmarks, showing significant improvements in both transductive and inductive scenarios.

Introduction

Knowledge Graphs (KGs) store facts as triplets (head entity, relation, tail entity). Despite their utility, they are often incomplete. Relation prediction aims to fill these gaps. A common approach is path-based reasoning, which seeks a "Closed Path" (CP) connecting the head and tail entities to justify a relationship. For instance, to predict if Morgan Freeman is an Actor, a model might find a path through a movie he performed in and its genre. However, in real-world, sparse KGs, these closed loops often do not exist. Furthermore, many models fail at inductive prediction—reasoning about entities not seen during training—and lack explainability.

Figure 1: Knowledge Graph example illustrating relations and potential anchoring paths for entities like Morgan Freeman.

Methodology

The proposed Anchoring Path Sentence Transformer (APST) addresses these limitations by moving beyond the reliance on closed loops. The core innovations include:

  1. Anchoring Paths (APs): Unlike CPs that must connect the head to the tail, APs "anchor" to just one entity. This captures contextual evidence even when a full path to the target entity is missing.
  2. Search-Based Description Retrieval: To overcome sparse entity descriptions, the authors use the Google Custom Search API to fetch detailed Wikipedia and Wiktionary content, providing deep semantic grounding.
  3. AP Filtering: To ensure quality, paths are filtered based on their "rationality"—a metric reflecting how often a specific relation chain leads to correct answers in training data.
  4. Unified Sentence Transformer: Query triplets and filtered paths are converted into natural language sentences. A pre-trained Sentence Transformer (all-mpnet-base-v2) encodes these into embeddings, and cosine similarity is used to score and aggregate predictions.
Figure 2: The APST framework architecture, detailing the pipeline from path extraction to aggregated scoring.

Results and Discussion

APST was evaluated on three benchmark datasets—WN18RR, FB15k-237, and NELL-995—across transductive, inductive, and few-shot settings. The model achieved State-of-the-Art (SOTA) performance in 30 out of 36 experimental configurations.

Key findings include:

  • Significant Performance Gains: On the FB15k-237 transductive set, APST improved the Mean Reciprocal Rank (MRR) by +0.054 over previous leading models.
  • Inductive Strength: In inductive settings, APST significantly outperformed previous models like KRST, particularly on lexical (WN18RR) and general knowledge (FB15k-237) datasets.
  • Few-Shot Efficiency: The model's reliance on a pre-trained language backbone makes it highly efficient in few-shot scenarios, maintaining robustness even with minimal training triplets.

Conclusion

APST demonstrates that semantic context and "open" logical paths can effectively substitute for rigid graph connectivity in KG reasoning. By grounding graph structures in natural language, the model achieves superior performance and better explainability. While the model showed slight limitations on niche entities in NELL-995 due to description alignment, future work will focus on refining retrieval and optimizing the architecture for massive, enterprise-scale knowledge graphs.

Summary updated

BibTeX
@inproceedings{su2024anchoring,
  author = {Zhixiang Su and Di Wang and Chunyan Miao and Lizhen Cui},
  title = {{Anchoring Path for Inductive Relation Prediction in Knowledge Graphs}},
  booktitle = {AAAI Conference on Artificial Intelligence},
  year = {2024},
  doi = {10.1609/aaai.v38i8.28750},
}
Figure