Generic Fibers and Functional Dimension of Multi-Head Attention

Nathan W. HenryWSS @ ICML 2026

TL;DR

This paper proves that the only symmetries in multi-head attention (MHA) are the "obvious" ones—linear basis changes within weight products and head permutations—meaning there are no hidden redundancies. By characterizing these symmetries, the author derives a formula for the functional dimension (effective parameter count) of MHA, demonstrating that this metric is a far more accurate predictor of a model's memorization capacity than raw parameter count.

What Problem Does This Paper Address?

In deep learning, we often use the total number of parameters as a proxy for a model's "capacity" or expressivity. However, neural networks possess weight-space symmetries: different sets of weights can represent the exact same mathematical function. The set of all parameters that map to the same function is called a "fiber."

If these fibers have a high dimension, it means many parameters are redundant. While single-head attention is well-understood, the symmetries of multi-head attention remained unproven. This gap makes it difficult to know the "true" dimensionality of the function space we are optimizing in. If we compare two models with the same number of parameters but different numbers of heads, are we really comparing models of equal capacity? This paper argues that we aren't, and provides the math to prove why.

Methods

The author employs a mix of rigorous theoretical proof and empirical validation:

  1. Theoretical Proof: Using tools from algebraic geometry and complex analysis, the author proves Theorem 2.1. They show that for "generic" (non-degenerate) parameters, MHA has no hidden symmetries. The proof involves reducing the Softmax operation to a family of sigmoid functions and using analytic continuation to show that terms from different heads cannot cancel each other out unless they are identical.
  2. Functional Dimension Formula: By calculating the dimension of these symmetry groups (the fibers), the author uses the fiber dimension theorem to derive the "functional dimension" ($P_{eff}$), which represents the number of effective, non-redundant parameters.
  3. Experimental Setup: To test the theory, the author trained 2-layer, attention-only Transformers. They kept the total parameter count constant while varying the number of heads ($k \in \{1, 2, 4, 8, 16\}$) to see how it affected the model's ability to memorize random data.

Datasets

The study uses a synthetic dataset designed specifically to measure memorization capacity:

  • Data: 16,384 uniformly random token sequences.
  • Parameters: Vocabulary size $V = 128$, sequence length $S = 16$.
  • Purpose: By using random sequences, the researchers eliminate the possibility of "generalization," ensuring that any decrease in training loss is purely a result of the model's capacity to store information (measured in bits).

Key Insights and Ideas

  • The "Obvious" is All There Is: The most significant theoretical finding is that MHA doesn't have "hidden" symmetries. The redundancies are limited to:
  • Invertible basis changes between the Query/Key and Output/Value matrices.
  • The discrete symmetry of swapping one head for another.
  • Functional Dimension vs. Parameter Count: The derived formula for functional dimension is $P_{eff} = 4d^2 - \frac{2d^2}{k}$ (for standard setups). This shows that as you increase the number of heads ($k$), the functional dimension actually increases, even if the total number of parameters stays the same.
  • A Better Axis for Scaling Laws: Scaling laws (like the Chinchilla or Kaplan laws) usually plot performance against parameter count. This paper suggests that "functional dimension" might be a more principled "size" coordinate for these laws, especially when comparing different architectures.

Key Results

The experiments provided a striking confirmation of the theory:

  • Raw Parameter Count Fails: When looking at "bits per parameter," the memorization capacity varied wildly (by 55%) as the number of heads changed, ranging from 1.83 to 2.83 bits. This suggests parameter count is a poor measure of capacity.
  • Functional Dimension Succeeds: When the same data was normalized by the calculated functional dimension ($P_{eff}$), the variation dropped to just 7% (2.69 to 2.89 bits).
  • Conclusion: The "effective" parameter count explains away almost all the variation in model capacity that raw parameter counts cannot account for.

Limitations and Future Work

  • Simplified Architectures: The study focused on attention-only models. Real-world Transformers include Multi-Layer Perceptrons (MLPs), Layer Normalization, and various biases. The author conjectures that these symmetries remain independent across layers, but this remains to be proven for full-scale models.
  • Generic vs. Specific: The proof holds for "generic" parameters. It is theoretically possible that at specific, non-generic points in weight space (like at initialization or under certain constraints), additional symmetries could emerge.
  • Optimization Dynamics: The small remaining variation (7%) in the results suggests that while functional dimension captures the potential capacity, the actual realized capacity might still be slightly influenced by how different head configurations affect optimization (gradient flow).

This work moves us closer to a "physics of language models" by providing a more precise ruler with which to measure the models we build.

Summary updated

BibTeX
@inproceedings{henry2026generic,
  author = {Nathan W. Henry},
  title = {{Generic Fibers and Functional Dimension of Multi-Head Attention}},
  booktitle = {WSS @ ICML},
  year = {2026},
  url = {https://openreview.net/forum?id=7vPmnHdAPl},
}
Figure