Skip to main content
QUICK REVIEW

[论文解读] Probing LLM Hallucination from Within: Perturbation-Driven Approach via Internal Knowledge

Seongmin Lee, Hsiang Hsu|arXiv (Cornell University)|Nov 14, 2024
Cryptography and Residue ArithmeticComputer Science被引用 3
一句话总结

本文提出了一项新颖的零样本幻觉推理任务,基于模型内部知识将大语言模型生成的文本分类为一致、不一致或虚构三类。所提出的MKT方法通过探测大语言模型是否具备足够的内部知识来检测幻觉,在与SelfCheckGPT等现有方法结合时,显著提升了检测准确率,尤其在虚构幻觉的检测上表现突出。

ABSTRACT

LLM hallucination, where unfaithful text is generated, presents a critical challenge for LLMs' practical applications. Current detection methods often resort to external knowledge, LLM fine-tuning, or supervised training with large hallucination-labeled datasets. Moreover, these approaches do not distinguish between different types of hallucinations, which is crucial for enhancing detection performance. To address such limitations, we introduce hallucination probing, a new task that classifies LLM-generated text into three categories: aligned, misaligned, and fabricated. Driven by our novel discovery that perturbing key entities in prompts affects LLM's generation of these three types of text differently, we propose SHINE, a novel hallucination probing method that does not require external knowledge, supervised training, or LLM fine-tuning. SHINE is effective in hallucination probing across three modern LLMs, and achieves state-of-the-art performance in hallucination detection, outperforming seven competing methods across four datasets and four LLMs, underscoring the importance of probing for accurate detection.

研究动机与目标

  • 解决现有检测方法中对幻觉类型缺乏区分的问题。
  • 开发一种无需源数据、零样本的方法,无需外部知识或微调即可识别幻觉成因。
  • 通过基于内部知识可用性的分类,将幻觉划分为一致、不一致和虚构三类,以提升幻觉检测能力。
  • 通过区分知识缺口与生成随机性,实现更精确的检测并为潜在的修复策略提供支持。
  • 构建一个新的基准数据集,用于幻觉推理,以支持未来研究。

提出的方法

  • 提出一项新任务——幻觉推理,用于将大语言模型输出分类为三类:一致(正确且已知)、不一致(随机或依赖上下文)和虚构(缺乏知识)。
  • 引入MKT(知识探测)方法,一种零样本技术,通过分析激活模式或注意力机制,判断大语言模型是否具备回答特定提示的足够内部知识。
  • 采用两阶段检测流程:首先,MKT通过检测知识不足来过滤出虚构内容;其次,通过一致性测试(如SelfCheckGPT)将剩余输出分类为一致或不一致。
  • 通过提示工程实现大语言模型的自我评估,以判断输出的一致性和正确性,无需外部监督或标注数据。
  • 采用基于阈值的分类方法对MKT得分进行处理,以区分已知与未知知识状态。
  • 将MKT与现有零样本检测器(如SelfCheckGPT和Hallucination Score)结合,以提升整体检测性能。
Figure 1 : Given a pair of prompt and LLM-generated text, we propose a two-stage workflow for hallucination reasoning, consisting of the Model Knowledge Test (MKT) ( Sec. 3.1 ) and the Alignment Test ( Sec. 3.2 ). The MKT identifies whether the LLM has sufficient knowledge to generate the text by pe
Figure 1 : Given a pair of prompt and LLM-generated text, we propose a two-stage workflow for hallucination reasoning, consisting of the Model Knowledge Test (MKT) ( Sec. 3.1 ) and the Alignment Test ( Sec. 3.2 ). The MKT identifies whether the LLM has sufficient knowledge to generate the text by pe

实验结果

研究问题

  • RQ1零样本方法能否在无需外部知识或微调的情况下,有效区分虚构幻觉(知识缺口)与不一致幻觉(随机性)?
  • RQ2与现有无源方法相比,内部知识探测在提升虚构幻觉检测能力方面表现如何?
  • RQ3根据成因对幻觉进行分类,在多大程度上能提升下游检测系统的性能?
  • RQ4MKT能否作为预过滤器,提升基于一致性的检测器(如SelfCheckGPT)的准确性?
  • RQ5该幻觉推理框架在生物医学和传记类等多样化领域中的泛化能力如何?

主要发现

  • 在NEC数据集上,MKT对虚构文本的检测准确率达到76.82%,在传记数据集上达到99.04%,显著优于基线方法。
  • 当与SelfCheckGPT结合时,MKT + SelfCheckGPT流水线在NEC数据集上实现84.43%的整体准确率,在传记数据集上达到94.64%。
  • SelfCheckGPT单独检测到的虚构幻觉仅占6.23%,但当MKT作为预过滤器使用时,该比例提升至77.85%。
  • 将MKT整合进Hallucination Score后,NEC数据集的整体准确率从55.25%提升至74.05%,传记数据集从53.93%提升至84.29%。
  • 该方法能有效区分三类幻觉,MKT在NEC数据集上对非虚构数据点的正确分类率达到92.39%。
  • 结果表明,区分幻觉成因(尤其是知识缺口)可显著提升检测性能,验证了幻觉推理的重要性。
Figure 2 : CDF on the NEC and Biography datasets show that Model Knowledge Score distributions of fabricated text are significantly distinct from non-fabricated ones.
Figure 2 : CDF on the NEC and Biography datasets show that Model Knowledge Score distributions of fabricated text are significantly distinct from non-fabricated ones.

阅读本论文

在 Nubint 阅读器中打开原文,边读边就任意段落提问。

在 Nubint 中阅读本论文

本解读由 AI 根据论文原文生成,引用前请核对原文。