Built on top of self-attention mechanisms, vision transformers have demonstrated remarkable performance on a variety of vision tasks recently. While achieving excellent performance, they still require relatively intensive computational cost that scales up drastically as the numbers of patches, self-attention heads and transformer blocks increase. In this paper, we argue that due to the large variations among images, their need for modeling long-range dependencies between patches differ. To this end, we introduce AdaViT, an adaptive computation framework that learns to derive usage policies on which patches, self-attention heads and transformer blocks to use throughout the backbone on a per-input basis, aiming to improve inference efficiency of vision transformers with a minimal drop of accuracy for image recognition. Optimized jointly with a transformer backbone in an end-to-end manner, a light-weight decision network is attached to the backbone to produce decisions on-the-fly. Extensive experiments on ImageNet demonstrate that our method obtains more than 2x improvement on efficiency compared to state-of-the-art vision transformers with only 0.8% drop of accuracy, achieving good efficiency/accuracy trade-offs conditioned on different computational budgets. We further conduct quantitative and qualitative analysis on learned usage polices and provide more insights on the redundancy in vision transformers.


翻译:视觉变压器建在自留机制之上,最近在各种视觉任务上表现出了显著的成绩。在取得优异业绩的同时,它们仍然需要相对密集的计算成本,随着补丁、自留头和变压器区块数目的增加而大幅扩大。在本文中,我们认为,由于图像差异很大,它们需要建模各补丁之间的长期依赖性。为此,我们引入了AdaViT,这是一个适应性计算框架,它学会了利用政策,使补丁、自留头和变压器块能够在整个骨干中使用,目的是提高视觉变压器的推算效率,使图像识别的精确度降低到最低限度。在以端到端的方式与变压器的骨干一道优化,一个轻量决策网络可以产生关于飞动的决定。在图像网上进行的广泛实验表明,我们的方法在效率方面得到了超过2x的提高,而以人均投入为基础使用,目的是提高视觉变压器的效率,只有0.8%的下降率,在精确度上实现更好的效率/精确度分析,在质量分析中,在质量分析中,我们更精确度上提供了更好的分析。

0
下载
关闭预览

相关内容

最新《Transformers模型》教程,64页ppt
专知会员服务
278+阅读 · 2020年11月26日
【阿里巴巴-CVPR2020】频域学习,Learning in the Frequency Domain
Transformer文本分类代码
专知会员服务
116+阅读 · 2020年2月3日
Stabilizing Transformers for Reinforcement Learning
专知会员服务
57+阅读 · 2019年10月17日
Hierarchically Structured Meta-learning
CreateAMind
23+阅读 · 2019年5月22日
Transferring Knowledge across Learning Processes
CreateAMind
26+阅读 · 2019年5月18日
ICLR2019最佳论文出炉
专知
11+阅读 · 2019年5月6日
无监督元学习表示学习
CreateAMind
26+阅读 · 2019年1月4日
Unsupervised Learning via Meta-Learning
CreateAMind
41+阅读 · 2019年1月3日
A Technical Overview of AI & ML in 2018 & Trends for 2019
待字闺中
16+阅读 · 2018年12月24日
CCF B类期刊IPM专刊截稿信息1条
Call4Papers
3+阅读 · 2018年10月11日
计算机视觉近一年进展综述
机器学习研究会
8+阅读 · 2017年11月25日
【今日新增】IEEE Trans.专刊截稿信息8条
Call4Papers
7+阅读 · 2017年6月29日
Arxiv
0+阅读 · 2022年1月28日
Arxiv
11+阅读 · 2021年10月26日
Arxiv
3+阅读 · 2021年10月14日
Arxiv
5+阅读 · 2020年3月16日
VIP会员
相关资讯
Hierarchically Structured Meta-learning
CreateAMind
23+阅读 · 2019年5月22日
Transferring Knowledge across Learning Processes
CreateAMind
26+阅读 · 2019年5月18日
ICLR2019最佳论文出炉
专知
11+阅读 · 2019年5月6日
无监督元学习表示学习
CreateAMind
26+阅读 · 2019年1月4日
Unsupervised Learning via Meta-Learning
CreateAMind
41+阅读 · 2019年1月3日
A Technical Overview of AI & ML in 2018 & Trends for 2019
待字闺中
16+阅读 · 2018年12月24日
CCF B类期刊IPM专刊截稿信息1条
Call4Papers
3+阅读 · 2018年10月11日
计算机视觉近一年进展综述
机器学习研究会
8+阅读 · 2017年11月25日
【今日新增】IEEE Trans.专刊截稿信息8条
Call4Papers
7+阅读 · 2017年6月29日
Top
微信扫码咨询专知VIP会员