Mitigating Large Language Model Hallucinations via Autonomous Knowledge Graph-Based Retrofitting

Xinyan GuanYanjiang LiuHongyu LinYaojie LuBen HeXianpei HanLe Sun

article2024AAAI126 citations

Proposes an autonomous framework that iteratively extracts, verifies, and retrofits intermediate factual claims in draft responses using knowledge graphs, effectively eliminating multi-step reasoning hallucinations in large language models.

Listen

Large language models frequently generate unsupported or factually incorrect statements, a challenge known as factual hallucination. While incorporating structured data from knowledge graphs offers a promising remedy, traditional approaches only query external sources using the user's initial prompt. This standard strategy fails during multi-step reasoning, where errors often emerge in intermediate steps involving entities that were not mentioned in the original question.

To address this limitation, the article presents and evaluates Knowledge Graph-based Retrofitting (KGR), an autonomous framework designed to correct factual errors within an artificial intelligence model's generated reasoning process. The primary objective is to demonstrate that refining initial draft responses using structured knowledge graphs significantly improves factual accuracy and reliability.

Researchers evaluated the approach using three prominent language models—ChatGPT, text-davinci-003, and the open-source Vicuna 13B—across three benchmark datasets representing varying levels of reasoning difficulty: Simple Question, Mintaka (complex multi-step questions), and HotpotQA (open-domain, multi-hop reasoning). The framework operates in a continuous, five-stage cycle: extracting individual factual claims from a model's draft answer, identifying key entities, retrieving relevant local subgraphs from Wikidata, selecting critical facts while filtering out noise, and validating and rewriting the draft response. This entire workflow executes autonomously using the language model itself, without requiring manual intervention or separate architectural components.

The findings confirm substantial performance gains across multiple evaluation metrics. First, retrofitting draft responses systematically outperformed traditional baselines, including standard prompting, detailed reasoning prompts (Chain of Thought), web retrieval correction (CRITIC), and query-only knowledge retrieval methods. Second, the framework achieved its most notable advantages in complex multi-step reasoning tasks, delivering an F1 score improvement of at least 6.2 points on Mintaka and 1.1 points on HotpotQA compared to query-focused retrieval methods. Third, the system demonstrated strong versatility across diverse model types, significantly boosting performance on aligned commercial models as well as compact open-source models like Vicuna 13B, where exact match accuracy rose from 14.0% to 46.0% on Simple Question.

These results show that fact-checking the model's intermediate reasoning, rather than merely retrieving context before generation, is critical for real-world reliability. Grounding outputs in structured graphs minimizes the risk of propagating false intermediate logic, reducing operational risk in sensitive question-answering applications. Furthermore, because the framework relies entirely on prompt-driven execution, it avoids expensive model retraining.

Organizations developing or deploying language models for complex knowledge retrieval should consider adopting response-retrofitting architectures. Technical teams should focus on optimizing the trade-offs between precision and recall when selecting retrieved knowledge chunks. Further research and development should specifically target improvements in entity detection and fact filtering to prevent irrelevant data from cluttering verification steps.

While the results demonstrate clear efficacy, the evaluation was conducted on sample subsets of 50 instances per dataset validation set. Additionally, the framework's overall accuracy remains constrained by the language model's ability to extract precise entities and filter out noisy triples during information retrieval. Stakeholders can be confident in the structural advantages of iterative post-generation retrofitting, while noting that production deployments will require ongoing refinement of the fact-selection pipeline.

arXiv: 2311.13314
Cover for Mitigating Large Language Model Hallucinations via Autonomous Knowledge Graph-Based Retrofitting

Abstract

Incorporating factual knowledge in knowledge graph is regarded as a promising approach for mitigating the hallucination of large language models (LLMs). Existing methods usually only use the user’s input to query the knowledge graph, thus failing to address the factual hallucination generated by LLMs during its reasoning process. To address this problem, this paper proposes Knowledge Graph-based Retrofitting (KGR), a new framework that incorporates LLMs with KGs to mitigate factual hallucination during the reasoning process by retrofitting the initial draft responses of LLMs based on the factual knowledge stored in KGs. Specifically, KGR leverages LLMs to extract, select, validate, and retrofit factual statements within the model-generated responses, which enables an autonomous knowledge verifying and refining procedure without any additional manual efforts. Experiments show that KGR can significantly improve the performance of LLMs on factual QA benchmarks especially when involving complex reasoning processes, which demonstrates the necessity and effectiveness of KGR in mitigating hallucination and enhancing the reliability of LLMs.

Citation

MLA
Guan, X., et al. “Mitigating Large Language Model Hallucinations via Autonomous Knowledge Graph-based Retrofitting”. arXiv, 2023, http://arxiv.org/abs/2311.13314v1.
APA
Guan, X., Liu, Y., Lin, H., Lu, Y., He, B., Han, X., & Sun, L. (2023). Mitigating Large Language Model Hallucinations via Autonomous Knowledge Graph-based Retrofitting. arXiv. http://arxiv.org/abs/2311.13314v1
Chicago
Guan, X., Y. Liu, H. Lin, et al. 2023. “Mitigating Large Language Model Hallucinations via Autonomous Knowledge Graph-based Retrofitting”. arXiv. http://arxiv.org/abs/2311.13314v1.
Harvard
Guan, X. et al. (2023) “Mitigating Large Language Model Hallucinations via Autonomous Knowledge Graph-based Retrofitting”, arXiv [Preprint]. Available at: http://arxiv.org/abs/2311.13314v1.
Vancouver
1. Guan X, Liu Y, Lin H, Lu Y, He B, Han X, Sun L (2023) Mitigating Large Language Model Hallucinations via Autonomous Knowledge Graph-based Retrofitting. arXiv

BibTeX

@article{guan2023mitigating,
  title = {Mitigating Large Language Model Hallucinations via Autonomous Knowledge Graph-based Retrofitting},
  author = {Guan, Xinyan and Liu, Yanjiang and Lin, Hongyu and Lu, Yaojie and He, Ben and Han, Xianpei and Sun, Le},
  year = {2023},
  journal = {arXiv},
  url = {http://arxiv.org/abs/2311.13314v1},
  eprint = {2311.13314}
}
Metadata:arXiv

Access the Paper

This paper is available from its original source. Click below to access the PDF.

Open PDF