Research · November 4, 2026
A Circuit for In-Context Learning
Reported by arXiv cs.AI + cs.CL
In short
Researchers map out how in-context learning works inside three 3-4B-parameter transformers on few-shot sentence classification with arbitrary labels. The models act like a key-value memory over label-token positions: middle-layer attention heads store each demonstration's class at its label token, and upper-layer heads match the query's class against those keys and copy out the right label. An early-layer signal that detects repeated labels gates this readout.
Why it matters
It goes beyond isolated components to show how they compose into a working mechanism, which advances mechanistic understanding of how prompts alone can teach a model a new task.
Read the original reporting
arXiv cs.AI + cs.CL (opens in a new tab)AI Download summarizes and links to the news. We do not republish full articles.