Contextual Position Encoding: Learning to Count What’s Important

要約

アテンション メカニズムは、大規模言語モデル (LLM) の重要なコンポーネントであり、シーケンス内のトークンの相互作用を可能にしますが、順序は不変です。
位置エンコーディング (PE) を組み込むと、i 番目のトークンに注目するなど、位置によるアドレス指定が可能になります。
ただし、現在の PE メソッドはトークン カウントを使用して位置を導出するため、i 番目の文に注目するなど、より高いレベルの抽象化に一般化することができません。
この論文では、モデルによって決定された特定のトークンの位置のみをインクリメントすることで、コンテキストに応じて位置を条件付けできる新しい位置エンコーディング方法であるコンテキスト位置エンコーディング (CoPE) を提案します。
これにより、$i$ 番目の特定の単語、名詞、または文に注目するなど、より一般的な位置アドレス指定が可能になります。
CoPE は、一般的な位置埋め込みが失敗する選択的コピー、カウント、およびフリップフロップのタスクを解決でき、言語モデリングとコーディングのタスクの複雑さを改善できることを示します。

要約(オリジナル)

The attention mechanism is a critical component of Large Language Models (LLMs) that allows tokens in a sequence to interact with each other, but is order-invariant. Incorporating position encoding (PE) makes it possible to address by position, such as attending to the i-th token. However, current PE methods use token counts to derive position, and thus cannot generalize to higher levels of abstraction, such as attending to the i-th sentence. In this paper, we propose a new position encoding method, Contextual Position Encoding (CoPE), that allows positions to be conditioned on context by incrementing position only on certain tokens determined by the model. This allows more general position addressing such as attending to the $i$-th particular word, noun, or sentence. We show that CoPE can solve the selective copy, counting and Flip-Flop tasks where popular position embeddings fail, and improves perplexity on language modeling and coding tasks.

arxiv情報

著者 Olga Golovneva,Tianlu Wang,Jason Weston,Sainbayar Sukhbaatar
発行日 2024-05-30 17:51:53+00:00
arxivサイト arxiv_id(pdf)

提供元, 利用サービス

arxiv.jp, Google

カテゴリー: cs.AI, cs.CL パーマリンク