Preprint
Large Language Models

Is In-Context Learning Learning?

Adrian de Wynter
September 12, 2025arXiv.org1 citations

1

Citations

0

Influential Citations

arXiv.org

Venue

2025

Year

Abstract

In-context learning (ICL) allows some autoregressive models to solve tasks via next-token prediction and without needing further training. This has led to claims about these model's ability to solve (learn) unseen tasks with only a few shots (exemplars) in the prompt. However, deduction does not always imply learning, as ICL does not explicitly encode a given observation. Instead, the models rely on their prior knowledge and the exemplars given, if any. We argue that, mathematically, ICL fits the definition of learning; however, its full characterisation requires empirical work. We then carry out a large-scale analysis of ICL ablating out or accounting for memorisation, pretraining, distributional shifts, and prompting style and phrasing. We find that, empirically, ICL is limited in its ability to learn and generalise to unseen tasks. Namely, in the limit where exemplars become more numerous, accuracy is insensitive to exemplar distribution, model, prompt style, and the input's linguistic features. Instead, it deduces patterns from regularities in the prompt, which leads to distributional sensitivity, especially in prompting styles such as chain-of-thought. Given the varied accuracies and on formally similar tasks, we conclude that autoregression's ad-hoc encoding is not a robust mechanism for learning, and suggests limited all-purpose generalisability.

Analysis

Why This Paper Matters

This paper tackles a fundamental question in large language model research: does in-context learning (ICL) actually constitute learning, or is it merely pattern matching? The authors provide both a theoretical argument and extensive empirical evidence to show that while ICL fits the mathematical definition of learning, its practical ability to generalize to unseen tasks is severely limited. This is critical for AI practitioners who rely on few-shot prompting to adapt models to new domains, as it suggests that observed performance gains may stem from prior knowledge and prompt regularities rather than genuine task acquisition.

The paper's large-scale ablation study systematically isolates factors like memorization, pretraining, distributional shifts, and prompting style, providing a rigorous benchmark for understanding ICL's behavior. The finding that accuracy becomes insensitive to exemplar distribution and prompt style in the limit of many exemplars challenges common assumptions about how ICL works. This has direct implications for prompt engineering and the design of chain-of-thought techniques, which the authors show are particularly vulnerable to distributional sensitivity.

Technical Contributions

  • Mathematical framing: Provides a formal argument that ICL satisfies the definition of learning, distinguishing it from mere memorization or pattern matching.
  • Large-scale ablation: Systematically removes or accounts for memorization, pretraining effects, distributional shifts, and prompt phrasing to isolate ICL's true learning capability.
  • Empirical findings: Demonstrates that ICL accuracy is insensitive to exemplar distribution, model choice, and prompt style when exemplars are numerous, but highly sensitive to distributional shifts, especially with chain-of-thought prompting.
  • Robustness analysis: Shows that ICL deduces patterns from regularities in the prompt rather than encoding observations, leading to limited generalization.

Results

The paper reports that in the limit of many exemplars, ICL accuracy does not improve with more diverse exemplars or different prompt styles, plateauing at levels determined by the model's prior knowledge. Chain-of-thought prompting shows particular sensitivity to distributional shifts, with accuracy dropping significantly when the prompt distribution differs from the test distribution. The authors also find that formally similar tasks yield varied accuracies, indicating that ICL's ad-hoc encoding is not robust.

Significance

This research has broad implications for the AI field, particularly for practitioners deploying LLMs in few-shot settings. It suggests that ICL should not be viewed as a general-purpose learning mechanism, and that performance gains from few-shot prompting may be brittle and task-specific. The work encourages the development of more robust learning paradigms and cautions against overinterpreting ICL as evidence of emergent reasoning abilities. For Neura Market's audience, this means that reliance on ICL for critical applications requires careful validation and awareness of distributional mismatches.