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.
翻译:近期研究揭示了从语言模型中提取良好校准置信度估计的有效途径,此时模型的置信度分数能反映其预测正确的可能性。然而,尽管语言模型在广泛分布上看似校准良好,这种表象往往掩盖了其在较窄切片内的显著失准现象(例如数学领域的系统性过度自信与历史领域的系统性信心不足相互抵消,最终在整体统计中呈现完美校准)。为获得任意数据切片上的良好校准置信度估计,我们提出了一种面向少样本切片特定重新校准的新型框架。具体而言,我们训练一个重新校准模型,该模型接收给定切片的少量无标签样本,预测可调整该切片置信度分数准确性的映射曲线。经过训练的模型能对任意新切片进行重新校准,且无需使用该切片的任何标注数据。这使我们能够识别领域特定的置信度阈值——当语言模型预测的置信度超过该阈值时可被信任,低于该阈值时则应弃权。实验表明,与温度缩放等现有校准方法相比,我们的少样本重新校准器始终表现更优,例如在MMLU基准上将PaLM2-Large的校准误差降低了16%。