Skip to main content
QUICK REVIEW

[论文解读] Quantifying Uncertainty in Answers from any Language Model and Enhancing their Trustworthiness

Jiuhai Chen, Jonas Mueller|arXiv (Cornell University)|Aug 30, 2023
Topic Modeling被引用 7
一句话总结

本文提出 BSDetector,一种通过采样多个响应并基于语义相似性和温度变化计算置信度分数的方法,以量化任何黑箱大语言模型(LLM)输出的不确定性。该方法使用户能够识别不可靠或幻觉性的回答,并通过选择置信度最高的响应(无需微调)来提高准确性,显著增强在人机协同和完全自动化的大语言模型评估场景中的可信度。

ABSTRACT

We introduce BSDetector, a method for detecting bad and speculative answers from a pretrained Large Language Model by estimating a numeric confidence score for any output it generated. Our uncertainty quantification technique works for any LLM accessible only via a black-box API, whose training data remains unknown. By expending a bit of extra computation, users of any LLM API can now get the same response as they would ordinarily, as well as a confidence estimate that cautions when not to trust this response. Experiments on both closed and open-form Question-Answer benchmarks reveal that BSDetector more accurately identifies incorrect LLM responses than alternative uncertainty estimation procedures (for both GPT-3 and ChatGPT). By sampling multiple responses from the LLM and considering the one with the highest confidence score, we can additionally obtain more accurate responses from the same LLM, without any extra training steps. In applications involving automated evaluation with LLMs, accounting for our confidence scores leads to more reliable evaluation in both human-in-the-loop and fully-automated settings (across both GPT 3.5 and 4).

研究动机与目标

  • 解决 LLM 在高风险应用中因幻觉或过度自信响应而导致的不可靠性问题。
  • 开发一种适用于仅通过黑箱 API 访问、且无法获取训练数据的任意 LLM 的不确定性量化方法。
  • 通过提供数值化的置信度分数来提升 LLM 输出的可信度,以标识低质量响应。
  • 通过从多次 LLM 生成中选择置信度最高的响应,无需额外训练即可提高答案准确性。
  • 通过基于置信度的过滤,实现更可靠的自动化与人机协同 LLM 输出评估。

提出的方法

  • BSDetector 通过使用不同的温度设置和提示变体,从同一 LLM 中采样多个响应。
  • 通过使用句子嵌入模型测量生成响应之间的语义相似性,计算置信度分数。
  • 置信度分数基于多次采样下响应的一致性得出,分数越低表示不确定性越高或可能存在幻觉。
  • 该方法结合内在(响应一致性)与外在(语义相似性)评估来估计可靠性。
  • 通过从多次生成中选择置信度最高的响应,无需模型微调即可提高准确性。
  • 通过在聚合前过滤低置信度响应,支持人机协同与完全自动化评估。
(a) Pipeline of BSDetector , which can be applied to any LLM API. ( $T=1.0$ means temperature sampling with parameter 1.0, Sim ( $\cdot$ , $\cdot$ ) means the semantic similarities between two sentences.)
(a) Pipeline of BSDetector , which can be applied to any LLM API. ( $T=1.0$ means temperature sampling with parameter 1.0, Sim ( $\cdot$ , $\cdot$ ) means the semantic similarities between two sentences.)

实验结果

研究问题

  • RQ1在无法访问模型训练数据或架构的情况下,能否可靠地量化黑箱 LLM 的不确定性?
  • RQ2从多次 LLM 生成中选择置信度最高的响应,是否能在不微调的情况下提高答案准确性?
  • RQ3BSDetector 的置信度分数能否提升在人机协同与完全自动化设置中基于 LLM 的评估可靠性?
  • RQ4基于置信度的过滤与随机过滤相比,在降低 LLM 评估分数方差和提升准确性方面表现如何?
  • RQ5与基线不确定性估计方法相比,BSDetector 在问答基准测试中能将错误率降低多少?

主要发现

  • BSDetector 在识别 GPT-3 和 ChatGPT 等模型在封闭域与开放域问答基准中的错误响应方面,优于其他不确定性估计方法。
  • 从多次 LLM 生成中选择置信度最高的响应,可在不进行任何额外训练或模型微调的情况下提高答案准确性。
  • 在人机协同评估中,基于置信度选择人工评估的答案相比随机选择,显著降低了错误率,提升了 TriviaQA 和 Summarize-from-feedback 数据集的可靠性。
  • 在完全自动化评估中,丢弃置信度最低的 20% 响应后,GPT-4 评估的平均分数更准确,MSE 得分提升,并在 TriviaQA 上达到 1.0 的准确率。
  • 随机丢弃 20% 的响应增加了方差但未提升准确性,证实基于置信度的过滤带来了实质性的性能提升。
  • 该方法在不同 LLM(如 GPT-3.5 和 GPT-4)及应用类型(如事实性问答与摘要生成)中均有效,展现出广泛的适用性。
(b) Two prompts from a Trivia Q&A dataset (Joshi et al., 2017 ) and the responses from ChatGPT, along with the associated confidence scores from BSDetector .
(b) Two prompts from a Trivia Q&A dataset (Joshi et al., 2017 ) and the responses from ChatGPT, along with the associated confidence scores from BSDetector .

更好的研究,从现在开始

从阅读论文到最终审阅,大幅缩短您的研究时间。

无需绑定信用卡

本解读由 AI 生成,并经人工编辑审核。