ChatPaper.aiChatPaper

CausalLMは、インコンテキスト学習において最適ではありません。

CausalLM is not optimal for in-context learning

August 14, 2023
著者: Nan Ding, Tomer Levinboim, Jialin Wu, Sebastian Goodman, Radu Soricut
cs.AI

要旨

最近の実証的研究によると、トランスフォーマーベースのインコンテキスト学習は、プレフィックス言語モデル(prefixLM)を使用した場合の方が、因果的言語モデル(causalLM)よりも優れたパフォーマンスを示すことが明らかになっています。プレフィックス言語モデルでは、インコンテキストサンプルが互いに注意を向けることが可能であるのに対し、因果的言語モデルでは、自己回帰的な注意機構を使用するため、インコンテキストサンプルが将来のサンプルに注意を向けることが禁止されています。この結果は直感的に理解できますが、理論的な観点からはまだ解明されていません。本論文では、理論的アプローチを取り、特定のパラメータ構成下でのプレフィックス言語モデルと因果的言語モデルの収束挙動を分析します。我々の分析によると、両方の言語モデルタイプは線形速度で定常点に収束しますが、プレフィックス言語モデルは線形回帰の最適解に収束するのに対し、因果的言語モデルの収束ダイナミクスはオンライン勾配降下法のアルゴリズムに従い、サンプル数が無限に増えても最適であることが保証されません。我々は、理論的な主張を補完するために、合成タスクと実タスク、およびさまざまなタイプのトランスフォーマーを使用した実証実験を行いました。実験結果は、因果的言語モデルがすべての設定で一貫してプレフィックス言語モデルよりも低いパフォーマンスを示すことを検証しています。
English
Recent empirical evidence indicates that transformer based in-context learning performs better when using a prefix language model (prefixLM), in which in-context samples can all attend to each other, compared to causal language models (causalLM), which use auto-regressive attention that prohibits in-context samples to attend to future samples. While this result is intuitive, it is not understood from a theoretical perspective. In this paper we take a theoretical approach and analyze the convergence behavior of prefixLM and causalLM under a certain parameter construction. Our analysis shows that both LM types converge to their stationary points at a linear rate, but that while prefixLM converges to the optimal solution of linear regression, causalLM convergence dynamics follows that of an online gradient descent algorithm, which is not guaranteed to be optimal even as the number of samples grows infinitely. We supplement our theoretical claims with empirical experiments over synthetic and real tasks and using various types of transformers. Our experiments verify that causalLM consistently underperforms prefixLM in all settings.
PDF181December 15, 2024