Skip to main content
QUICK REVIEW

[论文解读] A Stitch in Time Saves Nine: Detecting and Mitigating Hallucinations of LLMs by Validating Low-Confidence Generation

Neeraj Varshney, Wenlin Yao|arXiv (Cornell University)|Jul 8, 2023
Topic ModelingComputer Science被引用 28
一句话总结

本文提出一种主动的两阶段方法,在大语言模型生成过程中通过用检索的知识验证不确定概念并修正输出来检测和减轻幻觉,将 GPT-3.5 上的幻觉率从 47.5% 降至 14.5%。

ABSTRACT

Recently developed large language models have achieved remarkable success in generating fluent and coherent text. However, these models often tend to 'hallucinate' which critically hampers their reliability. In this work, we address this crucial problem and propose an approach that actively detects and mitigates hallucinations during the generation process. Specifically, we first identify the candidates of potential hallucination leveraging the model's logit output values, check their correctness through a validation procedure, mitigate the detected hallucinations, and then continue with the generation process. Through extensive experiments with GPT-3.5 (text-davinci-003) on the 'article generation task', we first demonstrate the individual efficacy of our detection and mitigation techniques. Specifically, the detection technique achieves a recall of ~88% and the mitigation technique successfully mitigates 57.6% of the correctly detected hallucinations. Importantly, our mitigation technique does not introduce new hallucinations even in the case of incorrectly detected hallucinations, i.e., false positives. Then, we show that the proposed active detection and mitigation approach successfully reduces the hallucinations of the GPT-3.5 model from 47.5% to 14.5% on average. We further demonstrate the effectiveness and wide applicability of our approach through additional studies including performance on different types of questions (multi-hop and false premise questions) and with another LLM from a different model family (Vicuna). In summary, our work contributes to improving the reliability and trustworthiness of large language models, a crucial step en route to enabling their widespread adoption in real-world applications.

研究动机与目标

  • 通过在生成过程中解决幻觉问题来提高大型语言模型的可靠性和可信度。
  • 开发一个主动的、迭代的检测与缓解框架,逐句运行以遏制错误传播。
  • 利用模型 logits 识别不确定的概念,借助检索得到的知识对其进行验证,并用证据修正幻觉。

提出的方法

  • 使用基于指令的提示(首选)或实体/关键词提取来识别每个生成句子中的关键概念。
  • 利用每个概念的令牌概率中的最小值,从令牌 logits 计算概念级不确定性。
  • 为不确定概念创建验证问题(是/否),并通过网页检索获取相关知识(或以自我探询作为后备)。
  • 使用检索到的知识回答验证问题,并将正确性与生成的句子进行核对;若任一概念不成立,通过使用证据移除或替换幻觉内容进行缓解。
  • 通过用检索到的知识修正句子来缓解,并可选地在前面添加证据以指导下一句生成。
  • 在 GPT-3.5(text-davinci-003)上跨主题评估主动检测与缓解,并测试在 Vicuna 和多跳/错误前提问题上的通用性。

实验结果

研究问题

  • RQ1基于 logits 的不确定性信号是否能在概念层面检测幻觉?
  • RQ2在生成过程中进行主动检测与缓解是否能减少幻觉并防止传播到后续句子?
  • RQ3该方法在不同的 LLM 家族(如 GPT-3.5、Vicuna)以及不同任务类型(单跳、多跳、错误前提问题)上的表现如何?
  • RQ4缓解对误报率和整体输出质量的影响是什么?

主要发现

  • 检测召回率约为 88%,用于识别潜在幻觉。
  • 缓解在正确检测到的幻觉中的处理率为 57.6%,在非幻觉情况下仅引入幻觉 3.06%。
  • 主动方法使 GPT-3.5 输出中的幻觉平均从 47.5% 降至 14.5%。
  • 该方法在模型家族(GPT-3.5 和 Vicuna)以及任务类型(单跳、多跳、错误前提)上仍然有效。
  • 即使检测产生误报,缓解也不会引入新的幻觉。

阅读本论文

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

在 Nubint 中阅读本论文

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