Implicit In-context Learning

要約

インコンテキスト学習 (ICL) は、クエリをテストする前にいくつかのデモンストレーション例をプレフィックスすることで、大規模言語モデル (LLM) が推論中に目に見えないタスクに適応できるようにします。
ICL はその多用途性にもかかわらず、ゼロショット学習と比較してかなりの計算量とメモリのオーバーヘッドが発生し、デモンストレーション例の選択と順序の影響を受けやすくなります。
この研究では、暗黙的インコンテキスト学習 (I2CL) を紹介します。これは、アクティベーション スペース内のデモンストレーション例を吸収することで、従来の ICL に関連する課題に対処する革新的なパラダイムです。
I2CL はまず、デモ例から圧縮されたベクトル表現、つまりコンテキスト ベクトルを生成します。
次に、コンテキスト ベクトルとクエリのアクティブ化の線形結合をモデルの残差ストリームに注入することにより、推論中にコンテキスト ベクトルを統合します。
3 つのモデル アーキテクチャにわたる 9 つの実際のタスクに関する実証評価により、I2CL がゼロ ショット コストで少数ショットのパフォーマンスを達成し、デモンストレーション例の変動に対して堅牢性を示すことが実証されました。
さらに、I2CL は「タスク ID」の新しい表現を容易にし、タスクの類似性検出を強化し、効果的な転移学習を可能にします。
私たちは I2CL の包括的な分析を提供し、そのメカニズムと ICL へのより広範な影響についてのより深い洞察を提供します。
ソース コードは https://github.com/LzVv123456/I2CL から入手できます。

要約(オリジナル)

In-context Learning (ICL) empowers large language models (LLMs) to adapt to unseen tasks during inference by prefixing a few demonstration examples prior to test queries. Despite its versatility, ICL incurs substantial computational and memory overheads compared to zero-shot learning and is susceptible to the selection and order of demonstration examples. In this work, we introduce Implicit In-context Learning (I2CL), an innovative paradigm that addresses the challenges associated with traditional ICL by absorbing demonstration examples within the activation space. I2CL first generates a condensed vector representation, namely a context vector, from the demonstration examples. It then integrates the context vector during inference by injecting a linear combination of the context vector and query activations into the model’s residual streams. Empirical evaluation on nine real-world tasks across three model architectures demonstrates that I2CL achieves few-shot performance with zero-shot cost and exhibits robustness against the variation of demonstration examples. Furthermore, I2CL facilitates a novel representation of ‘task-ids’, enhancing task similarity detection and enabling effective transfer learning. We provide a comprehensive analysis of I2CL, offering deeper insights into its mechanisms and broader implications for ICL. The source code is available at: https://github.com/LzVv123456/I2CL.

arxiv情報

著者 Zhuowei Li,Zihao Xu,Ligong Han,Yunhe Gao,Song Wen,Di Liu,Hao Wang,Dimitris N. Metaxas
発行日 2024-05-23 14:57:52+00:00
arxivサイト arxiv_id(pdf)

提供元, 利用サービス

arxiv.jp, Google

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