Skip to main content
QUICK REVIEW

[Paper Review] SoftTriple Loss: Deep Metric Learning Without Triplet Sampling

Qi Qian, Lei Shang|arXiv (Cornell University)|Sep 11, 2019
Face recognition and analysisComputer Science28 references93 citations
TL;DR

SoftTriple loss enables deep metric learning without triplet sampling by using multiple centers per class and a smoothed similarity, improving embedding quality for fine-grained tasks.

ABSTRACT

Distance metric learning (DML) is to learn the embeddings where examples from the same class are closer than examples from different classes. It can be cast as an optimization problem with triplet constraints. Due to the vast number of triplet constraints, a sampling strategy is essential for DML. With the tremendous success of deep learning in classifications, it has been applied for DML. When learning embeddings with deep neural networks (DNNs), only a mini-batch of data is available at each iteration. The set of triplet constraints has to be sampled within the mini-batch. Since a mini-batch cannot capture the neighbors in the original set well, it makes the learned embeddings sub-optimal. On the contrary, optimizing SoftMax loss, which is a classification loss, with DNN shows a superior performance in certain DML tasks. It inspires us to investigate the formulation of SoftMax. Our analysis shows that SoftMax loss is equivalent to a smoothed triplet loss where each class has a single center. In real-world data, one class can contain several local clusters rather than a single one, e.g., birds of different poses. Therefore, we propose the SoftTriple loss to extend the SoftMax loss with multiple centers for each class. Compared with conventional deep metric learning algorithms, optimizing SoftTriple loss can learn the embeddings without the sampling phase by mildly increasing the size of the last fully connected layer. Experiments on the benchmark fine-grained data sets demonstrate the effectiveness of the proposed loss function. Code is available at https://github.com/idstcv/SoftTriple

Motivation & Objective

  • Motivate deep metric learning without triplet sampling due to mini-batch limitations.
  • Analyze SoftMax loss as a smoothed triplet loss with a single center per class.
  • Propose SoftTriple loss with multiple centers to capture intra-class variance.
  • Develop an adaptive center strategy to keep a compact center set.
  • Demonstrate effectiveness on fine-grained datasets (CUB-2011, Cars196, SOP).

Proposed method

  • Reformulate SoftMax loss as a smoothed triplet loss with class centers.
  • Extend to multiple centers per class and define class-wide similarities using max-over-centers with smoothing.
  • Introduce an entropy-regularized smoothing of the max over centers to obtain a soft HardTriple-like loss.
  • Provide an adaptive scheme using L2,1 regularization to merge similar centers and keep a compact center set.
  • Optimize the SoftTriple objective end-to-end without triplet sampling.
  • Evaluate embeddings on retrieval and clustering metrics across datasets.

Experimental results

Research questions

  • RQ1Can SoftMax loss be interpreted as a smoothed triplet loss with centers?
  • RQ2Does introducing multiple centers per class better model intra-class variance and improve retrieval/clustering without triplet sampling?
  • RQ3How should the number of centers be chosen and regularized to remain compact while preserving performance?
  • RQ4Is SoftTriple scalable and effective on large fine-grained datasets compared to traditional triplet-based methods?

Key findings

  • SoftMax norm already outperforms many metric learning methods, indicating its smoothed triplet interpretation.
  • SoftTriple consistently improves over SoftMax norm by leveraging multiple centers.
  • SoftTriple achieves state-of-the-art or competitive results on CUB-2011, Cars196, and SOP, often surpassing SoftMax norm by several points in R@1.
  • Using a large initial number of centers with L2,1 regularization yields a compact center set and stable performance.
  • SoftTriple with large embeddings generally outperforms comparable methods, e.g., on CUB-2011 and Cars196 tables.
  • The approach eliminates the sampling phase, while maintaining or improving retrieval/clustering performance.

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.