One possible solution is to randomly sample a few pixel embeddings from \(F\)  corresponding to the two different classes similar to [1]}. Then, use those embeddings to calculate (REF ). This way, the memory requirement is greatly reduced. However, this solution does not take into account the context information from neighboring pixels. Also, similar to [2]}, another solution could be to average all the pixel embeddings of the two regions and then use the mean embeddings to calculate the loss. Although this may be helpful for computer vision tasks, such as segmentation of semantic objects etc., it is inappropriate for image manipulation detection tasks. Because, recent studies have shown that pooling is undesirable for tasks that require subtle signals since pooling reinforces content and suppresses noise-like signals [3]}. These fine-grained traces are helpful for detecting forgery. Hence, to find a balance between context and fine-grained traces, we opt for dividing \(F\)  into local regions.
