mlsanityData to 14 Oct 2026

What Do Language Models Learn in Context? The Structured Task Hypothesis

arXiv 2406.04216 ↗First posted 6 Jun 2024cs.CL cs.LGcited by 13

Not on the map. Why?

Abstract (arXiv)

Large language models (LLMs) exhibit an intriguing ability to learn a novel task from in-context examples presented in a demonstration, termed in-context learning (ICL). Understandably, a swath of research has been dedicated to uncovering the theories underpinning ICL. One popular hypothesis explains ICL by task selection. LLMs identify the task based on the demonstration and generalize it to the prompt. Another popular hypothesis is that ICL is a form of meta-learning, i.e., the models learn a learning algorithm at pre-training time and apply it to the demonstration. Finally, a third hypothesis argues that LLMs use the demonstration to select a composition of tasks learned during pre-training to perform ICL. In this paper, we empirically explore these three hypotheses that explain LLMs' ability to learn in context with a suite of experiments derived from common text classification tasks. We invalidate the first two hypotheses with counterexamples and provide evidence in support of the last hypothesis. Our results suggest an LLM could learn a novel task in context via composing tasks learned during pre-training.

Key facts. Cited by 13 papers in the map (data through 14 Oct 2026). Builds on 20 of its 33 references that are in the map. First posted on arXiv 6 Jun 2024.

Builds on

20 of 33 references.

References · 20

  1. 2020Language Models are Few-Shot Learnerscited by 32,419
  2. 2023Llama 2: Open Foundation and Fine-Tuned Chat Modelscited by 13,028
  3. 2021Evaluating Large Language Models Trained on Codecited by 8,320
  4. 2017Model-Agnostic Meta-Learning for Fast Adaptation of Deep Networkscited by 4,897
  5. 2015Character-level Convolutional Networks for Text Classificationcited by 2,330
  6. 2022Rethinking the Role of Demonstrations: What Makes In-Context Learning Work?cited by 1,434
  7. 2022In-context Learning and Induction Headscited by 964
  8. 2021An Explanation of In-context Learning as Implicit Bayesian Inferencecited by 938
  9. 2022Transformers learn in-context by gradient descentcited by 732
  10. 2022What Can Transformers Learn In-Context? A Case Study of Simple Function Classescited by 715
  11. 2022What learning algorithm is in-context learning? Investigations with linear modelscited by 684
  12. 2023Larger language models do in-context learning differentlycited by 394
8 more
  1. 2023What In-Context Learning "Learns" In-Context: Disentangling Task Recognition and Task Learningcited by 152
  2. 2023Pretraining task diversity and the emergence of non-Bayesian in-context learning for regressioncited by 146
  3. 2023The Learnability of In-Context Learningcited by 127
  4. 2024In-Context Language Learning: Architectures and Algorithmscited by 89
  5. 2023A Theory of Emergent In-Context Learning as Implicit Structure Inductioncited by 86
  6. 2023The Transient Nature of Emergent In-Context Learning in Transformerscited by 76
  7. 2023In-Context Learning Learns Label Relationships but Is Not Conventional Learningcited by 51
  8. 2023Do pretrained Transformers Learn In-Context by Gradient Descent?cited by 18

Built on by

Cited by year (2026 to 14 Oct)

Citing papers per year: 2024: 4; 2025: 6; 2026: 3.

13 papers.

Sort:

By area: