Emergence and Effectiveness of Task Vectors in In-Context Learning: An Encoder Decoder Perspective

要約

オートリグレッシブトランスは、コンテキスト学習(ICL)を通じて適応学習を示します。
以前の作品は、変圧器が表現のベクトルとしてICLタスクを表すことを示しています。
このホワイトペーパーでは、エンコーディングデコードフレームワークを活用して、変圧器が事前トレーニング中にタスクベクターを形成する方法と、それらのタスクをエンコードする品質がICLタスクのパフォーマンスをどのように予測するかを研究します。
合成ICLタスクでは、小さなトランスのトレーニングダイナミクスを分析し、タスクエンコードとデコードの結合された出現を報告します。
モデルが異なる潜在タスクをエンコードすることを学ぶと(たとえば、「文の最初の名詞を見つける」)、明確で分離可能な表現になり、条件付きデコードアルゴリズムを同時に構築し、ICLパフォーマンスを向上させます。
この現象は、さまざまなスケール(GEMMA-2 2B/9B/27B、LlAMA-3.1 8B/70B)の前提条件モデルで検証し、OLMO-7Bでの事前採取の過程で検証します。
さらに、表現から推測されるタスクの品質がICLパフォーマンスを予測し、驚くべきことに、以前のレイヤーを微調整すると、後者のレイヤーを微調整するよりもエンコードとパフォーマンスを向上させることができることを実証します。
私たちの経験的洞察は、表現を介して大規模な言語モデルの成功と失敗モードをよりよく理解するために光を当てました。

要約(オリジナル)

Autoregressive transformers exhibit adaptive learning through in-context learning (ICL), which begs the question of how. Prior works have shown that transformers represent the ICL tasks as vectors in their representations. In this paper, we leverage the encoding-decoding framework to study how transformers form task vectors during pretraining and how their task encoding quality predicts ICL task performance. On synthetic ICL tasks, we analyze the training dynamics of a small transformer and report the coupled emergence of task encoding and decoding. As the model learns to encode different latent tasks (e.g., ‘Finding the first noun in a sentence.’) into distinct, separable representations, it concurrently builds conditional decoding algorithms and improves its ICL performance. We validate this phenomenon across pretrained models of varying scales (Gemma-2 2B/9B/27B, Llama-3.1 8B/70B) and over the course of pretraining in OLMo-7B. Further, we demonstrate that the quality of task encoding inferred from representations predicts ICL performance, and that, surprisingly, finetuning the earlier layers can improve the task encoding and performance more than finetuning the latter layers. Our empirical insights shed light into better understanding the success and failure modes of large language models via their representations.

arxiv情報

著者 Seungwook Han,Jinyeop Song,Jeff Gore,Pulkit Agrawal
発行日 2025-06-02 12:55:12+00:00
arxivサイト arxiv_id(pdf)

提供元, 利用サービス

arxiv.jp, Google

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