Retrieval, Reasoning, Re-ranking: A Context-Enriched Framework for Knowledge Graph Completion

Muzhi Li, Cehao Yang, Chengjin Xu, Xuhui Jiang, Yiyan Qi, Jian Guo, Ho-fung Leung, Irwin King

Abstract

Knowledge Graph Completion (KGC) is critical for addressing the inherent incompleteness of structured knowledge bases. Traditional methods often struggle with the semantic gap between structured IDs and natural language or fail to leverage the full reasoning capabilities of Large Language Models (LLMs). We present KGR³, a three-stage framework—Retrieval, Reasoning, and Re-ranking—that bridges this gap by enriching structured graph data with textual context from Wikidata. KGR³ acts as a plug-and-play enhancer for existing KGC models, achieving state-of-the-art performance on benchmark datasets, including a massive 12.3% absolute improvement in Hits@1 on the FB15k237 dataset.

Introduction

Knowledge Graphs (KGs) such as Freebase and WordNet serve as foundational structures for various AI applications but are frequently incomplete. The task of KGC involves predicting missing links, such as identifying the team for a specific athlete (e.g., (Kasper Schmeichel, plays_for, ?)).

Existing methodologies generally fall into three categories:

  1. Embedding-based methods: These represent entities as vectors but often ignore semantic meaning and struggle with rare data.
  2. Text-based methods: These use language models for entity descriptions but face a significant "semantic gap" between structured IDs and natural language.
  3. LLM-based methods: While powerful, these can hallucinate or lack specific context for niche entities.

KGR³ addresses these challenges by effectively fusing structural graph data with rich textual descriptions, creating a "semantic bridge" that allows LLMs to reason accurately about KGs.

Methodology

The KGR³ framework is a "plug-and-play" enhancer designed to improve any existing KGC model through a modular three-stage process:

  1. Stage 1: Retrieval: This stage gathers structural "supporting triples" and textual context (labels, aliases, and descriptions) mapped from Wikidata. It also utilizes a "base" KGC model (like RotatE or NBF-Net) to generate an initial list of the top-N most likely candidates.
  2. Stage 2: Reasoning: An LLM (such as Llama-3 or GPT-3.5) is prompted with the retrieved context and in-context demonstrations to generate potential answers based on its internal knowledge and the provided text.
  3. Stage 3: Re-ranking: The candidate lists are merged and processed by an LLM fine-tuned via Supervised Fine-Tuning (SFT) with LoRA. This model acts as a final judge, selecting the best fit by analyzing the descriptions of all candidates.
The three-stage KGR³ framework: Retrieval, Reasoning, and Re-ranking.

Experimental Setup

The framework was evaluated on two gold-standard KGC benchmarks:

  • FB15k237: A subset of Freebase containing general world knowledge (celebrities, movies, sports).
  • WN18RR: A subset of WordNet focused on lexical relationships between English words.

Results and Discussion

Experimental results demonstrate that KGR³ consistently outperforms existing baselines across both datasets. The framework provides a significant boost to various base models, regardless of whether they are embedding-based or GNN-based.

Performance comparison of KGR³ against various KGC baselines on FB15k237 and WN18RR.

Key findings include:

  • State-of-the-Art Performance: KGR³ achieved Hits@1 improvements of 12.3% on FB15k237 and 5.6% on WN18RR over previous leading methods.
  • Efficiency: Smaller models, such as the 1.5B parameter Qwen2, produced highly competitive results, suggesting the framework's viability even with limited computational resources.
  • Importance of Context: Providing simple descriptions (e.g., "Kasper Schmeichel is a Danish professional footballer") is crucial for allowing LLMs to connect structured triples to their pre-trained knowledge.

Conclusion and Future Work

KGR³ represents a significant advancement in KGC by leveraging the semantic power of LLMs through a context-enriched pipeline. While the current framework operates in a transductive setting, future research will focus on adapting KGR³ for inductive KGC—where new entities appear at test time—and more complex multi-hop reasoning tasks.

Summary updated

BibTeX
@inproceedings{li2025retrieval,
  author = {Muzhi Li and Cehao Yang and Chengjin Xu and Xuhui Jiang and Yiyan Qi and Jian Guo and Ho-fung Leung and Irwin King},
  title = {{Retrieval, Reasoning, Re-ranking: A Context-Enriched Framework for Knowledge Graph Completion}},
  booktitle = {Conference of the North American Chapter of the Association for Computational Linguistics},
  year = {2025},
  doi = {10.18653/v1/2025.naacl-long.221},
}
Figure