A Capacity-Based Rationale for Multi-Head Attention

Micah Adler

Why do Transformers rely on multiple attention heads? The conventional wisdom suggests that multi-head attention allows models to "look at multiple things at once." However, this paper provides a rigorous mathematical and empirical proof for a different primary driver: relational capacity. By splitting a fixed memory budget into many smaller heads, models can effectively filter out the interference noise created when a massive vocabulary is compressed into a smaller embedding space. This allows the network to store and retrieve significantly more token-to-token relationships.

The Challenge of Embedding Superposition

In modern Large Language Models (LLMs), vocabularies often exceed 50,000 tokens, yet these tokens are represented in vector spaces of only a few thousand dimensions ($d_{model}$). Because the vocabulary size vastly outstrips the vector space dimensions, token embeddings cannot be perfectly orthogonal. Instead, they overlap and share directions, a phenomenon known as embedding superposition.

This overlap creates interference noise. When the attention mechanism attempts to determine where a query should attend, this noise can cause the model to hallucinate incorrect connections or miss the intended target entirely. Understanding the relational capacity of an attention layer—specifically, how many distinct token-to-token relationships a model can reliably remember for a fixed budget of key and query dimensions—is critical to optimizing Transformer architectures.

Methodology: Relational Graph Recognition

To quantify this capacity, the authors introduce a novel framework called Relational Graph Recognition (RGR). In RGR, the attention mechanism is conceptualized as a graph recovery engine. The model is tasked with learning a fixed "relational graph," where edges dictate which tokens should attend to which. Given a random subset of tokens (the context), the model must correctly identify these edges.

To study this, the researchers utilize:

  • Information-Theoretic Bounds: Mathematical proofs establishing the minimum resources required to solve RGR.
  • Explicit Constructions: A blueprint demonstrating how an attention layer can invert the embedding process to isolate specific tokens.
  • Max-over-Heads Aggregation: A simplified, tractable version of multi-head attention used for rigorous proofs, analyzed alongside the standard Scaled-Softmax attention used in practice.

Key Insights: Capacity and the Multi-Head Advantage

The study reveals that the required total key dimension ($D_K$) scales not just with the vocabulary size ($m$), but with the number of relationships ($m'$) the model needs to store. Specifically, the required budget scales roughly as $m' / d_{model}$.

The most striking insight is the true advantage of multi-head attention as a noise filter. Even in "permutation graphs"—synthetic datasets where each token points to exactly one unique token, effectively neutralizing the "attending to multiple things" justification—multi-head attention vastly outperforms a single-head model with the same total dimension. By dividing the budget into multiple heads, each head only processes a fraction of the vocabulary. This localization significantly reduces the interference from embedding superposition, yielding a much cleaner signal-to-noise ratio.

Furthermore, the capacity exhibits sharp phase transitions: if a model has a budget for 99 relations but needs to learn 100, performance does not degrade gracefully; it collapses entirely.

Empirical Validation

The theoretical predictions were tightly confirmed by empirical tests, revealing a scaling law of $D_K \approx 1.19 \frac{m \log m}{d_{model}}$ with an $R^2$ of 0.944. The optimal number of heads was shown to scale linearly with the compression ratio (vocabulary size divided by embedding dimension). As more tokens are squeezed into the same space, more heads are required to manage the resulting noise.

To validate these findings in a realistic setting, the researchers used frozen GPT-2 Small embeddings on a task mimicking "induction heads" (a common circuit in LLMs). While a single-head model failed completely despite a large parameter budget, multi-head models with the exact same total dimension achieved near-perfect accuracy.

Limitations and Future Directions

While RGR serves as a powerful proxy for addressing capacity, the study primarily focuses on a single attention layer in isolation and largely utilizes frozen embeddings. In real-world LLMs, multiple layers may iteratively clean up noise, and joint training of embeddings and attention might slightly shift the constants of the discovered scaling laws. Additionally, RGR does not capture the full complexity of natural language reasoning or the Value (OV) pathway's role in transformation. Nonetheless, this work provides a foundational, capacity-based rationale for the ubiquity of multi-head attention in modern AI.

Summary updated

BibTeX
@inproceedings{adler2026capacity,
  author = {Micah Adler},
  title = {{A Capacity-Based Rationale for Multi-Head Attention}},
  booktitle = {International Conference on Machine Learning},
  year = {2026},
  url = {https://openreview.net/forum?id=rIbK1X14la},
}
Figure