Introduction

This paper presents an updated version of the seminal triplet loss. Their proposed loss is called center-oriented margin-free triplet loss (or COM-Triplet). It has the following two main characteristics:

  • it comes with an adaptative margin
  • the proposed loss considers the distance between Positive and Negative points

They also show how to use their loss on unlabelled data. They tested their method on skin lesion images.

Method

The idea behind the COM-Triplet loss is well illustrated in the previous figure. Instead of only considering the pair-wise distances between an anchor point and a positive and negative point as in the original triplet loss

where \(\alpha\) is a fixed margin, they also account for the distance between the positive and the negative points which should be larger than between the positive and the anchor points:

where \(Dist_{wa}\) stands for the within- and across-cluster distance defined as

I also like the idea that the margin has been made adaptive by setting it to be the opposite of the positive-negative distance:

Unsupervised clustering

Figure 1

For the triplet loss to work, data has to be labelled as positive and negative. So, in case one has to deal with unsupervised data, the authors propose to use a Gaussian Mixture Model to automatically assign labels. This leads to a “Soft” version of their COM-Triplet. See paper for more details.

Results

The method was tested on the ISIC2020 skin lesion classification dataset. The most appealing results are those reported in Table II (supervised classification), Table III (unsupervised classification) and Figure 4 which shows that the COM-Triplet is more robust to class imbalance than a VGG classifier.

Results 1 Results 2 Results 3

Reference

Nice blog on the triplet loss : https://towardsdatascience.com/triplet-loss-advanced-intro-49a07b7d8905