Skip to main content
QUICK REVIEW

[论文解读] How Can We Know When Language Models Know? On the Calibration of Language Models for Question Answering

Zhengbao Jiang, Jun Araki|arXiv (Cornell University)|Dec 2, 2020
Topic Modeling参考文献 61被引用 40
一句话总结

这篇论文研究为问答任务进行校准的语言模型在多大程度上反映真实正确性,并提出通过微调与事后校准方法在不牺牲准确性的前提下改善校准。

ABSTRACT

Recent works have shown that language models (LM) capture different types of knowledge regarding facts or common sense. However, because no model is perfect, they still fail to provide appropriate answers in many cases. In this paper, we ask the question "how can we know when language models know, with confidence, the answer to a particular query?" We examine this question from the point of view of calibration, the property of a probabilistic model's predicted probabilities actually being well correlated with the probabilities of correctness. We examine three strong generative models -- T5, BART, and GPT-2 -- and study whether their probabilities on QA tasks are well calibrated, finding the answer is a relatively emphatic no. We then examine methods to calibrate such models to make their confidence scores correlate better with the likelihood of correctness through fine-tuning, post-hoc probability modification, or adjustment of the predicted outputs or inputs. Experiments on a diverse range of datasets demonstrate the effectiveness of our methods. We also perform analysis to study the strengths and limitations of these methods, shedding light on further improvements that may be made in methods for calibrating LMs. We have released the code at https://github.com/jzbjyb/lm-calibration.

研究动机与目标

  • 评估 state-of-the-art QA LMs (T5, BART, GPT-2) 是否产生经过校准的置信度估计。
  • 开发并评估通过微调和事后调整来改进校准的方法。
  • 分析校准方法的优点/局限性并为未来改进提供见解。

提出的方法

  • 将问答数据集视为输入X与候选输出Y的序列到序列任务;计算 P_LM(Y|X) 并对候选集的概率进行归一化。
  • 提出基于候选集的两种微调目标:softmax 基于的和边际基于的,以使候选概率与正确性对齐。
  • 调研事后校准:基于温度缩放和使用输入/特征的特征基决策树来重新校准置信度。
  • 引入特定于语言模型的技术:通过往返翻译对候选输出进行释义以降低措辞偏差,并通过检索上下文进行输入增强。
  • 使用维基百科摘录来增强输入,评估检索增强。
  • 通过消融研究模型大小、释义数量和不同数据集对校准的影响。

实验结果

研究问题

  • RQ1基于 LM 的问答模型是否可以校准,使其置信度在不同问答任务中与正确性的可能性保持一致?
  • RQ2哪些微调或事后策略在不牺牲准确性的情况下最好地改进校准?
  • RQ3输入变体(释义、检索上下文)如何影响校准性能?
  • RQ4模型大小如何影响跨数据集的校准质量?

主要发现

  • 基线语言模型(T5, UnifiedQA)显示出较高的准确性但校准性差(MT-test 的 ECE > 0.2)。
  • 微调与事后校准方法在多项选择问答数据集上改善 ECE,同时维持或提升准确性。
  • 表现最佳的设置(Combo:基于边际的微调加上温度缩放、释义与输入增强)将 MC-test 的 ECE 从 0.095 降至 0.044(相对降低53%)。
  • 对候选答案进行释义并提供检索到的上下文证据显著提升校准,特别是对较短的问题。
  • 校准在各方法之间具有互补性;较大模型通常在准确性和校准上都表现更好,尽管存在领域迁移效应。
  • 在抽取式问答上,校准改进较小,可能是因为候选跨度生成更困难;置信分布的更高熵值可能也有贡献。

更好的研究,从现在开始

从论文设计到论文写作,大幅缩短您的研究时间。

无需绑定信用卡

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