For backbone feature extractor, we use ResNet50 and ResNet101 [1]} pre-trained on ImageNet [2]}, which are frozen during training, following [3]}, [4]}. We set the threshold \(\tau \)  to \(0.5\) . We use data augmentation used in [5]}, [6]} for training. We use AdamW [7]} with learning rate set to \(5\mathrm {e}-4\) . We set \(D\)  to 128. We use feature maps from conv3\(\_\) x (\(p=3\) ), conv4\(\_\) x (\(p=4\) ) and conv5\(\_\) x (\(p=5\) ) for cost computation. We use last layers from conv2\(\_\) x, conv3\(\_\) x and conv4\(\_\) x for appearance affinity when trained on FSS-1000 [8]} and conv4\(\_\) x is excluded when trained on PASCAL-5\(^{i}\)  [9]} and COCO-20\(^{i}\)  [10]}. The aforementioned hyperparameters are set with cross-validation. More details can be found in supplementary material.
<TABLE>