A Unifying Perspective on Language Model Representations: From Filler-Role Structure to Mechanistic Interpretability
Organizations: Department of Computer Science Yale University New Haven, CT · Department of Linguistics & Wu Tsai Institute Yale University New Haven, CT
Abstract
A wide range of methods have been proposed for interpreting language models, delivering important insights into their inner workings. However, different methods and their resulting insights stand in relative isolation: what could the underlying structure of language models be, such that they give rise to all our interpretations? In this work, we propose using Tensor Product Representations (TPRs) as a unifying hypothesis. TPRs give a concrete proposal for how compositional structure could be represented in vector space --- as filler-role bindings. We show, both mathematically and empirically, that TPRs can unify several prior interpretability methods: additive analogies, linear probing, sparse autoencoders, and activation patching. Mathematically, we show that these methods can all be derived from TPRs. Empirically, we apply the derivations to a range of different models --- from small toy models to LLMs --- to construct instances of each of the above interpretability methods; these constructed variants perform comparably to their standard variants. We view this work as a step toward what interpretability will ideally provide: a unified account of the nature of neural networks, corroborated not just by individual observations but also by an explanation of the connections between them.
Figures & tables
| Model | SAE type | Quality (%) | |
|---|---|---|---|
| ModBERT | Top- | 0.9803 | 72.52 |
| Supervised | 0.9676 | 99.99 | |
| TPE-constr. | 0.9289 | 99.77 | |
| Gemma | Top- | 0.9889 | 92.63 |
| Supervised | 0.9866 | 97.26 | |
| TPE-constr. | 0.9679 | 99.98 |
Appendix figures & tables10 assets
Supplementary material from the paper’s appendix.
Appendix
| Task | Input | Output |
|---|---|---|
| Copy | 2 1 7 5 10 5 | 2 1 7 5 10 5 |
| Reverse | 2 1 7 5 10 5 | 5 10 5 7 1 2 |
| RNN | LSTM | GRU | ||||
|---|---|---|---|---|---|---|
| Task | Token | Sequence | Token | Sequence | Token | Sequence |
| Copy | 1.0000 | 1.0000 | 1.0000 | 1.0000 | 1.0000 | 1.0000 |
| Reverse | 1.0000 | 1.0000 | 1.0000 | 1.0000 | 1.0000 | 1.0000 |
| RNN | LSTM | GRU | |||||||
|---|---|---|---|---|---|---|---|---|---|
| Task | Token | Sequence | Token | Sequence | Token | Sequence | |||
| Copy | 1.0000 | 1.0000 | 0.9853 | 1.0000 | 1.0000 | 0.9754 | 0.9998 | 0.9990 | 0.9343 |
| Reverse | 1.0000 | 1.0000 | 0.8325 | 1.0000 | 0.9998 | 0.9721 | 0.9999 | 0.9996 | 0.9311 |
| Model | Position | Copy | Reverse | ||
|---|---|---|---|---|---|
| Trained | Constructed | Trained | Constructed | ||
| GRU | 1 | 100.00 | 100.00 | 58.70 | 57.34 |
| 2 | 100.00 | 100.00 | 85.84 | 76.68 | |
| 3 | 99.88 | 99.96 | 91.52 | 84.70 | |
| 4 | 99.12 | 99.08 | 98.40 | 97.32 | |
| 5 | 94.32 | 86.84 | 100.00 | 99.96 | |
| the carpenter will see the magician. |
| the tutor will help the engineer. |
| the violinist will see the dancer. |
| the umpire will help the librarian. |
| the intern will visit the scientist. |
| professor | student | president | judge | senator | secretary | doctor | lawyer |
| scientist | banker | tourist | artist | author | actor | athlete | teacher |
| engineer | accountant | architect | chef | photographer | farmer | ambassador | astronaut |
| astronomer | blacksmith | baker | barber | biologist | butler | chemist | composer |
| cartoonist | coach | captain | carpenter | dancer | director | drummer | detective |
| explorer | economist | editor | governor | gardener | illustrator | intern | inventor |
| journalist | linguist | manager | magician | mayor | miner | mathematician | musician |
| Type | Model | MSE | |
|---|---|---|---|
| Embedding Model | ModernBERT | 0.9396 | |
| EmbeddingGemma | 0.9155 | ||
| Qwen3-Embedding-8B | 0.9000 | ||
| LLM | Qwen3-8B | 0.7052 | |
| OLMo-2-13B | 0.6440 | ||
| GPT-OSS-20B | 0.7423 |
| Model | Role | Trained | Constructed |
|---|---|---|---|
| ModernBERT | Subject | 99.26 | 89.61 |
| Verb | 100.00 | 98.01 | |
| Object | 96.49 | 91.53 | |
| EmbedGemma | Subject | 99.83 | 100.00 |
| Verb | 100.00 | 99.83 | |
| Object | 99.87 | 99.80 |
| Test | Generalization | ||||
|---|---|---|---|---|---|
| Task | Model | Substitution Acc. | Substitution Acc. | ||
| Copy | RNN | 1.0000 | 0.9863 | 1.0000 | 0.9835 |
| LSTM | 1.0000 | 0.9949 | 0.9634 | 0.9882 | |
| GRU | 0.9994 | 0.9600 | 0.8230 | 0.9005 | |
| Reverse | RNN | 1.0000 | 0.8344 | 1.0000 | 0.8238 |
| LSTM | 0.9994 | 0.9888 | 0.9464 | 0.9758 | |
| Model | Test | Generalization |
|---|---|---|
| ModernBERT | 0.9679 | 0.9589 |
| EmbeddingGemma | 0.9883 | 0.9602 |
| Qwen3-Embedding-8B | 0.9619 | 0.9350 |
LLM Interpretability
Large language model (LLM) interpretability studies how internal representations and computations produce outputs, and how they can be explained or controlled.
See all 778 papers