arXivDaily arXiv每日学术速递 周一至周五更新
感恩节,周五至周末无更新,大家顺遂。周一再来吧
arXiv 2403.18286cs.CLcs.AIcs.LG
收藏

语言模型的少样本重校准

Few-Shot Recalibration of Language Models

Stanford University(斯坦福大学);Google DeepMind(谷歌DeepMind)

Xiang Lisa Li, Urvashi Khandelwal, Kelvin Guu

AI总结:

针对语言模型在分布窄切片上校准不良的问题,提出少样本切片特定重校准框架,利用少量无标签数据训练重校准模型以预测置信度重映射曲线,从而识别领域特定阈值决定信任或弃权(不执行),显著降低校准误差。

摘要:

近期的研究发现了从语言模型(LMs)中提取校准良好的置信度估计的有效方法,其中模型的置信度分数反映了其正确的可能性。然而,尽管LMs在广泛的分布上可能显得校准良好,但这往往掩盖了在较窄切片内的显著校准不良(例如,数学领域的系统性过度自信可以抵消历史领域的系统性自信不足,从而在总体上产生完美的校准)。为了对分布的任何切片获得校准良好的置信度估计,我们提出了一种新的少样本切片特定重校准框架。具体而言,我们训练了一个重校准模型,该模型接收来自任意给定切片的少量无标签示例,并预测一条曲线,将置信度分数重新映射,使其对该切片更准确。我们训练的模型可以在不使用该切片任何标签数据的情况下,对任意新切片进行重校准。这使我们能够识别特定领域的置信度阈值,高于该阈值时LM的预测可以被信任,低于该阈值时它应该弃权(不执行)。实验表明,我们的少样本重校准器持续优于现有的校准方法,例如,与温度缩放相比,将PaLM2-Large在MMLU上的校准误差降低了16%。

英文摘要:

Recent work has uncovered promising ways to extract well-calibrated confidence estimates from language models (LMs), where the model's confidence score reflects how likely it is to be correct. However, while LMs may appear well-calibrated over broad distributions, this often hides significant miscalibration within narrower slices (e.g., systemic over-confidence in math can balance out systemic under-confidence in history, yielding perfect calibration in aggregate). To attain well-calibrated confidence estimates for any slice of a distribution, we propose a new framework for few-shot slice-specific recalibration. Specifically, we train a recalibration model that takes in a few unlabeled examples from any given slice and predicts a curve that remaps confidence scores to be more accurate for that slice. Our trained model can recalibrate for arbitrary new slices, without using any labeled data from that slice. This enables us to identify domain-specific confidence thresholds above which the LM's predictions can be trusted, and below which it should abstain. Experiments show that our few-shot recalibrator consistently outperforms existing calibration methods, for instance improving calibration error for PaLM2-Large on MMLU by 16%, as compared to temperature scaling.

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

↑