Pitfalls of In-Domain Uncertainty Estimation and Ensembling in Deep Learning

Arsenii Ashukha, Alexander Lyzhov, Dmitry Molchanov, Dmitry P. Vetrov

Abstract

While uncertainty estimation and ensembling are critical for reliable deep learning, current evaluation practices often rely on flawed metrics and overstate the efficiency of snapshot-based methods. This paper introduces the Deep Ensemble Equivalent (DEE) score to quantify the effective diversity of ensembles. Our findings reveal that many "efficient" ensembling techniques provide significantly less diversity than independently trained models, and that post-hoc calibration is essential for any meaningful comparison of uncertainty metrics.

The Problem: Metric Unreliability and the Efficiency Illusion

Deep Neural Networks (DNNs) are notoriously overconfident, often predicting incorrect labels with high certainty. To address this, researchers employ uncertainty estimation and ensembling. However, two major issues plague current research:

  1. Metric Unreliability: Standard "in-domain" uncertainty metrics are highly sensitive to a model's "temperature" (the scaling of output probabilities). Without proper calibration, these metrics may rank models arbitrarily based on fixable calibration errors rather than inherent predictive quality.
  2. The Efficiency Illusion: Recent "efficient" ensembling methods—which take snapshots of a single model during training—claim to offer the benefits of ensembles at a fraction of the cost. The authors question whether these snapshots actually provide the "global" diversity necessary for robust uncertainty estimation.

Methodological Shifts: Calibration and DEE

To ensure fair comparisons, the authors propose two key shifts in evaluation methodology:

  • Calibrated Log-Likelihood: Models must be evaluated at their optimal temperature (post-hoc calibration). This isolates the model's inherent predictive power from simple miscalibration.
  • Deep Ensemble Equivalent (DEE) Score: This novel metric quantifies efficiency by asking: "How many independently trained models (Deep Ensembles) would be required to match this method's performance?"

Key Insights and Ideas

Temperature Scaling is Mandatory

Without temperature scaling, model rankings are essentially random. Once calibrated, the performance gap between complex Bayesian approaches and standard networks often disappears, suggesting that many perceived gains in uncertainty estimation are simply improvements in calibration.

Test-Time Augmentation (TTA) as a Baseline

A surprisingly powerful and "free" win is Test-Time Augmentation (TTA), where predictions are averaged over random crops or flips of the same image. On ImageNet, a single model using TTA can rival the performance of a small Deep Ensemble.

Log-likelihood vs. ensemble size for Deep Ensembles with and without Test-Time Augmentation (TTA).

The Diminishing Returns of Snapshots

Snapshot-based methods like FGE or SWAG are "local" explorers. While they may use dozens of snapshots, they fail to capture the global diversity of independent training runs. Their DEE scores typically saturate quickly, often reaching an effective size of only 2 to 5 independent models regardless of the number of snapshots taken.

Key Results: Deep Ensembles Remain King

Across CIFAR-10, CIFAR-100, and ImageNet, Deep Ensembles (independently trained models) consistently provide the best performance for a fixed computational budget during inference.

Deep Ensemble Equivalent (DEE) scores across three datasets, showing that most efficient ensembling methods saturate at a low effective ensemble size.

The DEE scores highlight a massive gap between the nominal number of members in an ensemble and its effective diversity. Furthermore, the authors found a very high correlation ((\rho > 0.95)) between accuracy and calibrated log-likelihood, suggesting that for in-domain tasks, improving model accuracy is often the most direct path to better uncertainty estimation.

Limitations and Future Work

This study focuses on in-domain uncertainty. The utility of these metrics and methods may differ significantly for out-of-distribution (OOD) detection. Additionally, while snapshot methods currently saturate, future work could focus on better hyperparameter schedules to help these "local" methods capture more "global" diversity, potentially closing the gap with Deep Ensembles.

Summary updated

BibTeX
@inproceedings{ashukha2020pitfalls,
  author = {Arsenii Ashukha and Alexander Lyzhov and Dmitry Molchanov and Dmitry P. Vetrov},
  title = {{Pitfalls of In-Domain Uncertainty Estimation and Ensembling in Deep Learning}},
  booktitle = {International Conference on Learning Representations},
  year = {2020},
  url = {https://openreview.net/forum?id=7aXixTNDJ0},
}
Figure