Vector Arithmetic in Concept and Token Subspaces
Sheridan Feucht, Byron Wallace, David Bau

TL;DR
This paper demonstrates that by transforming Llama-2-7b hidden states using attention weights from concept and token heads, one can perform semantic and surface-level arithmetic operations with significantly improved accuracy, revealing structured subspaces.
Contribution
The study introduces a method to identify and utilize semantic and surface-level subspaces in LLMs through attention-based transformations, enabling effective vector arithmetic.
Findings
Semantic transformations achieve 80% accuracy in nearest-neighbor tasks.
Raw hidden states achieve only 47% accuracy in similar tasks.
Attention-based transformations reveal coherent semantic and surface-level structures.
Abstract
In order to predict the next token, LLMs must represent semantic and surface-level information about the current word. Previous work identified two types of attention heads that disentangle this information: (i) Concept induction heads, which copy word meanings, and (ii) Token induction heads, which copy literal token representations (Feucht et al., 2025). We show that these heads can be used to identify subspaces of model activations that exhibit coherent semantic structure in Llama-2-7b. Specifically, when we transform hidden states using the attention weights of concept heads, we are able to more accurately perform parallelogram arithmetic (Mikolov et al., 2013) on the resulting hidden states, e.g., showing that "Athens" - "Greece" + "China" = "Beijing". This transformation allows for much higher nearest-neighbor accuracy (80%) than direct use of raw hidden states (47%). Analogously,…
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
TopicsTopic Modeling · Natural Language Processing Techniques · Machine Learning in Healthcare
