SwiftFormer: Efficient Additive Attention for Transformer-based Real-time Mobile Vision Applications

计算机科学 瓶颈 矩阵乘法 延迟(音频) 移动设备 计算机工程 推论 乘法(音乐) 分布式计算 人工智能 嵌入式系统 操作系统 物理 量子 电信 量子力学 声学
作者
Abdelrahman Shaker,Muhammad Maaz,Hanoona Rasheed,Salman Khan,Ming–Hsuan Yang,Fahad Shahbaz Khan
标识
DOI:10.1109/iccv51070.2023.01598
摘要

Self-attention has become a defacto choice for capturing global context in various vision applications. However, its quadratic computational complexity with respect to image resolution limits its use in real-time applications, especially for deployment on resource-constrained mobile devices. Although hybrid approaches have been proposed to combine the advantages of convolutions and self-attention for a better speed-accuracy trade-off, the expensive matrix multiplication operations in self-attention remain a bottleneck. In this work, we introduce a novel efficient additive attention mechanism that effectively replaces the quadratic matrix multiplication operations with linear element-wise multiplications. Our design shows that the key-value interaction can be replaced with a linear layer without sacrificing any accuracy. Unlike previous state-of-the-art methods, our efficient formulation of self-attention enables its usage at all stages of the network. Using our proposed efficient additive attention, we build a series of models called "SwiftFormer" which achieves state-of-the-art performance in terms of both accuracy and mobile inference speed. Our small variant achieves 78.5% top-1 ImageNet-1K accuracy with only 0.8 ms latency on iPhone 14, which is more accurate and 2× faster compared to MobileViT-v2. Our code and models: https://tinyurl.com/5ft8v46w
最长约 10秒,即可获得该文献文件

科研通智能强力驱动
Strongly Powered by AbleSci AI

祝大家在新的一年里科研腾飞
科研通是完全免费的文献互助平台,具备全网最快的应助速度,最高的求助完成率。 对每一个文献求助,科研通都将尽心尽力,给求助人一个满意的交代。
实时播报
1秒前
充电宝应助热情的依秋采纳,获得10
3秒前
在水一方应助二十而耳顺采纳,获得10
3秒前
甜味白开水完成签到,获得积分10
5秒前
5秒前
7秒前
t妥妥滴发布了新的文献求助10
7秒前
8秒前
茉莉猫哟发布了新的文献求助10
10秒前
酷波er应助caoju采纳,获得10
10秒前
ohh完成签到 ,获得积分10
10秒前
11秒前
科研小白发布了新的文献求助10
12秒前
欣喜面包完成签到,获得积分10
13秒前
15秒前
苏苏发布了新的文献求助10
15秒前
Ljh发布了新的文献求助10
17秒前
SciGPT应助科研小白采纳,获得10
17秒前
20秒前
20秒前
22秒前
22秒前
22秒前
sss完成签到,获得积分10
24秒前
拼搏君浩发布了新的文献求助10
24秒前
虚幻的楼房完成签到 ,获得积分10
25秒前
科研小白完成签到,获得积分10
26秒前
滕皓轩发布了新的文献求助10
28秒前
旅程发布了新的文献求助30
28秒前
28秒前
30秒前
二十而耳顺完成签到,获得积分10
31秒前
32秒前
科研求助者03完成签到,获得积分10
33秒前
温暖宛筠发布了新的文献求助10
34秒前
zxer发布了新的文献求助10
34秒前
小溪苏发布了新的文献求助10
36秒前
852应助一只奇怪的鸟采纳,获得30
40秒前
bkagyin应助zxer采纳,获得10
45秒前
46秒前
高分求助中
(应助此贴封号)【重要!!请各用户(尤其是新用户)详细阅读】【科研通的精品贴汇总】 10000
Les Mantodea de guyane 2500
Common Foundations of American and East Asian Modernisation: From Alexander Hamilton to Junichero Koizumi 600
Signals, Systems, and Signal Processing 510
Discrete-Time Signals and Systems 510
Using a Non-Equivalent Control Group Design in Educational Research 200
Public Health, Personal Health and Pills: Drug Entanglements and Pharmaceuticalised Governance 200
热门求助领域 (近24小时)
化学 材料科学 生物 医学 工程类 计算机科学 有机化学 物理 生物化学 纳米技术 复合材料 内科学 化学工程 人工智能 催化作用 遗传学 数学 基因 量子力学 物理化学
热门帖子
关注 科研通微信公众号,转发送积分 5868245
求助须知:如何正确求助?哪些是违规求助? 6439836
关于积分的说明 15658050
捐赠科研通 4983670
什么是DOI,文献DOI怎么找? 2687581
邀请新用户注册赠送积分活动 1630242
关于科研通互助平台的介绍 1588346