用注意力机制区分问题类型,三步检测大模型幻觉
Attention-guided Self-reflection for Zero-shot Hallucination Detection in Large Language Models
- 根据注意力分布把输入分为主动关注和非关注两类
- 仅需三次模型推理,一致性分数差值作为幻觉判据
- 零样本下优于现有方法,计算开销极低
幻觉已成为制约大语言模型有效应用的关键障碍。本文提出一种新型零样本幻觉检测方法——注意力引导的自省(AGSER)。该方法利用注意力贡献将输入问题分为关注型与非关注型,分别通过大模型处理后,计算生成结果与原始答案的一致性分数,二者差异作为幻觉估计值。实验在三个不同幻觉基准上,针对四种主流大模型验证,结果表明该方法显著优于现有技术。同时,AGSER仅需三次模型前向传播和两组提示词,大幅降低计算开销。
原文摘要 · Abstract (English)
Hallucination has emerged as a significant barrier to the effective application of Large Language Models (LLMs). In this work, we introduce a novel Attention-Guided SElf-Reflection (AGSER) approach for zero-shot hallucination detection in LLMs. The AGSER method utilizes attention contributions to categorize the input query into attentive and non-attentive queries. Each query is then processed separately through the LLMs, allowing us to compute consistency scores between the generated responses and the original answer. The difference between the two consistency scores serves as a hallucination estimator. In addition to its efficacy in detecting hallucinations, AGSER notably reduces computational overhead, requiring only three passes through the LLM and utilizing two sets of tokens. We have conducted extensive experiments with four widely-used LLMs across three different hallucination benchmarks, demonstrating that our approach significantly outperforms existing methods in zero-shot hallucination detection.
Thank you to arXiv for use of its open access interoperability. PaperDance 不是 arXiv 官方产品;中文卡片由大模型生成,请以原文为准。