A general framework for ensemble distribution distillation

Jakob Lindqvist, Amanda Olmin, Fredrik Lindsten, Lennart SvenssonMLSP 2020 · DOI

Abstract

Ensembles of neural networks have been shown to give better performance than single networks, both in terms of predictions and uncertainty estimation. Additionally, ensembles allow the uncertainty to be decomposed into aleatoric (data) and epistemic (model) components, giving a more complete picture of the predictive uncertainty. Ensemble distillation is the process of compressing an ensemble into a single model, often resulting in a leaner model that still outperforms the individual ensemble members. Unfortunately, standard distillation erases the natural uncertainty decomposition of the ensemble. We present a general framework for distilling both regression and classification ensembles in a way that preserves the decomposition. We demonstrate the desired behaviour of our framework and show that its predictive performance is on par with standard distillation.

Introduction

Ensembles are the gold standard for reliable machine learning, providing not just predictions but a nuanced sense of certainty. They allow for the decomposition of uncertainty into two critical types: aleatoric (inherent noise in the data) and epistemic (uncertainty due to a lack of training data). Despite these benefits, ensembles are computationally expensive and memory-intensive, making them impractical for edge devices or real-time applications.

Standard "distillation"—where a single student model learns to mimic a teacher ensemble—typically collapses the ensemble's diverse opinions into a single average. This process erases the epistemic uncertainty, leaving the student model unaware of its own ignorance. This paper introduces Distribution Distillation (DD), a framework designed to compress ensembles while preserving this vital uncertainty decomposition.

Methods

The core idea of Distribution Distillation is to train the student model to predict the parameters of a distribution that describes the ensemble's outputs, rather than predicting the final output itself.

In this higher-order approach, if an ensemble of regression models predicts various means and variances, the distilled model is trained to output the parameters of a distribution (such as a Normal distribution) over those ensemble parameters. The student model is optimized by minimizing the Negative Log-Likelihood (NLL) of the ensemble members' outputs. Essentially, the student learns to answer: "Given this input $x$, what is the distribution of predictions my teachers would have made?" This framework is generic and can be applied to both regression (using Gaussian distributions) and classification (using Dirichlet distributions or logit-space distillation).

Figure 5: Comparison of uncertainty decomposition in toy regression. (a) Original ensemble, (b) Distilled model using the DD framework, and (c) Standard mixture distillation. The DD model (b) successfully preserves the uncertainty profile of the ensemble (a).

Experimental Evaluation

The researchers evaluated the framework across several benchmarks, including toy regression, UCI regression datasets, and CIFAR-10 image classification. A key focus was Out-of-Distribution (OOD) evaluation using corrupted versions of CIFAR-10 to test model robustness.

Key Results

  • Preserving Decomposition: In regression tasks, the DD framework successfully captured complex uncertainty profiles. As shown in Figure 5, the distilled model (b) maintains an uncertainty decomposition nearly identical to the full ensemble (a), whereas alternative methods like mixture distillation (c) fail to represent the same epistemic spread.
  • Efficiency and Accuracy: The distilled models consistently performed nearly as well as the full 10-member ensembles while requiring 10x less memory and computation.
  • OOD Robustness: On corrupted CIFAR-10 data, the Distribution Distilled models maintained significantly better Expected Calibration Error (ECE) than vanilla distilled models. By preserving epistemic uncertainty, the models "knew when they didn't know," which is critical for safety in real-world deployments.
Figure 6: Performance metrics on CIFAR-10 (Test) and corrupted variants (Intensity 1-5). Distribution Distilled models (Gaussian and Dirichlet) show superior calibration (lower ECE) as data corruption increases.

Discussion and Conclusion

This framework demonstrates that it is possible to achieve the efficiency of a single model without losing the sophisticated uncertainty estimation of an ensemble. While a slight performance gap remains compared to full ensembles, the ability to maintain high calibration on out-of-distribution data makes DD a powerful tool for deploying reliable AI on resource-constrained hardware. Future work will focus on refining loss function tuning and automating the selection of output distribution parameterizations.

Summary updated

BibTeX
@inproceedings{lindqvist2020general,
  author = {Jakob Lindqvist and Amanda Olmin and Fredrik Lindsten and Lennart Svensson},
  title = {{A general framework for ensemble distribution distillation}},
  booktitle = {MLSP},
  year = {2020},
  doi = {10.1109/mlsp49062.2020.9231703},
}
Figure