Review: Improved Deep Metric Learning with Multi-class N-pair Loss Objective (N-pair-mc Loss)

Faster Convergence Using Multi-class N-pair Loss


1. Contrastive Loss & Triplet Loss

Deep Metric Learning with Triplet Loss

Such frameworks often suffer from slow convergence and poor local optima, partially due to that the loss function employs only one negative example while not interacting with the other negative classes per each update.

2. (N+1)-Tuplet Loss for Multiple Negative Examples

Deep Metric Learning with (N+1)-Tuplet Loss

The partition function corresponding to the (N+1)-tuplet approximates that of (L+1)-tuplet, and larger the value of N, more accurate the approximation. Therefore, it naturally follows that (N+1)-tuplet loss is a better approximation than the triplet loss to an ideal (L+1)-tuplet loss.

3. N-pair Loss as Efficient Batch Construction Method

Triplet loss, (N+1)-tuplet loss, and multi-class N-pair loss with training batch construction

That means each positive f+ for each f would becomes f- for other f, as shown in the above figure (c).

4. Hard Negative Class Mining & Regularization

5. Experimental Results

Mean recognition and verification accuracy with standard error on the test set of Car-333 and Flower-610 datasets

We observe consistent improvement of 72-pair loss models over triplet loss models. Although the negative data mining could bring substantial improvement to the baseline models, the performance is not as competitive as 72-pair loss models

F1, NMI, and recall@K scores on the test set of online product, Car-196, and CUB-200 datasets
Mean Verification Accuracy (MRF), Rank-1 Accuracy, and DIR@FAR=1% rate of open-set identification on LFW dataset

The N-pair-mc loss model improves the performance by a significant margin. Furthermore, it is observed additional improvement by increasing N to 320, obtaining 98.33% for verification, 90.17% for closed-set and 71.76% for open-set identification accuracy.

Training curve of triplet, 192-pair-ovo, and 192-pair-mc loss models onWebFace database



Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store