Skip to content

From Copying to Composition: How Language Models Develop In-Context Learning

Oct 2026 · 0 citations · 74 references
Computer Science

Abstract

In-context learning (ICL) allows language models to adapt their behavior from instructions and demonstrations in a prompt, but accuracy alone does not reveal how contextual information controls their predictions. We study the acquisition and trainability of ICL with a controlled diagnostic that separates copying a nearby demonstration from integrating information across the prompt. Across 17 models, about a third prefer the copied answer, a few are undecided, and the rest prefer the rule-consistent answer, which goes with higher accuracy and with control by the requested value rather than the closest conflicting example. Checkpoint analyses show that models begin prioritizing task-relevant prompt tokens over conflicting examples long before their accuracy improves beyond chance level. In matched training experiments, synthetic documents that define endings and then query them shift models toward compositional responses on the controlled diagnostic, whereas fine-tuning on definition exercises built from rewritten real documents improves accuracy when prompts reassign label meanings. The results suggest that ICL is not acquired as a single, uniform capability. Instead, prompt control, answer preference, construction without candidates, and transfer can develop along distinct trajectories.

View source

Similar papers

#machine learning Preprint Sep 2026

How Do Language Models Choose Between Context and Memory?

The results suggest that authority computations may be task-dependent, rather than reusable across tasks, and suggest that authority computations may be task-dependent, rather than reusable across tasks.

Benjamin Shih, John Winnicki, Arianna Cao · 0 citations
#natural language process... Preprint Sep 2026

Compile, Don't Memorize: A Context Compilation Architecture (CCA) for In-Context Learning

The Context Compilation Architecture (CCA), whose central novelty is a typed intermediate representation (IR) with fixed slots (rules.{must_do, must_not, conditional}, output_spec, available_tools, data_profile) into which any prose context is compiled once; executable verifiers and a violation-gated correction loop fo...

Jin-Hu Qi, Min-Da Hu, Wen-Tao Zhang et al. · 0 citations
#natural language process... Preprint Sep 2026

LLMs Learn Better In-Context from Rules than from Examples

It is found that models generally learn more reliably from rules than from examples alone, and additional examples on top of rules or simply scaling up the number of examples do not lead to consistent and significant gains.

Xiang Fu, Seungmin Cho, Yukyung Lee et al. · 0 citations
#artificial intelligence Preprint Oct 2026

Not All Drift Is a Mechanism: Tracing Prompt Adaptation in LLMs

Prompt-based adaptation offers several ways to specialize a frozen language model, ranging from natural-language prompt optimization to learned continuous prompts. These methods are usually compared through downstream performance, although similar outputs need not arise from similar internal computations. We study how...

Mikhail Aleksandrov, Nail Bashirov, Maksim Ivanov et al. · 0 citations
#natural language process... Preprint Oct 2026

Copying Before Suppression: What Drives a Below-Chance Dip During Language Model Training?

Mechanistic interpretability usually studies fully trained models, yet the computations that drive a behaviour can change while the model is still learning the task. On the Indirect Object Identification task, a model should continue with the name mentioned once rather than the name mentioned twice. Pythia models pass...

T. Dahiya, Cole Blondin · 0 citations

Related blog posts

MIT News · Artificial Intelligence Sep 29, 2026

Who we become when we talk to machines

Professor Sherry Turkle’s new book, “Artificial Intimacy,” offers a withering critique of chatbots and the antisocial dynamics she believes they encourage.

We use cookies to run the site and, with your consent, for analytics and to show ads. See our Cookie Policy.