Efficient Evaluation-Time Uncertainty Estimation by Improved Distillation

Erik Englesson, Hossein AzizpourarXiv 2019

Abstract

In this work we aim to obtain computationally-efficient uncertainty estimates with deep networks. For this, we propose a modified knowledge distillation procedure that achieves state-of-the-art uncertainty estimates both for in and out-of-distribution samples. Our contributions include a) demonstrating and adapting to distillation's regularization effect b) proposing a novel target teacher distribution c) a simple augmentation procedure to improve out-of-distribution uncertainty estimates d) shedding light on the distillation procedure through comprehensive set of experiments.

Introduction

Deep neural networks are often overconfident, providing high-certainty predictions even when they are incorrect or encountering data they have never seen before (Out-of-Distribution, or OOD). While ensembles of models can provide reliable uncertainty estimates, they are computationally expensive to run during evaluation, making them impractical for real-time applications on edge devices or autonomous systems. This paper explores how to "distill" the wisdom and uncertainty of a large ensemble into a single, efficient student network without losing the ability to signal when the model is unsure.

Methodology

The authors build upon vanilla knowledge distillation, where a student network is trained to match the output probability distribution of a teacher ensemble. They introduce several key refinements to improve the student's uncertainty calibration:

  1. Increased Student Capacity: Learning a complex, dispersed probability distribution (the "dark knowledge" of an ensemble) is a harder task than learning hard labels. The authors argue that the student network should often be deeper or wider than the individual networks within the teacher ensemble.
  2. Target Sharpening: Mixing the teacher's soft distribution with the true "hard" label helps reduce entropy and aids student convergence.
  3. Proper Class-Posterior: To prevent the student from mimicking teacher errors, the authors propose a target distribution that steers the student toward the correct label while preserving the relative probabilities of incorrect classes assigned by the teacher.
  4. Improved OOD Augmentation (Student-Aug): In standard distillation, augmented samples are typically mapped to the teacher's prediction of the original image. The proposed "Student-Aug" method uses the teacher's prediction of the transformed image instead, providing the student with more information about how the teacher's uncertainty changes across the data manifold.

Experimental Setup

The researchers evaluated their methods on standard computer vision benchmarks, using CIFAR-10 and CIFAR-100 as "In-Distribution" datasets and SVHN (Street View House Numbers) as the "Out-of-Distribution" dataset. Performance was measured using Classification Error, Negative Log-Likelihood (NLL), and Brier scores to assess both accuracy and calibration.

Results and Discussion

Calibration and Efficiency

The experiments revealed that distillation acts as a powerful regularizer. Students converge more slowly than teachers and are less prone to overfitting, which necessitates higher student capacity. As shown in Figure 1, student models with increased depth achieved NLL and Brier scores that were nearly on par with the 15-model ensembles they were distilled from, while maintaining the inference speed of a single network.

In-distribution performance metrics (Classification Error, NLL, Brier Score) comparing the teacher ensemble and the distilled student network across different ensemble sizes.

Out-of-Distribution Detection

The most striking improvement in OOD detection came from the "Student-Aug" technique. While vanilla students were often overconfident on SVHN data, the improved student correctly assigned high entropy (high uncertainty) to almost all OOD samples. As seen in Figure 2, the Student-Aug method significantly shifted the entropy histogram, matching or even exceeding the teacher ensemble's performance.

Entropy distributions for out-of-distribution (SVHN) data. The Student-Aug method significantly improves uncertainty estimation compared to vanilla distillation, closely matching the teacher ensemble.

Conclusion and Future Work

This work demonstrates that improved distillation techniques can produce single networks with uncertainty estimates comparable to large ensembles. While the "Proper Class-Posterior" modification showed marginal gains on CIFAR-10, it is expected to be more beneficial on harder datasets like ImageNet. Future work will focus on scaling these techniques to larger real-world datasets and further investigating the theoretical underpinnings of the observed regularization effects.

Summary updated

Abstract

In this work we aim to obtain computationally-efficient uncertainty estimates with deep networks. For this, we propose a modified knowledge distillation procedure that achieves state-of-the-art uncertainty estimates both for in and out-of-distribution samples. Our contributions include a) demonstrating and adapting to distillation's regularization effect b) proposing a novel target teacher distribution c) a simple augmentation procedure to improve out-of-distribution uncertainty estimates d) shedding light on the distillation procedure through comprehensive set of experiments.
BibTeX
@misc{englesson2019efficient,
  author = {Erik Englesson and Hossein Azizpour},
  title = {{Efficient Evaluation-Time Uncertainty Estimation by Improved Distillation}},
  year = {2019},
  eprint = {1906.05419},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/1906.05419},
}
Figure