CoChat

An Image is Worth 16x16 Words: Transformers for Image Recognition at Scale

Open access

The DOI matches its DataCite record; 64 of the 64 references it cites were found in a registry or an index; 11 of the 23 sources its claims cite were checked for support.

Abstract

While the Transformer architecture has become the de-facto standard for natural language processing tasks, its applications to computer vision remain limited. In vision, attention is either applied in conjunction with convolutional networks, or used to replace certain components of convolutional networks while keeping their overall structure in place. We show that this reliance on CNNs is not necessary and a pure transformer applied directly to sequences of image patches can perform very well on image classification tasks. When pre-trained on large amounts of data and transferred to multiple mid-sized or small image recognition benchmarks (ImageNet, CIFAR-100, VTAB, etc.), Vision Transformer (ViT) attains excellent results compared to state-of-the-art convolutional networks while requiring substantially fewer computational resources to train.

Overview

CoChat Summary

TL;DR

Vision Transformer (ViT) applies a standard Transformer directly to sequences of image patches and, when pre-trained on large datasets, matches or exceeds state-of-the-art convolutional networks on image classification while using substantially less pre-training compute. Large-scale pre-training can overcome ViT’s weaker image-specific inductive biases, though ViT underperforms ResNets on smaller pre-training datasets.

Key findings

  • ViT-H/14 pre-trained on JFT-300M reaches 88.55% ImageNet, 90.72% ImageNet-ReaL, 94.55% CIFAR-100, and 77.63% on VTAB (19 tasks), outperforming BiT-L on all reported tasks while using 2.5k TPUv3-core-days versus BiT-L’s 9.9k and Noisy Student’s 12.3k.
  • ViT-L/16 pre-trained on public ImageNet-21k reaches 85.30% ImageNet, 88.62% ImageNet-ReaL, 93.25% CIFAR-100, and 72.72% VTAB, using 0.23k TPUv3-core-days.
  • On smaller pre-training datasets, ViT underperforms comparable ResNets; with JFT-300M, larger ViT models overtake smaller ones and ViT overtakes BiT. In a scaling study, ViT uses approximately 2–4× less compute to attain the same performance averaged over 5 datasets.
  • Self-supervised masked patch prediction with ViT-B/16 achieves 79.9% ImageNet accuracy, a 2% improvement over training from scratch but still 4% behind supervised pre-training.

Methods

  • Images are split into fixed-size patches, flattened, linearly projected to D dimensions, given position embeddings, and fed as a sequence to a standard Transformer encoder; a learnable [class] token provides the image representation for classification.
  • Models include ViT-Base (12 layers, D=768, 86M params), ViT-Large (24 layers, D=1024, 307M params), and ViT-Huge (32 layers, D=1280, 632M params); baselines are ResNet (BiT) and hybrid ResNet+ViT models.
  • Pre-training uses ImageNet, ImageNet-21k, or JFT-300M; training uses Adam with batch size 4096 and weight decay 0.1, while fine-tuning uses SGD with momentum and batch size 512; evaluation reports fine-tuning and few-shot/linear accuracies.

Limitations

  • Stated by the paper: applying ViT to other vision tasks such as detection and segmentation remains a challenge; self-supervised pre-training still lags large-scale supervised pre-training; further scaling of ViT would likely improve performance but remains future work.
  • Evident from the text: ViT has much less image-specific inductive bias than CNNs, so it generalizes worse when trained on insufficient data and requires large-scale pre-training (14M–300M images) to become competitive.
  • Evident from the text: higher-resolution fine-tuning requires 2D interpolation of pre-trained position embeddings, and the paper notes that pre-training efficiency may be affected by factors beyond architecture, such as training schedule, optimizer, and weight decay.

Model-written summary. Check it against the paper before relying on it.

Integrity signals

Registry

DataCite · 10.48550/arxiv.2010.11929

Cites

64 of 64 references verified0 citation errors · 0 not checkable

Statistics

Nothing to recompute.

Figures

Figure 1 Model overview. We split an image into fixed-size patches, linearly embed each of them, add position embeddings, and feed the resulting sequence of vectors to a standard Transformer encoder. In order to perform classification, we use the standard approach of adding an extra learnable 'classification token' to the sequence. The illustration of the Transformer encoder was inspired by Vaswani et al. (2017).
Figure 1 Model overview. We split an image into fixed-size patches, linearly embed each of them, add position embeddings, and feed the resulting sequence of vectors to a standard Transformer encoder. In order to perform classification, we use the standard approach of adding an extra learnable 'classification token' to the sequence. The illustration of the Transformer encoder was inspired by Vaswani et al. (2017).From the PDF
Figure 2 Breakdown of VTAB performance in Natural , Specialized , and Structured task groups.
Figure 2 Breakdown of VTAB performance in Natural , Specialized , and Structured task groups.From the PDF
Image 3
From the PDF
Figure 4 Linear few-shot evaluation on ImageNet versus pre-training size. ResNets perform better with smaller pre-training datasets but plateau sooner than ViT, which performs better with larger pre-training. ViT-b is ViT-B with all hidden dimensions halved.
Figure 4 Linear few-shot evaluation on ImageNet versus pre-training size. ResNets perform better with smaller pre-training datasets but plateau sooner than ViT, which performs better with larger pre-training. ViT-b is ViT-B with all hidden dimensions halved.From the PDF
Figure 5 Performance versus pre-training compute for different architectures: Vision Transformers, ResNets, and hybrids. Vision Transformers generally outperform ResNets with the same computational budget. Hybrids improve upon pure Transformers for smaller model sizes, but the gap vanishes for larger models.
Figure 5 Performance versus pre-training compute for different architectures: Vision Transformers, ResNets, and hybrids. Vision Transformers generally outperform ResNets with the same computational budget. Hybrids improve upon pure Transformers for smaller model sizes, but the gap vanishes for larger models.From the PDF
Figure 6 Representative examples of attention from the output token to the input space. See Appendix D.7 for details.
Figure 6 Representative examples of attention from the output token to the input space. See Appendix D.7 for details.From the PDF
Figure 7 Left: Filters of the initial linear embedding of RGB values of ViT-L/32. Center: Similarity of position embeddings of ViT-L/32. Tiles show the cosine similarity between the position embedding of the patch with the indicated row and column and the position embeddings of all other patches. Right: Size of attended area by head and network depth. Each dot shows the mean attention distance across images for one of 16 heads at one layer. See Appendix D.7 for details.
Figure 7 Left: Filters of the initial linear embedding of RGB values of ViT-L/32. Center: Similarity of position embeddings of ViT-L/32. Tiles show the cosine similarity between the position embedding of the patch with the indicated row and column and the position embeddings of all other patches. Right: Size of attended area by head and network depth. Each dot shows the mean attention distance across images for one of 16 heads at one layer. See Appendix D.7 for details.From the PDF
Figure 8 Scaling different model dimensions of the Vision Transformer.
Figure 8 Scaling different model dimensions of the Vision Transformer.From the PDF
Figure 9 Comparison of class-token and global average pooling classifiers. Both work similarly well, but require different learning-rates.
Figure 9 Comparison of class-token and global average pooling classifiers. Both work similarly well, but require different learning-rates.From the PDF
Figure 10 Position embeddings of models trained with different hyperparameters.
Figure 10 Position embeddings of models trained with different hyperparameters.From the PDF
Figure 11 Size of attended area by head and network depth. Attention distance was computed for 128 example images by averaging the distance between the query pixel and all other pixels, weighted by the attention weight. Each dot shows the mean attention distance across images for one of 16 heads at one layer. Image width is 224 pixels.
Figure 11 Size of attended area by head and network depth. Attention distance was computed for 128 example images by averaging the distance between the query pixel and all other pixels, weighted by the attention weight. Each dot shows the mean attention distance across images for one of 16 heads at one layer. Image width is 224 pixels.From the PDF
Figure 12 Left: Real wall-clock timings of various architectures across input sizes. ViT models have speed comparable to similar ResNets. Right : Largest per-core batch-size fitting on device with various architectures across input sizes. ViT models are clearly more memory-efficient.
Figure 12 Left: Real wall-clock timings of various architectures across input sizes. ViT models have speed comparable to similar ResNets. Right : Largest per-core batch-size fitting on device with various architectures across input sizes. ViT models are clearly more memory-efficient.From the PDF
Figure 13 Performance of Axial-Attention based models, in terms of top-1 accuracy on ImageNet 5-shot linear, versus their speed in terms of number of FLOPs ( left ) and inference time ( left ).
Figure 13 Performance of Axial-Attention based models, in terms of top-1 accuracy on ImageNet 5-shot linear, versus their speed in terms of number of FLOPs ( left ) and inference time ( left ).From the PDF
Figure 14 Further example attention maps as in Figure 6 (random selection).
Figure 14 Further example attention maps as in Figure 6 (random selection).From the PDF

Verification

Claims the paper makes

6 Valid · 3 Not valid · 7 Not checked · 89 Own results and interpretations

54 more claims

Create a free account to see all 105 claims and to verify the 1 reference still open.

See all claims — free account
  • Probably not a substantial claim. 21
  • It may state two separate claims as one. 27

Create a free account to see these claims.

Claims other papers make about this one

Each is checked against this paper’s own text: does it say what the citing paper says it does?

63 more claims about this paper

Create a free account to see every claim other papers make about this one.

See all claims — free account

Self-check

Percentages, sums and reported differences re-computed from the paper’s own numbers.

Each contradiction between two passages listed here was confirmed by an independent check.

2 of 2

Citations

Cites

Show all 64 references

Research works printed but not linked: 2

  1. Jean-Baptiste Cordonnier, Andreas Loukas, and Martin Jaggi. On the relationship between selfattention and convolutional layers. In ICLR , 2020.
  2. Yuxin Wu and Kaiming He. Group normalization. In ECCV , 2018.

Cited by

Items 7,101–7,200 of 21,826

Metadata

Authors
Dosovitskiy, A., Beyer, L., Kolesnikov, A., Weissenborn, D., Zhai, X., Unterthiner, T., Dehghani, M., Minderer, M., Heigold, G., Gelly, S., Uszkoreit, J., & Houlsby, N.
Affiliations
Google (United States) (US)
Venue
arXiv
Publisher
arXiv
Published
2020
ISSN
2331-8422 (ISSN-L)
OpenAlex
W3094502228
Cited by
47,472
References
52
Citations by year
2026: 8731 · 2025: 12671 · 2024: 11821 · 2023: 8591 · 2022: 4351 · 2021: 1263 · 2020: 30
Type
posted content
Language
en
Open access
Locations
  • arXiv (Cornell University) (submittedVersion)
  • arXiv (Cornell University)
Topics
  • Physical Sciences › Computer Science › Computer Vision and Pattern Recognition › Advanced Neural Network Applications
  • Physical Sciences › Computer Science › Artificial Intelligence › Domain Adaptation and Few-Shot Learning
  • Physical Sciences › Computer Science › Computer Vision and Pattern Recognition › Visual Attention and Saliency Detection
Keywords
vision transformer, image classification, image patches, attention mechanism, pre-training, transfer learning, computational efficiency, ImageNet, CIFAR-100

About these checks

Registry, retraction, Cites and statistics results are computed, not judged, with one exception: a printed reference that no index lists is read once by a model before it counts as a citation error. Claims are extracted by a model and kept only when their quote appears verbatim in the text; each cited source is then checked, with a model’s help, for whether it says what the claim relies on. Those verdicts can be wrong — read the claim’s quote and the cited source before relying on one.

The claim verdicts this report counts are experimental: their accuracy is not yet measured.

A language model drew the claims from the paper on 2026-10-10, under version 3 of the claim definition (model deepseek-v4.1-flash, prompt extract-v3).

A second model labelled each claim on 2026-10-10 (model jev-1.13-20260917, definition revision gold-guideline-v0.2).

Cited sources are checked with a language model’s help (gpt-6-sol and qwen3.8-omni-flash).

Statistics and arithmetic are recomputed, not judged.

Confidence bands are shown only for fields calibrated on our annotated test set. None is calibrated yet, so no band is shown.

What counts as a claim ›How we measure confidence ›How we check this ›

Are you an author, or do you see a problem with this page? Request a review

Data sources

Bibliographic data: Semantic Scholar, OpenAlex, Crossref.

Contains information from the Semantic Scholar Academic Graph Datasets, made available under the ODC Attribution License (ODC-BY 1.0).

Semantic Scholar’s data is described in: Kinney, R., et al. (2023). The Semantic Scholar Open Data Platform. arXiv:2301.10140.