Share your thoughts, 1 month free Claude Pro on usSee more
WorkDL logo mark

Dual Focal Loss for Calibration

About

The use of deep neural networks in real-world applications require well-calibrated networks with confidence scores that accurately reflect the actual probability. However, it has been found that these networks often provide over-confident predictions, which leads to poor calibration. Recent efforts have sought to address this issue by focal loss to reduce over-confidence, but this approach can also lead to under-confident predictions. While different variants of focal loss have been explored, it is difficult to find a balance between over-confidence and under-confidence. In our work, we propose a new loss function by focusing on dual logits. Our method not only considers the ground truth logit, but also take into account the highest logit ranked after the ground truth logit. By maximizing the gap between these two logits, our proposed dual focal loss can achieve a better balance between over-confidence and under-confidence. We provide theoretical evidence to support our approach and demonstrate its effectiveness through evaluations on multiple models and datasets, where it achieves state-of-the-art performance. Code is available at https://github.com/Linwei94/DualFocalLoss

Linwei Tao, Minjing Dong, Chang Xu• 2023

Related benchmarks

TaskDatasetResultRank
Image ClassificationCIFAR-10 (test)--
1063
Image ClassificationTiny ImageNet (test)
Accuracy53.02
859
Fine-grained Image ClassificationCUB200 2011 (test)
Accuracy74.93
585
Image ClassificationCIFAR-100 (test)--
429
Image ClassificationCIFAR100 (test)
Top-1 Accuracy80.35
407
Image ClassificationTinyImageNet (val)
Accuracy51.04
289
Model CalibrationCIFAR-100
ECE1.26
150
Out-of-Distribution DetectionCIFAR-10 vs SVHN (test)
AUROC0.9387
146
Out-of-Distribution DetectionCIFAR-10 vs CIFAR-100 (test)
AUROC86.43
119
CalibrationCIFAR-100 (test)
ECE1.83
104
Showing 10 of 48 rows

Other info

Follow for update