Multi-Head Attention: Collaborate Instead of Concatenate

计算机科学 变压器 建筑 机器翻译 钥匙(锁) 人工智能 图层(电子) 机器学习 人机交互 自然语言处理 艺术 物理 电压 视觉艺术 化学 有机化学 计算机安全 量子力学
作者
Jean-Baptiste Cordonnier,Andreas Loukas,Martin Jaggi
出处
期刊:Cornell University - arXiv 被引量:4
标识
DOI:10.48550/arxiv.2006.16362
摘要

Attention layers are widely used in natural language processing (NLP) and are beginning to influence computer vision architectures. Training very large transformer models allowed significant improvement in both fields, but once trained, these networks show symptoms of over-parameterization. For instance, it is known that many attention heads can be pruned without impacting accuracy. This work aims to enhance current understanding on how multiple heads interact. Motivated by the observation that attention heads learn redundant key/query projections, we propose a collaborative multi-head attention layer that enables heads to learn shared projections. Our scheme decreases the number of parameters in an attention layer and can be used as a drop-in replacement in any transformer architecture. Our experiments confirm that sharing key/query dimensions can be exploited in language understanding, machine translation and vision. We also show that it is possible to re-parametrize a pre-trained multi-head attention layer into our collaborative attention layer. Collaborative multi-head attention reduces the size of the key and query projections by 4 for same accuracy and speed. Our code is public.
最长约 10秒,即可获得该文献文件

科研通智能强力驱动
Strongly Powered by AbleSci AI
科研通是完全免费的文献互助平台,具备全网最快的应助速度,最高的求助完成率。 对每一个文献求助,科研通都将尽心尽力,给求助人一个满意的交代。
实时播报
cs发布了新的文献求助10
刚刚
power完成签到,获得积分10
刚刚
Li完成签到,获得积分10
刚刚
心想事成关注了科研通微信公众号
刚刚
欣欣子完成签到 ,获得积分10
1秒前
357完成签到 ,获得积分10
1秒前
2秒前
2秒前
3秒前
南墙以南发布了新的文献求助10
3秒前
搜集达人应助显赫一世采纳,获得10
4秒前
暴富发布了新的文献求助30
4秒前
4秒前
双楠应助寒江雪采纳,获得10
5秒前
Ava应助WYF采纳,获得10
6秒前
sansan完成签到,获得积分20
6秒前
David发布了新的文献求助10
6秒前
GHL发布了新的文献求助10
7秒前
7秒前
共享精神应助陈住气采纳,获得10
8秒前
聪明的鹤发布了新的文献求助10
8秒前
华仔应助科研通管家采纳,获得10
8秒前
自信项链发布了新的文献求助30
8秒前
科研通AI5应助科研通管家采纳,获得10
8秒前
淡淡半莲发布了新的文献求助10
8秒前
科研通AI2S应助科研通管家采纳,获得10
9秒前
打打应助科研通管家采纳,获得10
9秒前
Li发布了新的文献求助10
9秒前
9秒前
9秒前
Hello应助bzg采纳,获得10
9秒前
加菲丰丰应助科研通管家采纳,获得10
9秒前
Hello应助科研通管家采纳,获得10
9秒前
10秒前
显赫一世完成签到,获得积分10
10秒前
科研通AI5应助科研通管家采纳,获得10
10秒前
量子星尘发布了新的文献求助10
10秒前
10秒前
10秒前
11秒前
高分求助中
Production Logging: Theoretical and Interpretive Elements 2700
Neuromuscular and Electrodiagnostic Medicine Board Review 1000
Statistical Methods for the Social Sciences, Global Edition, 6th edition 600
こんなに痛いのにどうして「なんでもない」と医者にいわれてしまうのでしょうか 510
Walter Gilbert: Selected Works 500
An Annotated Checklist of Dinosaur Species by Continent 500
岡本唐貴自伝的回想画集 500
热门求助领域 (近24小时)
化学 材料科学 医学 生物 工程类 有机化学 物理 生物化学 纳米技术 计算机科学 化学工程 内科学 复合材料 物理化学 电极 遗传学 量子力学 基因 冶金 催化作用
热门帖子
关注 科研通微信公众号,转发送积分 3658616
求助须知:如何正确求助?哪些是违规求助? 3220669
关于积分的说明 9736872
捐赠科研通 2929813
什么是DOI,文献DOI怎么找? 1604106
邀请新用户注册赠送积分活动 756967
科研通“疑难数据库(出版商)”最低求助积分说明 734269