要約
コンテキスト学習(ICL)は、クエリの前にいくつかのデモンストレーションの例をプレフィックスすることにより、推論時に目に見えないタスクに迅速に適応することができます。
その汎用性にもかかわらず、ICLはゼロショット学習と比較してかなりの計算およびメモリのオーバーヘッドを発生し、デモンストレーションの例の選択と順序に敏感です。
この作業では、ICLの推論コストを最小限の情報損失でゼロショット学習の推論コストに削減する革新的なパラダイムである暗黙のコンテキスト学習(I2CL)を紹介します。
I2CLは、最初に凝縮されたベクトル表現、つまりデモンストレーションの例から抽出されたコンテキストベクトルを生成することにより動作します。
次に、コンテキストベクトルとクエリのアクティベーションの線形組み合わせをモデルの残留ストリームに戻すことにより、推論時間介入を実施します。
3つのモデルアーキテクチャにわたる9つの現実世界のタスクに関する経験的評価は、I2CLがゼロショット推論コストで少ないショットレベルのパフォーマンスを達成し、デモンストレーションの例の変動に対して堅牢性を示すことを示しています。
さらに、I2CLは、タスクIDの新しい表現を促進し、タスクの類似性の検出を強化し、効果的な転送学習を促進します。
また、I2CLに関する包括的な分析とアブレーション研究を実行し、その内部メカニズムについてより深い洞察を提供します。
コードはhttps://github.com/lzvv123456/i2clで入手できます。
要約(オリジナル)
In-context Learning (ICL) empowers large language models (LLMs) to swiftly adapt to unseen tasks at inference-time by prefixing a few demonstration examples before queries. Despite its versatility, ICL incurs substantial computational and memory overheads compared to zero-shot learning and is sensitive to the selection and order of demonstration examples. In this work, we introduce Implicit In-context Learning (I2CL), an innovative paradigm that reduces the inference cost of ICL to that of zero-shot learning with minimal information loss. I2CL operates by first generating a condensed vector representation, namely a context vector, extracted from the demonstration examples. It then conducts an inference-time intervention through injecting a linear combination of the context vector and query activations back into the model’s residual streams. Empirical evaluation on nine real-world tasks across three model architectures demonstrates that I2CL achieves few-shot level performance at zero-shot inference cost, and it exhibits robustness against variations in demonstration examples. Furthermore, I2CL facilitates a novel representation of task-ids, enhancing task similarity detection and fostering effective transfer learning. We also perform a comprehensive analysis and ablation study on I2CL, offering deeper insights into its internal mechanisms. 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 |
発行日 | 2025-02-25 14:49:33+00:00 |
arxivサイト | arxiv_id(pdf) |
提供元, 利用サービス
arxiv.jp, Google