On the Integration of Self-Attention and Convolution

卷积(计算机科学) 计算机科学 核(代数) 计算 架空(工程) 代表(政治) 编码(集合论) 理论计算机科学 算法 人工智能 模式识别(心理学) 数学 离散数学 人工神经网络 程序设计语言 政治 法学 集合(抽象数据类型) 政治学
作者
Xuran Pan,Chunjiang Ge,Rui Lü,Shiji Song,Guan-Fu Chen,Zeyi Huang,Gao Huang
标识
DOI:10.1109/cvpr52688.2022.00089
摘要

Convolution and self-attention are two powerful techniques for representation learning, and they are usually considered as two peer approaches that are distinct from each other. In this paper, we show that there exists a strong underlying relation between them, in the sense that the bulk of computations of these two paradigms are in fact done with the same operation. Specifically, we first show that a traditional convolution with kernel size k × k can be decomposed into k 2 individual 1 × 1 convolutions, followed by shift and summation operations. Then, we interpret the projections of queries, keys, and values in self-attention module as multiple 1 × 1 convolutions, followed by the computation of attention weights and aggregation of the values. Therefore, the first stage of both two modules comprises the similar operation. More importantly, the first stage contributes a dominant computation complexity (square of the channel size) comparing to the second stage. This observation naturally leads to an elegant integration of these two seemingly distinct paradigms, i.e., a mixed model that enjoys the benefit of both self-Attention and Convolution (ACmix), while having minimum compu-tational overhead compared to the pure convolution or self-attention counterpart. Extensive experiments show that our model achieves consistently improved results over com-petitive baselines on image recognition and downstream tasks. Code and pre-trained models will be released at https://github.com/LeapLabTHU/ACmix and https://gitee.com/mindspore/models.
最长约 10秒,即可获得该文献文件

科研通智能强力驱动
Strongly Powered by AbleSci AI
科研通是完全免费的文献互助平台,具备全网最快的应助速度,最高的求助完成率。 对每一个文献求助,科研通都将尽心尽力,给求助人一个满意的交代。
实时播报
2秒前
丰富如南完成签到,获得积分10
3秒前
4秒前
小宇要加油完成签到,获得积分10
4秒前
6秒前
冯小样发布了新的文献求助10
6秒前
7秒前
8秒前
yyhgyg完成签到,获得积分10
10秒前
10秒前
11秒前
12秒前
研友_ZragOn发布了新的文献求助10
13秒前
13秒前
灵长类发布了新的文献求助10
14秒前
聪明白羊完成签到,获得积分10
14秒前
15秒前
zzz完成签到,获得积分10
15秒前
张必雨发布了新的文献求助10
16秒前
bxg完成签到 ,获得积分10
16秒前
17秒前
17秒前
和院发布了新的文献求助10
19秒前
四憙完成签到 ,获得积分10
19秒前
Supreme完成签到,获得积分10
19秒前
yaoyaoyang发布了新的文献求助10
20秒前
纯真的白开水完成签到 ,获得积分10
20秒前
genius发布了新的文献求助10
21秒前
英姑应助耍酷的指甲油采纳,获得10
22秒前
发疯的芙莉莲完成签到,获得积分20
22秒前
柔弱紊发布了新的文献求助10
23秒前
练习者发布了新的文献求助10
23秒前
372925abc完成签到,获得积分10
24秒前
24秒前
圈圈完成签到 ,获得积分10
25秒前
26秒前
灵长类完成签到,获得积分10
26秒前
29秒前
南有乔木发布了新的文献求助10
30秒前
纯真的白开水关注了科研通微信公众号
31秒前
高分求助中
Production Logging: Theoretical and Interpretive Elements 2700
Conference Record, IAS Annual Meeting 1977 1250
Neuromuscular and Electrodiagnostic Medicine Board Review 1000
APA educational psychology handbook, Vol 1: Theories, constructs, and critical issues 700
An Annotated Checklist of Dinosaur Species by Continent 500
岡本唐貴自伝的回想画集 500
Distinct Aggregation Behaviors and Rheological Responses of Two Terminally Functionalized Polyisoprenes with Different Quadruple Hydrogen Bonding Motifs 450
热门求助领域 (近24小时)
化学 材料科学 医学 生物 工程类 有机化学 物理 生物化学 纳米技术 计算机科学 化学工程 内科学 复合材料 物理化学 电极 遗传学 量子力学 基因 冶金 催化作用
热门帖子
关注 科研通微信公众号,转发送积分 3651973
求助须知:如何正确求助?哪些是违规求助? 3216162
关于积分的说明 9711019
捐赠科研通 2923965
什么是DOI,文献DOI怎么找? 1601432
邀请新用户注册赠送积分活动 754160
科研通“疑难数据库(出版商)”最低求助积分说明 732987