🛰️ Daily AI Frontier
‹ back to 2026-10-18

In-Context Learning Before Specialisation: Theory of Learning in a Solvable Topic Model

arXiv cs.LG LLMs & Foundation Models Francesco Cagnetta, Casper L. Christensen 2026-10-15

TL;DR - This paper develops a learning theory for why sequence models shift from in-context generalization to memorizing specialized patterns as pretraining data grows. In a solvable latent-topic model, theory and transformer experiments agree on when each strategy emerges without fitted parameters.

  • In-context prediction appears at lower sample complexity and generalizes optimally to topics unseen during training.
  • Specialized prediction emerges only once training tokens outnumber the parameters of the data-generating process.
  • The specialized strategy stores the finite mixture of latent topics represented in the training distribution.
  • Trained transformers reproduce the predicted scaling regimes and crossover between the two strategies.

view merged work →