How Does the Pretraining Distribution Shape In-Context Learning? Task Selection, Generalization, and Robustness

Waïss Azizian, Ali Hasan
10/1/2025
cs.LGstat.ML

No confident code implementation found for this paper. 1 possible match can be shown below.

Abstract

The emergence of in-context learning (ICL) in large language models (LLMs) remains poorly understood despite its consistent effectiveness, enabling models to adapt to new tasks from only a handful of examples. To clarify and improve these capabilities, we characterize how the statistical properties of the pretraining distribution (e.g., tail behavior, coverage) shape ICL on numerical tasks. We develop a theoretical framework that unifies task selection and generalization, extending and sharpening earlier results, and show how distributional properties govern sample efficiency, task retrieval, and robustness. To this end, we generalize Bayesian posterior consistency and concentration results to heavy-tailed priors and dependent sequences, better reflecting the structure of LLM pretraining data. We then empirically study how ICL performance varies with the pretraining distribution on challenging tasks such as stochastic differential equations and stochastic processes with memory. Together, these findings suggest that controlling key statistical properties of the pretraining distribution is essential for building ICL-capable and reliable LLMs.

View on arXivView PDF

Code Implementations

No confident code match yet

We couldn't find an author-owned or strongly-evidenced community implementation for this paper. 1 weaker match is hidden by default — verify before relying on them.

No code implementations found yet.

Know of an implementation? Let us know in the comments below!

Similar Papers

Cite this paper

@article{azizian2025does,
  title  = {How Does the Pretraining Distribution Shape In-Context Learning? Task Selection, Generalization, and Robustness},
  author = {Waïss Azizian and Ali Hasan},
  year   = {2025},
  eprint = {2510.01163},
  archivePrefix = {arXiv},
  url    = {http://arxiv.org/abs/2510.01163v1}
}

Add a badge to your README

Shows whether official code is linked for this paper.

Code of Paper badge
[![Code of Paper](https://codeofpaper.com/badge/2510.01163.svg)](https://codeofpaper.com/paper/2510.01163)

Discussion