General Pair Weighting (GPW) frame work
A unified weighting view of sampling problem of metric learning. This indicates that a pair-based method can be formulated as weighting of pair-wise similarities.
Conclude three type of similarities. (Assume we are research on a negative pair)
Similarity-S: Such as the distance between pair.
Similarity-P: Compared with other positive pair
Similarity-N:Compared with other negative pair
multi-similarity (MS) loss
α
\alpha
α and
β
\beta
β and
λ
\lambda
λ are hyper-parameters.
It’s partial derivative is
each weight include Similarity-S and N.
there are two steps,
(1)Pair mining
A negative pair is compared to the hardest positive pair (with the lowest similarity), while a positive pair is sampled by comparing to a negative one having the largest similarity
The positive pair is sampled in the same way.
Use Similarity P
(2) Pair weighting