An Image is Worth 16x16 Words: Transformers for Image Recognition at Scale
@dosovitskiyImageWorth16x162021
While the Transformer architecture has become the de-facto standard for natural language processing tasks, its applications to computer vision remain limited. In vision, attention is either applied in conjunction with convolutional networks, or used to replace certain components of convolutional networks while keeping their overall structure in place. We show that this reliance on CNNs is not necessary and a pure transformer applied directly to sequences of image patches can perform very well on image classification tasks. When pre-trained on large amounts of data and transferred to multiple mid-sized or small image recognition benchmarks (ImageNet, CIFAR-100, VTAB, etc.), Vision Transformer (ViT) attains excellent results compared to state-of-the-art convolutional networks while requiring substantially fewer computational resources to train.
Knowledge
Section titled “Knowledge”
We use standard learnable 1D position embeddings, since we have not observed significant performance gains from using more advanced 2D-aware position embeddings (Appendix D.4). [@dosovitskiyImageWorth16x162021, p. 3]
Insights
Section titled “Insights”Beyer is good Twitter shitposter.
the picture changes if the models are trained on larger datasets (14M-300M images). We find that large scale training trumps inductive bias [@dosovitskiyImageWorth16x162021, p. 2]
Similar to the high-bias low-variance, low-bias high-variance trade-off. In low-data regime, high-bias may be better since you directly fit many data points. This fails at large-data regime because of the amount of noise overwhelms the variance of the model. Regularization is key.