ChatPaper.aiChatPaper

文脈内学習戦略は合理的に出現する

In-Context Learning Strategies Emerge Rationally

June 21, 2025
著者: Daniel Wurgaft, Ekdeep Singh Lubana, Core Francisco Park, Hidenori Tanaka, Gautam Reddy, Noah D. Goodman
cs.AI

要旨

近年の文脈内学習(ICL)を分析する研究では、さまざまな実験条件下でのモデルの挙動を説明する広範な戦略が特定されている。本研究では、なぜモデルがこれらの異なる戦略を学習するのかという問いを通じて、これらの知見を統合することを目指す。具体的には、文献で一般的な複数のタスクの混合を学習するように訓練された場合、モデルがICLを実行するために学習する戦略は、ベイズ予測子のファミリーによって捉えられることを観察することから始める。そのファミリーとは、既に見たタスクの集合に対して離散的な事前分布を仮定する「記憶型予測子」と、事前分布が基盤となるタスク分布に一致する「汎化型予測子」である。学習者の挙動を計算上の制約を考慮したデータへの最適な適応として説明する「合理的分析」の視点を採用し、Transformerの次のトークン予測を訓練全体にわたってほぼ完璧に予測する階層的ベイズフレームワークを開発する。このフレームワークでは、事前学習は異なる戦略の事後確率を更新するプロセスとして捉えられ、推論時の挙動はこれらの戦略の予測を事後確率で重み付けした平均として説明される。本フレームワークは、ニューラルネットワークの学習ダイナミクスに関する一般的な仮定に基づいており、候補となる戦略間での損失と複雑性のトレードオフを明示する。つまり、データをどれだけうまく説明するかだけでなく、戦略を実装する際のモデルの選好はその複雑性によって決定される。これにより、既知のICL現象を説明するだけでなく、新しい予測も提供する。例えば、タスクの多様性が増すにつれて、汎化から記憶への遷移にかかる時間スケールが超線形的に増加する傾向を示す。全体として、本研究は戦略の損失と複雑性のトレードオフに基づいたICLの説明と予測の枠組みを前進させるものである。
English
Recent work analyzing in-context learning (ICL) has identified a broad set of strategies that describe model behavior in different experimental conditions. We aim to unify these findings by asking why a model learns these disparate strategies in the first place. Specifically, we start with the observation that when trained to learn a mixture of tasks, as is popular in the literature, the strategies learned by a model for performing ICL can be captured by a family of Bayesian predictors: a memorizing predictor, which assumes a discrete prior on the set of seen tasks, and a generalizing predictor, where the prior matches the underlying task distribution. Adopting the normative lens of rational analysis, where a learner's behavior is explained as an optimal adaptation to data given computational constraints, we develop a hierarchical Bayesian framework that almost perfectly predicts Transformer next-token predictions throughout training -- without assuming access to its weights. Under this framework, pretraining is viewed as a process of updating the posterior probability of different strategies, and inference-time behavior as a posterior-weighted average over these strategies' predictions. Our framework draws on common assumptions about neural network learning dynamics, which make explicit a tradeoff between loss and complexity among candidate strategies: beyond how well it explains the data, a model's preference towards implementing a strategy is dictated by its complexity. This helps explain well-known ICL phenomena, while offering novel predictions: e.g., we show a superlinear trend in the timescale for transitioning from generalization to memorization as task diversity increases. Overall, our work advances an explanatory and predictive account of ICL grounded in tradeoffs between strategy loss and complexity.
PDF71June 30, 2025