NeurIPS 2026Coming to NeurIPS?Explore papers, orals & directions

Deep metric learning for computer vision: A brief overview

Deen Dayal Mohan, Bhavin Jawade, Srirangaraj Setlur, Venu GovindarajuHandbook 2023 · OpenAlex

Abstract

Deep Metric Learning (DML) represents a fundamental shift in computer vision, moving beyond simple classification toward the creation of discriminative embedding spaces. By mapping data into a geometric space where distance correlates with semantic similarity, DML enables neural networks to "measure" relationships between objects. This overview explores the evolution of DML from basic pair-based losses to efficient proxy-based methods and modern multi-modal regularizations.

Introduction

Standard deep learning architectures typically rely on cross-entropy loss for classification tasks. While effective for closed-set problems, cross-entropy struggles with high intra-class variance (e.g., the same person appearing different across photos) and low inter-class variance (e.g., different individuals appearing similar). Furthermore, classification models are inherently limited by a fixed number of classes.

Deep Metric Learning addresses these limitations by learning a representation function, or embedding. This approach is critical for "open-set" problems such as face recognition, image retrieval, and person re-identification, where a model must compare images it did not encounter during training. The primary challenge in DML lies in designing loss functions that can efficiently organize these high-dimensional embedding spaces.

Methodological Framework

The evolution of DML can be categorized into three primary pillars: pair-based formulations, proxy-based methods, and advanced regularizations.

1. Pair-based Formulations

These methods rely on the relationships between individual samples within a mini-batch:

  • Contrastive Loss: The foundational DML loss, which pulls positive pairs together and pushes negative pairs apart, provided they fall within a defined "margin."
  • Triplet Loss: Utilizes a triplet consisting of an Anchor, a Positive, and a Negative sample. It ensures the anchor is closer to the positive than to the negative.
  • N-Pair & Multi-Similarity (MS) Loss: These refine efficiency by considering multiple negatives simultaneously or weighting pairs based on their relative "hardness"—the degree to which they violate desired distance constraints.

2. Proxy-based Methods

To mitigate the $O(n^3)$ computational complexity associated with mining triplets in large datasets, researchers introduced "proxies"—learnable vectors representing an entire class.

  • ProxyNCA: Samples are compared against class proxies rather than individual samples.
  • Proxy Anchor Loss: Treats each proxy as an anchor and interacts it with all samples in a batch, providing a more global perspective of the data distribution.
  • ProxyGML: Employs multiple proxies per class to capture complex, multi-modal intra-class variations.

3. Regularization Techniques

Auxiliary constraints are often added to enhance the robustness of the embedding space:

  • Language Guidance: This involves distilling knowledge from Large Language Models (LLMs) like BERT to ensure visual embeddings respect semantic hierarchies (e.g., ensuring a "husky" embedding is closer to a "wolf" than to a "car").
  • Direction Regularization: A geometric constraint ensuring negative samples are pushed in a direction orthogonal to the class cluster, preventing them from inadvertently interfering with other positive clusters.

Key Insights and Strategic Considerations

The Mining Bottleneck

The most significant hurdle in DML is not necessarily the architecture, but the identification of informative samples. Selecting "easy" pairs results in stagnant learning, while focusing exclusively on the "hardest" pairs can lead to model collapse or failure to converge.

Efficiency via Proxies

Transitioning from sample-to-sample comparisons to sample-to-proxy interactions has drastically reduced training time and memory requirements. These methods often improve accuracy by providing a more stable training signal.

Geometric and Semantic Awareness

Effective DML requires attention to the geometry of the embedding space. Pushing a negative sample radially away from an anchor may accidentally push it closer to a different class. Furthermore, integrating semantic maps from LLMs helps visual models understand the broader context and hierarchy of the physical world.

Applications and Performance

DML is the backbone of several critical computer vision domains, including:

  • Face and Fingerprint Recognition
  • Large-scale Image Retrieval
  • Person Re-Identification
  • Cross-Modal Retrieval

While results vary by task, proxy-based methods generally outperform basic triplet losses in both speed and stability. Multi-Similarity (MS) Loss remains a dominant pair-based baseline due to its sophisticated weighting mechanisms. Currently, regularization techniques involving language guidance are setting new benchmarks in cross-modal tasks, such as text-to-image search.

Limitations and Future Directions

Despite its successes, DML faces ongoing challenges. Pair-based mining remains computationally expensive for massive datasets, and many loss functions are highly sensitive to hyperparameters like "margin" and "temperature."

The field is increasingly moving toward multi-modal representation learning (e.g., CLIP). In these contexts, DML is used to align disparate data types—images, text, and audio—into a single, unified embedding space, paving the way for more generalizable and semantically aware AI systems.

Summary updated

BibTeX
@inproceedings{mohan2023deep,
  author = {Deen Dayal Mohan and Bhavin Jawade and Srirangaraj Setlur and Venu Govindaraju},
  title = {{Deep metric learning for computer vision: A brief overview}},
  booktitle = {Handbook},
  year = {2023},
  doi = {10.1016/bs.host.2023.01.003},
}

Loading related content...

Figure