G-Distillation: Reducing Overconfident Errors on Novel Samples

Zhizhong Li, Derek Hoiem

Introduction

Deep learning models are notoriously overconfident. While they perform exceptionally well on data similar to their training sets, they often make "wildly confident" incorrect predictions when encountering novel samples—such as a new dog breed or an age group not represented in the training data. This "overconfidence gap" poses significant risks in real-world applications like autonomous driving or medical diagnostics, where a model must "know what it doesn't know."

The Problem: Overconfident Errors

In machine learning research, we typically assume that training and testing data are independent and identically distributed (i.i.d.). In practice, this assumption frequently fails. A face recognizer trained on office workers might struggle with children; a self-driving car trained in sunny conditions might be dangerously overconfident in a snowy forest.

The authors identify a specific, dangerous failure mode: high-confidence errors on unfamiliar but valid examples. For instance, a gender classifier was found to be 12 times more likely to produce an error at a 99% confidence level when presented with an age group outside its training distribution.

Examples of high-confidence misclassifications on unfamiliar data, where models assign near 100% probability to incorrect classes.

As shown in the figure above, models can assign near 100% probability to incorrect classes—such as labeling a fish as a bird or a cat as a dog—when the input is slightly outside the expected distribution. This calibration gap is often an order of magnitude higher for unfamiliar samples than for familiar ones.

Methodology and G-Distillation

The researchers compared several existing and novel approaches to improve confidence estimates:

  • Temperature Scaling (T-Scaling): A simple post-processing step where the model's output scores (logits) are divided by a constant $T$ before the final softmax. This "softens" the probability distribution, making the model less "cocky" without changing the rank-order of predictions.
  • Ensembles: Training multiple models (e.g., 10) and averaging their predictions. Because different models tend to disagree in unfamiliar regions of the feature space, the average confidence naturally drops where the data is novel, providing a powerful proxy for epistemic uncertainty.
  • G-Distillation (Generalized Distillation): This is the paper's primary novel contribution. Standard distillation trains a "student" model to match the outputs of a "teacher" ensemble on the training set. G-Distillation adds an unsupervised dataset to this process. By seeing how the ensemble reacts to a wide variety of unlabeled images, the student model learns to mimic the ensemble’s uncertainty even in regions where no labeled data exists.

Experimental Results

The authors tested these methods by splitting datasets (like LFW+ for gender and ImageNet for animals) into "familiar" and "unfamiliar" subsets. Key findings include:

  • Ensembles are the Gold Standard: An ensemble of T-scaled models reduced the Negative Log Likelihood (NLL) by 33-46% on unfamiliar data compared to a standard baseline.
  • The 99% Rule: In the Gender Recognition task, the baseline model had a 14.7% error rate for unfamiliar samples. When the model was 99% confident, it was still wrong 8.0% of the time. Calibrated ensembles brought that "confident error rate" down to near 1%.
  • Distilling Uncertainty: G-Distillation proved that we can "distill" uncertainty. While it still lagged slightly behind the full ensemble, it outperformed standard distillation by using unlabeled data to map the ensemble's caution into a single, lightweight model.

Conclusion

The study concludes that calibration is essential but insufficient on its own; T-scaling is a highly effective baseline, but safety-critical applications should ideally use calibrated ensembles. G-Distillation offers a promising path forward for deploying the robustness of ensembles within the computational constraints of a single model, provided that the unsupervised data sufficiently covers the space of potential novel inputs.

Summary updated

BibTeX
@inproceedings{li2018g,
  author = {Zhizhong Li and Derek Hoiem},
  title = {{G-Distillation: Reducing Overconfident Errors on Novel Samples}},
  booktitle = {IEEE/CVF Conference on Computer Vision and Pattern Recognition},
  year = {2018},
}
Figure