We then use structural similarity index (SSIM) to verify that these patches are similar to each other [1]}. If they meet or exceed a threshold of similarity set as a hyperparameter for our model, then they are used as a positive pair. Negative pairs for \(x_{ij}\)  are selected in a similar fashion: patches centered at pixels that are not nearby are the initial candidates, subject to the same SSIM verification except they must be below the threshold for similarity. In this way, we can generate (equal numbers of) positive and negative pairs for our contrastive loss without needing supervised labels in any way and build invariances into our embedding. Note each pixel-centered patch \(x_{ij}\)  has its own set of positive patches (which we will denote \(\Omega ^+\) ) and set of negative patches (which we denote \(\Omega ^-\)
<FIGURE>