Importantly, we desire the loss to be tolerant and only tolerant of local misalignment, as large misalignment will potentially introduce noisy pixel correspondences that may jeopardize appearance learning.
Inspired by the focal loss for detection [1]}, we introduce an exponential operation in the spatial term to penalize those spatially distant pixel pairs.
Therefore, we define the overall distance matrix \(\mathbf {D} \in ^ {|_1| \times |_2|}\)  as follows
\(\mathbf {D} = \max ((\mathbf {D}^s+\epsilon _s)^{\alpha },1) \otimes (\mathbf {D}^a + \epsilon _a),\) 
