How Depth Growth and Looping Shape In-Context Learning in Language Models
Organizations: Technical University of Munich · Helmholtz AI, Munich · Munich Center for Machine Learning (MCML) · Google, Paradigms of Intelligence Team
Abstract
Looped and depth-grown language models reuse computations across depth and have attracted interest for their reasoning capabilities. Building on prior suggestive evidence of improved in-context-learning (ICL), we investigate how such reuse favors ICL, including how it shapes the acquisition, retention, and mechanisms of this ability. Our analysis spans pretrained language models up to 3B parameters and controlled tasks. The experiments provide evidence for a shared inductive bias toward learning from context: grown and looped models rely more on information in context and, compared with a full-depth dense reference, acquire ICL earlier in controlled tasks and retain it more strongly when learning fixed associations in the weights is also possible. Tracing attention heads through training reveals that depth growth propagates early induction heads across layers. Ablations show that grown and looped models rely more strongly on induction-ranked heads for both few-shot performance and later-token prediction. Together, these findings provide evidence for a shared inductive bias toward learning from context and suggest that (soft) parameter reuse shapes how this ability develops and which attention mechanisms support it.
Figures & tables
Appendix figures & tables18 assets
Supplementary material from the paper’s appendix.
Appendix
| 360M | 1.7B | 3B | |
| Dense layers | 32 | 24 | 36 |
| Hidden / MLP width | 960 / 2560 | 2048 / 8192 | 2048 / 11008 |
| Query / key-value heads | 15 / 5 | 32 / 32 | 16 / 4 |
| Vocabulary size | 49,152 | 49,152 | 128,256 |
| Context length | 2048 | 2048 | 4096 |
| Rotary base |
| Model | Strategy | 9-task MC | MMLU |
|---|---|---|---|
| 360M | Baseline | 54.69 | 34.67 |
| MIDAS | 56.00 | 34.11 | |
| LIDAS | 57.10 | 34.09 | |
| 54.21 | 33.69 | ||
| 1.7B | Baseline | 62.97 | 40.12 |
| MIDAS | 64.61 | 40.43 |
In-Context Learning
In-context learning studies how models adapt to new tasks from examples or instructions supplied at inference time, without changing their weights.
See all 402 papers