TL;DR
This paper presents a systematic "head-to-head" comparison between Convolutional Neural Networks (ConvNets) and Vision Transformers (ViTs) to see which architecture produces more transferable visual features. The researchers found that Transformers—particularly the Swin Transformer—consistently outperform ConvNets across 13 out of 15 downstream tasks, proving to be more robust and generalizable "backbones" for computer vision.
What Problem Does This Paper Address?
For a decade, ConvNets have been the undisputed kings of computer vision. Their success is largely attributed to spatial inductive bias—the built-in assumption that local pixels are related to one another. However, Vision Transformers (ViTs) have recently emerged, ditching these local assumptions in favor of "self-attention" mechanisms that can model long-range dependencies across an entire image.
While ViTs have matched ConvNets on ImageNet classification, the real test of a model's utility is transfer learning: how well do features learned on one big dataset (like ImageNet) work when applied to a completely different task (like medical imaging or scene segmentation)? This paper investigates whether the "global" view of Transformers makes them better general-purpose learners than the "local" view of ConvNets.
Methods
To ensure a fair fight, the authors selected models with nearly identical performance on ImageNet-1k. If two models start with the same accuracy, any difference in downstream performance must be due to the architecture's inherent transferability.
- The Contenders:
- ConvNets: ResNet-101×3 and ResNet-152×4 (wide versions of the classic residual network).
- Transformers: ViT-B/16, ViT-L/16 (the standard "Vanilla" Transformers), and Swin-B (a hierarchical Transformer that uses shifted windows).
- The Evaluation: The models were pre-trained on ImageNet-21k and then evaluated on 15 downstream tasks using two protocols:
- Fine-tuning: Updating the entire network for the new task.
- Linear Evaluation: Freezing the backbone and only training a simple classification head (testing the "raw" quality of the learned features).
- Multi-task Learning: The authors also tested how these models handle multiple tasks simultaneously (e.g., predicting both depth and segmentation from one image) to see which architecture manages task interference better.
Datasets
The study utilized a diverse array of benchmarks to stress-test the models:
- Fine-grained Classification: Flower102, CUB200 (birds).
- Scene Recognition & Understanding: Indoor67, NYU Depth V2 (for both semantic segmentation and depth estimation).
- Open-domain Classification: WikiArt (paintings), COVID-19 (chest X-rays).
- In-domain Classification: Caltech101.
- Face Recognition: FG-NET (age estimation).
- Image Retrieval: Oxford5k.
Key Insights and Ideas
- Transformers are Better Generalists: Transformers outperformed ConvNets in 13 of the 15 tasks. They were particularly dominant in "open-domain" tasks (like art or medical scans) where the visual data looks very different from the natural images in ImageNet.
- The "Swin" Factor: The Swin Transformer was the standout performer. Unlike the "Vanilla" ViT, which treats an image as a flat sequence of patches, Swin uses a hierarchical structure. This allows it to produce high-quality features without requiring the massive fine-tuning that standard ViTs often need.
- Multi-task Robustness: Transformers are "better team players." In multi-task settings, they showed higher performance gains when tasks were complementary and suffered smaller performance drops when tasks were irrelevant to each other compared to ConvNets.
- ConvNets Still Have a Niche: ConvNets maintained a slight edge in unsupervised image retrieval (Oxford5k) and in-domain classification (Caltech101). This suggests that for tasks requiring very specific local matching or memorization of seen categories, the convolutional bias is still helpful.
Key Results
- Average Rank: In scene recognition tasks, Transformers achieved an average rank of 2.2, significantly better than the ConvNets' 4.2.
- Open-Domain Dominance: On the WikiArt and COVID-19 datasets, all three Transformer models occupied the top three spots, beating the ConvNets by large margins.
- Efficiency: Transformers often achieved these superior results with significantly fewer parameters. For example, ViT-B (86M parameters) often outperformed ResNet-152x4 (937M parameters) on transfer tasks.
- Multi-task Synergy: In the NYU Depth V2 evaluation, Transformers saw a relative improvement of 0.4 in mIoU when trained multi-task, compared to only 0.3 for ConvNets.
Limitations and Future Work
The authors acknowledge a few "mysteries" that remain:
- Image Retrieval: It is still not entirely clear why ConvNets perform better at unsupervised image retrieval. The authors suspect the hierarchical nature of convolutions might be better at capturing specific local textures used for matching.
- Dataset Breadth: While 15 tasks is extensive, the authors hope to include even more diverse datasets in the future to pinpoint exactly where the Transformer advantage begins and ends.
- Architectural Evolution: As "hybrid" models (combining convolutions and attention) emerge, the line between these two families is blurring, necessitating further study into which specific components drive transferability.
Summary updated