arXivDaily arXiv每日学术速递 周一至周五更新
arXiv 2209.10655cs.LG
收藏

Mega:移动平均线配备门控注意

Mega: Moving Average Equipped Gated Attention

University of Southern California(南加州大学);Meta AI Research(Meta人工智能研究院);Carnegie Mellon University(卡内基梅隆大学);Shanghai Jiao Tong University(上海交通大学)

Xuezhe Ma, Chunting Zhou, Xiang Kong, Junxian He, Liangke Gui, Graham Neubig, Jonathan May, Luke Zettlemoyer

摘要:

Transformer注意力机制的设计选择,包括弱感应偏置和二次计算复杂性,限制了其在长序列建模中的应用。在本文中,我们介绍了兆,一个简单的,理论上接地,单头门控注意力机制配备(指数)移动平均将位置感知的局部依赖性的归纳偏差到位置不可知的注意力机制。我们进一步提出了一个变种的兆,提供线性的时间和空间复杂度,但只产生最小的质量损失,有效地分裂成多个块的整个序列具有固定的长度。在广泛的序列建模基准上进行的广泛实验,包括长距离竞技场,神经机器翻译,自回归语言建模以及图像和语音分类,表明Mega比其他序列模型(包括Transformers的变体和最近的状态空间模型)实现了显着的改进。

英文摘要:

The design choices in the Transformer attention mechanism, including weak inductive bias and quadratic computational complexity, have limited its application for modeling long sequences. In this paper, we introduce Mega, a simple, theoretically grounded, single-head gated attention mechanism equipped with (exponential) moving average to incorporate inductive bias of position-aware local dependencies into the position-agnostic attention mechanism. We further propose a variant of Mega that offers linear time and space complexity yet yields only minimal quality loss, by efficiently splitting the whole sequence into multiple chunks with fixed length. Extensive experiments on a wide range of sequence modeling benchmarks, including the Long Range Arena, neural machine translation, auto-regressive language modeling, and image and speech classification, show that Mega achieves significant improvements over other sequence models, including variants of Transformers and recent state space models.

机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。

↑