# Solvable dynamical model of in-context learning

arXiv: https://arxiv.org/abs/2611.00921 · HTML: https://mlsanity.com/paper/2611.00921/

## Key facts

- No citing papers in the map yet (data through 26 Nov 2026).
- Builds on 20 of its 23 references that are in the map.
- Submitted 31 Oct 2026.

## Builds on (most cited first, 20 of 20)

- [Attention Is All You Need](https://mlsanity.com/paper/1706.03762/) (2017)
- [Language Models are Few-Shot Learners](https://mlsanity.com/paper/2005.14165/) (2020)
- [Sparks of Artificial General Intelligence: Early experiments with GPT-4](https://mlsanity.com/paper/2303.12712/) (2023)
- [An Explanation of In-context Learning as Implicit Bayesian Inference](https://mlsanity.com/paper/2111.02080/) (2021)
- [Transformers learn in-context by gradient descent](https://mlsanity.com/paper/2212.07677/) (2022)
- [What learning algorithm is in-context learning? Investigations with linear models](https://mlsanity.com/paper/2211.15661/) (2022)
- [Trained Transformers Learn Linear Models In-Context](https://mlsanity.com/paper/2306.09927/) (2023)
- [High-dimensional dynamics of generalization error in neural networks](https://mlsanity.com/paper/1710.03667/) (2017)
- [Pretraining task diversity and the emergence of non-Bayesian in-context learning for regression](https://mlsanity.com/paper/2306.15063/) (2023)
- [How Many Pretraining Tasks Are Needed for In-Context Learning of Linear Regression?](https://mlsanity.com/paper/2310.08391/) (2023)
- [Auto-Regressive Next-Token Predictors are Universal Learners](https://mlsanity.com/paper/2309.06979/) (2023)
- [Asymptotic theory of in-context learning by linear attention](https://mlsanity.com/paper/2405.11751/) (2024)
- [Training Dynamics of In-Context Learning in Linear Attention](https://mlsanity.com/paper/2501.16265/) (2025)
- [Key-value memory in the brain](https://mlsanity.com/paper/2501.02950/) (2025)
- [Theory of Scaling Laws for In-Context Regression: Depth, Width, Context and Time](https://mlsanity.com/paper/2510.01098/) (2025)
- [In-Context Linear Regression Demystified: Training Dynamics and Mechanistic Interpretability of Multi-Head Softmax Attention](https://mlsanity.com/paper/2503.12734/) (2025)
- [From AGI to ASI](https://mlsanity.com/paper/2606.12683/) (2026)
- [Weakly-correlated synapses promote dimension reduction in deep neural networks](https://mlsanity.com/paper/2006.11569/) (2020)
- [Exact Learning Dynamics of In-Context Learning in Linear Transformers and Its Application to Non-Linear Transformers](https://mlsanity.com/paper/2504.12916/) (2025)
- [Spin glass model of in-context learning](https://mlsanity.com/paper/2408.02288/) (2024)

## Abstract (arXiv)

Pretrained Transformer architectures display a surprising in-context learning ability without additional training. How the learning process guides the network to achieve this intriguing capability remains unsolved. In this study, we focus on a single-layer single-head linear attention model, where an empirical risk minimization is defined for learning. Given a finite number of training examples, we determine the exact solution of network-parameter dynamics, which is linked to the training error and generalization error, characterizing how memorization and generalization emerge from learning and how these transitions are related to curvatures of the empirical risk landscape. Furthermore, we calculate a data-dependent free energy, from which the training and generalization errors in the long time limit of learning dynamics can be well predicted. Our work adds insights toward understanding the mechanism of in-context learning especially from a learning dynamics perspective.
