Decomposing Prediction Mechanisms for In-Context Recall
Not on the map. Why?
Abstract (arXiv)
We introduce a new family of toy problems that combine features of linear-regression-style continuous in-context learning (ICL) with discrete associative recall. We pretrain transformer models on sample traces from this toy, specifically symbolically-labeled interleaved state observations from randomly drawn linear deterministic dynamical systems. We study if the transformer models can recall the state of a sequence previously seen in its context when prompted to do so with the corresponding in-context label. Taking a closer look at this task, it becomes clear that the model must perform two functions: (1) identify which system's state should be recalled and apply that system to its last seen state, and (2) continuing to apply the correct system to predict the subsequent states. Training dynamics reveal that the first capability emerges well into a model's training. Surprisingly, the second capability, of continuing the prediction of a resumed sequence, develops much earlier. Via out-of-distribution experiments, and a mechanistic analysis on model weights via edge pruning, we find that next-token prediction for this toy problem involves at least two separate mechanisms. One mechanism uses the discrete symbolic labels to do the associative recall required to predict the start of a resumption of a previously seen sequence. The second mechanism, which is largely agnostic to the discrete symbolic labels, performs a "Bayesian-style" prediction based on the previous token and the context. These two mechanisms have different learning dynamics. To confirm that this multi-mechanism (manifesting as separate phase transitions) phenomenon is not just an artifact of our toy setting, we used OLMo training checkpoints on an ICL translation task to see a similar phenomenon: a decisive gap in the emergence of first-task-token performance vs second-task-token performance.
Key facts. No citing papers in the map yet (data through 14 Oct 2026). Builds on 58 of its 85 references that are in the map. First posted on arXiv 2 Jul 2025.
Builds on
58 of 85 references.
References · 58
- 2020Language Models are Few-Shot Learnerscited by 32,419
- 2023Lost in the Middle: How Language Models Use Long Contextscited by 3,455
- 2022Emergent Abilities of Large Language Modelscited by 2,512
- 2022Beyond the Imitation Game: Quantifying and extrapolating the capabilities of language modelscited by 1,998
- 2022Rethinking the Role of Demonstrations: What Makes In-Context Learning Work?cited by 1,434
- 2022In-context Learning and Induction Headscited by 964
- 2021An Explanation of In-context Learning as Implicit Bayesian Inferencecited by 938
- 2023Progress measures for grokking via mechanistic interpretabilitycited by 839
- 2022Transformers learn in-context by gradient descentcited by 732
- 2022What Can Transformers Learn In-Context? A Case Study of Simple Function Classescited by 715
- 2017The Implicit Bias of Gradient Descent on Separable Datacited by 655
- 2022Grokking: Generalization Beyond Overfitting on Small Algorithmic Datasetscited by 629
38 more
- 2024OLMo: Accelerating the Science of Language Modelscited by 613
- 2023Are Emergent Abilities of Large Language Models a Mirage?cited by 523
- 2020The Pitfalls of Simplicity Bias in Neural Networkscited by 351
- 2017Stochastic Gradient Descent as Approximate Bayesian Inferencecited by 300
- 2020Gradient Starvation: A Learning Proclivity in Neural Networkscited by 267
- 2023Transformers as Algorithms: Generalization and Stability in In-context Learningcited by 222
- 2022Predictability and Surprise in Large Generative Modelscited by 210
- 2023Zoology: Measuring and Improving Recall in Efficient Language Modelscited by 204
- 2023The Clock and the Pizza: Two Stories in Mechanistic Explanation of Neural Networkscited by 156
- 2022Omnigrok: Grokking Beyond Algorithmic Datacited by 146
- 2023Pretraining task diversity and the emergence of non-Bayesian in-context learning for regressioncited by 146
- 2023The Quantization Model of Neural Scalingcited by 138
- 2023Sudden Drops in the Loss: Syntax Acquisition, Phase Transitions, and Simplicity Bias in MLMscited by 124
- 2023The mechanistic basis of data dependence and abrupt learning in an in-context classification taskcited by 118
- 2024The Evolution of Statistical Induction Heads: In-Context Learning Markov Chainscited by 118
- 2023Are Emergent Abilities in Large Language Models just In-Context Learning?cited by 109
- 2023Grokking as the Transition from Lazy to Rich Training Dynamicscited by 108
- 2023How Many Pretraining Tasks Are Needed for In-Context Learning of Linear Regression?cited by 96
- 2024Understanding Emergent Abilities of Language Models from the Loss Perspectivecited by 94
- 2024In-Context Language Learning: Architectures and Algorithmscited by 89
- 2024What needs to go right for an induction head? A mechanistic study of in-context learning circuits and their formationcited by 89
- 2023Grokking modular arithmeticcited by 83
- 2023Dichotomy of Early and Late Phase Implicit Biases Can Provably Induce Grokkingcited by 80
- 2023Symbol tuning improves in-context learning in language modelscited by 75
- 2025Which Attention Heads Matter for In-Context Learning?cited by 61
- 2024Finding Transformer Circuits with Edge Pruningcited by 60
- 2023The Local Learning Coefficient: A Singularity-Aware Complexity Measurecited by 51
- 2024Deep Networks Always Grok and Here is Whycited by 51
- 2020Is SGD a Bayesian sampler? Well, almostcited by 50
- 2023Unifying Grokking and Double Descentcited by 50
- 2025Grokking at the Edge of Numerical Stabilitycited by 46
- 2025Training Dynamics of In-Context Learning in Linear Attentioncited by 46
- 2024Dual Operating Modes of In-Context Learningcited by 43
- 2023Dynamical versus Bayesian Phase Transitions in a Toy Model of Superpositioncited by 29
- 2024Emergence in non-neural models: grokking modular arithmetic via average gradient outer productcited by 28
- 2024Transformers on Markov Data: Constant Depth Sufficescited by 27
- 2024A Percolation Model of Emergence: Analyzing Transformers Trained on a Formal Languagecited by 26
- 2021Multi-scale Feature Learning Dynamics: Insights for Double Descentcited by 24
50 most cited of 58 All 58 (JSON)
Built on by
Not cited yet.