Papers › Unsupervised Learning of Visual Features by Contrasting Cluster Assignments

Unsupervised Learning of Visual Features by Contrasting Cluster Assignments

17 Jun 2020NeurIPS 2020 12arXiv:2006.09882archive 2025-07-28

Mathilde Caron, Ishan Misra, Julien Mairal, Priya Goyal, Piotr Bojanowski, Armand Joulin

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.

PaperPDFConference PDFCodeCode Syntology ran

In Syntology Open this paper in Syntology's Atlas, the map of the papers in Syntology's graph and their citations.

For agents, Syntology's MCP tool lists every function and class Syntology harvested from this paper and whether it ran (how to connect): get_harvested_code_for_paper(arxiv_id="2006.09882")

Code

Syntology Ran 13 of 17 code samples harvested from 4 repositories linked to this paper; 4 have no recorded run. Of those that ran: 1 ran · honoured contract; 1 ran · violated contract; 3 ran · our draft was wrong; 4 ran · fixture could not drive it; 4 ran with no contract checked.

By repository: community (archive-listed): 17 samples from 4 repositories, 13 ran. The run record, sample by sample. “Ran” means executed on a synthesized input, not that the code is correct or reproduces the paper.

18 repositories listed; official and paper-mentioned ones first.

facebookresearch/swav officialmentioned in papermentioned on GitHubpytorchNOASSERTION report
SaeedShurrab/SimSiam-pytorch mentioned on GitHubpytorch report
TRAILab/ST-SLidR mentioned on GitHubpytorch report
Westlake-AI/openmixup mentioned on GitHubpytorch report
ananyahjha93/swav mentioned on GitHubpytorchNOASSERTION report
ayulockin/SwAV-TF mentioned on GitHubtf report
buyeah1109/finc mentioned on GitHubpytorch report
facebookresearch/clip-rocket mentioned on GitHubpytorch report
facebookresearch/vissl mentioned on GitHubpytorch report
hsfzxjy/swavx mentioned on GitHubpytorch report
lightly-ai/lightly mentioned on GitHubpytorch report
sayakpaul/PAWS-TF mentioned on GitHubtfApache-2.0 report
vinhdv1628/image_classification_task mentioned on GitHubpytorchNOASSERTION report
vturrisi/solo-learn mentioned on GitHubpytorch report
PaddlePaddle/PASSL paddleApache-2.0 report
open-mmlab/mmdetection pytorchApache-2.0 report

Repository list and official/mentioned flags are the archive's, frozen 2025-07-28. Reachability, where shown, is from one Syntology probe window (2026-09-16 to 2026-09-18); repositories not probed show nothing. GitHub stars are not tracked.

Code Syntology ran Syntology

17 samples harvested; 13 ran; 1 honoured the contract we drafted; 4 have no recorded run. Read from Syntology's graph 2026-09-24; that is when this build read the record, not when the samples ran.

1ran · honoured contract
1ran · violated contract
3ran · our draft was wrong
4ran · fixture could not drive it
4ran
4unverified

Licence: 6 of the 17 samples are pointer only, meaning Syntology does not serve that copy's text. This page shows no code text for any sample; each one links to its file in the repository.

Harvested from 4 repositories linked to this paper, official or community; each sample names its own and says which. “Ran” means the sample executed on a synthesized input. It does not mean the output is correct, and nothing here reproduces the paper's results. “Honoured” and “violated” refer to a contract Syntology drafted from the code itself; “our draft was wrong” and “fixture could not drive it” are failures of Syntology's instrument, not of the code.

Each sample ends with its code_sha256, Syntology's identity for that exact code. An agent fetches the stored sample with Syntology's MCP tool get_code(code_sha256="…") (how to connect); click an identity to copy that call.

Repository labels, per sample. official repository: The archive marks this repository official for the paper. named in the paper: The archive records that the paper mentions this repository; it is not marked official. community (archive-listed): In the archive's code links for this paper, not marked official and not recorded as mentioned in the paper. found in paper text by Syntology: Syntology found this repository in the paper's own text; whether it is the authors' implementation is not asserted. community: Not in the archive's code links for this paper; a community repository Syntology harvested. Samples from a repository marked official are listed first. Licence labels name the repository's licence as recorded at harvest. “Pointer only” means Syntology does not serve that copy's text, for one of four reasons: no licence file was found; the licence was not identified; the licence is recorded as permissive but that copy's record is not marked cleared; or the licence is outside the permissive list Syntology serves text under (MIT, Apache-2.0, BSD and similar). Some licences outside that list permit redistribution, such as WTFPL, and GPL-3.0 under its conditions; they are simply not on the list. Hover a licence label for the reason. File links open the file on GitHub at the default branch, which may have changed since the harvest.

CL2LLoss facebookresearch/clip-rocket/losses.py community (archive-listed) ran licence not identified · pointer only · 65ea068099ec8a00 · report
ImageFeatureExtractor buyeah1109/finc/src/features/SwAVFeatureExtractor.py community (archive-listed) ran no licence file found · pointer only · d66b0649e0c37be9 · report
SwAVFeatureExtractor buyeah1109/finc/src/features/SwAVFeatureExtractor.py community (archive-listed) ran no licence file found · pointer only · ef7fd0fad6c1ce99 · report
TransformedIndexDataset buyeah1109/finc/src/features/SwAVFeatureExtractor.py community (archive-listed) ran no licence file found · pointer only · ba4892e53d17ff07 · report
all_gather_batch facebookresearch/clip-rocket/losses.py community (archive-listed) ran · our draft was wrong licence not identified · pointer only · 99efca6b93eccdc4 · report
color_jitter ayulockin/SwAV-TF/utils/multicrop_dataset.py community (archive-listed) ran · fixture could not drive it Apache-2.0 (permissive) · 9409540d35684afe · report
gaussian_blur ayulockin/SwAV-TF/utils/multicrop_dataset.py community (archive-listed) ran · fixture could not drive it Apache-2.0 (permissive) · c0f578da1f63b8dc · report
get_multires_dataset ayulockin/SwAV-TF/utils/multicrop_dataset.py community (archive-listed) ran · our draft was wrong Apache-2.0 (permissive) · d10fcd33136b539d · report
random_apply ayulockin/SwAV-TF/utils/multicrop_dataset.py community (archive-listed) ran · our draft was wrong Apache-2.0 (permissive) · f63e696498472c1e · report
random_resize_crop ayulockin/SwAV-TF/utils/multicrop_dataset.py community (archive-listed) ran · fixture could not drive it fingerprinted Apache-2.0 (permissive) · 9804c7348e6e7ece · report
scale_image ayulockin/SwAV-TF/utils/multicrop_dataset.py community (archive-listed) ran · violated contract fingerprinted Apache-2.0 (permissive) · aa8570de6f4e85b0 · report
sinkhorn lightly-ai/lightly/lightly/loss/swav_loss.py community (archive-listed) ran · fixture could not drive it fingerprinted MIT (permissive) · 58db645a1b52ab84 · report
tie_together ayulockin/SwAV-TF/utils/multicrop_dataset.py community (archive-listed) ran · honoured contract Apache-2.0 (permissive) · f87ad47efb0bcc47 · report
SwALIPLoss facebookresearch/clip-rocket/losses.py community (archive-listed) unverified licence not identified · pointer only · 9b6d7a79e463251f · report
SwaVLoss lightly-ai/lightly/lightly/loss/swav_loss.py community (archive-listed) unverified MIT (permissive) · 03392c922af8bf4c · report
color_drop ayulockin/SwAV-TF/utils/multicrop_dataset.py community (archive-listed) unverified Apache-2.0 (permissive) · 1f7646e4cd1d0e9e · report
custom_augment ayulockin/SwAV-TF/utils/multicrop_dataset.py community (archive-listed) unverified Apache-2.0 (permissive) · 451594dfca49b64d · report

Tasks

Contrastive LearningData AugmentationImage ClassificationSelf-Supervised Image ClassificationSemi-Supervised Image Classification

Results from the paper archive 2025-07-28

TaskDatasetModelMetricValueRank at snapshotLeaderboardReport
Image Classification OmniBenchmark SwAV Average Top-1 Accuracy 38.3 #9 of 22 Archive leaderboard report
Image Classification Places205 SwAV Top 1 Accuracy 56.7% #10 of 15 Archive leaderboard report
Image Classification Places205 ResNet-50 (Supervised) Top 1 Accuracy 53.2% #14 of 15 Archive leaderboard report
Image Classification iNaturalist 2018 ResNet-50 Top-1 Accuracy 48.6 #59 of 60 Archive leaderboard report
Self-Supervised Image Classification ImageNet SwAV (ResNet-50 x5) Number of Params 586M #45 of 144 Archive leaderboard report
Self-Supervised Image Classification ImageNet SwAV (ResNet-50 x5) Top 1 Accuracy 78.5% #45 of 144 Archive leaderboard report
Self-Supervised Image Classification ImageNet SwAV (ResNet-50 x2) Number of Params 94M #54 of 144 Archive leaderboard report
Self-Supervised Image Classification ImageNet SwAV (ResNet-50 x2) Top 1 Accuracy 77.3% #54 of 144 Archive leaderboard report
Self-Supervised Image Classification ImageNet SwAV (ResNet-50) Number of Params 24M #74 of 144 Archive leaderboard report
Self-Supervised Image Classification ImageNet SwAV (ResNet-50) Top 1 Accuracy 75.3% #74 of 144 Archive leaderboard report
Self-Supervised Image Classification ImageNet DeepCluster-v2 (ResNet-50) Number of Params 24M #77 of 144 Archive leaderboard report
Self-Supervised Image Classification ImageNet DeepCluster-v2 (ResNet-50) Top 1 Accuracy 75.2% #77 of 144 Archive leaderboard report
Self-Supervised Image Classification ImageNet (finetuned) SwAV (ResNeXt-101-32x16d) Number of Params 193M #54 of 65 Archive leaderboard report
Self-Supervised Image Classification ImageNet (finetuned) SwAV (ResNeXt-101-32x16d) Top 1 Accuracy 82.0% #54 of 65 Archive leaderboard report
Self-Supervised Image Classification ImageNet (finetuned) SwAV (Resnet-50) Number of Params 182M #61 of 65 Archive leaderboard report
Self-Supervised Image Classification ImageNet (finetuned) SwAV (Resnet-50) Top 1 Accuracy 77.8% #61 of 65 Archive leaderboard report
Semi-Supervised Image Classification ImageNet - 1% labeled data SwAV (ResNet-50) Top 1 Accuracy 53.9% #48 of 65 Archive leaderboard report
Semi-Supervised Image Classification ImageNet - 1% labeled data SwAV (ResNet-50) Top 5 Accuracy 78.5 #48 of 65 Archive leaderboard report

Ranks are positions in the archive's leaderboards as they stood at the 2025-07-28 snapshot. Results published since then are not among these rows, so a rank here is not a current standing.

Methods

Introduced by this paper: SwAV

1x1 ConvolutionBatch NormalizationBottleneck Residual BlockConvolutionDense ConnectionsDetrFeedforward NetworkLARSMask R-CNNRPNReLUResidual BlockResidual ConnectionSwAV

Report a problem or propose a change · a person checks every report against the paper or source before anything changes; decisions are listed on /corrections