Zenaique

Head pruning studies report that many attention heads can be removed with negligible loss. Pick the correct interpretation.

MCQ·Medium·4.0 · 0·~1 min·Asked atEyMphasisPatronus·Relevant atMeta
Attempt it
TL;DR

Pretraining over-provisions heads. Many can be pruned post-hoc with small quality loss, but training with fewer heads from scratch hits worse final quality. The extra heads pay off at train time.

Memory aid
Sign in to see the mnemonic that makes this stick.
Easy to grasp

Picture a relay team training with 16 runners. After many races, you notice only 8 actually run the final routes; the other 8 are bench helpers, warming up, scouting, sharing tactics. Once the team is trained, you can race with just the 8 runners and barely lose. But if you had only ever signed 8 runners, the team never would have developed the same tactics, because the bench helpers were what made the training useful. Attention heads work the same way: the extras help while learning, and you can drop them after.

Concept explanation~2 min read

Everything you need to truly understand this topic: intuition, mechanics, step by step explanation, code, formulas, and worked example. Click to expand.

The head-pruning literature is one of the cleanest examples in transformer research of how empirical findings can mislead if interpreted naively. Many attention heads in a trained transformer can be removed with negligible quality loss, this is robustly true. But the natural conclusion 'so multi-head attention is wasteful' is empirically wrong: training with fewer heads from scratch produces worse final quality.

The right interpretation is over-provisioning. Extra heads provide scaffolding during training that helps the optimizer reach a better solution, even if that scaffolding becomes redundant at inference time. This deep dive walks the canonical empirical results, the over-provisioning mechanism, how it ties into interpretability findings about head specialization, why modern LLM design still uses large head counts despite the prunability result, and how GQA and MLA represent structured ways to capture the head-redundancy insight without sacrificing train-time quality.

The empirical landscape

Michel et al. 2019 (Are Sixteen Heads Really Better Than One?) was the canonical demonstration. The paper showed that on BERT for the GLUE benchmark and on a Transformer-based machine translation model:

  • 30-50% of attention heads could be removed (via greedy importance-ranking pruning) with under 1 metric point of quality loss.
  • Some individual layers could be reduced to a single head with negligible loss.
  • The remaining 'critical' heads varied across layers but tended to cluster around specific syntactic or semantic roles.

How prunable heads are identified

The method is empirical: rank heads by a gradient-based importance score (proportional to how much loss increases when the head is masked off), prune the lowest-ranked, retrain or fine-tune briefly to recover quality. The result is a smaller model with similar evaluation metrics.

Variants of the method include:

  • Magnitude-based pruning: rank by L2 norm of the head's output projection.
  • Gradient-based: rank by the head's contribution to the training loss gradient.
  • Ablation-based: rank by the increase in loss when the head is zeroed.

All three give roughly similar rankings, and all three identify a substantial prunable fraction in BERT and GPT-class models.

Replication across model families

Follow-up work replicated the finding on:

  • T5 (Raffel et al. 2020) and its variants.
  • GPT-2 and GPT-3 (limited public studies, but similar patterns reported).
  • Vision Transformers (with somewhat smaller prunable fractions).
  • BART, Pegasus, and other encoder-decoder models.

The prunable fraction varies by model and task, but the qualitative pattern, many heads are dispensable post-training, is robust.

The empirical result is solid. The question is what to do with it, and the naive answer 'train with fewer heads' is the trap.

Why over-provisioning is the right interpretation
Head specialization and the interpretability angle
Why modern LLM design still uses large head counts
The senior-level frame
Sign in to unlock the full deep dive.

Situations where this technique stops working.

Sign in to see when this approach fails.

2–4 min · Everything important, quickly.

Sign in to see the quick scan of the deep dive.

Real products, models, and research that use this idea.

  • Michel et al. 2019 'Are Sixteen Heads Really Better Than One?' showed 30-50% of heads prunable on BERT and Transformer NMT.
  • Voita et al. 2019 connected head pruning to attention specialization, identifying syntactic, positional, and topic head patterns.
Sign in to see more production examples.

What an interviewer would ask next. Try answering before peeking at the approach.

QWhy does training with fewer heads from scratch produce worse quality than pruning after?
A

Gradient-based optimization is path-dependent. With more heads, the optimizer has parallel hypotheses, redundancy that smooths the loss landscape, and exploration headroom. With fewer heads, each gradient step has less freedom and the optimizer is more likely to get stuck in worse local minima. The extra heads are scaffolding for the training process; once training converges, the scaffolding can be removed but it had to be there during the build.

2 more follow-ups an interviewer would ask next. Sign in to reveal them.

Red flags & common mistakes

The phrases that signal junior thinking. Click to expand.

Most common mistake

Concluding 'pruning works, so train with fewer heads.' Empirically that fails: smaller from scratch models hit worse quality. The redundancy is a training-time enabler, not a wasted capacity.

Sign in to see all red flags and common mistakes.

60 second bullets to scan on the way to the call.

  • Michel et al. 2019 result: 30-50% of heads prunable post-training with small loss

  • Why training with fewer heads from scratch produces worse final quality

Sign in to unlock the revision sheet.

Primary sources. Browse if you want the original framing.

Similar questions

Same topic, related formats. Practice these next.

4 curated
Next question
Explain scaled dot product attention.
Short answer·Medium