atlas

Research map / Architectures and efficiency / Attention and transformers

What needs to go right for an induction head? A mechanistic study of in-context learning circuits and their formation

ICML 2024 · Architectures and efficiency › Attention and transformers · approach: Training dynamics of in-context learning · 2 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.

Trains 2-layer attention-only transformers on a synthetic Omniglot few-shot task and uses a new JAX "artificial optogenetics" clamping framework to causally decompose induction head formation into three interacting subcircuits.

Problem

Induction heads emerge abruptly with a phase change in loss, but their diversity and the subcircuits driving their formation dynamics are poorly understood; prior progress measures are correlational.

Approach

Clamp (fix) subsets of activations throughout training, with gradients routed correctly, to causally isolate subcircuits; this reveals that induction head formation is driven by three smoothly evolving subcircuits (Layer 1 previous-token, QK match, copy) whose interaction yields the phase change.

Key results

Measured effects reported in the paper

What was changedWhereMeasuredEffect
Use multiple Layer 2 induction heads instead of restricting training to one head (ablation)2-layer attention-only transformer · Few-shot Omniglot tasktraining dynamicsHelped
Keep only Layer 2 Head 3 active throughout training (ablation)2-layer attention-only transformer · Few-shot Omniglot tasktraining dynamicsHurt
Keep only Layer 2 Head 3 active in the trained network (ablation)2-layer attention-only transformer · Few-shot Omniglot taskaccuracy: 98%Hurt
Ablate Layer 1 head outputs while preserving Layer 2 activations (ablation)2-layer attention-only transformer · Few-shot Omniglot taskaccuracy: 99.99% -> 99.98%No clear effect
Ablate Layer 1 heads 1, 2, and 5 while preserving Layer 2 patterns (ablation)2-layer attention-only transformer · Few-shot Omniglot taskaccuracy: 99.85%No clear effect
Ablate Layer 1 heads 1, 2, and 5 while preserving Layer 2 values (ablation)2-layer attention-only transformer · Few-shot Omniglot taskaccuracy: 69.87%Hurt
Ablate Layer 1 heads 0, 3, 4, 6, and 7 while preserving Layer 2 patterns (ablation)2-layer attention-only transformer · Few-shot Omniglot taskaccuracy: 34.27%Hurt
Ablate Layer 1 heads 0, 3, 4, 6, and 7 while preserving Layer 2 values (ablation)2-layer attention-only transformer · Few-shot Omniglot taskaccuracy: 99.32%No clear effect
Ablate all Layer 1 heads while preserving Layer 2 attention patterns (ablation)2-layer attention-only transformer · Few-shot Omniglot taskaccuracy: down to 55%Hurt
Ablate all Layer 1 heads while preserving Layer 2 value vectors (ablation)2-layer attention-only transformer · Few-shot Omniglot taskaccuracy: down to 11%Hurt
Clamp one Layer 1 head to attend perfectly to the previous token (ablation)2-layer attention-only transformer · Few-shot Omniglot taskloss dynamicsNo clear effect
Clamp Layer 1 attention and output (PT-attend and PT-copy) (ablation)2-layer attention-only transformer · Few-shot Omniglot taskphase-change duration: ≈7.5e4 iterations; compared to 2e5Helped

Surprising findings

Limitations

Experimental setup

Datasets: Omniglot

Benchmarks: held-out Omniglot classes (test exemplars) held-out label pairs (test relabel)

Metrics: accuracy cross-entropy loss induction head strength

Baselines: progress measures

Builds on: induction heads progress measures pattern-preserving ablation RoPE Omniglot

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