arXiv:2504.07640cs.AI2025-04被引 10

用知识图谱+逻辑推理修正大模型幻觉,提升回答准确性

Enhancing Large Language Models through Neuro-Symbolic Integration and Ontological Reasoning

  • 将自然语言转为逻辑形式,通过知识图谱验证一致性
  • 检测到矛盾时生成反馈,引导模型迭代修正输出
  • 适合需要高准确性的医疗、法律等专业领域应用

大型语言模型在自然语言处理中表现出色,但常出现事实错误和逻辑不一致(即幻觉),影响其可靠性,尤其在要求高准确性的领域。本文提出一种神经符号方法,融合符号化本体推理与机器学习技术,以增强语言模型输出的一致性与可信度。该流程使用OWL本体、符号推理器(如HermiT)进行一致性检查,并采用轻量级机器学习模型(逻辑回归)将自然语言语句映射为与本体兼容的逻辑形式。当检测到语言模型输出与本体存在不一致时,系统生成解释性反馈,引导模型在迭代优化循环中调整至逻辑自洽的响应。我们实现了一个可运行的Python原型,实验结果表明,在特定领域内,语言模型输出的语义连贯性和事实准确性显著提升,展示了将语言模型流畅性与形式语义严谨性相结合的巨大潜力。

原文摘要 · Abstract (English)

Large Language Models (LLMs) demonstrate impressive capabilities in natural language processing but suffer from inaccuracies and logical inconsistencies known as hallucinations. This compromises their reliability, especially in domains requiring factual accuracy. We propose a neuro-symbolic approach integrating symbolic ontological reasoning and machine learning methods to enhance the consistency and reliability of LLM outputs. Our workflow utilizes OWL ontologies, a symbolic reasoner (e.g., HermiT) for consistency checking, and a lightweight machine learning model (logistic regression) for mapping natural language statements into logical forms compatible with the ontology. When inconsistencies between LLM outputs and the ontology are detected, the system generates explanatory feedback to guide the LLM towards a corrected, logically coherent response in an iterative refinement loop. We present a working Python prototype demonstrating this pipeline. Experimental results in a defined domain suggest significant improvements in semantic coherence and factual accuracy of LLM outputs, showcasing the potential of combining LLM fluency with the rigor of formal semantics.

大模型知识图谱逻辑推理幻觉修正

Thank you to arXiv for use of its open access interoperability. PaperDance 不是 arXiv 官方产品;中文卡片由大模型生成,请以原文为准。