Unsupervised Learning of Visual Features by Contrasting Cluster Assignments

Unsupervised image representations have significantly reduced the gap with supervised pretraining, notably with the recent achievements of contrastive learning methods. These contrastive methods typically work online and rely on a large number of explicit pairwise feature comparisons, which is computationally challenging. In this paper, we propose an online algorithm, SwAV, that takes advantage of contrastive methods without requiring to compute pairwise comparisons. Specifically, our method simultaneously clusters the data while enforcing consistency between cluster assignments produced for different augmentations (or views) of the same image, instead of comparing features directly as in contrastive learning. Simply put, we use a swapped prediction mechanism where we predict the cluster assignment of a view from the representation of another view. Our method can be trained with large and small batches and can scale to unlimited amounts of data. Compared to previous contrastive methods, our method is more memory efficient since it does not require a large memory bank or a special momentum network. In addition, we also propose a new data augmentation strategy, multi-crop, that uses a mix of views with different resolutions in place of two full-resolution views, without increasing the memory or compute requirements much. We validate our findings by achieving 75.3% top-1 accuracy on ImageNet with ResNet-50, as well as surpassing supervised pretraining on all the considered transfer tasks.

PDF Abstract NeurIPS 2020 PDF NeurIPS 2020 Abstract
Task Dataset Model Metric Name Metric Value Global Rank Uses Extra
Training Data
Result Benchmark
Self-Supervised Image Classification ImageNet DeepCluster-v2 (ResNet-50) Top 1 Accuracy 75.2% # 73
Number of Params 24M # 48
Self-Supervised Image Classification ImageNet SwAV (ResNet-50 x4) Top 1 Accuracy 78.5% # 44
Number of Params 586M # 12
Self-Supervised Image Classification ImageNet SwAV (ResNet-50 x2) Top 1 Accuracy 77.3% # 51
Number of Params 94M # 29
Self-Supervised Image Classification ImageNet SwAV (ResNet-50) Top 1 Accuracy 75.3% # 71
Number of Params 24M # 48
Semi-Supervised Image Classification ImageNet - 1% labeled data SwAV (ResNet-50) Top 5 Accuracy 78.5 # 25
Top 1 Accuracy 53.9% # 41
Self-Supervised Image Classification ImageNet (finetuned) SwAV (Resnet-50) Number of Params 182M # 29
Top 1 Accuracy 77.8% # 61
Image Classification iNaturalist 2018 ResNet-50 Top-1 Accuracy 48.6 # 54
Image Classification OmniBenchmark SwAV Average Top-1 Accuracy 38.3 # 9
Image Classification Places205 SwAV Top 1 Accuracy 56.7% # 10
Image Classification Places205 ResNet-50 (Supervised) Top 1 Accuracy 53.2% # 14

Results from Other Papers


Task Dataset Model Metric Name Metric Value Rank Uses Extra
Training Data
Source Paper Compare
Self-Supervised Image Classification ImageNet (finetuned) SwAV (ResNeXt-101-32x16d) Number of Params 193M # 28
Top 1 Accuracy 82.0% # 54

Methods