Pith. sign in

REVIEW 11 cited by

Which Attention Heads Matter for In-Context Learning?

Not yet reviewed by Pith; the record is open.

This paper has not been read by Pith yet. Machine review is queued; the pith claim, tier, and objections will appear here once it completes.

SPECIMEN: schema-true, not a live event

T0 review · schema-true

One-sentence machine reading of the paper's core claim.

pith:XXXXXXXX · record.json · timestamp

arxiv 2502.14010 v1 pith:E7ELTB7A submitted 2025-02-19 cs.LG cs.AIcs.CL

Which Attention Heads Matter for In-Context Learning?

classification cs.LG cs.AIcs.CL
keywords headsinductionlearningmodelsdrivesin-contextlanguagemechanism
verification ladder T0 review T1 audit T2 compute T3 formal T4 reserved
0 comments
read the original abstract

Large language models (LLMs) exhibit impressive in-context learning (ICL) capability, enabling them to perform new tasks using only a few demonstrations in the prompt. Two different mechanisms have been proposed to explain ICL: induction heads that find and copy relevant tokens, and function vector (FV) heads whose activations compute a latent encoding of the ICL task. To better understand which of the two distinct mechanisms drives ICL, we study and compare induction heads and FV heads in 12 language models. Through detailed ablations, we discover that few-shot ICL performance depends primarily on FV heads, especially in larger models. In addition, we uncover that FV and induction heads are connected: many FV heads start as induction heads during training before transitioning to the FV mechanism. This leads us to speculate that induction facilitates learning the more complex FV mechanism that ultimately drives ICL.

discussion (0)

Sign in with ORCID, Apple, or X to comment. Anyone can read and Pith papers without signing in.

Forward citations

Cited by 11 Pith papers

Reviewed papers in the Pith corpus that reference this work. Sorted by Pith novelty score.

  1. Explaining Attention with Program Synthesis

    cs.LG 2026-06 unverdicted novelty 7.0

    Language-model-guided program synthesis can approximate transformer attention heads with over 75% IoU fidelity on held-out data and allow replacing 25% of heads with only 16% average perplexity increase.

  2. Manifold Steering Reveals the Shared Geometry of Neural Network Representation and Behavior

    cs.LG 2026-05 unverdicted novelty 7.0

    Manifold steering along activation geometry induces behavioral trajectories matching the natural manifold of outputs, while linear steering produces off-manifold unnatural behaviors.

  3. MIDUS: Memory-Infused Depth Up-Scaling

    cs.LG 2025-12 unverdicted novelty 7.0

    MIDUS replaces duplicated FFN branches in depth up-scaling with head-wise memory layers using product-key retrieval and HIVE to deliver lightweight, head-conditioned residual capacity.

  4. CompressKV: Semantic-Retrieval-Guided KV-Cache Compression for Resource-Efficient Long-Context LLM Inference

    cs.AI 2026-06 unverdicted novelty 6.0

    CompressKV uses Semantic Retrieval Heads to guide KV-cache token selection and layer-wise budget allocation, retaining over 97% performance with 3% cache on LongBench QA tasks.

  5. Explaining Attention with Program Synthesis

    cs.LG 2026-06 unverdicted novelty 6.0

    Fewer than 1000 synthesized Python programs can replicate attention head behavior in GPT-2, TinyLlama, and Llama-3B at >75% IoU on TinyStories, and replacing 25% of heads raises perplexity by only 16% while preserving...

  6. Contribution Weights: A Geometrical Analysis of Self-Attention Transformers

    cs.LG 2026-05 unverdicted novelty 6.0

    Contribution Weights combine attention, value magnitude, and directional alignment to measure token influence more faithfully than attention alone, and show attention sinks actively suppress information via a convex s...

  7. Distributional Alignment as a Criterion for Designing Task Vectors in In-Context Learning

    cs.CL 2026-05 unverdicted novelty 6.0

    A distributional alignment metric d_NTP and a linear regression method LTV for task vectors that improves accuracy by 9.2% over baselines on classification and regression tasks across multiple LLMs.

  8. Compressed Sensing for Capability Localization in Large Language Models

    cs.CL 2026-02 conditional novelty 6.0

    LLM capabilities are concentrated in small sets of attention heads, and a compressed-sensing method can find those heads efficiently.

  9. Predicting the Emergence of Induction Heads in Language Model Pretraining

    cs.CL 2025-11 conditional novelty 6.0

    A fitted law UPT = T/√(BC) predicts when induction heads emerge, and a Pareto frontier in bigram repetition frequency/reliability separates data that produce induction heads from data that do not.

  10. Localizing Task Recognition and Task Learning in In-Context Learning via Attention Head Analysis

    cs.CL 2025-09 unverdicted novelty 6.0

    A new framework using Task Subspace Logit Attribution localizes attention heads specialized for task recognition and task learning in in-context learning, showing they align and rotate hidden states within a task subspace.

  11. When Context Sticks: Studying Interference in In-Context Learning

    cs.LG 2026-04 unverdicted novelty 5.0

    In-context learning shows persistent interference from prior examples, with more misleading linear examples degrading quadratic predictions and training curricula modulating recovery speed.