arXivDaily arXiv每日学术速递 周一至周五更新
arXiv 2211.00151cs.CLcs.LG
收藏

预训练语言模型校准的深入探究

A Close Look into the Calibration of Pre-trained Language Models

UIUC(伊利诺伊大学厄巴纳-香槟分校);HUST(华中科技大学);Tsinghua University(清华大学)

Yangyi Chen, Lifan Yuan, Ganqu Cui, Zhiyuan Liu, Heng Ji

AI总结:

本研究通过控制实验发现预训练语言模型在训练中未学会校准,置信度持续增加,并评估了现有校准方法,表明可学习方法能有效降低错误预测的置信度。

摘要:

预训练语言模型(PLMs)可能无法对其预测不确定性提供可靠的估计。我们深入探讨了这一问题,旨在回答两个问题:(1)PLMs在训练过程中是否学会变得校准?(2)现有校准方法的效果如何?针对第一个问题,我们进行了细粒度的控制实验,以研究PLMs在训练中校准性能的动态变化。我们考虑六个因素作为控制变量,包括数据集难度、可用训练样本、训练步数、可调参数数量、模型规模和预训练。我们观察到跨六个因素的校准性能一致变化。我们发现PLMs并未在训练中学会校准,表现为置信度持续增加,无论预测是否正确。我们强调,我们的发现与两个既定结论有些矛盾:(a)更大的PLMs更校准;(b)预训练改善了模型校准。接下来,我们研究现有校准方法在缓解过度自信问题上的有效性。除了不可学习的校准方法(如标签平滑),我们改编并扩展了两种最近提出的可学习方法,这些方法直接收集数据以训练模型获得合理的置信度估计。实验结果表明,可学习方法显著降低了PLMs在错误预测上的置信度。代码可在\url{https://github.com/lifan-yuan/PLMCalibration}获取。

英文摘要:

Pre-trained language models (PLMs) may fail in giving reliable estimates of their predictive uncertainty. We take a close look into this problem, aiming to answer two questions: (1) Do PLMs learn to become calibrated in the training process? (2) How effective are existing calibration methods? For the first question, we conduct fine-grained control experiments to study the dynamic change in PLMs' calibration performance in training. We consider six factors as control variables, including dataset difficulty, available training samples, training steps, the number of tunable parameters, model scale, and pretraining. We observe a consistent change in calibration performance across six factors. We find that PLMs don't learn to become calibrated in training, evidenced by the continual increase in confidence, no matter whether the predictions are correct or not. We highlight that our finding somewhat contradicts two established conclusions: (a) Larger PLMs are more calibrated; (b) Pretraining improves model calibration. Next, we study the effectiveness of existing calibration methods in mitigating the overconfidence issue. Besides unlearnable calibration methods (e.g., label smoothing), we adapt and extend two recently proposed learnable methods that directly collect data to train models to have reasonable confidence estimations. Experimental results show that learnable methods significantly reduce PLMs' confidence in wrong predictions. The code is available at \url{https://github.com/lifan-yuan/PLMCalibration}.

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

↑