Abstract
Fully convolutional neural networks (FCNs), and in particular U-Nets, have achieved state-of-the-art results in semantic segmentation for numerous medical imaging applications. Moreover, batch normalization and Dice loss have been used successfully to stabilize and accelerate training. However, these networks are poorly calibrated i.e. they tend to produce overconfident predictions both in correct and erroneous classifications, making them unreliable and hard to interpret. In this paper, we study predictive uncertainty estimation in FCNs for medical image segmentation. We make the following contributions: 1) We systematically compare cross entropy loss with Dice loss in terms of segmentation quality and uncertainty estimation of FCNs; 2) We propose model ensembling for confidence calibration of the FCNs trained with batch normalization and Dice loss; 3) We assess the ability of calibrated FCNs to predict segmentation quality of structures and detect out-of-distribution test examples. We conduct extensive experiments across three medical image segmentation applications of the brain, the heart, and the prostate to evaluate our contributions. The results of this study offer considerable insight into the predictive uncertainty estimation and out-of-distribution detection in medical image segmentation and provide practical recipes for confidence calibration. Moreover, we consistently demonstrate that model ensembling improves confidence calibration.
Introduction
In clinical settings, the reliability of a segmentation mask is as critical as its accuracy. A well-calibrated model provides confidence scores that reflect the true probability of correctness. However, standard U-Nets often exhibit extreme overconfidence, a problem exacerbated by the popular Dice loss. While Dice loss effectively handles class imbalance, it is not a "proper scoring rule" and tends to push pixel probabilities toward 0 or 1 regardless of actual certainty. This research investigates practical methods to maintain high segmentation performance while achieving reliable uncertainty estimates.
Methodology
The study evaluates two primary loss functions—Weighted Cross-Entropy (CE) and Soft Dice Loss—across three benchmarks:
- Brain Tumor (BraTS 2017): Multi-modal MRI.
- Heart (ACDC 2017): Cine MRI for ventricular segmentation.
- Prostate (PROSTATEx & PROMISE12): T2-weighted MRI, with PROMISE12 serving as an out-of-distribution (OOD) test set due to different imaging hardware.
Two uncertainty estimation techniques were compared: MC Dropout, which samples from a model with active dropout during inference, and Model Ensembling, which averages predictions from $M$ independently trained models. To quantify segment-level confidence, the authors proposed using average pixel-wise entropy as a scalar proxy for volume-level quality.
Results and Discussion
The Dice Paradox and Calibration
Experiments revealed that while Dice loss consistently yields superior segmentation accuracy (higher Dice scores), it results in significantly poorer calibration compared to Cross-Entropy. Uncalibrated models produce highly overconfident probability maps, even in regions of error.
Ensembling as a Robust Solution
Model ensembling ($M \ge 5$) emerged as the most effective "fix" for calibration. It not only improved Dice scores further but also drastically reduced the Expected Calibration Error (ECE) and Negative Log-Likelihood (NLL). For instance, ensembling reduced NLL by 66% for prostate and 62% for brain tumor tasks compared to single Dice-trained models.
Entropy as a Proxy for Segmentation Quality
A key finding is the strong negative correlation ($r \approx -0.77$ to $-0.92$) between the average entropy of a predicted segment and its actual Dice score. This allows clinicians to use the model's internal uncertainty to flag potentially failed segmentations in the absence of ground truth.
Out-of-Distribution Detection
Calibrated models also demonstrated the ability to detect OOD data. When tested on the PROMISE12 dataset (different MRI protocol), uncertainty metrics spiked, providing a vital "I don't know" signal that prevents silent failures in clinical software.
Conclusion
This study provides a practical recipe for reliable medical image segmentation: use Dice loss for performance, but employ model ensembling to ensure calibration. The proposed entropy-based quality metric offers a transparent way to communicate model confidence to clinicians, enhancing the safety and interpretability of deep learning in medicine. While ensembling increases computational cost, the gains in reliability and the ability to detect out-of-distribution data are significant for clinical deployment.
Summary updated