
where \(\mathbf {x}_1,\mathbf {x}_2\)  represent two different sample, \(||.||_2\)  is the Euclidean norm, and \(g_\phi (\cdot )\) 
is a temperature generator with learnable parameters. In this paper, we use instance-specific temperatures because, as demonstrated in [1]}, [2]}, the scaling temperature in a softmax operation can significantly affect the performance of a few learning models. Therefore, an instance-specific temperature adapts the metric to a specific task.
