Scalable Vision Transformers with Hierarchical Pooling
Authors:
- 1 October 2021
- conference paper
- Published by Institute of Electrical and Electronics Engineers (IEEE)
- p. 367-376
Abstract
The recently proposed Visual image Transformers (ViT) with pure attention have achieved promising performance on image recognition tasks, such as image classification. However, the routine of the current ViT model is to maintain a full-length patch sequence during inference, which is redundant and lacks hierarchical representation. To this end, we propose a Hierarchical Visual Transformer (HVT) which progressively pools visual tokens to shrink the sequence length and hence reduces the computational cost, analogous to the feature maps downsampling in Convolutional Neural Networks (CNNs). It brings a great benefit that we can increase the model capacity by scaling dimensions of depth/width/resolution/patch size without introducing extra computational complexity due to the reduced sequence length. Moreover, we empirically find that the average pooled visual tokens contain more discriminative information than the single class token. To demonstrate the improved scalability of our HVT, we conduct extensive experiments on the image classification task. With comparable FLOPs, our HVT outperforms the competitive baselines on ImageNet and CIFAR-100 datasets. Code is available at https://github.com/MonashAI/HVT.Keywords
All Related Versions
This publication has 16 references indexed in Scilit:
- Fully Quantized Transformer for Machine Translation2020
- TinyBERT: Distilling BERT for Natural Language Understanding2020
- HAT: Hardware-Aware Transformers for Efficient Natural Language Processing2020
- Compressing BERT: Studying the Effects of Weight Pruning on Transfer Learning2020
- Local Relation Networks for Image Recognition2019
- CCNet: Criss-Cross Attention for Semantic Segmentation2019
- Transformer-XL: Attentive Language Models beyond a Fixed-Length Context2019
- Feature Pyramid Networks for Object Detection2017
- Deep Residual Learning for Image Recognition2016
- ImageNet Large Scale Visual Recognition ChallengeInternational Journal of Computer Vision, 2015