[Paper Review] Well-calibrated Model Uncertainty with Temperature Scaling for Dropout Variational Inference
This paper proposes temperature scaling for dropout variational inference to produce well-calibrated model uncertainty in deep neural networks. By applying a learnable temperature parameter to soften the softmax output during Monte Carlo dropout inference, the method significantly reduces uncertainty miscalibration—demonstrated by up to a 66% reduction in uncertainty calibration error (UCE) on CIFAR-100 with ResNet-101—while preserving model accuracy and enabling robust prediction rejection.
Model uncertainty obtained by variational Bayesian inference with Monte Carlo dropout is prone to miscalibration. The uncertainty does not represent the model error well. In this paper, temperature scaling is extended to dropout variational inference to calibrate model uncertainty. Expected uncertainty calibration error (UCE) is presented as a metric to measure miscalibration of uncertainty. The effectiveness of this approach is evaluated on CIFAR-10/100 for recent CNN architectures. Experimental results show, that temperature scaling considerably reduces miscalibration by means of UCE and enables robust rejection of uncertain predictions. The proposed approach can easily be derived from frequentist temperature scaling and yields well-calibrated model uncertainty. It is simple to implement and does not affect the model accuracy.
Motivation & Objective
- To address the miscalibration of model uncertainty in dropout variational inference, where predicted confidence does not align with actual error rates.
- To extend temperature scaling—originally used for calibrating frequentist softmax outputs—to Bayesian deep learning with Monte Carlo dropout.
- To define a new metric, expected uncertainty calibration error (UCE), to quantify uncertainty miscalibration in Bayesian models.
- To enable robust rejection of uncertain predictions through well-calibrated uncertainty estimates.
- To demonstrate that temperature scaling outperforms confidence penalty during training in achieving calibrated uncertainty.
Proposed method
- Apply temperature scaling to the logits of a neural network during Monte Carlo dropout inference, using a scalar temperature parameter T to soften the softmax output.
- Derive the temperature scaling update rule via gradient descent on the expected uncertainty calibration error (UCE) using a validation set.
- Use Monte Carlo dropout with N forward passes to approximate the posterior predictive distribution and compute uncertainty via normalized entropy.
- Define normalized entropy H̃(p) as a measure of uncertainty, scaled to [0,1], to quantify prediction confidence across all classes.
- Calibrate uncertainty by minimizing UCE on a validation set, where UCE measures the expected difference between predicted confidence and actual accuracy across confidence bins.
- Apply the same learned temperature T to both model likelihood and uncertainty estimation, ensuring consistency in calibration.
Experimental results
Research questions
- RQ1Can temperature scaling effectively reduce miscalibration in model uncertainty obtained via Monte Carlo dropout?
- RQ2How does temperature scaling compare to confidence penalty in calibrating uncertainty and prediction confidence?
- RQ3To what extent does temperature scaling improve the reliability of uncertainty-based prediction rejection?
- RQ4Does temperature scaling preserve model accuracy while improving uncertainty calibration?
- RQ5What is the impact of network architecture and depth on the effectiveness of temperature scaling for uncertainty calibration?
Key findings
- Temperature scaling reduced uncertainty calibration error (UCE) by up to 66% on ResNet-101 for CIFAR-100, with UCE dropping from 30.33% to 2.41%.
- On CIFAR-10 with ResNet-18, UCE was reduced from 7.60% (uncalibrated) to 5.27% (TS-calibrated), showing consistent improvement.
- Temperature scaling outperformed confidence penalty: while CP reduced ECE from 5.20% to 3.37%, TS achieved lower ECE and UCE with better uncertainty calibration.
- Well-calibrated uncertainty enabled robust prediction rejection: as the uncertainty threshold decreased, error dropped almost linearly, indicating reliable uncertainty estimates.
- The method is simple to implement, does not affect model accuracy, and can be applied post-training without retraining.
- Reliability diagrams confirmed that TS-calibrated uncertainty better aligns predicted confidence with actual accuracy across confidence bins.
Read this paper
Open the full text in the Nubint reader and ask about any passage as you read.
Read this paper on NubintThis review was generated by AI from the original paper. Please check the paper before citing it.