Variance & Greediness: A comparative study of metric-learning losses

Donghuo Zeng, Hao Niu, Zhi Li, Masato Taya
1/29/2026
cs.CV

No confident code implementation found for this paper.

Abstract

Metric learning is central to retrieval, yet its effects on embedding geometry and optimization dynamics are not well understood. We introduce a diagnostic framework, VARIANCE (intra-/inter-class variance) and GREEDINESS (active ratio and gradient norms), to compare seven representative losses, i.e., Contrastive, Triplet, N-pair, InfoNCE, ArcFace, SCL, and CCL, across five image-retrieval datasets. Our analysis reveals that Triplet and SCL preserve higher within-class variance and clearer inter-class margins, leading to stronger top-1 retrieval in fine-grained settings. In contrast, Contrastive and InfoNCE compact embeddings are achieved quickly through many small updates, accelerating convergence but potentially oversimplifying class structures. N-pair achieves a large mean separation but with uneven spacing. These insights reveal a form of efficiency-granularity trade-off and provide practical guidance: prefer Triplet/SCL when diversity preservation and hard-sample discrimination are critical, and Contrastive/InfoNCE when faster embedding compaction is desired.

View on arXivView PDF

Code Implementations

No confident code match yet

We couldn't find an author-owned or strongly-evidenced community implementation for this paper. Any repos shown below are weak matches — verify before relying on them.

No code implementations found yet.

Know of an implementation? Let us know in the comments below!

Cite this paper

@article{zeng2026variance,
  title  = {Variance & Greediness: A comparative study of metric-learning losses},
  author = {Donghuo Zeng and Hao Niu and Zhi Li and Masato Taya},
  year   = {2026},
  eprint = {2601.21450},
  archivePrefix = {arXiv},
  url    = {http://arxiv.org/abs/2601.21450v1}
}

Add a badge to your README

Shows whether official code is linked for this paper.

Code of Paper badge
[![Code of Paper](https://codeofpaper.com/badge/2601.21450.svg)](https://codeofpaper.com/paper/2601.21450)

Discussion