LeViT: a Vision Transformer in ConvNet’s Clothing for Faster Inference
Authors:
- Ben GrahamBGBen Graham
- Alaaeldin El-NoubyAEAlaaeldin El-Nouby
- Hugo TouvronHTHugo Touvron
- Pierre StockPSPierre Stock
- Armand JoulinAJArmand Joulin
- Herve JegouHJHerve Jegou
- Matthijs DouzeMDMatthijs Douze
Top Cited Papers
- 1 October 2021
- conference paper
- Published by Institute of Electrical and Electronics Engineers (IEEE)
- p. 12239-12249
Abstract
We design a family of image classification architectures that optimize the trade-off between accuracy and efficiency in a high-speed regime. Our work exploits recent findings in attention-based architectures, which are competitive on highly parallel processing hardware. We revisit principles from the extensive literature on convolutional neural networks to apply them to transformers, in particular activation maps with decreasing resolutions. We also introduce the attention bias, a new way to integrate positional information in vision transformers.As a result, we propose LeViT: a hybrid neural network for fast inference image classification. We consider different measures of efficiency on different hardware platforms, so as to best reflect a wide range of application scenarios. Our extensive experiments empirically validate our technical choices and show they are suitable to most architectures. Overall, LeViT significantly outperforms existing convnets and vision transformers with respect to the speed/accuracy tradeoff. For example, at 80% ImageNet top-1 accuracy, LeViT is 5 times faster than EfficientNet on CPU. We release the code at https://github.com/facebookresearch/LeViT.Keywords
All Related Versions
This publication has 24 references indexed in Scilit:
- Self-Attention with Relative Position Representations2018
- Densely Connected Convolutional Networks2017
- Residual Attention Network for Image Classification2017
- Aggregated Residual Transformations for Deep Neural Networks2017
- Deep Residual Learning for Image Recognition2016
- Wide Residual Networks2016
- Going deeper with convolutions2015
- ImageNet Large Scale Visual Recognition ChallengeInternational Journal of Computer Vision, 2015
- ImageNet: A large-scale hierarchical image database2009
- Backpropagation Applied to Handwritten Zip Code RecognitionNeural Computation, 1989