paper-with-me

홈 › Papers

Early Convolutions Help Transformers See Better

2021-06-28 · NeurIPS 2021 12 · Tete Xiao, Mannat Singh, Eric Mintun, Trevor Darrell, Piotr Dollár, Ross Girshick

Vision transformer (ViT) models exhibit substandard optimizability. In particular, they are sensitive to the choice of optimizer (AdamW vs. SGD), optimizer hyperparameters, and training schedule length. In comparison, modern convolutional neural networks are easier to optimize. Why is this the case? In this work, we conjecture that the issue lies with the patchify stem of ViT models, which is implemented by a stride-p p*p convolution (p=16 by default) applied to the input image. This large-kernel plus large-stride convolution runs counter to typical design choices of convolutional layers in neural networks. To test whether this atypical design choice causes an issue, we analyze the optimization behavior of ViT models with their original patchify stem versus a simple counterpart where we replace the ViT stem by a small number of stacked stride-two 3*3 convolutions. While the vast majority of computation in the two ViT designs is identical, we find that this small change in early visual processing results in markedly different training behavior in terms of the sensitivity to optimization settings as well as the final model accuracy. Using a convolutional stem in ViT dramatically increases optimization stability and also improves peak performance (by ~1-2% top-1 accuracy on ImageNet-1k), while maintaining flops and runtime. The improvement can be observed across the wide spectrum of model complexities (from 1G to 36G flops) and dataset scales (from ImageNet-1k to ImageNet-21k). These findings lead us to recommend using a standard, lightweight convolutional stem for ViT models in this regime as a more robust architectural choice compared to the original ViT model design.

📄 PDF Abstract BibTeX arXiv:2106.14881

Code (1)

Jack-Etheredge/early_convolutions_vit_pytorch pytorch

Methods 이 논문이 사용한 방법론

Convolution A convolution is a type of matrix operation, consisting of a kernel, a small matrix of weights, that slides over input data performing element-wise multiplication with the…

Similar Papers 제목 키워드 기반

Scaled ReLU Matters for Training Vision Transformers

2021-09-08 · Pichao Wang, Xue Wang, Hao Luo, Jingkai Zhou 외

Vision transformers (ViTs) have been an alternative design paradigm to convolutional neural networks (CNNs). However, the training of ViTs is much harder than CNNs, as it is sensitive to the training parameters, such as …

Diversity

Accelerating Large Kernel Convolutions with Nested Winograd Transformation.pdf

2021-02-26 · Jingbo Jiang, Xizi Chen, Chi-Ying Tsui

Recent literature has shown that convolutional neural networks (CNNs) with large kernels outperform vision transformers (ViTs) and CNNs with stacked small kernels in many computer vision tasks, such as object detection a…

Image Restorationobject-detectionObject DetectionSemantic Segmentation

Efficient Neural Net Approaches in Metal Casting Defect Detection

2022-08-08 · Rohit Lal, Bharath Kumar Bolla, Sabeesh Ethiraj

One of the most pressing challenges prevalent in the steel manufacturing industry is the identification of surface defects. Early identification of casting defects can help boost performance, including streamlining produ…

Defect Detection

Masked Mixers for Language Generation and Retrieval

2024-09-02 · Benjamin L. Badger

Attention mechanisms that confer selective focus on a strict subset of input elements are nearly ubiquitous in language models today. We posit there to be downside to the use of attention: most information present in the…

Causal Language ModelingRetrievalText Generation

Are Transformers More Robust Than CNNs?

2021-11-10 · NeurIPS 2021 12 · Yutong Bai, Jieru Mei, Alan Yuille, Cihang Xie

Transformer emerges as a powerful tool for visual recognition. In addition to demonstrating competitive performance on a broad range of visual benchmarks, recent works also argue that Transformers are much more robust th…

Adversarial Robustness