ReEval: Automatic Hallucination Evaluation for Retrieval-Augmented Large Language Models via Transferable Adversarial Attacks

📄 arXiv: 2310.12516v2 📥 PDF

作者: Xiaodong Yu, Hao Cheng, Xiaodong Liu, Dan Roth, Jianfeng Gao

分类: cs.CL, cs.AI, cs.LG

发布日期: 2023-10-19 (更新: 2024-05-31)

备注: NAACL 2024 Findings


💡 一句话要点

提出ReEval框架以解决LLM的幻觉评估问题

🎯 匹配领域: 支柱九:具身大模型 (Embodied Foundation Models)

关键词: 大型语言模型 幻觉评估 对抗学习 动态评估 检索增强

📋 核心要点

  1. 现有方法在使用静态问答数据评估大型语言模型的可靠性时面临数据污染和记忆化的挑战。
  2. 论文提出ReEval框架,通过对原始证据进行自动扰动,生成新的测试案例来评估模型的可靠性。
  3. 实验结果显示,准确的模型在静态数据上表现良好,但在扰动后的证据下准确率显著下降,且对抗示例具有可转移性。

📝 摘要(中文)

尽管通过检索增强技术在减轻大型语言模型(LLMs)幻觉方面取得了显著进展,但使用静态问答数据来衡量LLMs的可靠性仍然具有挑战性。数据污染的潜在风险使得静态基准性能无法保证模型在面对新知识时能够可靠地使用提供的证据。本文提出了ReEval框架,通过提示链的方式自动扰动原始证据,生成新的测试案例,以评估LLMs在使用新证据回答时的可靠性。我们使用ChatGPT实现了ReEval,并在多种提示设置下评估了两个流行的开放域问答数据集的变体,发现准确的模型在静态数据上表现良好,但在扰动证据下却产生了不支持的答案,准确率显著下降。我们的对抗示例在所有考虑的LLMs中具有可转移性,成本效益高。

🔬 方法详解

问题定义:本文旨在解决大型语言模型在使用静态问答数据时的幻觉评估问题。现有方法无法有效应对数据污染和模型记忆化,导致评估结果不可靠。

核心思路:ReEval框架的核心思路是通过对原始证据进行自动扰动,生成新的测试案例,以动态评估模型在使用新证据时的可靠性。这种设计灵感来源于对抗机器学习。

技术框架:ReEval框架主要包括两个模块:首先是提示链模块,通过对原始证据进行扰动生成新的问题;其次是评估模块,使用生成的问题测试模型的回答能力。

关键创新:最重要的技术创新在于通过对抗扰动生成可转移的测试案例,使得小模型生成的对抗示例可以有效评估更大模型的性能。这与传统的静态评估方法有本质区别。

关键设计:在实现过程中,采用了ChatGPT作为基础模型,设计了多种提示设置以生成不同类型的扰动数据,确保生成的数据既可读又能有效触发模型的幻觉。

🖼️ 关键图片

fig_0
fig_1

📊 实验亮点

实验结果表明,准确的模型在静态数据上表现良好,但在扰动证据下的准确率显著下降,尤其是在GPT-4等大型模型中。我们的对抗示例在所有考虑的LLMs中均具有可转移性,表明该方法具有较高的成本效益。

🎯 应用场景

该研究的潜在应用领域包括大型语言模型的评估和优化,尤其是在需要处理新知识或私有信息的场景中。通过提供一种动态评估方法,ReEval框架能够帮助开发者更好地理解和改进模型的可靠性,降低幻觉现象的发生率,从而提升用户体验和信任度。

📄 摘要(原文)

Despite remarkable advancements in mitigating hallucinations in large language models (LLMs) by retrieval augmentation, it remains challenging to measure the reliability of LLMs using static question-answering (QA) data. Specifically, given the potential of data contamination (e.g., leading to memorization), good static benchmark performance does not ensure that model can reliably use the provided evidence for responding, which is essential to avoid hallucination when the required knowledge is new or private. Inspired by adversarial machine learning, we investigate the feasibility of automatically perturbing existing static one for dynamic evaluation. Specifically, this paper presents ReEval, an LLM-based framework using prompt chaining to perturb the original evidence for generating new test cases for evaluating the LLMs' reliability in using new evidence for answering. We implement ReEval using ChatGPT and evaluate the resulting variants of two popular open-domain QA datasets on a collection of LLMs under various prompting settings. Our generated data is human-readable and useful to trigger hallucination in LLM. Accurate models on static data are observed to produce unsupported answers from the perturbed evidence, with pronounced accuracy drops across LLMs including GPT-4. We find that our adversarial examples are transferable across all considered LLMs. The examples generated by a small model can be used to evaluate a much larger model, making our approach cost-effective.