Analysing the Linearity of Linguistic Relations in Language Model Embedding Spaces
Organizations: ADAPT Research Centre Trinity College Dublin, Ireland · Indian Institute of Technology Bombay Mumbai, India
Abstract
We propose a framework to analyse how strongly different linguistic relations are linearly encoded in language model embedding spaces. We formalise linear encoding via a constrained linear approximation over related and unrelated word pairs and apply this to an extended BATS dataset covering inflectional, derivational, lexicographic, and encyclopedic relations in GloVe, RoBERTa, and ModernBERT. Our experiments show near-perfect linear encodings for inflectional and derivational relations, but substantially higher errors for lexicographic and encyclopedic relations, especially for one-to-many and many-to-many associations. We also find that RoBERTa and ModernBERT generally encode relations more linearly than GloVe. These results indicate that our framework can reveal which relational structures are most linearly accessible in embeddings, offering a compact tool for probing and comparing relational geometry across models.
Figures & tables
| Relations | # Related pairs | # Unrelated pairs | Avg error of approximation | ||||||
|---|---|---|---|---|---|---|---|---|---|
| Min | Max | Avg | Min | Max | Avg | GloVe | RoBERTa | ModernBERT | |
| Inflectional | 100 | 131 | 108.6 | 9900 | 17030 | 11765.2 | 0 | 0 | 0 |
| Derivational | 101 | 202 | 124.7 | 9999 | 20200 | 13909.8 | 0 | 0 | 0 |
| Encyclopedic | 104 | 284 | 177.2 | 2751 | 11539 | 7544.9 | 0.4704 | 0.4685 | 0.4549 |
| Lexicographic | 209 | 1988 | 965.1 | 12814 | 197900 | 63923.3 | 0.9201 | 0.8139 | 0.8360 |
Representation Geometry in Language Models
Representation geometry in language models studies how embeddings and hidden states organize concepts, computation, and behavior.
See all 417 papers