MateICL: Mitigating Attention Dispersion in Large-Scale In-Context Learning

要約

大規模言語モデル(LLM)は、文脈内学習(ICL)において顕著な能力を発揮している。しかし、事前に学習されたモデルでは、固定された位置の長さの制約により、実証例の数が制限される。コンテキストを拡張する最近の取り組みでは、デモの数が増えるにつれて、注意の分散に悩まされる。本論文では、コンテキストのサイズが大きくなってもLLMが効果的な自己注意を維持できるようにする、大規模ICLにおける注意分散の緩和(MateICL)を紹介する。まずコンテキストを複数のウィンドウに分割し、各ウィンドウはモデルのコンテキスト容量に満たされ、別々に処理される。次に、注意の重みを再調整するための追加レイヤーを導入し、デモの数が増えるにつれてクエリートークンを優先させる。我々の実証結果は、MateICLがより大きなコンテキストを効果的に活用し、ICLの性能を改善できることを示している。検索ベースのベースラインと比較して、MateICLは、外部で訓練された検索モデルを必要とすることなく、一貫して優れた性能を達成する。最近の推論ストラテジーの進歩(32kトークンコンテキストなど)にもかかわらず、我々の結果は、MateICLが計算リソースに制約のある環境においても有益であることを示している。コードはhttps://github.com/amurtadha/MateICL。

要約(オリジナル)

Large Language Models (LLMs) have demonstrated remarkable capabilities in In-Context Learning (ICL). However, the fixed position length constraints in pre-trained models limit the number of demonstration examples. Recent efforts to extend context suffer from attention dispersion as the number of demonstrations increases. In this paper, we introduce Mitigating Attention Dispersion in large-scale ICL (MateICL) that enables LLMs to maintain effective self-attention as the context size grows. We first split the context into multiple windows, each filled to the model’s context capacity, which are processed separately. Then, we introduce an additional layer to recalibrate the attention weights, prioritizing the query tokens as the number of demonstrations increases. Our empirical results show that MateICL can effectively leverage larger contexts to improve ICL performance. Compared to retrieval-based baselines, MateICL consistently achieves better performance without requiring an externally trained retrieval model. Despite recent advances in inference strategies (e.g., 32k token contexts), our results demonstrate that MateICL remains beneficial in computationally resource-constrained settings. The code is publicly available at https://github.com/amurtadha/MateICL.

arxiv情報

著者 Murtadha Ahmed,Wenbo,Liu yunfeng
発行日 2025-05-02 08:45:45+00:00
arxivサイト arxiv_id(pdf)

提供元, 利用サービス

arxiv.jp, DeepL

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