arXivDaily arXiv每日学术速递 周一至周五更新
arXiv 2207.06211cs.CV
收藏

用于改进校准的样品相关自适应温度定标

Sample-dependent Adaptive Temperature Scaling for Improved Calibration

University of Oxford(牛津大学);Meta AI;Five AI Ltd.(Five人工智能有限公司)

Tom Joy, Francesco Pinto, Ser-Nam Lim, Philip H. S. Torr, Puneet K. Dokania

摘要:

现在众所周知,神经网络在其预测的高置信度下可能是错误的,导致校准不良。补偿这一点的最常见的事后方法是执行温度缩放,它通过将logit缩放固定值来调整任何输入上的预测置信度。虽然这种方法通常改善了整个测试数据集的平均校准,但这种改善通常会降低预测的个体置信度,而不管给定输入的分类是正确还是不正确。基于这一认识,我们的方法基于这样的观察:不同的样本对校准误差的贡献不同,其中一些样本需要增加置信度,而另一些样本需要降低置信度。因此,对于每个输入,我们建议预测不同的温度值,从而能够以更精细的粒度调整置信度和准确度之间的不匹配。此外,我们观察到OOD检测的改进结果,并且还可以提取数据点的硬度概念。我们的方法是事后应用的,因此使用非常少的计算时间和可忽略的内存占用,并应用于现成的预训练分类器。我们使用CIFAR 10/100和Tiny-ImageNet数据集在ResNet 50和WideResNet 28 -10架构上测试了我们的方法,表明产生每个数据点的温度也有利于整个测试集的预期校准误差。代码可在:https://github.com/thwjoy/adats.

英文摘要:

It is now well known that neural networks can be wrong with high confidence in their predictions, leading to poor calibration. The most common post-hoc approach to compensate for this is to perform temperature scaling, which adjusts the confidences of the predictions on any input by scaling the logits by a fixed value. Whilst this approach typically improves the average calibration across the whole test dataset, this improvement typically reduces the individual confidences of the predictions irrespective of whether the classification of a given input is correct or incorrect. With this insight, we base our method on the observation that different samples contribute to the calibration error by varying amounts, with some needing to increase their confidence and others needing to decrease it. Therefore, for each input, we propose to predict a different temperature value, allowing us to adjust the mismatch between confidence and accuracy at a finer granularity. Furthermore, we observe improved results on OOD detection and can also extract a notion of hardness for the data-points. Our method is applied post-hoc, consequently using very little computation time and with a negligible memory footprint and is applied to off-the-shelf pre-trained classifiers. We test our method on the ResNet50 and WideResNet28-10 architectures using the CIFAR10/100 and Tiny-ImageNet datasets, showing that producing per-data-point temperatures is beneficial also for the expected calibration error across the whole test set. Code is available at: https://github.com/thwjoy/adats.

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

↑