Papers › Self-Supervised Learning by Estimating Twin Class Distributions

Self-Supervised Learning by Estimating Twin Class Distributions

14 Oct 2021arXiv:2110.07402archive 2025-07-28

Feng Wang, Tao Kong, Rufeng Zhang, Huaping Liu, Hang Li

We present TWIST, a simple and theoretically explainable self-supervised representation learning method by classifying large-scale unlabeled datasets in an end-to-end way. We employ a siamese network terminated by a softmax operation to produce twin class distributions of two augmented images. Without supervision, we enforce the class distributions of different augmentations to be consistent. However, simply minimizing the divergence between augmentations will cause collapsed solutions, i.e., outputting the same class probability distribution for all images. In this case, no information about the input image is left. To solve this problem, we propose to maximize the mutual information between the input and the class predictions. Specifically, we minimize the entropy of the distribution for each sample to make the class prediction for each sample assertive and maximize the entropy of the mean distribution to make the predictions of different samples diverse. In this way, TWIST can naturally avoid the collapsed solutions without specific designs such as asymmetric network, stop-gradient operation, or momentum encoder. As a result, TWIST outperforms state-of-the-art methods on a wide range of tasks. Especially, TWIST performs surprisingly well on semi-supervised learning, achieving 61.2% top-1 accuracy with 1% ImageNet labels using a ResNet-50 as backbone, surpassing previous best results by an absolute improvement of 6.2%. Codes and pre-trained models are given on: https://github.com/bytedance/TWIST

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="2110.07402")

Code

Syntology Ran 5 of 15 code samples harvested from 1 repository linked to this paper; 10 have no recorded run. Of those that ran: 1 ran · honoured contract; 2 ran · our draft was wrong; 2 ran · fixture could not drive it.

By repository: official repository: 15 samples from 1 repository, 5 ran. The run record, sample by sample. “Ran” means executed on a synthesized input, not that the code is correct or reproduces the paper.

bytedance/TWIST officialmentioned in papermentioned on GitHubpytorchApache-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

15 samples harvested; 5 ran; 1 honoured the contract we drafted; 10 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
2ran · our draft was wrong
2ran · fixture could not drive it
10unverified

Licence: 0 of the 15 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 bytedance/TWIST. “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.

accuracy bytedance/TWIST/evaluate.py official repository ran · fixture could not drive it Apache-2.0 (permissive) · b0f936d4d6ae3b8c · report
conv1x1 bytedance/TWIST/widen_resnet.py official repository ran · our draft was wrong Apache-2.0 (permissive) · 2a80220dabcb742a · report
conv3x3 bytedance/TWIST/widen_resnet.py official repository ran · our draft was wrong Apache-2.0 (permissive) · 600ff2c45e0de056 · report
cosine_scheduler bytedance/TWIST/utils.py official repository ran · honoured contract fingerprinted Apache-2.0 (permissive) · 361a6b24f11fc50a · report
trunc_normal_ bytedance/TWIST/utils.py official repository ran · fixture could not drive it Apache-2.0 (permissive) · 915b71e73a54fc97 · report
CE bytedance/TWIST/objective.py official repository unverified Apache-2.0 (permissive) · 5067fd3e4ebe3111 · report
KL bytedance/TWIST/objective.py official repository unverified Apache-2.0 (permissive) · a74d130de19016d6 · report
calculate_cost_matrix bytedance/TWIST/evaluate_cluster.py official repository unverified Apache-2.0 (permissive) · f6d031f1affc8b74 · report
check_path bytedance/TWIST/imagenet_lmdb.py official repository unverified Apache-2.0 (permissive) · 8b7b49496df1bbe5 · report
concat_all_gather bytedance/TWIST/utils.py official repository unverified Apache-2.0 (permissive) · 73cecca9f3575f09 · report
evaluate bytedance/TWIST/evaluate_cluster.py official repository unverified Apache-2.0 (permissive) · e3880dee498de475 · report
get_augmentations bytedance/TWIST/augmentation.py official repository unverified Apache-2.0 (permissive) · f8fa05939509a76b · report
get_cluster_labels_from_indices bytedance/TWIST/evaluate_cluster.py official repository unverified Apache-2.0 (permissive) · c5807f4f8acc5c0b · report
loads_pyarrow bytedance/TWIST/imagenet_lmdb.py official repository unverified Apache-2.0 (permissive) · b4c154b6f0568b6b · report
resnet18 bytedance/TWIST/widen_resnet.py official repository unverified Apache-2.0 (permissive) · d2772e0a588e4529 · report

Tasks

Fine-Grained Image ClassificationImage ClassificationRepresentation LearningSelf-Supervised Image ClassificationSelf-Supervised LearningSemi-Supervised Image ClassificationTransfer LearningUnsupervised Image Classification

Results from the paper archive 2025-07-28

TaskDatasetModelMetricValueRank at snapshotLeaderboardReport
Fine-Grained Image Classification Caltech-101 TWIST (ResNet-50 ) Accuracy 93.5% #6 of 18 Archive leaderboard report
Fine-Grained Image Classification Caltech-101 TWIST (ResNet-50 ) Top-1 Error Rate 6.5% #6 of 18 Archive leaderboard report
Fine-Grained Image Classification SUN397 TWIST (ResNet-50) Accuracy 67.4 #4 of 5 Archive leaderboard report
Image Classification DTD TWIST (ResNet-50) Accuracy 76.6 #8 of 11 Archive leaderboard report
Image Classification Food-101 TWIST (ResNet-50) Accuracy (%) 89.3 #5 of 11 Archive leaderboard report
Image Classification Oxford-IIIT Pet Dataset TWIST (ResNet-50) Accuracy 94.5 #1 of 5 Archive leaderboard report
Semi-Supervised Image Classification ImageNet - 1% labeled data TWIST (ResNet-50 x2) Top 1 Accuracy 67.2% #26 of 65 Archive leaderboard report
Semi-Supervised Image Classification ImageNet - 1% labeled data TWIST (ResNet-50 x2) Top 5 Accuracy 88.2% #26 of 65 Archive leaderboard report
Semi-Supervised Image Classification ImageNet - 10% labeled data TWIST (ResNet-50 x2) Top 1 Accuracy 75.3% #26 of 75 Archive leaderboard report
Semi-Supervised Image Classification ImageNet - 10% labeled data TWIST (ResNet-50 x2) Top 5 Accuracy 92.8% #26 of 75 Archive leaderboard report
Unsupervised Image Classification ImageNet TWIST (ResNet-50) ARI 30.0 #6 of 9 Archive leaderboard report
Unsupervised Image Classification ImageNet TWIST (ResNet-50) Accuracy (%) 40.6 #6 of 9 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

Siamese NetworkSoftmax

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