Lune

ICLR2025Top-tier venue

Differential learning kinetics govern the transition from memorization to generalization during in-context learning

Alex Nguyen, Gautam Reddy

Abstract

Transformers exhibit in-context learning (ICL): the ability to use novel information presented in the context without additional weight updates. Recent work shows that ICL emerges when models are trained on a sufficiently diverse set of tasks and the transition from memorization to generalization is sharp with increasing task diversity. One interpretation is that a network's limited capacity to memorize favors generalization. Here, we examine the mechanistic underpinnings of this transition using a small transformer applied to a synthetic ICL task. Using theory and experiment, we show that the sub-circuits that memorize and generalize can be viewed as largely independent. The relative rates at which these subcircuits learn explains the transition from memorization to generalization, rather than capacity constraints. We uncover a memorization scaling law, which determines the task diversity threshold at which the network generalizes. The theory quantitatively explains a variety of other ICL-related phenomena, including the long-tailed distribution of when ICL is acquired, the bimodal behavior of solutions close to the task diversity threshold, the influence of contextual and data distributional statistics on ICL, and the transient nature of ICL.

Ask Lune

Know this paper in minutes, not an afternoon.

Lune can read every page of it and the top-tier papers that cite it, and gives you its claims, its evidence and its limits, each one cited to the paper it comes from. No skimming, no AI slop.

9 top-tier papers have cited it since. Know what they found before your reviewers do.

Questions to start from

Lune can draw on

the full paper · the top-tier papers that cite it · related work

Get the answer

Free to start. No credit card required.

Lineage

  • Data Distributional Properties Drive Emergent In-Context Learning in Transformers cites An Explanation of In-context Learning as Implicit Bayesian Inference
  • An evolutionary perspective on modes of learning in Transformers cites Data Distributional Properties Drive Emergent In-Context Learning in Transformers
  • An evolutionary perspective on modes of learning in Transformers cites An Explanation of In-context Learning as Implicit Bayesian Inference
  • An evolutionary perspective on modes of learning in Transformers cites Language Models are Few-Shot Learners
  • An evolutionary perspective on modes of learning in Transformers cites Transformers Learn In-Context by Gradient Descent
  • Belief Dynamics Reveal the Dual Nature of In-Context Learning and Activation Steering cites An Explanation of In-context Learning as Implicit Bayesian Inference
  • Belief Dynamics Reveal the Dual Nature of In-Context Learning and Activation Steering cites Language Models are Few-Shot Learners
  • Belief Dynamics Reveal the Dual Nature of In-Context Learning and Activation Steering cites Transformers Learn In-Context by Gradient Descent
  • Context and Diversity Matter: The Emergence of In-Context Learning in World Models cites Data Distributional Properties Drive Emergent In-Context Learning in Transformers
  • Context and Diversity Matter: The Emergence of In-Context Learning in World Models cites An Explanation of In-context Learning as Implicit Bayesian Inference
  • Context and Diversity Matter: The Emergence of In-Context Learning in World Models cites Language Models are Few-Shot Learners
  • Context and Diversity Matter: The Emergence of In-Context Learning in World Models cites What Can Transformers Learn In-Context? A Case Study of Simple Function Classes
  • An Explanation of In-context Learning as Implicit Bayesian Inference cites Language Models are Few-Shot Learners
  • In-Context Learning Strategies Emerge Rationally cites Data Distributional Properties Drive Emergent In-Context Learning in Transformers
  • In-Context Learning Strategies Emerge Rationally cites Belief Dynamics Reveal the Dual Nature of In-Context Learning and Activation Steering
  • In-Context Learning Strategies Emerge Rationally cites An Explanation of In-context Learning as Implicit Bayesian Inference
  • In-Context Learning Strategies Emerge Rationally cites Language Models are Few-Shot Learners
  • In-Context Learning Strategies Emerge Rationally cites Transformers Learn In-Context by Gradient Descent
  • In-Context Learning Strategies Emerge Rationally cites What Can Transformers Learn In-Context? A Case Study of Simple Function Classes
  • Transformers Learn In-Context by Gradient Descent cites Data Distributional Properties Drive Emergent In-Context Learning in Transformers
  • Transformers Learn In-Context by Gradient Descent cites Language Models are Few-Shot Learners
  • Transformers Learn In-Context by Gradient Descent cites What Can Transformers Learn In-Context? A Case Study of Simple Function Classes
  • What Can Transformers Learn In-Context? A Case Study of Simple Function Classes cites An Explanation of In-context Learning as Implicit Bayesian Inference
  • What Can Transformers Learn In-Context? A Case Study of Simple Function Classes cites Language Models are Few-Shot Learners
Builds onCited byLeft to right by year; the more cited, the higher.

Cited by top-tier papers9

  1. In-Context Learning Strategies Emerge RationallyDaniel Wurgaft, Ekdeep Singh Lubana, Core Francisco Park, Hidenori Tanaka et al.NeurIPS 2025 · 19 citations
  2. Context and Diversity Matter: The Emergence of In-Context Learning in World ModelsFan Wang, ZHIYUAN CHEN, YUXUAN ZHONG, Sunjian Zheng et al.ICLR 2026 · 5 citations
  3. An evolutionary perspective on modes of learning in TransformersAlexander Ku, Thomas L. Griffiths, Stephanie C. Y. ChanICLR 2026 · 1 citation
  4. Li2: A Framework on Dynamics of Feature Emergence and Delayed GeneralizationYuandong TianICLR 2026
  5. Belief Dynamics Reveal the Dual Nature of In-Context Learning and Activation SteeringEric Bigelow, Daniel Wurgaft, YingQiao Wang, Noah Goodman et al.ICML 2026

Builds on16

  1. Language Models are Few-Shot LearnersTom B. Brown, Benjamin Mann, Nick Ryder, Melanie Subbiah et al.NeurIPS 2020 · 64,255 citations
  2. An Explanation of In-context Learning as Implicit Bayesian InferenceSang Michael Xie, Aditi Raghunathan, Percy Liang, Tengyu MaICLR 2022 · 1,030 citations
  3. What Can Transformers Learn In-Context? A Case Study of Simple Function ClassesShivam Garg, Dimitris Tsipras, Percy Liang, Gregory ValiantNeurIPS 2022 · 883 citations
  4. Transformers Learn In-Context by Gradient DescentJohannes von Oswald, Eyvind Niklasson, Ettore Randazzo, João Sacramento et al.ICML 2023 · 729 citations
  5. Data Distributional Properties Drive Emergent In-Context Learning in TransformersStephanie C. Y. Chan, Adam Santoro, Andrew K. Lampinen, Jane X. Wang et al.NeurIPS 2022 · 407 citations

Related papers

  1. When can in-context learning generalize out of task distribution?Page C. Goddard, Lindsay M. Smith, Vudtiwat Ngampruetikorn, David J. SchwabICML 2025
  2. The Transient Nature of Emergent In-Context Learning in TransformersAaditya K. Singh, Stephanie C. Y. Chan, Ted Moskovitz, Erin Grant et al.NeurIPS 2023 · 92 citations
  3. Pretraining task diversity and the emergence of non-Bayesian in-context learning for regressionAllan Raventós, Mansheej Paul, Feng Chen, Surya GanguliNeurIPS 2023 · 174 citations
  4. Beyond Induction Heads: In-Context Meta Learning Induces Multi-Phase Circuit EmergenceGouki Minegishi, Hiroki Furuta, Shohei Taniguchi, Yusuke Iwasawa et al.ICML 2025
  5. Strategy Coopetition Explains the Emergence and Transience of In-Context LearningAaditya K. Singh, Ted Moskovitz, Sara Dragutinovic, Felix Hill et al.ICML 2025
Dusk over the sea between two cliffs drawn in fine vertical lines