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

Knowledge Graph-Enhanced Large Language Models via Path Selection

Haochen Liu, Song Wang, Yaochen Zhu, Yushun Dong, Jundong Li

Abstract

Large Language Models (LLMs) demonstrate remarkable reasoning capabilities but are prone to factual hallucinations. Integrating external Knowledge Graphs (KGs) is a common mitigation strategy, yet existing methods often struggle with selecting truly relevant multi-hop information, particularly when semantic links are indirect. We present KELP (Knowledge Graph-Enhanced Large Language Models via Path Selection), a framework that utilizes a specialized encoder to identify and rank "potentially impactful" knowledge paths from a KG. By training the selector on the actual utility of paths for LLM reasoning, KELP achieves state-of-the-art results on benchmarks like MetaQA and FACTKG, particularly in low-shot and weakly semantic scenarios.

Introduction

While models like GPT-4 have revolutionized natural language processing, their reliance on internal weights often leads to "hallucinations"—the generation of plausible-sounding but factually incorrect information. Retrieval-Augmented Generation (RAG) using Knowledge Graphs (KGs) offers a structured solution by providing explicit facts. However, current KG-LLM integration techniques face two primary hurdles: inflexibility in ranking factual relevance and "semantic blindness," where models overlook crucial but semantically distant information.

Examples of how different context types, including semantically unrelated ones, affect LLM verification accuracy.

As illustrated above, providing context—even if it seems semantically unrelated to the query keywords—can be the difference between a correct and incorrect model output. KELP addresses this by moving beyond simple keyword matching to a utility-based selection process.

The KELP Framework

The KELP framework operates through a sophisticated pipeline designed to bridge the gap between structured KG data and unstructured LLM prompts.

Methodology

  1. Knowledge Path Extraction: For any given query, KELP extracts 1-hop and 2-hop paths from the KG related to the mentioned entities. This creates a comprehensive pool of candidate facts.
  2. Path Encoding: These paths are linearized into natural language sentences. A fine-tuned DistilBERT encoder then maps both the query and the candidate paths into a shared latent space.
  3. Fine-Grained Selection: KELP employs specific coverage rules to ensure the selected paths are diverse, avoiding redundancy while maximizing the information provided to the LLM.
The KELP framework architecture, illustrating the inference and utility-based training phases.

Utility-Based Training

The core innovation of KELP is its training objective. Rather than training the encoder on simple text similarity, the authors used the LLM itself as a teacher. A path is labeled as a positive sample if its inclusion in the prompt allows the LLM to correct a previously wrong answer. This "utility-based" approach enables the encoder to learn which specific types of knowledge gaps the LLM has and which KG paths are most effective at filling them.

Experimental Evaluation

The researchers evaluated KELP against two distinct challenges:

  • MetaQA: A benchmark for multi-hop reasoning where answers are directly linked within the KG (strongly semantic).
  • FACTKG: A fact-verification task using DBpedia where claims are often not directly connected to KG entities, requiring the identification of "hidden" or indirect evidence (weakly semantic).

Key Results

KELP demonstrated superior performance and stability across both datasets:

  • MetaQA (1-hop): Achieved 97.5% accuracy in a 4-shot setting, a 2.8% improvement over the previous state-of-the-art, KG-GPT.
  • FACTKG: Showed a significant 9.0% improvement over standard LLM-based evidence retrieval, proving its effectiveness in complex, weakly semantic tasks.
  • Low-Shot Stability: Unlike many baselines that require extensive prompting to reach peak performance, KELP maintains high accuracy even with very few examples (4-shot), thanks to its precise path selection.

Discussion and Insights

The success of KELP highlights that utility is more important than similarity. In complex reasoning tasks, the "missing link" is often a fact that doesn't share keywords with the question. By using LLMs to label training data for the path selector, KELP creates a closed-loop system that specifically targets the model's factual weaknesses.

Furthermore, the introduction of Relation-Only Ranking ensures that KELP remains computationally efficient even when dealing with the dense subgraphs typical of large-scale Knowledge Graphs like DBpedia.

Conclusion

KELP represents a significant step forward in KG-enhanced LLM reasoning. By prioritizing the actual utility of knowledge paths and accounting for indirect semantic relationships, it effectively reduces hallucinations and improves multi-hop reasoning. Future work will look toward extending these capabilities to deeper paths (3+ hops) and adapting the framework for dynamic, real-time knowledge updates.

Summary updated

BibTeX
@inproceedings{liu2024knowledge,
  author = {Haochen Liu and Song Wang and Yaochen Zhu and Yushun Dong and Jundong Li},
  title = {{Knowledge Graph-Enhanced Large Language Models via Path Selection}},
  booktitle = {Annual Meeting of the Association for Computational Linguistics},
  year = {2024},
  doi = {10.18653/v1/2024.findings-acl.376},
}
Figure