맥락 내 학습 전략의 합리적 등장
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
초록
최근 문맥 내 학습(in-context learning, ICL)을 분석한 연구에서는 다양한 실험 조건에서 모델의 행동을 설명하는 광범위한 전략들을 확인하였다. 우리는 이러한 발견들을 통합하기 위해, 왜 모델이 이러한 상이한 전략들을 학습하는지에 대한 질문을 던진다. 구체적으로, 우리는 문헌에서 흔히 볼 수 있는 여러 작업의 혼합을 학습하도록 훈련된 모델이 ICL을 수행하기 위해 학습한 전략들이 베이지안 예측자(Bayesian predictor)의 패밀리로 포착될 수 있다는 관찰에서 출발한다: 이는 본 작업 집합에 대해 이산적 사전 분포를 가정하는 기억형 예측자(memorizing predictor)와, 기본 작업 분포와 일치하는 사전 분포를 가진 일반화형 예측자(generalizing predictor)를 포함한다. 학습자의 행동이 계산적 제약 하에서 데이터에 대한 최적의 적응으로 설명된다는 합리적 분석(normative analysis)의 관점을 채택하여, 우리는 훈련 과정 전반에 걸쳐 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.