弥合置信度差距:用于校准测试时提示调优的温度缩放
Bridging the Confidence Gap: Temperature Scaling for Calibrating Test-Time Prompt Tuning
- University of Chinese Academy of Sciences(中国科学院大学)
- Institute of Automation, Chinese Academy of Sciences(中国科学院自动化研究所)
机构由 AI 辅助整理,请以论文原文为准。
AI总结:
针对测试时提示调优校准不佳的问题,提出基于温度缩放的CoTS及其集成版本E-CoTS,在降低校准误差的同时提升准确率,实验验证了其有效性。
AI中文摘要:
测试时提示调优(TPT)能够在单个测试实例上进行自适应,从而提升准确率,但往往牺牲校准性能。现有的大多数校准方法通过引入额外的正则化项来促进文本嵌入间的分散性并降低校准误差,然而这些方法常常伴随准确率的下降。受零样本预测良好校准特性的启发,我们提出了CoTS,一种简单而有效的后处理校准方法,能够在保持准确率的同时进行校准。具体而言,CoTS应用温度缩放来最小化自适应预测与零样本预测之间的置信度差距。为了充分利用自适应过程中多次增强的潜力,我们引入了一种弱-强集成策略,进一步提升了准确率。随后,我们将CoTS应用于该集成,称为E-CoTS,以维持其良好校准的特性。在多种数据集和骨干网络上的大量实验表明,我们的方法能够有效缓解误校准问题,且不损害主要准确率。例如,在ImageNet变体上,E-CoTS将TPT的平均期望校准误差从11.90%降低至5.38%,同时准确率从60.74%提升至62.95%。此外,当与现有校准方法集成时,E-CoTS通常能同时增强准确率和校准性能。
英文摘要:
Test-time prompt tuning (TPT) enables adaptation on a single test instance, achieving improved accuracy but often sacrificing calibration performance. Most existing calibration methods introduce additional regularization terms to promote dispersion across text embeddings and reduce calibration error, yet these methods often suffer from a drop in accuracy. Motivated by the well-calibrated nature of zero-shot predictions, we propose CoTS, a simple yet effective post-hoc calibration method that preserves accuracy. Specifically, CoTS applies temperature scaling to minimize the confidence gap between adapted and zero-shot predictions. To fully exploit the potential of multiple augmentations during adaptation, we introduce a weak-strong ensemble strategy that further boosts accuracy. We then apply CoTS to this ensemble, termed E-CoTS, to maintain its well-calibrated property. Extensive experiments on diverse datasets and backbones show that our approaches effectively mitigate miscalibration without compromising primary accuracy. For instance, E-CoTS reduces the average expected calibration error of TPT from 11.90% to 5.38% on ImageNet variants, while even increasing accuracy from 60.74% to 62.95%. Moreover, when integrated with existing calibration methods, E-CoTS usually enhances both accuracy and calibration simultaneously.