arXivDaily arXiv每日学术速递 周一至周五更新
北美退伍军人节(Veterans Day),12 日无更新
arXiv 2202.11364cs.LG
收藏

FastRPB:一种可扩展的长序列任务相对位置编码

FastRPB: a Scalable Relative Positional Encoding for Long Sequence Tasks

Moscow Institute of Physics and Technology(莫斯科物理技术学院);VK Lab(VK实验室);Tinkoff(Tinkoff公司)

Maksim Zubkov, Daniil Gavrilov

摘要:

Transformers在各个领域都取得了卓越的性能,包括NLP、CV、音频处理和图形分析。然而,他们没有规模以及长序列的任务,由于其二次复杂性w.r.t.输入长度。线性Transformers被提出来解决这个限制。然而,这些模型在长序列任务上的性能较弱。在本文中,我们探讨线性Transformer模型,重新思考他们的两个核心组成部分。首先,采用平移不变核函数SIKF对线性Transformer进行改进,在不损失速度的前提下提高了精度。其次,我们介绍了FastRPB,它代表快速相对位置偏差,它有效地增加了位置信息,自我注意使用快速傅立叶变换。FastRPB独立于自注意机制,可以与原始自注意及其所有有效变体相结合。FastRPB具有O(N log(N))计算复杂性,需要O(N)内存w.r.t.输入序列长度N。

英文摘要:

Transformers achieve remarkable performance in various domains, including NLP, CV, audio processing, and graph analysis. However, they do not scale well on long sequence tasks due to their quadratic complexity w.r.t. the inputs length. Linear Transformers were proposed to address this limitation. However, these models have shown weaker performance on the long sequence tasks comparing to the original one. In this paper, we explore Linear Transformer models, rethinking their two core components. Firstly, we improved Linear Transformer with Shift-Invariant Kernel Function SIKF, which achieve higher accuracy without loss in speed. Secondly, we introduce FastRPB which stands for Fast Relative Positional Bias, which efficiently adds positional information to self-attention using Fast Fourier Transformation. FastRPB is independent of the self-attention mechanism and can be combined with an original self-attention and all its efficient variants. FastRPB has O(N log(N)) computational complexity, requiring O(N) memory w.r.t. input sequence length N.

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

↑