Fast Vision Transformers with HiLo Attention

计算机科学 标杆管理 失败 公制(单位) 人工智能 计算机工程 计算机视觉 并行计算 工程类 运营管理 业务 营销
作者
Zizheng Pan,Jianfei Cai,Bohan Zhuang
出处
期刊:Cornell University - arXiv [Cornell University]
被引量:114
标识
DOI:10.48550/arxiv.2205.13213
摘要

Vision Transformers (ViTs) have triggered the most recent and significant breakthroughs in computer vision. Their efficient designs are mostly guided by the indirect metric of computational complexity, i.e., FLOPs, which however has a clear gap with the direct metric such as throughput. Thus, we propose to use the direct speed evaluation on the target platform as the design principle for efficient ViTs. Particularly, we introduce LITv2, a simple and effective ViT which performs favourably against the existing state-of-the-art methods across a spectrum of different model sizes with faster speed. At the core of LITv2 is a novel self-attention mechanism, which we dub HiLo. HiLo is inspired by the insight that high frequencies in an image capture local fine details and low frequencies focus on global structures, whereas a multi-head self-attention layer neglects the characteristic of different frequencies. Therefore, we propose to disentangle the high/low frequency patterns in an attention layer by separating the heads into two groups, where one group encodes high frequencies via self-attention within each local window, and another group encodes low frequencies by performing global attention between the average-pooled low-frequency keys and values from each window and each query position in the input feature map. Benefiting from the efficient design for both groups, we show that HiLo is superior to the existing attention mechanisms by comprehensively benchmarking FLOPs, speed and memory consumption on GPUs and CPUs. For example, HiLo is 1.4x faster than spatial reduction attention and 1.6x faster than local window attention on CPUs. Powered by HiLo, LITv2 serves as a strong backbone for mainstream vision tasks including image classification, dense detection and segmentation. Code is available at https://github.com/ziplab/LITv2.
最长约 10秒,即可获得该文献文件

科研通智能强力驱动
Strongly Powered by AbleSci AI
科研通是完全免费的文献互助平台,具备全网最快的应助速度,最高的求助完成率。 对每一个文献求助,科研通都将尽心尽力,给求助人一个满意的交代。
实时播报
岛主发布了新的文献求助20
1秒前
xx发布了新的文献求助10
1秒前
JamesPei的应助被咚咚采纳,获得10
2秒前
2秒前
Bsisoy完成签到,获得积分10
2秒前
CNS工厂完成签到,获得积分10
4秒前
星辰大海的应助被穆夏采纳,获得10
5秒前
小黎快看完成签到 ,获得积分10
6秒前
6秒前
6秒前
初景发布了新的文献求助10
8秒前
9秒前
CipherSage的应助被王欣采纳,获得10
9秒前
10秒前
10秒前
祁乾完成签到 ,获得积分0
10秒前
晚汀听雪发布了新的文献求助10
11秒前
aaaaa发布了新的文献求助10
12秒前
12秒前
Y.fan完成签到,获得积分10
12秒前
Glovexx完成签到,获得积分20
13秒前
Lucas的应助被Twinkle采纳,获得10
13秒前
顺其自然发布了新的文献求助10
14秒前
俏皮道之完成签到,获得积分10
15秒前
LOnlyT发布了新的文献求助10
16秒前
蓝天的应助被higvhsd采纳,获得10
16秒前
16秒前
17秒前
yyyyy发布了新的文献求助10
17秒前
17秒前
蒸馒头争气完成签到,获得积分10
17秒前
19秒前
科研通AI6.2的应助被飞利浦采纳,获得10
20秒前
风堇发布了新的文献求助10
20秒前
科研通AI6.2的应助被快乐星球采纳,获得10
20秒前
21秒前
yulin完成签到,获得积分10
22秒前
Pursuit发布了新的文献求助10
22秒前
DACHIYIJING完成签到,获得积分10
23秒前
24秒前
高分求助中
(应助此贴封号)【重要!!请各用户(尤其是新用户)详细阅读】【科研通的精品贴汇总】 10000
自動車の空力技術 800
Essentials of Carbohydrate Chemistry and Biochemistry, 4th Edition 800
Organizational Behavior 510
Management and the Arts 510
Matrix Methods in Data Mining and Pattern Recognition Second Edition 510
Issues in Task-Based Language Teaching 500
热门求助领域 (近24小时)
化学 材料科学 医学 生物 纳米技术 计算机科学 化学工程 工程类 有机化学 物理 复合材料 生物化学 内科学 细胞生物学 基因 遗传学 免疫学 冶金 光电子学 癌症研究
热门帖子
关注 科研通微信公众号,转发送积分 7783710
求助须知:如何正确求助?哪些是违规求助? 9322987
关于积分的说明 20392570
捐赠科研通 7372332
什么是DOI,文献DOI怎么找? 3320737
关于科研通互助平台的介绍 2468747
邀请新用户注册赠送积分活动 2336971