arXivDaily arXiv每日学术速递 周一至周五更新
arXiv 2106.02795cs.LGcs.AIcs.CV
收藏

用于多维空间位置编码的可学习傅立叶特征

Learnable Fourier Features for Multi-Dimensional Spatial Positional Encoding

Google Research(谷歌研究院);UCLA(加州大学洛杉矶分校);Apple(苹果公司)

Yang Li, Si Si, Gang Li, Cho-Jui Hsieh, Samy Bengio

摘要:

注意机制是顺序不变的。位置编码是一个至关重要的组件,它允许基于注意力的深度模型架构(如Transformer)处理信息位置重要的序列或图像。在本文中,我们提出了一种新的位置编码方法的基础上学习傅立叶特征。我们不是将每个位置硬编码为令牌或向量,而是将每个位置(可以是多维的)表示为基于可学习傅立叶特征映射的可训练编码,并使用多层感知器进行调制。该表示对于空间多维位置特别有利,例如,图像上的像素位置,其中需要捕获$L_2$距离或更复杂的位置关系。我们基于几个公共基准测试任务的实验表明,我们的可学习的傅立叶特征表示的多维位置编码优于现有的方法,既提高了精度,允许更快的收敛。

英文摘要:

Attentional mechanisms are order-invariant. Positional encoding is a crucial component to allow attention-based deep model architectures such as Transformer to address sequences or images where the position of information matters. In this paper, we propose a novel positional encoding method based on learnable Fourier features. Instead of hard-coding each position as a token or a vector, we represent each position, which can be multi-dimensional, as a trainable encoding based on learnable Fourier feature mapping, modulated with a multi-layer perceptron. The representation is particularly advantageous for a spatial multi-dimensional position, e.g., pixel positions on an image, where $L_2$ distances or more complex positional relationships need to be captured. Our experiments based on several public benchmark tasks show that our learnable Fourier feature representation for multi-dimensional positional encoding outperforms existing methods by both improving the accuracy and allowing faster convergence.

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

↑