Skip to main content
QUICK REVIEW

[Paper Review] Ranked List Loss for Deep Metric Learning

Xinshao Wang, Hua Yang|arXiv (Cornell University)|Mar 8, 2019
Advanced Image and Video Retrieval TechniquesComputer Science82 references4 citations
TL;DR

This paper proposes a novel Ranked List Loss (RLL) for deep metric learning that leverages all non-trivial examples in a mini-batch to build a set-based similarity structure, improving training efficiency and generalization. By enforcing a margin between positive and negative sets and learning class-specific hyperspheres to preserve intraclass structure, RLL achieves state-of-the-art performance on fine-grained image retrieval benchmarks.

ABSTRACT

The objective of deep metric learning (DML) is to learn embeddings that can capture semantic similarity and dissimilarity information among data points. Existing pairwise or tripletwise loss functions used in DML are known to suffer from slow convergence due to a large proportion of trivial pairs or triplets as the model improves. To improve this, ranking-motivated structured losses are proposed recently to incorporate multiple examples and exploit the structured information among them. They converge faster and achieve state-of-the-art performance. In this work, we unveil two limitations of existing ranking-motivated structured losses and propose a novel ranked list loss to solve both of them. First, given a query, only a fraction of data points is incorporated to build the similarity structure. Consequently, some useful examples are ignored and the structure is less informative. To address this, we propose to build a set-based similarity structure by exploiting all instances in the gallery. The learning setting can be interpreted as few-shot retrieval: given a mini-batch, every example is iteratively used as a query, and the rest ones compose the gallery to search, i.e., the support set in few-shot setting. The rest examples are split into a positive set and a negative set. For every mini-batch, the learning objective of ranked list loss is to make the query closer to the positive set than to the negative set by a margin. Second, previous methods aim to pull positive pairs as close as possible in the embedding space. As a result, the intraclass data distribution tends to be extremely compressed. In contrast, we propose to learn a hypersphere for each class in order to preserve useful similarity structure inside it, which functions as regularisation. Extensive experiments demonstrate the superiority of our proposal by comparing with the state-of-the-art methods.

Motivation & Objective

  • Address the limitation of existing ranking-motivated losses that only use a fraction of informative examples, ignoring useful non-trivial data points.
  • Improve the discriminative power of metric learning by exploiting richer set-based similarity structures instead of point-based comparisons (e.g., triplet loss).
  • Overcome the issue of intraclass distribution compression caused by forcing all positive pairs to be as close as possible, which distorts internal similarity structure.
  • Enhance training efficiency and convergence by dynamically weighting non-trivial examples and focusing on critical early learning phases.
  • Provide a generalizable, scalable loss function that outperforms state-of-the-art methods on fine-grained image retrieval tasks.

Proposed method

  • Formulate the learning objective as few-shot retrieval: in each mini-batch, every sample acts as a query, with the rest forming the gallery.
  • Construct a ranked list of gallery samples based on similarity scores, splitting them into positive and negative sets relative to the query.
  • Apply a margin-based loss to ensure the query is closer to the positive set than to the negative set by a margin $ m $, using a hinge-like formulation.
  • Introduce a hypersphere regularization per class, where the diameter defines the maximum allowed distance between any two positive samples to preserve internal structure.
  • Implement dynamic example mining and adaptive weighting of negative pairs based on their difficulty, with learning periods tuned for early training stability.
  • Use a multi-scale network design (RLL-L, RLL-M, RLL-H) to evaluate the impact of depth and embedding size on performance and generalization.

Experimental results

Research questions

  • RQ1Can a set-based similarity structure, incorporating all non-trivial examples in a mini-batch, lead to faster convergence and better performance than pairwise or triplet-based losses?
  • RQ2How does learning a hypersphere per class for intraclass structure preservation affect generalization and robustness in deep metric learning?
  • RQ3What is the impact of dynamic example weighting and critical learning phase scheduling on model convergence and performance?
  • RQ4How does the choice of embedding dimension and network depth influence the performance of the proposed RLL loss?
  • RQ5Can the proposed RLL be generalized across different datasets and tasks, particularly in fine-grained image retrieval?

Key findings

  • RLL achieves state-of-the-art performance on the CUB-200-2011 and SOP datasets, with Recall@1 of 56.4% on CUB-200-2011 and 87.7% on In-shop Clothes under optimal settings.
  • The RLL-L and RLL-M variants, despite shallower network depth, achieve performance competitive with or better than deeper models, indicating high sample efficiency.
  • Increasing embedding size improves performance up to a point, after which gains become negligible, suggesting a practical trade-off between model size and accuracy.
  • A higher number of classes with fewer images per class (i.e., more challenging few-shot tasks) leads to better generalization, indicating improved robustness under data scarcity.
  • The early learning phase is critical: dynamic weighting with $ T_1 $ in the range 8–16 yields the most stable and highest performance, with low standard deviation across runs.
  • The proposed dynamic weighting scheme significantly improves performance, with the best results achieved when negative pairs are weighted based on their difficulty and learning phase.

Read this paper

Open the full text in the Nubint reader and ask about any passage as you read.

Read this paper on Nubint

This review was generated by AI from the original paper. Please check the paper before citing it.