In the paper, triple losses was given as, (exp(d(p1,p2))/(exp(d*) + exp(d(p1,p2))))**2 + (exp(d * ) / (exp(d * ) + exp(d(p1,p2))) - 1)**2 If you simplify the 2nd term, it is the same as the first one.