Dynamic Spatial Sparsification for Efficient Vision Transformers and Convolutional Neural Networks

计算机科学 计算 人工智能 变压器 失败 安全性令牌 卷积神经网络 特征(语言学) 模式识别(心理学) 算法 并行计算 量子力学 语言学 物理 哲学 计算机安全 电压
作者
Yongming Rao,Zuyan Liu,Wenliang Zhao,Jie Zhou,Jiwen Lu
出处
期刊:IEEE Transactions on Pattern Analysis and Machine Intelligence [IEEE Computer Society]
卷期号:45 (9): 10883-10897 被引量:24
标识
DOI:10.1109/tpami.2023.3263826
摘要

In this paper, we present a new approach for model acceleration by exploiting spatial sparsity in visual data. We observe that the final prediction in vision Transformers is only based on a subset of the most informative regions, which is sufficient for accurate image recognition. Based on this observation, we propose a dynamic token sparsification framework to prune redundant tokens progressively and dynamically based on the input to accelerate vision Transformers. Specifically, we devise a lightweight prediction module to estimate the importance of each token given the current features. The module is added to different layers to prune redundant tokens hierarchically. While the framework is inspired by our observation of the sparse attention in vision Transformers, we find that the idea of adaptive and asymmetric computation can be a general solution for accelerating various architectures. We extend our method to hierarchical models including CNNs and hierarchical vision Transformers as well as more complex dense prediction tasks. To handle structured feature maps, we formulate a generic dynamic spatial sparsification framework with progressive sparsification and asymmetric computation for different spatial locations. By applying lightweight fast paths to less informative features and expressive slow paths to important locations, we can maintain the complete structure of feature maps while significantly reducing the overall computations. Extensive experiments on diverse modern architectures and different visual tasks demonstrate the effectiveness of our proposed framework. By hierarchically pruning 66% of the input tokens, our method greatly reduces 31% ∼ 35% FLOPs and improves the throughput by over 40% while the drop of accuracy is within 0.5% for various vision Transformers. By introducing asymmetric computation, a similar acceleration can be achieved on modern CNNs and Swin Transformers. Moreover, our method achieves promising results on more complex tasks including semantic segmentation and object detection. Our results clearly demonstrate that dynamic spatial sparsification offers a new and more effective dimension for model acceleration. Code is available at https://github.com/raoyongming/DynamicViT.
最长约 10秒,即可获得该文献文件

科研通智能强力驱动
Strongly Powered by AbleSci AI
更新
PDF的下载单位、IP信息已删除 (2025-6-4)

科研通是完全免费的文献互助平台,具备全网最快的应助速度,最高的求助完成率。 对每一个文献求助,科研通都将尽心尽力,给求助人一个满意的交代。
实时播报
Yimi完成签到,获得积分10
1秒前
1秒前
2秒前
CHENCHEN完成签到,获得积分10
2秒前
3秒前
帅关发布了新的文献求助10
3秒前
4秒前
4秒前
hantuo发布了新的文献求助10
4秒前
LFC发布了新的文献求助10
5秒前
5秒前
科研韭菜发布了新的文献求助10
6秒前
充电宝应助jingyu841123采纳,获得10
8秒前
dearcih完成签到,获得积分10
9秒前
9秒前
10秒前
yankai发布了新的文献求助30
10秒前
小二郎应助木易采纳,获得10
10秒前
10秒前
帅关完成签到,获得积分10
10秒前
Akim应助马良伟采纳,获得10
10秒前
Owen应助细腻的歌曲采纳,获得10
11秒前
甜瓜不熟完成签到,获得积分10
12秒前
六六大顺发布了新的文献求助10
12秒前
喝下午茶的狗完成签到,获得积分10
13秒前
桐桐应助hantuo采纳,获得10
13秒前
13秒前
14秒前
14秒前
15秒前
15秒前
16秒前
小饼干完成签到,获得积分10
17秒前
sujustin333发布了新的文献求助30
18秒前
18秒前
阿刁完成签到,获得积分10
19秒前
zm发布了新的文献求助30
19秒前
生动的水池完成签到,获得积分10
20秒前
在水一方应助飞飞采纳,获得10
20秒前
云中发布了新的文献求助10
20秒前
高分求助中
A new approach to the extrapolation of accelerated life test data 1000
Cognitive Neuroscience: The Biology of the Mind 1000
Technical Brochure TB 814: LPIT applications in HV gas insulated switchgear 1000
ACSM’s Guidelines for Exercise Testing and Prescription, 12th edition 500
Picture Books with Same-sex Parented Families: Unintentional Censorship 500
Nucleophilic substitution in azasydnone-modified dinitroanisoles 500
不知道标题是什么 500
热门求助领域 (近24小时)
化学 材料科学 医学 生物 工程类 有机化学 生物化学 物理 内科学 纳米技术 计算机科学 化学工程 复合材料 遗传学 基因 物理化学 催化作用 冶金 细胞生物学 免疫学
热门帖子
关注 科研通微信公众号,转发送积分 3969513
求助须知:如何正确求助?哪些是违规求助? 3514327
关于积分的说明 11173617
捐赠科研通 3249672
什么是DOI,文献DOI怎么找? 1794973
邀请新用户注册赠送积分活动 875537
科研通“疑难数据库(出版商)”最低求助积分说明 804836