DeepAI AI Chat
Log In Sign Up

SoftTriple Loss: Deep Metric Learning Without Triplet Sampling

by   Qi Qian, et al.
Alibaba Group
University of Washington

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.


page 7

page 8


Triplet-Center Loss for Multi-View 3D Object Retrieval

Most existing 3D object recognition algorithms focus on leveraging the s...

Distance-Ratio-Based Formulation for Metric Learning

In metric learning, the goal is to learn an embedding so that data point...

NBC-Softmax : Darkweb Author fingerprinting and migration tracking

Metric learning aims to learn distances from the data, which enhances th...

Self-Paced Learning with Adaptive Deep Visual Embeddings

Selecting the most appropriate data examples to present a deep neural ne...

Batch-Incremental Triplet Sampling for Training Triplet Networks Using Bayesian Updating Theorem

Variants of Triplet networks are robust entities for learning a discrimi...

Large-scale Distance Metric Learning with Uncertainty

Distance metric learning (DML) has been studied extensively in the past ...

Code Repositories


towards the solving spoofing problem

view repo


Minimalistic TensorFlow2+ deep metric/similarity learning library with loss functions, miners, and utils as embedding projector.

view repo


Dogs classification with Deep Metric Learning

view repo


Official PyTorch implementation of "Proxy Synthesis: Learning with Synthetic Classes for Deep Metric Learning" (AAAI 2021)

view repo


SoftTriple (ICCV2019) in pytorch

view repo