Abstract
Vision Transformers (ViTs) have demonstrated remarkable performance in computer vision tasks but are notoriously data-hungry, often requiring massive datasets like ImageNet-21k to outperform traditional Convolutional Neural Networks (CNNs). This requirement stems from a lack of inherent inductive biases, such as locality and translation invariance, which are baked into CNN architectures. This paper presents a simple yet effective two-stage training framework that enables ViTs to learn these biases directly from small-scale datasets. By utilizing a self-supervised pretext task for weight initialization followed by supervised fine-tuning, the proposed method allows standard ViTs to outperform state-of-the-art CNNs and specialized ViT variants without any external large-scale pre-training.
Introduction
For over a decade, Convolutional Neural Networks (CNNs) have been the standard for image recognition. Their success is largely attributed to inductive biases—architectural assumptions that nearby pixels are related (locality) and that features are stationary across an image (translation invariance). These assumptions act as a regularizer, allowing CNNs to generalize well even when trained on limited data.
In contrast, Vision Transformers (ViTs) treat images as sequences of patches, using self-attention to capture global dependencies. While this flexibility is powerful, it makes ViTs "data-hungry." When trained from scratch on small datasets like CIFAR-10 or Tiny-ImageNet, ViTs often fail to converge or yield sub-par results compared to their convolutional counterparts. To bridge this "data-efficiency gap," researchers typically rely on pre-training on millions of images. This paper explores an alternative: can we make ViTs viable for niche domains where massive datasets are unavailable?
Proposed Method: A Two-Stage Framework
The authors propose a strategy focused on Weight Initialization rather than architectural modification. The framework consists of two distinct stages:
Stage 1: Self-supervised Weight Learning
Before introducing labels, the ViT is trained on the target small-scale dataset using a self-distillation pretext task. The architecture is organized into a "Student" and a "Teacher" network. The training process involves:
- Multi-crop Strategy: An image is decomposed into "Global views" (covering >50% of the image) and "Local views" (20-50%).
- Feature Prediction: The Student network is tasked with predicting the Teacher's feature representations of these different views.
This process forces the ViT to learn spatial relationships and the concept of locality from the data itself. By reconstructing the relationship between local and global patches, the model effectively "learns" the inductive biases that CNNs possess by design.
Stage 2: Supervised Fine-tuning
The weights learned by the Teacher network in Stage 1 serve as the initialization for a standard ViT. This model is then fine-tuned using standard supervised learning with cross-entropy loss on the same dataset. Because the model starts from a "warm" state with learned spatial awareness, it avoids the stability issues common when training ViTs from scratch.
Crucially, this method is "plug-and-play." It requires no changes to the ViT architecture and no additional loss functions during the final supervised phase.
Experimental Results
The researchers evaluated the framework across several benchmarks, including general-purpose datasets (CIFAR-10/100, SVHN), medium-scale datasets (Tiny-ImageNet), and fine-grained classification tasks (FGVC-Aircraft, Stanford Cars).
Performance Benchmarks
The proposed method consistently outperformed training from scratch and previous specialized techniques:
- Tiny-ImageNet: The model achieved 63.36% top-1 accuracy, significantly higher than the 57.07% achieved by training from scratch and surpassing ResNet-110 (59.77%).
- CIFAR-100: The framework reached 79.15%, outperforming both ResNet-56 and ResNet-110.
- Fine-grained Data: On the FGVC-Aircraft dataset, the method achieved 66.04% accuracy—a massive improvement over the previous state-of-the-art for small-scale ViT training, which sat at approximately 10.40%.
Efficiency and Robustness
Beyond raw accuracy, the method proved efficient, reaching these results in 300 total epochs, whereas some baseline methods require up to 600 epochs. Furthermore, the self-supervised initialization provided a "robustness bonus," making the models significantly more resilient to natural corruptions such as noise, blur, and weather effects compared to models trained from scratch.
Key Insights
- Initialization is the Bottleneck: The sensitivity of ViTs to small data is primarily an initialization problem. Standard schemes like Xavier initialization often place the model in a poor region of the loss landscape for small datasets.
- Learned vs. Built-in Bias: Inductive biases do not have to be hard-coded into the architecture. A Transformer can discover these properties through self-supervision.
- The Teacher's Role: Weights from the Teacher network (updated via Exponential Moving Average) consistently outperformed Student weights for fine-tuning, acting as a powerful regularizer during the self-supervised phase.
Conclusion and Future Work
This research demonstrates that Vision Transformers can be highly effective on small-scale datasets without the need for external large-scale pre-training or complex architectural changes. By shifting the focus to self-supervised initialization, the authors provide a pathway for using ViTs in specialized domains like medical imaging or satellite analysis.
Future work may involve optimizing the hyperparameter sensitivity of the self-supervised phase—specifically the crop ratios—and exploring how this initialization scheme scales to non-monolithic or hybrid architectures. For now, this two-stage approach offers a robust solution to the data-efficiency gap in Transformer-based vision models.
Summary updated