SoftTriple Loss: Deep Metric Learning Without Triplet Sampling

  • 2019-09-11 17:47:25
  • Qi Qian, Lei Shang, Baigui Sun, Juhua Hu, Hao Li, Rong Jin
  • 38

Abstract

Distance metric learning (DML) is to learn the embeddings where examples fromthe same class are closer than examples from different classes. It can be castas an optimization problem with triplet constraints. Due to the vast number oftriplet constraints, a sampling strategy is essential for DML. With thetremendous success of deep learning in classifications, it has been applied forDML. When learning embeddings with deep neural networks (DNNs), only amini-batch of data is available at each iteration. The set of tripletconstraints has to be sampled within the mini-batch. Since a mini-batch cannotcapture the neighbors in the original set well, it makes the learned embeddingssub-optimal. On the contrary, optimizing SoftMax loss, which is aclassification loss, with DNN shows a superior performance in certain DMLtasks. It inspires us to investigate the formulation of SoftMax. Our analysisshows that SoftMax loss is equivalent to a smoothed triplet loss where eachclass has a single center. In real-world data, one class can contain severallocal clusters rather than a single one, e.g., birds of different poses.Therefore, we propose the SoftTriple loss to extend the SoftMax loss withmultiple centers for each class. Compared with conventional deep metriclearning algorithms, optimizing SoftTriple loss can learn the embeddingswithout the sampling phase by mildly increasing the size of the last fullyconnected layer. Experiments on the benchmark fine-grained data setsdemonstrate the effectiveness of the proposed loss function.

 

Quick Read (beta)

loading the full paper ...