注意メカニズムは順序不変です。位置エンコーディングは、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.