TL;DR
This paper introduces a simplified and more effective supervised training recipe for Vision Transformers (ViTs). By revisiting and refining existing techniques, the authors achieve state-of-the-art performance on ImageNet classification, demonstrating that ViTs can be trained efficiently and competitively with self-supervised methods, even on smaller datasets.
What Problem Does This Paper Address?
Vision Transformers (ViTs) have shown great promise in computer vision, offering a flexible architecture that can learn from data without strong inductive biases like convolutional neural networks (CNNs). However, ViTs traditionally require massive datasets or complex self-supervised pre-training to achieve competitive performance. Existing supervised training recipes for ViTs have been either complex or not as effective as self-supervised approaches, leaving a gap in understanding how to best leverage ViTs with standard supervised learning, especially on mid-sized datasets like ImageNet-1k. This paper aims to bridge this gap by proposing a simpler, yet more powerful, supervised training methodology.
Methods
The authors propose a refined supervised training recipe for ViTs, building upon previous work but simplifying key components. The core of their approach includes:
- Simplified Data Augmentation ("3-Augment"): Instead of complex, learned augmentation strategies like RandAugment, they introduce a minimal policy with only three augmentations (grayscale, solarization, and Gaussian blur), inspired by self-supervised learning practices.
- Lower Training Resolution: They leverage the "FixRes" effect by training ViTs at a lower resolution than the target inference resolution, which acts as a regularizer and improves performance, especially for larger models.
- Simple Random Cropping (SRC): For pre-training on larger datasets like ImageNet-21k, they find that Simple Random Cropping is more effective than the standard Random Resized Crop (RRC), as it reduces train-test discrepancy and labeling errors.
- Regularization and Loss: They incorporate stochastic depth and LayerScale for regularization and use a binary cross-entropy loss for ImageNet-1k training, which they found to be beneficial.
- Optimizer: They utilize the LAMB optimizer, which is known for its effectiveness in large-batch training.
Datasets
The primary datasets used in this paper are:
- ImageNet-1k: Used for training and evaluating ViTs from scratch.
- ImageNet-21k: Used for pre-training ViTs before fine-tuning on ImageNet-1k.
- ImageNet-V2: Used as an independent validation set to assess generalization and overfitting.
- Transfer Learning Datasets: iNaturalist 2018, iNaturalist 2019, Flowers-102, Stanford Cars, CIFAR-100, and CIFAR-10 were used to evaluate the models' performance on downstream tasks.
- ADE20k: Used for semantic segmentation experiments.
Key Insights and Ideas
- Simplicity is Key: The paper strongly suggests that complex data augmentation and training schedules are not always necessary for ViTs. A simple, well-chosen set of augmentations can be highly effective.
- Lower Training Resolution as a Regularizer: Training ViTs at a lower resolution than inference time significantly improves performance and acts as a crucial regularizer, especially for larger models, preventing overfitting.
- SRC Outperforms RRC on Large Datasets: For large-scale pre-training (ImageNet-21k), Simple Random Cropping is more beneficial than Random Resized Crop, likely due to reduced train-test discrepancy and fewer labeling errors.
- Supervised ViTs Can Compete: The proposed supervised training recipe allows ViTs to achieve performance comparable to, and in some cases exceeding, recent self-supervised approaches, challenging the notion that self-supervision is strictly necessary for top performance.
- ViTs Generalize Well: The authors' models show good generalization capabilities, with less overfitting compared to other architectures on ImageNet-V2.
Key Results
- ImageNet-1k Classification: The proposed training recipe achieves state-of-the-art results for fully supervised ViTs on ImageNet-1k. For instance, a ViT-H model trained solely on ImageNet-1k reaches 85.2% top-1 accuracy, a significant improvement over previous supervised methods.
- ImageNet-21k Pre-training: ViTs pre-trained on ImageNet-21k and fine-tuned with the proposed recipe show substantial gains, outperforming existing recipes by a large margin (e.g., +3.0% for ViT-L).
- Efficiency: The training procedure is more efficient, reducing the number of GPUs and training time required for large ViT models. For example, training ViT-H is made effectively possible with reduced resources.
- Downstream Tasks: The trained ViTs perform competitively on transfer learning tasks and semantic segmentation, often offering better compute/performance trade-offs than recent architectures.
- Comparison to Self-Supervised: For ViT-B and ViT-L models, the supervised approach is on par with BERT-like self-supervised methods, using fewer epochs and less data.
Limitations and Future Work
- Hyperparameter Sensitivity: While the paper aims for simplicity, some hyperparameter choices might still be sensitive to model size or dataset. The authors mention that for some architectures, their training procedure might not be optimal, suggesting the need for architecture-specific tuning.
- Comparison with Advanced SSL: The paper focuses on comparing with "default" settings of self-supervised methods. More extensive comparisons with highly optimized SSL approaches might reveal further differences.
- Future Work: The authors suggest their work can serve as better baselines for future research, particularly for self-supervised approaches. They also highlight the potential for training even larger models with reduced resources, opening avenues for exploring massive-scale ViT training. The insights on data augmentation and resolution could be further explored for other vision tasks.
Summary updated