arXivDaily arXiv每日学术速递 周一至周五更新
arXiv 2012.00955cs.CL
收藏

我们如何知道语言模型何时知道?问答中语言模型的标定

How Can We Know When Language Models Know? On the Calibration of Language Models for Question Answering

Carnegie Mellon University(卡内基梅隆大学);Bosch Research(博世研究院)

Zhengbao Jiang, Jun Araki, Haibo Ding, Graham Neubig

摘要:

最近的工作表明,语言模型(LM)捕捉不同类型的知识,关于事实或常识。但是,由于没有一个模型是完美的,它们在许多情况下仍然无法提供适当的答案。在本文中,我们提出了这样一个问题:“我们如何知道语言模型何时知道某个特定查询的答案?“我们从校准的角度来研究这个问题,概率模型的预测概率的属性实际上与正确性的概率密切相关。我们研究了三个强大的生成模型- T5,BART和GPT-2 -并研究其QA任务的概率是否得到了很好的校准,发现答案是一个相对简单的否定。然后,我们研究了校准这些模型的方法,使其置信度得分更好地与正确性的可能性相关,通过微调,事后概率修改,或调整预测的输出或输入。在不同数据集上的实验证明了我们方法的有效性。我们还进行了分析,研究这些方法的优势和局限性,揭示了进一步的改进,可以在校准LM的方法。我们已经在https://github.com/jzbjyb/lm-calibration上发布了代码。

英文摘要:

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.

机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。

↑