In-Context Learning Without Copying
Kerem Sahin, Sheridan Feucht, Adam Belfki, Jannik Brinkmann, Aaron Mueller, David Bau, Chris Wendler
TL;DR
The paper investigates whether inductive copying via induction heads is necessary for in-context learning (ICL) in transformers. By introducing Hapax, a loss-masking regime that omits gradients for positions predictable by induction heads, the authors suppress inductive copying while training 1B models on the Pile. Hapax reduces exact copying behaviors and induction-head activity, yet preserves or even improves abstractive ICL performance on many tasks, including translation, and improves fluency, suggesting abstractive ICL can emerge without reliance on induction copying. Mechanistic analyses and cross-checkpoint experiments indicate weaker induction circuits but reveal that prefix-matching patterns can form due to prior-token information, challenging the notion that induction copying is causally essential for abstractive ICL and highlighting the value of shaping data distributions to study learning dynamics.
Abstract
Induction heads are attention heads that perform inductive copying by matching patterns from earlier context and copying their continuations verbatim. As models develop induction heads, they often experience a sharp drop in training loss, a phenomenon cited as evidence that induction heads may serve as a prerequisite for more complex in-context learning (ICL) capabilities. In this work, we ask whether transformers can still acquire ICL capabilities when inductive copying is suppressed. We propose Hapax, a setting where we omit the loss contribution of any token that can be correctly predicted by induction heads. Despite a significant reduction in inductive copying, performance on abstractive ICL tasks (i.e., tasks where the answer is not contained in the input context) remains comparable and surpasses the vanilla model on 13 of 21 tasks, even though 31.7\% of tokens are omitted from the loss. Furthermore, our model achieves lower loss values on token positions that cannot be predicted correctly by induction heads. Mechanistic analysis further shows that models trained with Hapax develop fewer and weaker induction heads but still preserve ICL capabilities. Taken together, our findings indicate that inductive copying is not essential for learning abstractive ICL mechanisms.
