Transformers as Statisticians: Provable In-Context Learning with In-Context Algorithm Selection

要約

トランスフォーマー アーキテクチャに基づくニューラル シーケンス モデルは、顕著な \emph{インコンテキスト学習} (ICL) 能力を実証しており、モデルのパラメーターを更新することなく、トレーニングやテストの例で指示されたときに新しいタスクを実行できます。
この研究では、まず、変圧器が ICL を実行するための包括的な統計理論を提供します。
具体的には、トランスフォーマーが、最小二乗法、リッジ回帰、なげなわ、一般化線形モデルの学習、2 層ニューラル ネットワーク上の勾配降下法などの幅広いクラスの標準的な機械学習アルゴリズムを最適に近い予測力で実装できることを示します。
さまざまなコンテキスト内のデータ配布について。
基礎となるメカニズムとしてコンテキスト内勾配降下の効率的な実装を使用することで、変換器の構造は緩やかなサイズ限界を許容し、多項式的に多くの事前トレーニング シーケンスで学習できます。
これらの「基本」ICL アルゴリズムを基にして、興味深いことに、統計学者が実生活で実行できることと同様に、\emph{コンテキスト内のアルゴリズム選択}を含むより複雑な ICL 手順をトランスフォーマーが実装できることを示します。
single} トランスフォーマは、適切なアルゴリズムやタスクを明示的に指示することなく、異なる入力シーケンスに対して異なるベース ICL アルゴリズムを適応的に選択したり、質的に異なるタスクを実行したりすることができます。
私たちはこれを明示的な構築によって理論的に確立し、またこの現象を実験的に観察します。
理論的には、ICL 前のテストと ICL 後の検証という具体的な例を使用して、アルゴリズム選択のための 2 つの一般的なメカニズムを構築します。
例として、ポスト ICL 検証メカニズムを使用して、困難なタスク (ノイズ レベルが混在するノイズの多い線形モデル) に対してほぼベイズ最適 ICL を実行できるトランスフォーマーを構築します。
標準的なトランスフォーマー アーキテクチャの強力なコンテキスト内アルゴリズム選択機能を実験的に実証します。

要約(オリジナル)

Neural sequence models based on the transformer architecture have demonstrated remarkable \emph{in-context learning} (ICL) abilities, where they can perform new tasks when prompted with training and test examples, without any parameter update to the model. This work first provides a comprehensive statistical theory for transformers to perform ICL. Concretely, we show that transformers can implement a broad class of standard machine learning algorithms in context, such as least squares, ridge regression, Lasso, learning generalized linear models, and gradient descent on two-layer neural networks, with near-optimal predictive power on various in-context data distributions. Using an efficient implementation of in-context gradient descent as the underlying mechanism, our transformer constructions admit mild size bounds, and can be learned with polynomially many pretraining sequences. Building on these “base” ICL algorithms, intriguingly, we show that transformers can implement more complex ICL procedures involving \emph{in-context algorithm selection}, akin to what a statistician can do in real life — A \emph{single} transformer can adaptively select different base ICL algorithms — or even perform qualitatively different tasks — on different input sequences, without any explicit prompting of the right algorithm or task. We both establish this in theory by explicit constructions, and also observe this phenomenon experimentally. In theory, we construct two general mechanisms for algorithm selection with concrete examples: pre-ICL testing, and post-ICL validation. As an example, we use the post-ICL validation mechanism to construct a transformer that can perform nearly Bayes-optimal ICL on a challenging task — noisy linear models with mixed noise levels. Experimentally, we demonstrate the strong in-context algorithm selection capabilities of standard transformer architectures.

arxiv情報

著者 Yu Bai,Fan Chen,Huan Wang,Caiming Xiong,Song Mei
発行日 2023-06-07 17:59:31+00:00
arxivサイト arxiv_id(pdf)

提供元, 利用サービス

arxiv.jp, Google

カテゴリー: cs.AI, cs.CL, cs.LG, math.ST, stat.ML, stat.TH パーマリンク