Measuring Affinity between Attention-Head Weight Subspaces via the Projection Kernel
Hiroaki Yamagiwa, Yusuke Takase, Hidetoshi Shimodaira

TL;DR
This paper introduces the Projection Kernel, a new metric for measuring relationships between attention heads in Transformers, providing clearer insights into head interactions and their roles.
Contribution
It proposes the Projection Kernel for subspace similarity, demonstrating its effectiveness over existing metrics and applying it to analyze head functions in GPT2-small.
Findings
PK better captures known head interactions than prior metrics
PK-based graph analysis identifies key heads like L4H7 as hubs
Framework for quantifying informativeness of PK distributions
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 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.
Peer Reviews
No public reviews on file for this paper yet. If you reviewed it on a platform where reviews are public (OpenReview, ICLR, NeurIPS, ICML), you can paste yours below so the community can read it here.
Videos
No videos yet. Explain this paper in a talk, walkthrough, or lecture? Add one.
Taxonomy
TopicsFunctional Brain Connectivity Studies · EEG and Brain-Computer Interfaces · Visual Attention and Saliency Detection
