Deep neural networks are notoriously overconfident, often making high-certainty predictions even when they are wrong or faced with out-of-distribution (OOD) data. Ensembles—groups of models trained independently—solve this by providing a "vote." If all models agree but are unsure, it signals data uncertainty (e.g., a blurry image). If the models wildly disagree, it signals knowledge uncertainty (e.g., showing a car-classifier a picture of a boat).
However, running dozens of models in production is computationally expensive and memory-intensive. Standard Knowledge Distillation (KD) can shrink an ensemble into one model, but it typically only teaches the student to match the ensemble's average output. This destroys the information about how much the models disagreed, ruining the student's ability to estimate knowledge uncertainty.
To solve this, researchers introduce Ensemble Distribution Distillation (EnD²), a method that compresses an entire ensemble into a single model while preserving the diversity of its internal disagreements.
Modeling Distributions with EnD²
Instead of a standard softmax output that yields a single probability vector, the EnD² model uses a Prior Network architecture to predict the parameters of a Dirichlet distribution. This allows the model to represent a distribution over distributions, effectively capturing the spread of the original ensemble's opinions.
During training, the student model treats the individual predictions of every ensemble member as samples. The Negative Log-Likelihood loss function forces the student to shape its Dirichlet distribution to encompass all these different predictions. Because ensemble predictions can be very "sharp" (concentrated at corners of the probability simplex), the authors use temperature annealing to smooth out these distributions early in training, gradually cooling back down to the target.
Key Insights
- Diversity is Information: The variance within an ensemble is a crucial signal. By capturing this variance, a single model can emulate the "disagreement" of a crowd.
- Separable Uncertainties: Using Dirichlet parameters provides closed-form math for different types of uncertainty. By calculating Mutual Information, the model can specifically isolate knowledge uncertainty, which is highly effective for OOD detection.
- The "Dark Holes" of Knowledge: Without seeing some form of auxiliary (OOD) data during distillation, even EnD² can have "dark holes"—regions far from training data where it mistakenly becomes confident again. Using a small amount of auxiliary data during distillation helps the model learn to stay uncertain in the face of "unknown unknowns."
Performance and Results
The researchers evaluated EnD² across several benchmarks, including an artificial spiral dataset for 2D visualization, and image classification tasks (CIFAR-10, CIFAR-100, TinyImageNet).
- Performance Retention: EnD² models approach the classification accuracy of the full ensemble. On CIFAR-10, an ensemble had a 6.2% error rate; EnD² achieved 7.3%, significantly outperforming a standard single model (8.0%).
- Superior OOD Detection: Tested on unseen datasets like LSUN, EnD² consistently outperformed standard distillation and baseline networks at identifying misclassifications and OOD samples. On the LSUN detection task, EnD² reached ~94% AUC-ROC, nearly matching the full ensemble.
- Calibration: The distilled models showed improved calibration, meaning their predicted probabilities more accurately reflected their actual likelihood of being correct.
Limitations and Future Work
The authors note that the Dirichlet distribution might be too simple for all use cases. Real-world ensemble predictions can be multi-modal (grouped into distinct "opinions"), which a single Dirichlet cannot capture perfectly. Future work may explore more flexible distributions, such as Mixtures of Dirichlets or Logistic-Normal distributions. Additionally, while EnD² excels in classification, the framework requires further investigation to be extended to regression tasks, where uncertainty estimation is mathematically different but equally critical.
Summary updated