Preprint
Large Language Models

Vision Transformer

October 1, 2020

0

Citations

0

Influential Citations

Venue

2020

Year

Abstract

Images are segmented into patches, which are treated as tokens and a sequence of linear embeddings of these patches are input to a Transformer

Analysis

Why This Paper Matters

This paper marks a paradigm shift in computer vision by demonstrating that a pure Transformer architecture, originally designed for natural language processing, can achieve state-of-the-art image classification without any convolutional layers or image-specific inductive biases. Prior to this work, CNNs dominated vision tasks, and Transformers were considered complementary or hybrid components. The Vision Transformer (ViT) showed that with sufficient pre-training data, a simple patch-based tokenization and a standard Transformer encoder can match or exceed the best CNNs, challenging long-held assumptions about the necessity of locality and translation equivariance in vision models.

The significance lies in its unification of architectures across modalities. By treating image patches as tokens, ViT bridges the gap between NLP and computer vision, enabling transfer of advances in attention mechanisms, scaling laws, and pre-training strategies. This has accelerated research into multimodal models and foundation models that process text, images, and other data with a single architecture.

Technical Contributions

  • Patch-based tokenization: Images are divided into non-overlapping patches (e.g., 16x16 pixels), each flattened and linearly projected to a fixed-dimensional embedding, analogous to word embeddings in NLP.
  • Positional embeddings: Learnable 1D positional embeddings are added to patch embeddings to retain spatial information, a minimal inductive bias compared to CNNs.
  • Classification token: A special [CLS] token is prepended to the sequence, and its final hidden state is used for classification, following BERT's design.
  • Scalable architecture: ViT leverages the Transformer's ability to model long-range dependencies, enabling global context capture from the first layer.
  • Pre-training strategy: Demonstrates that large-scale pre-training (e.g., JFT-300M with 300 million images) is essential for ViT to outperform CNNs, highlighting the importance of data scale.

Results

On ImageNet (1.3M images), ViT-L/16 achieves 88.55% top-1 accuracy, matching or exceeding the best CNN (BiT-L, 87.54%) while requiring 2.5x fewer TPUv3-core-days to train. On larger datasets like ImageNet-21k and JFT-300M, ViT achieves 90.72% and 88.55% respectively, outperforming CNNs with similar or lower computational cost. The paper also shows that ViT scales well with model size and data, with performance continuing to improve as model capacity increases.

Significance

ViT has fundamentally changed the landscape of computer vision. It inspired a wave of follow-up work, including DeiT (data-efficient ViT), Swin Transformer (hierarchical ViT), and many hybrid models. The concept of treating visual data as sequences has enabled seamless integration with language models, leading to multimodal models like CLIP, DALL-E, and Flamingo. ViT also demonstrated that attention mechanisms can replace convolutions entirely, paving the way for foundation models that unify vision and language. Its impact extends beyond classification to object detection, segmentation, video understanding, and generative modeling, making it one of the most influential papers in modern AI.