[Paper Review] Understanding Why ViT Trains Badly on Small Datasets: An Intuitive Perspective
The paper empirically shows Vision Transformer (ViT) underperforms on small datasets (CIFAR-10/100) compared with ResNet-18, while performing similarly on SVHN, and outlines plans for representation analysis.
Vision transformer (ViT) is an attention neural network architecture that is shown to be effective for computer vision tasks. However, compared to ResNet-18 with a similar number of parameters, ViT has a significantly lower evaluation accuracy when trained on small datasets. To facilitate studies in related fields, we provide a visual intuition to help understand why it is the case. We first compare the performance of the two models and confirm that ViT has less accuracy than ResNet-18 when trained on small datasets. We then interpret the results by showing attention map visualization for ViT and feature map visualization for ResNet-18. The difference is further analyzed through a representation similarity perspective. We conclude that the representation of ViT trained on small datasets is hugely different from ViT trained on large datasets, which may be the reason why the performance drops a lot on small datasets.
Motivation & Objective
- Demonstrate that ViT underperforms on small datasets compared to CNNs like ResNet-18.
- Compare ViT and ResNet-18 performance on CIFAR-10, CIFAR-100, and SVHN with controlled settings.
- Provide intuitive explanations and visual/quantitative evidence of the underfitting behavior of ViT on small data.
- Lay groundwork for analyzing representations to understand failure modes in ViT on small datasets.
Proposed method
- Train ViT (6-layer encoder, 8 heads, 64-dim heads, 64-dim MLP, dropout 0.1) and ResNet-18 on CIFAR-10, CIFAR-100, and SVHN with identical hyperparameters (lr=1e-4, batch=100, Adam, 500 epochs).
- Use data augmentation (random crop with padding 4, horizontal flip) and no pixel normalization to standardize input across models.
- Compare against a ResNet-18 baseline (11.5M parameters) to mirror ViT's parameter count (~9.6M).
- Report top-1 accuracy and track train/test loss and accuracy with wandb visualizations.
- Provide qualitative observations through attention and forward-propagation visuals to support intuition.

Experimental results
Research questions
- RQ1Why does ViT perform worse than CNNs like ResNet on small-scale datasets?
- RQ2How does dataset size affect ViT versus CNN performance, and can this gap be explained intuitively?
- RQ3Do simple qualitative/quantitative analyses of representations (e.g., attention patterns, forward propagation) reveal the failure modes of ViT on small data?
- RQ4What empirical directions (e.g., representation analysis with CKA) could illuminate why ViT struggles with limited data?
Key findings
- On CIFAR-10 and CIFAR-100, ViT achieves significantly lower accuracy than ResNet-18 (ViT: 81.36% vs ResNet-18: 92.8% on CIFAR-10; ViT: 54.31% vs ResNet-18: 70.7% on CIFAR-100).
- On SVHN, ViT and ResNet-18 perform similarly (ViT: 95.17% vs ResNet-18: 95.78%), though ViT converges more slowly.
- The results support the claim that ViT underperforms on small datasets, with a weaker relative performance on more challenging class-distributed data (CIFAR-100) compared to SVHN.
- The authors plan to use CKA to analyze local and global representations in ViT and CNNs to explain learning differences on varying dataset sizes.

Read this paper
Open the full text in the Nubint reader and ask about any passage as you read.
Read this paper on NubintThis review was generated by AI from the original paper. Please check the paper before citing it.