Why do Transformers use multi-head attention instead of a single large attention head?

Last updated 22 November 2026

Multi-head attention lets each position attend in several different ways at once, at roughly the same cost as one full-width head. A single head produces only one softmax distribution per query, so it must average all the relationships it cares about into one weighting.

  • A single softmax is a bottleneck:

    • Each query gets one weighted average over values. If a token needs both its syntactic head and its previous token, one head blurs them together.

    • The original paper notes that averaging inhibits attending to different representation subspaces.

  • Heads work in different subspaces:

    • Each head has its own W_Q, W_K, W_V projecting into a d_model/h space.

    • Different heads can therefore define different notions of similarity (position, syntax, coreference, copying).

  • It costs about the same: Splitting d_model across h heads keeps parameters and matmul FLOPs essentially unchanged. You get more attention patterns for free.

  • Ensemble-like robustness: multiple heads give redundancy and more stable training.

  • Caveats:

    • Returns diminish. Many heads can be pruned after training with little loss (Michel et al., 2019).

    • With too many heads, d_k gets so small that each head's expressiveness (rank) is limited.

  • https://medium.com/@smohammedzubair0/multi-head-attention-in-transformers-explained-architecture-mathematics-and-implementation-33a64e4d4891
  • https://sebastianraschka.com/faq/
  • https://dev.to/jackm_345442a09fb53b/llm-interview-series3-transformers-explained-attention-is-all-you-need-523o
All Transformers interview questions