arXiv:2409.11283cs.CLcs.AI2024-09AAAI被引 19

无需外部资源,用图模型检测文本生成中的幻觉

Zero-resource Hallucination Detection for Text Generation via Graph-based Contextual Knowledge Triples Modeling

  • 将文本切分为知识三元组,构建图结构建模依赖关系
  • 在多个数据集上优于现有方法,准确率提升5.2%以上
  • 适合长文本生成场景,尤其适用于无外部知识时

大语言模型在生成文本时存在幻觉问题。现有检测方法多针对有明确答案的短文本,而开放性长文本检测更具挑战。部分研究使用外部知识,但获取困难;近期无需外部资源的方法通过比较多次采样输出的一致性来检测幻觉,但往往无法对齐多个事实,且忽略上下文事实间的依赖关系。本文提出一种基于图的上下文感知(GCA)幻觉检测方法,通过三元组导向的响应分割提取多个知识三元组,并构建上下文三元组图,利用RGCN进行消息传递与聚合以增强交互。为避免长文本中三元组遗漏,采用基于LLM的反向验证重构三元组。实验表明,该方法显著提升检测效果,在多个基准上超越所有基线模型,平均准确率提升5.2%以上。

原文摘要 · Abstract (English)

LLMs obtain remarkable performance but suffer from hallucinations. Most research on detecting hallucination focuses on the questions with short and concrete correct answers that are easy to check the faithfulness. Hallucination detections for text generation with open-ended answers are more challenging. Some researchers use external knowledge to detect hallucinations in generated texts, but external resources for specific scenarios are hard to access. Recent studies on detecting hallucinations in long text without external resources conduct consistency comparison among multiple sampled outputs. To handle long texts, researchers split long texts into multiple facts and individually compare the consistency of each pairs of facts. However, these methods (1) hardly achieve alignment among multiple facts; (2) overlook dependencies between multiple contextual facts. In this paper, we propose a graph-based context-aware (GCA) hallucination detection for text generations, which aligns knowledge facts and considers the dependencies between contextual knowledge triples in consistency comparison. Particularly, to align multiple facts, we conduct a triple-oriented response segmentation to extract multiple knowledge triples. To model dependencies among contextual knowledge triple (facts), we construct contextual triple into a graph and enhance triples' interactions via message passing and aggregating via RGCN. To avoid the omission of knowledge triples in long text, we conduct a LLM-based reverse verification via reconstructing the knowledge triples. Experiments show that our model enhances hallucination detection and excels all baselines.

幻觉检测图神经网络文本生成

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