Mitigating Hallucinations in Knowledge Graph Completion via Embedding-Guided Instruction Tuning

Pengfei Zhang, Xing Xu, Junying Wu, Xin Lu, Jiahao Shi, Xi Zhang, Dezhi Cui, Xiuxian Peng, Sihao He, Ping Zong, G. Zhang, Zhonghong Ou, Meina Song, Yifan ZhuInformation 2026

TL;DR

This paper introduces EGIT, a novel framework that tackles the "hallucination" problem in Knowledge Graph Completion (KGC) by combining the structural accuracy of traditional embedding models with the semantic reasoning power of Large Language Models (LLMs). EGIT achieves this by using embedding models to generate structured training data for LLMs and then employing a "retrieve-then-rerank" inference strategy, leading to significant performance improvements and reduced hallucinations.

What Problem Does This Paper Address?

Knowledge Graphs (KGs) are powerful tools for representing structured information, but they are often incomplete. Knowledge Graph Completion (KGC) aims to fill these gaps by predicting missing links. While Large Language Models (LLMs) excel at semantic understanding, directly applying them to KGC leads to a critical issue: hallucinations. LLMs, trained on open-world data, tend to generate plausible but factually incorrect entities that don't adhere to the strict, closed-world structure of KGs. This mismatch causes LLMs to "hallucinate" entities or relations that don't exist in the KG, undermining the reliability of KGC. Existing methods struggle to bridge this gap, either relying on limited in-context learning or failing to fully integrate structural information during LLM training.

Methods

EGIT proposes a three-stage pipeline to address these challenges:

  1. Embedding-Guided Data Synthesis: Instead of manual annotation, EGIT leverages pre-trained Knowledge Graph Embedding (KGE) models (like TransE, SimKGC) to act as a "structural anchor." These KGE models identify both correct entities and "hard negatives" (plausible but incorrect entities) for incomplete triples. This information is then used to automatically generate high-quality, structure-aware instruction data for LLMs, transforming the task into a more constrained discrimination problem.
  2. Structure-Aware Instruction Tuning: The synthesized data is used to fine-tune an LLM. This stage introduces two key innovations:
  3. Structural Token Initialization: Special tokens (e.g., [ENTITY]) are initialized with the centroid of their semantic class, providing a clear semantic anchor and preventing the LLM from misinterpreting them as part of the answer.
  4. Attention-Enhanced QLoRA (AEQLORA): Building on QLoRA for efficient fine-tuning, AEQLORA introduces a "structure-guided attention bias." This bias explicitly boosts the attention weights for candidate entity tokens retrieved by the KGE model, forcing the LLM to focus on valid options and suppress irrelevant context or internal parametric knowledge that could lead to hallucinations.
  5. Joint Inference Mechanism: A "Retrieve-then-Rerank" pipeline is employed. First, the KGE model acts as a high-recall retriever to narrow down the search space to a top-K candidate list. Then, the fine-tuned LLM acts as a high-precision reranker, selecting the most probable entity from this constrained list. This collaborative approach ensures that predictions are structurally valid and semantically sound.

Datasets

The proposed EGIT framework is evaluated on two widely used benchmark datasets for knowledge graph completion:

  • FB15k-237: Derived from FB15k, this dataset removes inverse relations and contains 14,541 entities, 237 relations, and 310,116 triplets.
  • WN18RR: This dataset comprises 40,943 entities, 11 relations, and 93,003 triplets.

Both datasets are split into training, validation, and test sets. No new benchmarks were introduced in this paper.

Key Insights and Ideas

  • KGEs as "Structural Anchors": The core idea of using KGE models not just for retrieval but as a fundamental component for generating structured training data for LLMs is a significant departure from previous approaches. This provides the necessary structural grounding that LLMs inherently lack.
  • Transforming Generation to Discrimination: By framing KGC as a multiple-choice-like task (selecting from a candidate list) during fine-tuning, EGIT effectively shifts the LLM's behavior from open-ended generation to constrained discrimination, directly combating hallucinations.
  • Attention Bias for Structural Awareness: The Attention-Enhanced QLoRA is a clever way to guide the LLM's attention mechanism to prioritize structurally relevant information (candidate entities) over generic text, making it more attuned to the KGC task's constraints.
  • Synergy is Key: The paper strongly emphasizes that the combination of structural priors from KGEs and semantic reasoning from LLMs is crucial. Neither component alone is sufficient; their synergistic integration is what drives the performance gains and hallucination mitigation.

Key Results

EGIT demonstrates state-of-the-art performance on both FB15k-237 and WN18RR datasets.

  • FB15k-237: The best variant of EGIT achieved a 7.0% absolute improvement in Hits@1 over the base ComplEx model (0.341 vs. 0.271).
  • WN18RR: EGIT maintained robust performance (MRR 0.674), outperforming the LLM-based baseline KICGPT by 11.0% in MRR (0.674 vs. 0.564).
  • Hallucination Mitigation: The ablation study showed that removing the candidate list (w/o Candidate List) led to a significant performance drop, highlighting the necessity of structural constraints. Similarly, fine-tuning was crucial, as the "w/o Fine-tuning" variant performed suboptimally. EGIT's design inherently prevents out-of-vocabulary or schema-violating hallucinations.
  • Robustness: EGIT showed consistent improvements across different KGE backbones, indicating the model-agnostic nature of its "retrieve-then-rerank" paradigm.

Limitations and Future Work

  • Inference Latency: The paper acknowledges that the inference latency introduced by the LLM reranking stage is relatively high compared to lightweight embedding models.
  • Future Work: The authors aim to explore knowledge distillation techniques to accelerate inference and extend the framework to inductive settings.

Summary updated

BibTeX
@inproceedings{zhang2026mitigating,
  author = {Pengfei Zhang and Xing Xu and Junying Wu and Xin Lu and Jiahao Shi and Xi Zhang and Dezhi Cui and Xiuxian Peng and Sihao He and Ping Zong and G. Zhang and Zhonghong Ou and Meina Song and Yifan Zhu},
  title = {{Mitigating Hallucinations in Knowledge Graph Completion via Embedding-Guided Instruction Tuning}},
  booktitle = {Information},
  year = {2026},
  doi = {10.3390/info17020207},
}
Figure