Uncertainties of Latent Representations in Computer Vision

Michael Kirchhof, Michael Kirchhof 0002 · DOI

Introduction

Modern computer vision models, particularly deep neural networks, are notoriously overconfident. When processing an image, these models typically map inputs to a single point in a high-dimensional latent space. While this deterministic approach achieves high accuracy on standard benchmarks, it fails to account for inherent ambiguity—such as blurriness, occlusion, or out-of-distribution samples. In safety-critical applications, a model's ability to "know what it doesn't know" is as crucial as its predictive accuracy.

This paper summarizes the contributions of Michael Kirchhof's 2024 dissertation from the University of Tübingen, which introduces a framework for integrating uncertainty directly into latent representations. By transitioning from point-based embeddings to probabilistic distributions, the work enables models to provide reliable, zero-shot uncertainty estimates that scale to large-scale vision architectures.

Methodology: Probabilistic Latent Spaces

The core innovation lies in the adoption of Probabilistic Embeddings. Instead of representing an image $x$ as a fixed vector $z$, the encoder $e(x)$ outputs the parameters of a distribution. Specifically, the research utilizes the von Mises-Fisher (vMF) distribution, which is effectively a Gaussian distribution projected onto a hypersphere. The mean of the distribution represents the semantic content, while the concentration parameter (inverse variance) quantifies the model's uncertainty.

To train these representations without explicit uncertainty labels, the author introduced MCInfoNCE Loss, a Monte-Carlo adaptation of the Contrastive InfoNCE loss. This allows the model to learn uncertainty through self-supervision: the model learns that noisy or ambiguous samples should have higher variance to minimize the loss during contrastive learning.

Scalability via StopGrad

A significant hurdle in training uncertainty-aware models is the computational cost and potential for "gradient conflicts," where the task of learning uncertainty interferes with the backbone's ability to learn features. Kirchhof proposes a StopGrad mechanism. By freezing the backbone and training only a lightweight "uncertainty head" using cached representations, the training time for a Vision Transformer (ViT-Large) is reduced from weeks to just 2.5 hours on a single V100 GPU.

The URL Benchmark

To rigorously evaluate these models, the Uncertainty-aware Representation Learning (URL) benchmark was developed. Central to this benchmark is the R-AUROC metric, which assesses whether a model’s internal uncertainty can predict its own downstream errors (e.g., incorrect nearest-neighbor retrieval). This provides a more meaningful measure of trustworthiness than standard accuracy alone.

Results and Discussion

The proposed framework was evaluated across a diverse set of datasets, including ImageNet-21k for pretraining and specialized sets like CUB-200 and Stanford Online Products for evaluation.

Performance and Reliability

  • Accuracy Gains: Incorporating uncertainty actually improved retrieval accuracy. By accounting for ambiguity, the model learns more robust features, effectively "down-weighting" noisy samples during the learning process.
  • Human Alignment: The model's uncertainty estimates showed a high rank correlation (0.80) with human annotator disagreement on datasets like CIFAR-10H and Treeversity. This indicates that the model's "doubt" aligns with human perception of ambiguity.
  • Zero-Shot Transfer: A key finding is the transferability of these uncertainties. Models trained on ImageNet-21k maintained high R-AUROC scores across ten different datasets (e.g., Oxford Pets, SUN, DTD) without any task-specific fine-tuning.

Aleatoric vs. Epistemic Uncertainty

The research demonstrates that these latent uncertainties primarily capture aleatoric uncertainty—the ambiguity inherent in the data itself. This makes the approach particularly suitable for "plug-and-play" use with pretrained models, where the goal is to identify difficult or ambiguous inputs in real-time.

Conclusion

The transition from deterministic to probabilistic embeddings represents a significant step toward trustworthy AI. By providing a mathematically grounded, scalable, and transferable framework for latent uncertainty, this work equips computer vision models with the necessary tools to handle real-world ambiguity. Future research will likely explore multi-modal distributions to capture more complex ambiguities and further bridge the gap between aleatoric and epistemic uncertainty quantification.

Summary updated

BibTeX
@inproceedings{kirchhof2024uncertainties,
  author = {Michael Kirchhof and Michael Kirchhof},
  title = {{Uncertainties of Latent Representations in Computer Vision}},
  booktitle = {Undefined},
  year = {2024},
  url = {https://openreview.net/forum?id=ZC7PwilFrx},
}
Figure