Transformers are Universal In-context Learners

要約

トランスフォーマーとは、与えられたトークン(自然言語処理アプリケーションにおけるプロンプトや、視覚トランスフォーマーにおけるパッチの集合など)の集合に基づいて、新しいトークンを予測することを可能にする「コンテキスト内マッピング」を定義するディープアーキテクチャである。この研究では、特に、これらのアーキテクチャが任意の数のコンテキスト・トークンを扱う能力を研究する。これらのアーキテクチャの表現力を数学的かつ一様に扱うために、マッピングがトークンの確率分布(トークンの数が有限の場合は離散的)で表されるコンテキストを条件とする場合を考える。関連する滑らかさの概念は、これらのコンテキスト間のワッサーシュタイン距離における連続性に対応する。我々は、ディープトランスフォーマが普遍的であり、コンパクトなトークン領域上で一様に、連続的なコンテキスト内マッピングを任意の精度で近似できることを示す。既存の知見と比較した我々の結果の重要な点は、一定の精度であれば、1つの変換器が任意の(無限でさえある)数のトークンに作用できることである。さらに、トークンの埋め込み次元を固定し(この次元は精度とともに増加しない)、ヘッド数を固定(次元に比例)して動作させる。マルチヘッド注目層間のMLP層の使用も明示的に制御される。

要約(オリジナル)

Transformers are deep architectures that define ‘in-context mappings’ which enable predicting new tokens based on a given set of tokens (such as a prompt in NLP applications or a set of patches for vision transformers). This work studies in particular the ability of these architectures to handle an arbitrarily large number of context tokens. To mathematically and uniformly address the expressivity of these architectures, we consider the case that the mappings are conditioned on a context represented by a probability distribution of tokens (discrete for a finite number of tokens). The related notion of smoothness corresponds to continuity in terms of the Wasserstein distance between these contexts. We demonstrate that deep transformers are universal and can approximate continuous in-context mappings to arbitrary precision, uniformly over compact token domains. A key aspect of our results, compared to existing findings, is that for a fixed precision, a single transformer can operate on an arbitrary (even infinite) number of tokens. Additionally, it operates with a fixed embedding dimension of tokens (this dimension does not increase with precision) and a fixed number of heads (proportional to the dimension). The use of MLP layers between multi-head attention layers is also explicitly controlled.

arxiv情報

著者 Takashi Furuya,Maarten V. de Hoop,Gabriel Peyré
発行日 2024-08-02 16:21:48+00:00
arxivサイト arxiv_id(pdf)

提供元, 利用サービス

arxiv.jp, DeepL

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