SwAV (swapping assignments between views)
SwAV blends contrastive learning with online clustering and, in doing so, sidesteps the need to compare every pair of images directly. Rather than asking 'are these two embeddings the same,' it asks 'do these two views of one image get assigned to the same cluster.' A bank of learnable prototype vectors plays the role of cluster centroids, and the supervision is the requirement that the cluster code computed from one view should be predictable from the other view.
For each batch it computes soft cluster assignments (codes) by matching embeddings to the prototypes, then enforces a swapped-prediction loss: predict view A's code from view B's features and vice versa, via a cross-entropy over the prototypes. The danger is the trivial solution of dumping every image into one cluster, so SwAV computes the codes online with the Sinkhorn-Knopp algorithm, which solves an entropy-regularized optimal-transport problem that constrains the assignments to be equally partitioned across prototypes within the batch. This balancing constraint is what prevents cluster collapse.
SwAV also introduced multi-crop: feeding several low-resolution crops alongside two full-resolution ones, cheaply increasing the number of views and noticeably improving features. Because it contrasts cluster codes rather than instance features, it needs neither a large negative bank nor a memory queue, which made it efficient at the time it appeared.
Swapped prediction: predict one view's code q from the other's features z.
The Sinkhorn balancing is the anti-collapse mechanism — remove the equal-partition constraint and the model is free to assign everything to one prototype.