Tokens-to-Token ViT: Training Vision Transformers from Scratch on ImageNet
dc.contributor.author | Li Yuan | |
dc.contributor.author | Yunpeng Chen | |
dc.date.accessioned | 2025-01-16T06:55:14Z | |
dc.date.issued | 2021-01-28 | |
dc.description | Transformers, initially popular for language modeling, have been adapted for vision tasks, such as the Vision Transformer (ViT) for image classification. ViT splits images into tokens and applies Transformer layers to capture global relationships. However, ViT underperforms compared to CNNs on midsize datasets like ImageNet due to inefficient tokenization that misses local structures and a redundant attention design that limits feature richness. | |
dc.description.abstract | Transformers, which are popular for language modeling, have been explored for solving vision tasks recently, e.g., the Vision Transformer (ViT) for image classification. The ViT model splits each image into a sequence of tokens with fixed length and then applies multiple Transformer layers to model their global relation for classification. However, ViT achieves inferior performance to CNNs when trained from scratch on a midsize dataset like ImageNet. We find it is because: 1) the simple tokenization of input images fails to model the important local structure such as edges and lines among neighboring pixels, leading to low training sample efficiency; 2) the redundant attention backbone design of ViT leads to limited feature richness for fixed computation budgets and limited training samples. To overcome such limitations, we propose a new Tokens-To-Token Vision Transformer (T2T-ViT), which incorporates 1) a layer-wise Tokens-to-Token (T2T) transformation to progressively structurize the image to tokens by recursively aggregating neighboring Tokens into one Token (Tokens-to-Token), such that local structure represented by surrounding tokens can be modeled and tokens length can be reduced; 2) an efficient backbone with a deep-narrow structure for vision transformer motivated by CNN architecture design after empirical study. Notably, T2T-ViT reduces the parameter count and MACs of vanilla ViT by half, while achieving more than 3.0\% improvement when trained from scratch on ImageNet. It also outperforms ResNets and achieves comparable performance with MobileNets by directly training on ImageNet. For example, T2T-ViT with comparable size to ResNet50 (21.5M parameters) can achieve 83.3\% top1 accuracy in image resolution 384×384 on ImageNet. (Code: this https URL) | |
dc.identifier.uri | https://openaccess.thecvf.com/content/ICCV2021/html/Yuan_Tokens-to-Token_ViT_Training_Vision_Transformers_From_Scratch_on_ImageNet_ICCV_2021_paper.html?ref=https://githubhelp.com | |
dc.identifier.uri | https://ds.uofallujah.edu.iq/handle/123456789/56 | |
dc.language.iso | en | |
dc.publisher | Corinel University | |
dc.title | Tokens-to-Token ViT: Training Vision Transformers from Scratch on ImageNet | |
dc.type | Article |