Introduction
In computer vision, instance embeddings typically map images to fixed points in a high-dimensional space. While effective for clear data, this "point embedding" approach struggles with ambiguity. When an image is blurry or occluded, it may represent multiple potential identities. A point embedding is forced to choose a single coordinate, often landing in a "no man's land" that matches neither possibility correctly.
Hedged Instance Embedding (HIB)
To address this, we propose Hedged Instance Embedding (HIB). Instead of a deterministic mapping $x \to z$, HIB maps an input to a distribution $p(z|x)$, typically a Gaussian or a Mixture of Gaussians (MoG). This allows the model to represent uncertainty by spreading probability mass across the embedding space.
The training process utilizes the Variational Information Bottleneck (VIB) principle. By adding a KL-divergence penalty against a standard normal prior, the model is encouraged to find a "minimal sufficient" representation. This prevents overconfidence and ensures that the variance of the distribution meaningfully reflects the input's ambiguity.
Handling Ambiguity through "Hedging"
The core advantage of HIB is its ability to "hedge its bets." In cases of high aleatoric uncertainty—such as a digit that could be either a '1' or a '4'—the stochastic embedding can cover both relevant clusters in the latent space.
We also define a "self-mismatch probability" $\eta(x)$ as a measure of uncertainty. By sampling twice from the same image's distribution, we can determine how likely the model is to disagree with itself. A high $\eta(x)$ serves as a reliable indicator of potential model failure.
Experimental Results
We evaluated HIB on a novel N-digit MNIST benchmark and a large-scale Pet Identification dataset.
- N-digit MNIST: On corrupted 2-digit images, HIB improved Average Precision from 88.0% to 91.2%. In K-Nearest Neighbor tasks with occlusions, accuracy jumped from 58.3% to 76.0%.
- Pet Identification: On a dataset of ~1 million images, HIB achieved 0.777 balanced accuracy. Crucially, the uncertainty measure $\eta(x)$ showed a 0.995 correlation with actual error rates, demonstrating its utility as a real-world diagnostic tool.
Conclusion
Hedged Instance Embedding provides a robust framework for modeling aleatoric uncertainty in metric learning. By representing images as distributions rather than points, models can better navigate ambiguous data and provide interpretable confidence scores. Future work will explore the extension of this method to epistemic uncertainty and its behavior in very high-dimensional latent spaces.
Summary updated