On the Integration of Self-Attention and Convolution

卷积(计算机科学) 计算机科学 核(代数) 计算 架空(工程) 代表(政治) 编码(集合论) 理论计算机科学 算法 人工智能 模式识别(心理学) 数学 离散数学 人工神经网络 程序设计语言 政治 法学 集合(抽象数据类型) 政治学
作者
Xuran Pan,Chunjiang Ge,Rui Lü,Shiji Song,Guan-Fu Chen,Zeyi Huang,Gao Huang
出处
期刊: 卷期号:: 805-815 被引量:479
标识
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
科研通是完全免费的文献互助平台,具备全网最快的应助速度,最高的求助完成率。 对每一个文献求助,科研通都将尽心尽力,给求助人一个满意的交代。
实时播报
Nsy9802完成签到,获得积分10
刚刚
清脆的秋寒完成签到,获得积分10
1秒前
科研通AI6.2应助yeyiliux采纳,获得10
3秒前
清脆夜阑完成签到,获得积分10
4秒前
潇洒的惋清应助dan采纳,获得10
5秒前
修狗狗完成签到,获得积分10
5秒前
温婉的凝芙完成签到 ,获得积分10
5秒前
cdercder应助MaanEcho采纳,获得10
6秒前
势均力敌完成签到,获得积分10
7秒前
8秒前
9秒前
efoge完成签到 ,获得积分10
10秒前
longmad完成签到,获得积分10
11秒前
11秒前
Jim完成签到 ,获得积分10
11秒前
fallrain完成签到 ,获得积分10
11秒前
路人完成签到,获得积分10
11秒前
zuijiasunyou完成签到,获得积分10
12秒前
dan完成签到,获得积分20
13秒前
越野蟹完成签到,获得积分10
14秒前
yeyiliux发布了新的文献求助10
14秒前
现代完成签到,获得积分10
15秒前
15秒前
满鑫完成签到,获得积分10
16秒前
解方程组完成签到,获得积分10
16秒前
王翎力发布了新的文献求助10
16秒前
Lynette完成签到 ,获得积分10
17秒前
自由盼望完成签到,获得积分10
18秒前
琴箫枫发布了新的文献求助10
19秒前
沈括完成签到,获得积分10
23秒前
CharlieYue完成签到,获得积分10
23秒前
现代大神完成签到,获得积分10
24秒前
qm2026完成签到,获得积分10
24秒前
科研型高松灯完成签到 ,获得积分10
25秒前
哈哈完成签到,获得积分10
25秒前
蓝景轩辕完成签到 ,获得积分10
26秒前
猕猴桃完成签到 ,获得积分10
28秒前
zygclwl完成签到,获得积分10
28秒前
爱科研的小虞完成签到 ,获得积分10
29秒前
霸气鞯完成签到 ,获得积分10
29秒前
高分求助中
(应助此贴封号)【重要!!请各用户(尤其是新用户)详细阅读】【科研通的精品贴汇总】 10000
Principles of town planning: translating concepts to applications 1000
Management and the Arts 510
Matrix Methods in Data Mining and Pattern Recognition Second Edition 510
The Great Hymn to Šamaš 500
Positive Obsession: The Life and Times of Octavia E. Butler 500
Interpolation and Regression Models for the Chemical Engineer: Solving Numerical Problems 400
热门求助领域 (近24小时)
化学 材料科学 医学 生物 纳米技术 工程类 有机化学 化学工程 生物化学 计算机科学 内科学 物理 复合材料 催化作用 细胞生物学 无机化学 光电子学 物理化学 电极 基因
热门帖子
关注 科研通微信公众号,转发送积分 7694363
求助须知:如何正确求助?哪些是违规求助? 9254730
关于积分的说明 19991429
捐赠科研通 7268171
什么是DOI,文献DOI怎么找? 3292069
关于科研通互助平台的介绍 2447990
邀请新用户注册赠送积分活动 2297489