Measuring Affinity between Attention-Head Weight Subspaces via the Projection Kernel

Hiroaki Yamagiwa, Yusuke Takase, Hidetoshi Shimodaira


Abstract
Understanding relationships between attention heads is essential for interpreting the internal structure of Transformers, yet existing metrics do not capture this structure well. We focus on the subspaces spanned by attention-head weight matrices and quantify head-to-head relationships using the Projection Kernel (PK), a principal-angle-based measure of subspace similarity. Experiments on GPT2-small, BLOOM-560M, and Qwen2-0.5B-Instruct show that PK reproduces known head-to-head interactions on the IOI task more clearly than prior metrics such as the Composition Score. We further introduce a framework to quantify the informativeness of PK distributions by comparing them with a reference distribution derived from random orthogonal subspaces. As an application, we analyze a directed graph constructed from PK and show that, in GPT2-small, L4H7 acts as a hub by functioning as an Identity Head.
Anthology ID:
2026.emnlp-main.1517
Volume:
Proceedings of the 2026 Conference on Empirical Methods in Natural Language Processing
Month:
October
Year:
2026
Address:
Budapest, Hungary
Editors:
Hung-Yi Lee, Sunipa Dev, Jessy Li, Desmond Elliott
Venue:
EMNLP
SIG:
SIGDAT
Publisher:
Association for Computational Linguistics
Note:
Pages:
34591–34660
Language:
URL:
https://aclanthology.org/2026.emnlp-main.1517/
DOI:
Bibkey:
Cite (ACL):
Hiroaki Yamagiwa, Yusuke Takase, and Hidetoshi Shimodaira. 2026. Measuring Affinity between Attention-Head Weight Subspaces via the Projection Kernel. In Proceedings of the 2026 Conference on Empirical Methods in Natural Language Processing, pages 34591–34660, Budapest, Hungary. Association for Computational Linguistics.
Cite (Informal):
Measuring Affinity between Attention-Head Weight Subspaces via the Projection Kernel (Yamagiwa et al., EMNLP 2026)
Copy Citation:
PDF:
https://aclanthology.org/2026.emnlp-main.1517.pdf