cs.LGSep 19, 2026
SaveOn attention heads and bilinear forms
Abstract
We study the symmetric and antisymmetric parts of bilinear forms in the attention heads of trained large language models. We introduce an orthogonally invariant profile map from real bilinear forms to a three-dimensional simplex and observe that profiles of trained bilinear forms accumulate near profiles of rank-one bilinear forms. We prove that the symmetric part of a bilinear form in an attention head is the sum of a hyperbolic form and a zero form for a Zariski-dense subset of query-key matrices.
Figures & tables
Figure 1. The simplex of profiles of nonzero bilinear forms. Red segments comprise . denotes a symmetric matrix whose spectrum is symmetric about zero and a positive semidefinite matrix. The front-right facet corresponds to symmetric forms, the bottom facet to , and the left facet to . Fibers of over the relative interiors of the back facet and the top-right edge are empty.
Figure 2. Profiles of the bilinear forms of gpt2-large and of Mistral-Small-24B-Base . The left model uses QKV attention while the right uses RoPE, showing that accumulation occurs for both types of positional encoding. Markers ( Type , Type , Type ) indicate parity.
Figure 3. The mean eigenvalue distribution of symmetric parts for gpt2 .
Figure 4. Measured eigenvalue distributions in gpt2 , attached to their branches or midpoint of . Each histogram shows the mean of the sorted, unit-length spectra of the ten most extreme heads in one cluster. Here has spectrum symmetric about zero and is positive semidefinite.
Figure 5. Projection of gpt2 ’s symmetric part eigenvalue distributions to the first three principal components (left), and to the second and third components (right).
| Model | Scoring parameters ( ) |
|---|---|
| QKV/RoPE/ALiBi attention | |
| Biaffine attention | |
| Bilinear attention | |
| Multi-head QKV/RoPE/ALiBi attention | |
| Multi-head bilinear |
Table 1. Trainable scoring parameter counts in the attention blocks; value map and positional encoding parameters are excluded. Here , is the sequence length, and is the number of heads. The last row uses fixed coordinate projections as described above.
| model | heads | Type | Type | Type |
|---|---|---|---|---|
| distilgpt2 | ||||
| gpt2 | ||||
| gpt2-medium | ||||
| gpt2-large | ||||
| opt-125m | ||||
| opt-350m |
Table 2. Percentage of the heads by parity, classified using , with tolerance for Type .
Figure 6. Average error of each fitted family over the heads of a model, against the size of the model; lower is a closer fit. The error is the root mean square difference between the heights of a -bin histogram of the sample and the fitted density, after rescaling the sample to unit mean.
Figure 7. The simplex of profiles of bilinear forms (left) and its face of symmetric forms (right). Here has spectrum symmetric about zero and is positive semidefinite. The fiber over the dashed edge is empty away from its endpoints.
| face | fiber of | |
|---|---|---|
| vertex | antisymmetric forms | |
| vertex | symmetric forms with | |
| vertex | positive semidefinite forms | |
| vertex | negative semidefinite forms | |
| edge | forms with | |
| edge | forms with positive semidefinite |
Table 3. The fibers of over the faces of ; denotes a symmetric matrix with spectrum symmetric about zero and a positive semidefinite matrix.
Figure 8. Profiles of the heads of gpt2 on the simplex .
Figure 9. Profiles of the symmetric parts of the heads of gpt2 on . Here has spectrum symmetric about zero and is positive semidefinite.
Figure 10. Profiles of spectra sampled from with , , , for and eigenvalues per side, plotted by their coordinate along the edge , drawn horizontally from the vertex to the vertex , together with the limit point of Theorem 5 ( ).
| Observation | Status | Source |
|---|---|---|
| 1 : the symmetric part is balanced | Proved: Theorem 3 | |
| 2 : head profiles accumulate near rank-one profiles | Partially explained: Theorem 5 ; the proportionality of the lobes in its proof holds approximately at the heads (§ 5.2 ) | |
| 3 : has two gamma-like lobes | Unexplained | |
| 4 : symmetric bias of attention heads | Partially explained: [ 10 , Theorem 2.4] for the bidirectional case with assumptions, unexplained for decoder-only | [ 10 ] |
| 5 : the sorted spectral lobes are approximately proportional | Linked to profile accumulation by Theorem 5 ; see § 5.2.1 | |
| 6 : and have gamma-like profiles | Unexplained | [ 3 ] |
Appendix figures & tables4 assets
Supplementary material from the paper’s appendix.
Appendix
Figure 11. Distribution of the trained-head pairing scores in Figure 14 . Dashed lines mark model medians.
Figure 12. Parity by layer in all fourteen models. Each cell shows the percentage of a layer’s heads of the indicated type, with a shared scale from white ( ) to black ( ). Types use the symmetric profile: Type has ; otherwise gives Type and the remaining heads are Type . Layers are indexed from zero; RoPE models use relative position zero.
Figure 13. Symmetric energy at each attention head. For each model, the trained heads (left) are paired with independent random products (right), with iid standard normal of the same dimensions. Rows index layers and columns index heads, both starting at zero. The shared color scale is white at , red above and blue below; the random baseline has expectation . RoPE models use relative position .
Figure 14. Pairing score at each attention head. Each model’s trained heads (left) are paired with independent Gaussian QK products of the same dimensions (right), as in Figure 13 . Rows index layers and columns index heads. A score of one means the symmetric spectrum is symmetric about zero. The shared color scale is white at , red above and blue below. RoPE models use relative position .
More in this topic
Attention Head Analysis
Attention head analysis studies how individual Transformer heads route information, support computations, and affect model behavior.
See all 82 papers