Profile

Settings

Loading…

← Papers

Help

FAQ

Which features require signing in?

You can read the commentary, paper info, Model Structure and related papers of public papers without signing in. Sign in to manage your account or contact us about your inquiries.

Can I upload a PDF file?

Upload papers with an arXiv or DOI link; the commentary is public to everyone. Papers whose source and terms of use can't be verified, so the commentary can't be made public, can't be uploaded. Uploading PDF files and keeping papers private are for subscribers only, and a paper uploaded as a file is saved as private only. Searching for official info by title runs only when you press the button.

Are the figures and AI commentary accurate?

Figures come only from the original paper, and only those whose terms of use are verified are shown. The commentary is written by AI and may be wrong. Check important claims, numbers and figure context against the evidence in the original paper.

I want to report a copyright issue.

Terms of use and the source of the original paper are on the Paper info tab. If there's a problem, choose "Paper content, figures and copyright" under Contact us and send the paper link, the part in question, and evidence that you hold the rights. Receiving your report doesn't confirm any rights or remove anything right away. You can see the result of the review under My inquiries.

I forgot my password.

If you signed up with email, use Forgot password in the sign-in window to reset it with your verified email. If you signed up with Google, Naver or Kakao, change your password with that service.

What should I include in an inquiry?

Tell us which screen you were on and what you were doing when the problem happened, along with the paper link. Don't include personal information such as passwords, API keys, verification codes or phone numbers. Inquiries and replies are stored in Refivu and you can see them under My inquiries.

How do I delete my account?

In Settings, under My account, press Delete account. Review what will be deleted and complete identity verification to delete your account. For other requests, choose "Account" under Contact us.

Paper commentary

Emerging Properties in Self-Supervised Vision Transformers

Self-supervised Vision Transformers learn segmentation-like features that supervised ones lack

  • Problem Vision Transformers match convnets on images but gain little from supervised training. They cost more to run and need more data, and their features don't stand out.
  • Method DINO is a label-free method that trains a student network to match a teacher built from its own past weights. The teacher is a moving average of the student, and centering with sharpening stops collapse.
  • Results DINO ViT-S/8 reached 78.3 top-1 with k-NN on ImageNet, with no finetuning or linear classifier. Its self-attention also marks object boundaries without any labels.

Figure 2: Self-distillation with no labels. We illustrate DINO in
the case of one single pair of views ( x1, x2) for simplicity. The
model passes two different…

Figure 2 : Self-distillation with no labels. We illustrate DINO in the case of one single pair of views ( x1, x2) for simplicity. The model passes two different random transformations of an input image to the student and teacher networks. Both networks have the same architecture but different parameters. The output of the teacher network is centered with a mean computed over the batch. Each networks outputs a K dimensional feature that is normalized with a temperature softmax over the feature dimension. Their similarity is then measured with a cross-entropy loss. We apply a stop-gradient (sg) operator on the teacher to propagate gradients only through the student. The teacher parameters are updated with an exponential moving average (ema) of the student parameters.

Original paper · CC BY 4.0 · Mathilde Caron, Hugo Touvron, Ishan Misra, Hervé Jégou, Julien Mairal, Piotr Bojanowski, Armand Joulin · Emerging Properties in Self-Supervised Vision Transformers · Original paper figure · Extracted the figure area from page 2 of the original PDF.

Where supervised ViTs fall short

Vision Transformers can match convnets on images, but they bring no clear gain over them. They cost more to run and need more training data, and their features don't stand out as special. The authors suspect supervision as the cause, because Transformers in NLP took off with self-supervised pretext tasks. An image label squeezes a rich scene into one category from a few thousand, which gives a thin learning signal.

Self-supervised methods already work on convnets, but they differ in the components they add to avoid collapse. That leaves the open question of what self-supervision does for ViT features, which the authors test. They look for properties that supervised ViTs and convnets don't show.

How DINO turns distillation into a label-free loss

The core idea is to train a student network to match a teacher network's output, with no labels involved. Both networks share one architecture, and the teacher is built from the student's own past weights rather than given beforehand.

Each network turns its K-dimensional output into a probability distribution with a temperature softmax. For the student, the probability of dimension i is written as follows. \[ P_s(x)(i)=\frac{\exp(g_{\theta_s}(x)(i)/\tau_s)}{\sum_{k=1}^{K}\exp(g_{\theta_s}(x)(k)/\tau_s)} \] The student temperature τs is 0.1 in pretraining.

The loss is a cross-entropy H(a,b) = -a log b between the teacher and student distributions, with the teacher side treated as a fixed target. Each image is cut into global crops at resolution 2242 and several local crops at 962. All crops pass through the student, but only the global crops pass through the teacher, which encourages local-to-global matching.

The student is trained to minimize the following sum, which pairs each global view with every other view in V. \[ \min_{\theta_s}\sum_{x\in\{x_1^g,x_2^g\}}\sum_{x'\in V,\,x'\neq x}H(P_t(x),P_s(x')) \]

The teacher output is centered with a batch mean and sharpened with a low temperature before it serves as a target. A stop-gradient on the teacher means gradients flow only through the student, while the teacher weights follow the student through a moving average.

Keeping the teacher stable without collapse

The teacher is an exponential moving average of the student, updated with the following rule. \[ \theta_t\leftarrow\lambda\theta_t+(1-\lambda)\theta_s \] The rate λ follows a cosine schedule from 0.996 to 1 over training. The authors view this as a momentum encoder whose role is closer to a mean teacher than to a queue for contrastive learning.

Freezing the teacher for an epoch works, but copying the student into the teacher at each step fails to converge. The momentum teacher scored 72.8 k-NN top-1, compared to 66.6 for a teacher taken from the previous epoch. A copy of the student as teacher scored 0.1, and a teacher from the previous iteration did not converge.

Collapse happens when the outputs ignore the input and stay uniform or lean on one dimension. Centering updates a running mean of the teacher outputs in the following way. \[ c\leftarrow mc+(1-m)\frac{1}{B}\sum_{i=1}^{B}g_{\theta_t}(x_i) \] Subtracting this mean stops one dimension from dominating, but it pushes the outputs toward uniformity.

Sharpening uses a low teacher temperature to push the other way, and applying both balances the two effects.

The authors split the cross-entropy into an entropy term and a KL divergence term. \[ H(P_t,P_s)=h(P_t)+D_{KL}(P_t\,|\,P_s) \] If one operation is missing, the KL term converges to zero, which marks collapse. The entropy settles at different values for each missing operation, so each one blocks a different failure.

The authors read the momentum teacher as Polyak-Ruppert averaging, which builds a model ensemble that guides the student. For ViT, the momentum teacher consistently beats the student during training.

ImageNet linear and k-NN results

The authors compare DINO with BYOL, MoCov2 and SwA V on the same ViT-S backbone, pretrained on ImageNet without labels. The k-NN classifier uses 20 neighbors, which worked best in most runs. With ViT-S, DINO scored 77.0 linear and 74.5 k-NN top-1. DINO led these baselines by +3.5% in linear and +7.9% in k-NN top-1.

The k-NN score sits close to the linear score, 74.5 compared to 77.0. The authors say this closeness appears only with DINO and ViT, and not with other self-supervised methods or with ResNet-50. On ResNet-50, DINO gave 75.3 linear and 67.5 k-NN top-1, matching SwA V on the linear score.

A base ViT with 8×8 patches gave 80.1 linear and 77.4 k-NN top-1. A small ViT with 8×8 patches gave 78.3 k-NN top-1 with no finetuning or linear classifier. The authors compare the base model with SCLRv2, which they describe as the previous state of the art, and it has 10× fewer parameters and runs 1.4× faster.

Attention maps as object masks

Self-supervised ViT features hold the scene layout, and object boundaries can be read from the self-attention of the last block. Figure 1 shows the self-attention of the [CLS] token in the last layer of a ViT trained without any supervision. Different heads focus on different objects or parts, as the attention maps of a ViT-S/8 show.

The authors threshold the self-attention to keep 60% of the mass and score the masks with Jaccard similarity. On PASCAL VOC12 validation images, DINO ViT-S/16 scored 45.9, compared to 22.0 for the supervised ViT-S/16. The authors say a supervised ViT attends poorly to objects in clutter, which fits this gap. They note that self-supervised convnets hold segmentation information too, but extracting it needs dedicated methods.

Retrieval, copy detection and video tracking

The authors evaluate frozen features on revisited Oxford and Paris with nearest-neighbor retrieval. DINO ViT-S/16 trained on Google Landmarks v2 scored 51.5 mAP on the Oxford medium split, compared to 33.5 for supervised ViT-S/16 on ImageNet. The authors note that landmark pretraining performs particularly well here.

For copy detection, the features concatenate the CLS token with GeM-pooled patch tokens, then get whitened and compared by cosine similarity. Ten thousand YFCC100M distractors are added to the Copydays strong subset. DINO ViT-B/8 at resolution 3202 scored 85.5 mAP, compared to 82.5 for Multigrain with ResNet-50 at largest side 800.

DINO ViT-S/8 scored 69.9 (J&F)m, compared to 66.0 for the supervised ViT-S/8. The authors infer that the frozen output keeps some spatial information.

Transfer learning and component ablations

The authors finetuned pretrained ViT-B/16 models and compared DINO with supervised pretraining. On Cifar100, DINO scored 91.7 top-1, compared to 90.8 for supervised pretraining. For ViT architectures, self-supervised pretraining transfers better than supervised features in these experiments.

The ablation starts from the default DINO, which scored 72.8 k-NN top-1 with ViT-S/16 over 300 epochs. Without the momentum encoder and Sinkhorn-Knopp, the model scored 0.1 k-NN top-1. Removing multi-crop gave 67.9, and swapping cross-entropy for a mean square error gave 52.6.

The authors say comparing rows 3 and 9 shows the momentum encoder matters for performance. Adding a predictor to the student gave 71.8 k-NN, little change from 72.8.

Compute, patch size and batch size

Adding 10×962 local crops raised this to 74.6 in 24.2 h, with peak memory rising from 9.3G to 15.4G. The authors say the local-to-global views help more than extra training without them.

Training DINO with ViT on two 8-GPU servers for 3 days scored 76.1 top-1 on the linear benchmark. The authors compare this with convnet-based self-supervised systems of comparable size, which need more compute.

Smaller patches improve k-NN without adding parameters. The cost is throughput: 5×5 patches run at 44 im/s, compared to 180 im/s for 8×8 patches.

With 100 epochs and no multi-crop, k-NN top-1 rose from 57.9 at batch size 128 to 59.9 at batch size 1024. The learning rate scales linearly with batch size, as lr = 0.0005 × batch size / 256. A batch size of 8 gave 35.2% accuracy after 50 epochs.

Limitations

Copying the student to the teacher didn't converge, so the teacher needs its moving-average update. The momentum teacher's advantage over the student is seen in training curves, and the Polyak-Ruppert reading is the authors' interpretation.

Batch size results stop at 100 epochs without multi-crop, and batch size 8 ran only for 50 epochs. The authors say small-batch training would likely need retuned hyperparameters such as the momentum rates. Patch size gains come at a throughput cost, with 5×5 at 44 im/s.

Paper info

Authors
Mathilde Caron, Hugo Touvron, Ishan Misra, Hervé Jégou, Julien Mairal, Piotr Bojanowski, Armand Joulin
Venue
arXiv · Preprint
First published
2021-4-29
Added
2026-10-20
Updated
2021-5-24
Version
v2
arXiv
2104.14294
Category
cs.CV
Original paper terms
CC BY 4.0
What we show
Paper info, commentary and permitted figures from the original paper

AI commentary is a separate explanation from the original paper and may contain errors. The original paper and figures follow each source's terms of use and any rights noted separately.

Abstract

In this paper, we question if self-supervised learning provides new properties to Vision Transformer (ViT) that stand out compared to convolutional networks (convnets). Beyond the fact that adapting self-supervised methods to this architecture works particularly well, we make the following observations: first, self-supervised ViT features contain explicit information about the semantic segmentation of an image, which does not emerge as clearly with supervised ViTs, nor with convnets. Second, these features are also excellent k-NN classifiers, reaching 78.3% top-1 on ImageNet with a small ViT. Our study also underlines the importance of momentum encoder, multi-crop training, and the use of small patches with ViTs. We implement our findings into a simple self-supervised method, called DINO, which we interpret as a form of self-distillation with no labels. We show the synergy between DINO and ViTs by achieving 80.1% top-1 on ImageNet in linear evaluation with ViT-Base.

Quote from the paper

Mathilde Caron, Hugo Touvron, Ishan Misra, Hervé Jégou, Julien Mairal, Piotr Bojanowski, Armand Joulin (2021). Emerging Properties in Self-Supervised Vision Transformers. arXiv:2104.14294v2. https://arxiv.org/abs/2104.14294v2

BibTeX
@misc{caron2021emerging,
  title = {{Emerging Properties in Self-Supervised Vision Transformers}},
  author = {Mathilde Caron and Hugo Touvron and Ishan Misra and Hervé Jégou and Julien Mairal and Piotr Bojanowski and Armand Joulin},
  year = {2021},
  eprint = {2104.14294},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2104.14294v2}
}

See related papersBrowse other papers

Paper preview
Account security

Connect Google account

If you connect a Google account, you can sign in with it too.

Refivu

Delete account

Refivu
Refivu

Sign up