インコンテキスト学習はタスクベクトルを生成する
In-Context Learning Creates Task Vectors
October 24, 2023
著者: Roee Hendel, Mor Geva, Amir Globerson
cs.AI
要旨
大規模言語モデル(LLM)におけるインコンテキスト学習(ICL)は、強力な新しい学習パラダイムとして登場しました。しかし、その根本的なメカニズムはまだ十分に理解されていません。特に、ICLを「標準的な」機械学習のフレームワークにマッピングすることは困難です。標準的なフレームワークでは、訓練セットSを使用して、ある仮説クラス内で最適な関数f(x)を見つけます。ここでは、ICLによって学習される関数が非常に単純な構造を持つことを示すことで、この問題に進展をもたらします。具体的には、これらの関数は、クエリxと訓練セットから計算された単一の「タスクベクトル」のみを入力とするトランスフォーマーLLMに対応します。したがって、ICLはSを単一のタスクベクトルtheta(S)に圧縮し、このタスクベクトルを使用してトランスフォーマーを調整し、出力を生成するものと見なすことができます。私たちは、さまざまなモデルとタスクにわたる包括的な実験を通じて、上記の主張を支持します。
English
In-context learning (ICL) in Large Language Models (LLMs) has emerged as a
powerful new learning paradigm. However, its underlying mechanism is still not
well understood. In particular, it is challenging to map it to the "standard"
machine learning framework, where one uses a training set S to find a
best-fitting function f(x) in some hypothesis class. Here we make progress on
this problem by showing that the functions learned by ICL often have a very
simple structure: they correspond to the transformer LLM whose only inputs are
the query x and a single "task vector" calculated from the training set.
Thus, ICL can be seen as compressing S into a single task vector
theta(S) and then using this task vector to modulate the
transformer to produce the output. We support the above claim via comprehensive
experiments across a range of models and tasks.