对比7种度量学习损失函数,发现不同方法在收敛速度与特征区分度间有权衡。
Variance & Greediness: A comparative study of metric-learning losses
- 设计方差与贪婪度诊断框架,量化分析嵌入空间特性。
- 三元组和SCL保持更高类内方差与清晰类间间隔,细粒度检索表现更优。
- 对比损失和InfoNCE收敛快但压缩特征,适合追求速度的场景。
度量学习在信息检索中至关重要,但其对嵌入几何结构与优化动态的影响尚不明确。本文提出VARIANCE(类内/类间方差)与GREEDINESS(活跃比率与梯度范数)诊断框架,对比七种代表性损失函数——对比损失、三元组损失、N-pair、InfoNCE、ArcFace、SCL与CCL——在五个图像检索数据集上的表现。分析显示,三元组和SCL能更好保持类内方差与清晰的类间边界,从而在细粒度设置下获得更强的top-1检索性能。相比之下,对比损失和InfoNCE通过大量小更新快速压缩嵌入空间,加速收敛,但可能过度简化类别结构;N-pair实现较大平均分离度,但间距分布不均。这些发现揭示了效率与粒度间的权衡关系,并提供实用建议:当需保留多样性与硬样本区分能力时,优选三元组或SCL;当追求更快嵌入压缩时,可选对比损失或InfoNCE。
原文摘要 · Abstract (English)
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.
Thank you to arXiv for use of its open access interoperability. PaperDance 不是 arXiv 官方产品;中文卡片由大模型生成,请以原文为准。