atlas

Research map / Large language models / Language, safety and interpretability

Which Attention Heads Matter for In-Context Learning?

ICML 2025 · Large language models › Language, safety and interpretability · approach: Task vectors and steering · 0 citations (OpenAlex)

Read the paperCheck your idea against 108,967 papers

AI-extracted summary. Written by AI from the paper's full text. Numbers and claims can be wrong or missing context, so check the paper before you cite or build on it.

Compares induction heads and function-vector (FV) heads across 12 decoder-only LMs (70M–7B), finding few-shot ICL depends mainly on FV heads (especially at scale), and that many FV heads evolve from induction heads during training.

Problem

Two proposed mechanisms explain in-context learning: induction heads that copy tokens and function-vector heads that encode the task. It is unclear which drives few-shot ICL, and prior conclusions conflicted.

Approach

Measures induction and FV scores per head, performs ablations with "exclusion" to control for overlap between the two head sets, separates few-shot ICL accuracy from token-loss difference, and tracks individual heads over training checkpoints to find that FV heads often arise from induction heads.

Key results

Measured effects reported in the paper

What was changedWhereMeasuredEffect
Preserve FV heads rather than ablate them, excluding top induction heads (ablation)Decoder-only transformer models · Few-shot ICL accuracy on 19 natural language tasksaccuracyHelped
Preserve induction heads with low FV scores rather than ablate them (ablation)Models exceeding 1B parameters · Few-shot ICL accuracy on 19 natural language tasksaccuracyNo clear effect
Preserve induction heads rather than ablate them (ablation)Models below 160M parameters · Token-loss differencetoken-loss differenceNo clear effect
Preserve FV heads rather than ablate them (ablation)Models below 160M parameters · Token-loss differencetoken-loss differenceNo clear effect
Preserve induction heads rather than ablate them (ablation)Models over 345M parameters · Token-loss differencetoken-loss differenceHelped
Preserve FV heads rather than ablate them (ablation)Models over 345M parameters · Token-loss differencetoken-loss differenceHelped
Increase model scale while comparing FV-head and induction-head ablations (ablation)Decoder-only transformer models · Few-shot ICL accuracyaccuracyMixed
Ablate induction heads without excluding heads that also score highly for FV (ablation)Decoder-only transformer models · Few-shot ICL accuracyaccuracyHurt
Ablate induction heads while excluding the top 2% FV heads (ablation)Decoder-only transformer models · Few-shot ICL accuracyaccuracyNo clear effect

Surprising findings

Limitations

Experimental setup

Datasets: 37 natural language ICL tasks (Todd et al.) 8 new ICL tasks (4 variants, 4 binding tasks) The Pile (token-loss difference)

Benchmarks: 19 natural language ICL tasks (few-shot accuracy) The Pile token-loss difference

Metrics: few-shot ICL accuracy token-loss difference induction score FV score

Baselines: random head ablation token-loss difference (Olsson et al. metric)

Builds on: induction heads function vectors causal mediation analysis TransformerLens

Closest papers by meaning

Writing a paper in this area? scime draft is a free LaTeX editor with AI included, real-time co-authors and a check of your references and venue rules before you submit. It also imports OpenAI Prism projects.

Open scime draft

Get the next scime Dispatch and a monthly field update

Free. We send a confirmation link first; every email has a one-click unsubscribe. Privacy