Uncertainty-Based Abstention in LLMs Improves Safety and Reduces Hallucinations

📄 arXiv: 2404.10960v1 📥 PDF

作者: Christian Tomani, Kamalika Chaudhuri, Ivan Evtimov, Daniel Cremers, Mark Ibrahim

分类: cs.CL, cs.AI

发布日期: 2024-04-16


💡 一句话要点

基于不确定性的放弃策略提升LLM安全性与减少幻觉现象

🎯 匹配领域: 支柱二:RL算法与架构 (RL & Architecture) 支柱九:具身大模型 (Embodied Foundation Models)

关键词: 大型语言模型 不确定性度量 放弃策略 问答系统 安全性提升 幻觉现象 强化学习 人类反馈

📋 核心要点

  1. 现有大型语言模型在处理不确定性时缺乏有效的放弃机制,导致错误回答和幻觉现象频发。
  2. 本文提出了一种基于不确定性度量的放弃策略,旨在提升模型在问答任务中的可靠性。
  3. 实验结果显示,采用该策略后,模型的正确性提升2%至8%,幻觉现象减少50%,安全性显著提高。

📝 摘要(中文)

大型语言模型(LLMs)在实际应用中面临可靠性不足的主要障碍,尤其在正确性、面对无法回答的问题时的幻觉现象及安全性方面。本文借鉴分类中的类似方法,探讨在问答领域中,如何在不确定时选择放弃回答。研究了统计不确定性度量和一种称为对话不确定性(InDU)的独特口头化度量,结合有无强化学习与人类反馈(RLHF)的模型,结果表明,基于合适的不确定性度量进行放弃可以显著提升LLMs的可靠性。通过放弃少量高度不确定的样本,正确性提升2%至8%,幻觉现象减少50%,安全性提升70%至99%,几乎没有额外的计算开销。

🔬 方法详解

问题定义:本文旨在解决大型语言模型在面对不确定性时的回答可靠性问题,现有方法未能有效处理无法回答的问题,导致错误和幻觉现象。

核心思路:提出在不确定时放弃回答的策略,借鉴人类的决策过程,利用统计不确定性和对话不确定性度量来判断是否放弃回答。

技术框架:整体架构包括不确定性度量模块、决策放弃模块和问答生成模块,结合有无强化学习与人类反馈的模型进行比较。

关键创新:引入对话不确定性(InDU)作为新的不确定性度量,与传统的统计不确定性相结合,显著提升了模型在不确定情况下的表现。

关键设计:在模型训练中,设置了不确定性阈值以决定放弃回答的标准,损失函数设计考虑了放弃策略的影响,确保模型在放弃时不会产生负面反馈。

📊 实验亮点

实验结果表明,采用基于不确定性的放弃策略后,模型的正确性提升2%至8%,幻觉现象减少50%,安全性提升70%至99%。这些结果在几乎没有额外计算开销的情况下实现,显示出该方法的高效性与实用性。

🎯 应用场景

该研究的潜在应用领域包括智能客服、医疗问答系统及教育辅助工具等,能够有效提升用户体验和系统安全性。通过减少错误回答和幻觉现象,增强用户对系统的信任,未来可能推动更广泛的LLM应用。

📄 摘要(原文)

A major barrier towards the practical deployment of large language models (LLMs) is their lack of reliability. Three situations where this is particularly apparent are correctness, hallucinations when given unanswerable questions, and safety. In all three cases, models should ideally abstain from responding, much like humans, whose ability to understand uncertainty makes us refrain from answering questions we don't know. Inspired by analogous approaches in classification, this study explores the feasibility and efficacy of abstaining while uncertain in the context of LLMs within the domain of question-answering. We investigate two kinds of uncertainties, statistical uncertainty metrics and a distinct verbalized measure, termed as In-Dialogue Uncertainty (InDU). Using these uncertainty measures combined with models with and without Reinforcement Learning with Human Feedback (RLHF), we show that in all three situations, abstention based on the right kind of uncertainty measure can boost the reliability of LLMs. By sacrificing only a few highly uncertain samples we can improve correctness by 2% to 8%, avoid 50% hallucinations via correctly identifying unanswerable questions and increase safety by 70% up to 99% with almost no additional computational overhead.