[论文解读] Attended Temperature Scaling: A Practical Approach for Calibrating Deep Neural Networks
本文提出了一种新型后处理校准方法——注意力温度缩放(Attended Temperature Scaling, ATS),在小样本或标签噪声较大的验证集以及高度准确的模型等具有挑战性的条件下,通过学习注意力加权的温度缩放,显著提升了深度神经网络的置信度校准性能。ATS在保持标准温度缩放低计算成本的同时,在NLL和ECE等校准指标上显著优于标准方法,尤其在真实世界医疗应用中表现突出。
Recently, Deep Neural Networks (DNNs) have been achieving impressive results on wide range of tasks. However, they suffer from being well-calibrated. In decision-making applications, such as autonomous driving or medical diagnosing, the confidence of deep networks plays an important role to bring the trust and reliability to the system. To calibrate the deep networks' confidence, many probabilistic and measure-based approaches are proposed. Temperature Scaling (TS) is a state-of-the-art among measure-based calibration methods which has low time and memory complexity as well as effectiveness. In this paper, we study TS and show it does not work properly when the validation set that TS uses for calibration has small size or contains noisy-labeled samples. TS also cannot calibrate highly accurate networks as well as non-highly accurate ones. Accordingly, we propose Attended Temperature Scaling (ATS) which preserves the advantages of TS while improves calibration in aforementioned challenging situations. We provide theoretical justifications for ATS and assess its effectiveness on wide range of deep models and datasets. We also compare the calibration results of TS and ATS on skin lesion detection application as a practical problem where well-calibrated system can play important role in making a decision.
研究动机与目标
- 解决标准温度缩放(TS)在验证集较小或包含噪声标签时校准性能差的问题。
- 改善高度准确的深度神经网络中标准TS无法泛化的置信度校准问题。
- 开发一种后处理校准方法,保持模型准确率并维持低时间/内存复杂度。
- 在医疗诊断和自动驾驶等安全关键应用中实现可靠的不确定性估计。
- 为ATS在低数据量和标签噪声场景下的鲁棒性提升提供理论依据。
提出的方法
- 引入可学习的注意力机制,在应用温度缩放前动态加权logits。
- 联合优化温度参数 $ T $ 和注意力权重 $ \theta $,以最小化验证集上的负对数似然(NLL)。
- 使用可微分注意力模块,在 $ T $ 优化过程中为更可靠或更自信的样本分配更高重要性。
- 保持后处理校准特性,无需微调主干网络,从而保留推理速度与准确率。
- 将该方法作为插件层置于Softmax输出之后,可直接部署于已训练好的模型。
- 最终输出为 $ \text{softmax}(z / T) $,其中 $ z $ 为输入logits,$ T $ 通过注意力加权NLL最小化学习得到。
实验结果
研究问题
- RQ1能否使温度缩放在深度神经网络校准中对小样本和噪声验证集更具鲁棒性?
- RQ2所提出的注意力机制是否能在标准TS失效的高度准确模型中提升校准性能?
- RQ3在多种数据集和网络架构下,ATS与标准TS在NLL、ECE等校准指标上的表现如何比较?
- RQ4ATS是否能通过更好地区分正确预测与错误预测,提升医疗诊断系统中决策的可靠性?
- RQ5ATS在低数据量和标签噪声环境下性能更稳定、表现更优的理论基础是什么?
主要发现
- 在ISIC数据集上,ATS相较于标准TS显著降低NLL与ECE,ECE分别降至0.333%与7.978%。
- 在ISIC上训练的ResNet200模型中,ATS实现NLL为0.333、ECE为3.548%,优于TS(NLL: 0.379,ECE: 7.978%)。
- 即使仅有801个验证样本,ATS仍能保持校准稳定性,而TS在小样本设置下表现出高方差与不稳定性。
- ATS在标签噪声环境下仍保持优异性能,展现出TS无法收敛至最优温度时的鲁棒性。
- 在皮肤病变检测应用中,ATS提升了可靠性图的AUC,表明其能更有效地分离正确与错误分类样本。
- 可视化对比显示,ATS比TS更有效地增大正确与错误分类样本之间的置信度差距。
更好的研究,从现在开始
从阅读论文到最终审阅,大幅缩短您的研究时间。
无需绑定信用卡
本解读由 AI 生成,并经人工编辑审核。