Focal Gradient: Improving the Calibration of Deep Neural Networks with an Implicit Loss Function

Deep neural networks used for image classification are typically not well calibrated. Current evidence suggests that this miscalibration is primarily driven by the excessive tendency of the cross-entropy loss to increase the confidence during training. Thus, addressing this undesired behavior arises as a promising approach to achieving deep learning models that are well calibrated by default. In this work, first, we analyze existing log-based loss functions that can be used in place of cross-entropy loss to improve calibration. We show that, despite being built upon cross-entropy loss, existing alternatives lack some sensible properties of cross-entropy for training with gradient descent. Based on these observations, we propose Focal Gradient, an implicit loss function that aims to correct the main driving factor in the miscalibration of the networks while also providing useful properties for training with gradient descent. We conduct a comparative study on image classification benchmarks, considering different factors. The results show that Focal Gradient provides the best calibration performance among all the methods. Additionally, when temperature scaling is included in the picture, Focal Gradient is the only method able to consistently outperform cross-entropy loss. Finally, we also show that some advantages of our proposal can be translated to other related methods.

Authors

Institutions

Publication Details

Journal
Zenodo (CERN European Organization for Nuclear Research)
Published
2026-11-09
DOI
https://doi.org/10.5281/zenodo.24068047
Primary Topic
Advanced Neural Network Applications
Type
preprint
Controls
|||
ALL TIME
JAN
FEB
MAR
APR
MAY
JUN
JUL
AUG
SEP
OCT
NOV
preprint

Focal Gradient: Improving the Calibration of Deep Neural Networks with an Implicit Loss Function

Jorge Novo, José Rouco, Álvaro S. Hervella, Marcos Ortega
Zenodo (CERN European Organization for Nuclear Research)
Advanced Neural Network Applications
preprint

Focal Gradient: Improving the Calibration of Deep Neural Networks with an Implicit Loss Function

Jorge Novo, José Rouco, Álvaro S. Hervella, Marcos Ortega
preprint en

Abstract

Deep neural networks used for image classification are typically not well calibrated. Current evidence suggests that this miscalibration is primarily driven by the excessive tendency of the cross-entropy loss to increase the confidence during training. Thus, addressing this undesired behavior arises as a promising approach to achieving deep learning models that are well calibrated by default. In this work, first, we analyze existing log-based loss functions that can be used in place of cross-entropy loss to improve calibration. We show that, despite being built upon cross-entropy loss, existing alternatives lack some sensible properties of cross-entropy for training with gradient descent. Based on these observations, we propose Focal Gradient, an implicit loss function that aims to correct the main driving factor in the miscalibration of the networks while also providing useful properties for training with gradient descent. We conduct a comparative study on image classification benchmarks, considering different factors. The results show that Focal Gradient provides the best calibration performance among all the methods. Additionally, when temperature scaling is included in the picture, Focal Gradient is the only method able to consistently outperform cross-entropy loss. Finally, we also show that some advantages of our proposal can be translated to other related methods.

Zenodo (CERN European Organization for Nuclear Research)
Universidade da Coruña (ES), Universidade de Santiago de Compostela (ES), Instituto de Investigación Biomédica de A Coruña (ES)
Advanced Neural Network Applications
AI Navigator

Ask Laika to Summarize, Analyze, and Connect papers live on the map.

Summarize Papers & Methodologies

Extract key findings, datasets, and comparative methods across publications.

Benchmark Rankings & Visual Analytics

Rank top research institutions, authors, funders, topics, and journals by Field-Weighted Citation Impact (FWCI) and paper volume with instant charts.

Connect Distant Disciplines

Bridge topological clusters on the map to find hidden collaborative intersections.

Laika access coming soon