Transformers have improved the state-of-the-art across numerous tasks in sequence modeling. Besides the quadratic computational and memory complexity w.r.t the sequence length, the self-attention mechanism only processes information at the same scale, i.e., all attention heads are in the same resolution, resulting in the limited power of the Transformer. To remedy this, we propose a novel and efficient structure named Adaptive Multi-Resolution Attention (AdaMRA for short), which scales linearly to sequence length in terms of time and space. Specifically, we leverage a multi-resolution multi-head attention mechanism, enabling attention heads to capture long-range contextual information in a coarse-to-fine fashion. Moreover, to capture the potential relations between query representation and clues of different attention granularities, we leave the decision of which resolution of attention to use to query, which further improves the model's capacity compared to vanilla Transformer. In an effort to reduce complexity, we adopt kernel attention without degrading the performance. Extensive experiments on several benchmarks demonstrate the effectiveness and efficiency of our model by achieving a state-of-the-art performance-efficiency-memory trade-off. To facilitate AdaMRA utilization by the scientific community, the code implementation will be made publicly available.


翻译:变异器改进了在序列建模方面众多任务中的最新技术。除了四重计算和记忆复杂程度的序列长度外,自留机制只以同一规模处理信息,即所有关注负责人都在同一分辨率中,导致变异器的能力有限。为了纠正这一点,我们建议建立一个创新和有效的结构,名为适应多分辨率关注(简称AdaMRA),以线性尺度衡量时间和空间的顺序长度。具体地说,我们利用一个多分辨率多头关注机制,使关注负责人能够以粗略到直线的方式获取远程背景信息。此外,为了捕捉查询代表与不同关注粒子线索之间的潜在关系,我们留意将注意力的分辨率留给查询,从而进一步提高模型与香草变异器相比的能力。为了降低复杂性,我们在不贬低业绩的情况下采取核心关注。关于若干基准的广泛实验展示了我们模型的实效和效率,通过实现状态化、可应用的科学效率标准,实现社区高效使用。

0
下载
关闭预览

相关内容

Attention机制最早是在视觉图像领域提出来的,但是真正火起来应该算是google mind团队的这篇论文《Recurrent Models of Visual Attention》[14],他们在RNN模型上使用了attention机制来进行图像分类。随后,Bahdanau等人在论文《Neural Machine Translation by Jointly Learning to Align and Translate》 [1]中,使用类似attention的机制在机器翻译任务上将翻译和对齐同时进行,他们的工作算是是第一个提出attention机制应用到NLP领域中。接着类似的基于attention机制的RNN模型扩展开始应用到各种NLP任务中。最近,如何在CNN中使用attention机制也成为了大家的研究热点。下图表示了attention研究进展的大概趋势。
【DeepMind】强化学习教程,83页ppt
专知会员服务
147+阅读 · 2020年8月7日
因果图,Causal Graphs,52页ppt
专知会员服务
238+阅读 · 2020年4月19日
Stabilizing Transformers for Reinforcement Learning
专知会员服务
57+阅读 · 2019年10月17日
一文读懂Attention机制
机器学习与推荐算法
63+阅读 · 2020年6月9日
Hierarchically Structured Meta-learning
CreateAMind
23+阅读 · 2019年5月22日
Transferring Knowledge across Learning Processes
CreateAMind
25+阅读 · 2019年5月18日
强化学习的Unsupervised Meta-Learning
CreateAMind
17+阅读 · 2019年1月7日
无监督元学习表示学习
CreateAMind
25+阅读 · 2019年1月4日
Unsupervised Learning via Meta-Learning
CreateAMind
41+阅读 · 2019年1月3日
Hierarchical Disentangled Representations
CreateAMind
4+阅读 · 2018年4月15日
语义分割+视频分割开源代码集合
极市平台
35+阅读 · 2018年3月5日
Arxiv
0+阅读 · 2021年10月6日
Arxiv
5+阅读 · 2020年3月16日
Arxiv
6+阅读 · 2019年11月14日
Area Attention
Arxiv
5+阅读 · 2019年2月5日
Arxiv
19+阅读 · 2018年3月28日
VIP会员
相关资讯
一文读懂Attention机制
机器学习与推荐算法
63+阅读 · 2020年6月9日
Hierarchically Structured Meta-learning
CreateAMind
23+阅读 · 2019年5月22日
Transferring Knowledge across Learning Processes
CreateAMind
25+阅读 · 2019年5月18日
强化学习的Unsupervised Meta-Learning
CreateAMind
17+阅读 · 2019年1月7日
无监督元学习表示学习
CreateAMind
25+阅读 · 2019年1月4日
Unsupervised Learning via Meta-Learning
CreateAMind
41+阅读 · 2019年1月3日
Hierarchical Disentangled Representations
CreateAMind
4+阅读 · 2018年4月15日
语义分割+视频分割开源代码集合
极市平台
35+阅读 · 2018年3月5日
相关论文
Top
微信扫码咨询专知VIP会员