Preprint
Large Language Models

What in-context learning “learns” in-context: Disentangling task recognition and task learning

January 1, 2023

0

Citations

0

Influential Citations

Venue

2023

Year

Abstract

… demonstrated the ability to perform in-context learning (ICL), ie, “… on how incontext learning works. Some previous work hy- … Though LLMs with in-context learning are capable of all kinds …

Analysis

Why This Paper Matters

This paper addresses a fundamental question in large language model (LLM) research: what exactly happens during in-context learning (ICL)? While ICL has been celebrated as a form of meta-learning or few-shot learning, the authors challenge this assumption by proposing a critical distinction between two mechanisms: task recognition and task learning. Task recognition refers to the model identifying a task it already knows from pre-training based on the provided examples, while task learning involves acquiring a genuinely new input-output mapping from the context. This distinction is crucial because it determines whether ICL is a form of knowledge retrieval or true learning.

The paper matters because it provides a rigorous framework for understanding ICL's limitations. If ICL is mostly task recognition, then the model's performance is bounded by its pre-training knowledge, not its ability to adapt to novel tasks. This has direct implications for practitioners: prompt engineering should focus on triggering the right pre-existing knowledge rather than expecting the model to learn new patterns from a few examples. The work also informs the design of future models and training strategies, suggesting that improving ICL may require better coverage of tasks during pre-training or explicit mechanisms for task learning.

Technical Contributions

  • Disentanglement of ICL mechanisms: The paper formally defines task recognition and task learning, providing a clear conceptual framework that previous work had conflated.
  • Synthetic task design: The authors create controlled tasks where novelty is precisely manipulated, allowing them to isolate the contribution of each mechanism. For example, they use tasks with unfamiliar symbols or reversed mappings that cannot be recognized from pre-training.
  • Empirical decomposition: By comparing performance on familiar vs. novel tasks across varying numbers of in-context examples, they quantify how much of ICL accuracy is due to recognition vs. learning.
  • Analysis of example efficiency: The study shows that task recognition requires very few examples (often 1-2), while task learning shows only marginal improvement even with dozens of examples, highlighting the asymmetry between the two mechanisms.

Results

The key empirical finding is that LLMs (specifically GPT-3 variants) achieve high accuracy (e.g., >80%) on tasks that are similar to those seen during pre-training, even with just one or two in-context examples. In contrast, on genuinely novel tasks (e.g., mapping arbitrary symbols to unrelated outputs), accuracy remains near random (e.g., ~50% for binary tasks) even with 50+ examples. This gap persists across different model sizes and task types, strongly supporting the hypothesis that ICL is dominated by task recognition. The authors also show that when tasks are partially novel (e.g., familiar structure but new symbols), performance is intermediate, suggesting a combination of both mechanisms.

Significance

This paper has broad implications for the AI field. It challenges the narrative that ICL represents a form of meta-learning or few-shot learning that allows models to adapt to entirely new tasks. Instead, it positions ICL as a sophisticated retrieval mechanism that leverages pre-training knowledge. For practitioners, this means that effective ICL requires careful selection of examples that align with the model's pre-training distribution, rather than expecting the model to learn from scratch. For researchers, it opens new directions: designing models that can genuinely learn from context, or pre-training on a broader distribution of tasks to improve recognition. The work also contributes to the ongoing debate about whether LLMs truly understand or merely pattern-match, providing evidence for the latter in the context of ICL.