Disentangling Direction and Magnitude in Transformer Representations: A Double Dissociation Through L2-Matched Perturbation Analysis
Mangadoddi Srikar Vardhan, Lekkala Sai Teja

TL;DR
This paper reveals that in transformer models, the direction and magnitude of hidden state vectors serve distinct functions, with direction influencing attention and magnitude affecting syntactic processing, demonstrated through L2-matched perturbation analysis.
Contribution
The study introduces L2-matched perturbation analysis to disentangle the roles of direction and magnitude in transformer representations, showing their functional dissociation across model architectures.
Findings
Angular perturbations damage language modeling loss more.
Magnitude perturbations impair syntactic accuracy more.
Patterns are consistent across Pythia models and vary with architecture.
Abstract
Transformer hidden states encode information as high-dimensional vectors, yet whether direction (orientation in representational space) and magnitude (vector norm) serve distinct functional roles remains unclear. Studying Pythia-family models, we discover a striking cross-over dissociation: angular perturbations cause up to 42.9 more damage to language modeling loss, while magnitude perturbations cause disproportionately more damage to syntactic processing (20.4% vs.1.6% accuracy drop on subject-verb agreement).This finding is enabled by L2-matched perturbation analysis, a methodology ensuring that an gular and magnitude perturbations achieve identical Euclidean displacements. Causal intervention reveals that angular damage flows substantially through the attention pathways (28.4% loss recovery via attention repair), while magnitude damage flows partly through the LayerNorm…
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
TopicsNeurobiology of Language and Bilingualism · Face Recognition and Perception · Action Observation and Synchronization
