arXivDaily arXiv每日学术速递 周一至周五更新
arXiv周末暂无论文更新,休息一下吧,周末愉快~~
arXiv 2407.05591cs.LGcs.CLcs.NE
收藏

卷积增强 Transformer 的能力研究

On the Power of Convolution Augmented Transformer

University of Michigan(密歇根大学);UC Berkeley(加州大学伯克利分校)

Mingchen Li, Xuechen Zhang, Yixiao Huang, Samet Oymak

AI总结:

本文提出在注意力 K/Q/V 嵌入中加入卷积的 CAT,证明其单层即可解决联想回忆与复制任务并保证长度泛化,且实验表明可提升语言建模性能。

摘要:

Transformer 架构推动了语言建模的革命性进展。然而,近期的架构方案(如状态空间模型)已经缩小了性能差距。受此启发,我们考察了卷积增强 Transformer(Convolution-Augmented Transformer,CAT)在回忆、复制和长度泛化任务上的优势。CAT 在注意力层的 K/Q/V 嵌入中引入卷积滤波器。通过 CAT,我们证明卷积的局部性与注意力的全局视角能够协同作用。与 Mamba 或 transformer 等同类架构不同,CAT 可被证明仅用单层即可解决联想回忆(associative recall,AR)和复制任务,同时享有有保证的长度泛化能力。我们还通过刻画卷积如何总结上下文窗口并创建可供注意的显著摘要令牌,从而缓解对全注意力的需求,建立了卷积与注意力之间的计算权衡。在真实数据集上的评估证实了我们的发现,并表明 CAT 及其变体确实提升了语言建模性能。

英文摘要:

The transformer architecture has catalyzed revolutionary advances in language modeling. However, recent architectural recipes, such as state-space models, have bridged the performance gap. Motivated by this, we examine the benefits of Convolution-Augmented Transformer (CAT) for recall, copying, and length generalization tasks. CAT incorporates convolutional filters in the K/Q/V embeddings of an attention layer. Through CAT, we show that the locality of the convolution synergizes with the global view of the attention. Unlike comparable architectures, such as Mamba or transformer, CAT can provably solve the associative recall (AR) and copying tasks using a single layer while also enjoying guaranteed length generalization. We also establish computational tradeoffs between convolution and attention by characterizing how convolution can mitigate the need for full attention by summarizing the context window and creating salient summary tokens to attend. Evaluations on real datasets corroborate our findings and demonstrate that CAT and its variations indeed enhance the language modeling performance.

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

↑