bnu-wangxun / Deep_Metric

Deep Metric Learning
Apache License 2.0
778 stars 148 forks source link

modified lifted loss #37

Open JasAva opened 5 years ago

JasAva commented 5 years ago

Thanks for the comprehensive implementation. Really helpful for understanding the various metric learning loss.

I'm wondering if you can shed some insights on the modified loss function, which takes a different formation as the original one.

Compared to the original loss, the modified version use a different pos loss, and introduce a new parameter beta.

bnu-wangxun commented 5 years ago
  1. In the paper, I show why I modify the loss into such version, 《Multi-Similarity Loss with General Pair Weighting for Deep Metric Learning》 https://arxiv.org/abs/1904.06627
  2. insght: the insight comes from binomial deviance loss, the beta and alpha have similar effect as their corresponding hyperparameter in binomial deviance loss. The beta is large because for negative pair we want to extremely focus on hard pairs, while we use much smaller alpha for positive pairs because hard positive and easy positive pairs are nearly of equal importantance.