CLAug 17, 2023

Linearity of Relation Decoding in Transformer Language Models

MicrosoftMIT
arXiv:2308.09124v2179 citationsh-index: 68
AI Analysis

This work provides insights into the interpretability of knowledge representation in language models, though it is incremental in revealing specific strategies.

The study found that transformer language models encode some relational knowledge through a single linear transformation on subject representations, but this linear encoding is not universally applied across all types of relations.

Much of the knowledge encoded in transformer language models (LMs) may be expressed in terms of relations: relations between words and their synonyms, entities and their attributes, etc. We show that, for a subset of relations, this computation is well-approximated by a single linear transformation on the subject representation. Linear relation representations may be obtained by constructing a first-order approximation to the LM from a single prompt, and they exist for a variety of factual, commonsense, and linguistic relations. However, we also identify many cases in which LM predictions capture relational knowledge accurately, but this knowledge is not linearly encoded in their representations. Our results thus reveal a simple, interpretable, but heterogeneously deployed knowledge representation strategy in transformer LMs.

Code Implementations1 repo
Foundations

The foundational work for this paper's niche, ranked by how specifically the neighbourhood builds on it — not by global fame.

Your Notes