NeurIPS 2026Coming to NeurIPS?Explore papers, orals & directions

The Structure of Relation Decoding Linear Operators in Large Language Models

Miranda Anna Christ, Adrián Csiszárik, Gergely Becsó, Dániel Varga

Introduction

Recent advancements in interpretability have revealed that Large Language Models (LLMs) often utilize surprisingly simple mechanisms to retrieve factual information. Specifically, research by Hernandez et al. (2023) demonstrated that the mapping from a subject (e.g., "Paris") to an object (e.g., "France") for a given relation (e.g., "capital of") can be approximated by a single linear matrix, termed a Linear Relational Embedding (LRE). While this discovery simplifies our understanding of individual facts, it raises a significant architectural question: if every unique relation requires its own $d \times d$ matrix, the resulting "knowledge map" would be both massive and inefficient.

This study investigates the underlying organization of these linear decoders. By analyzing the collective structure of LREs, we explore whether LLMs represent knowledge as a fragmented list of isolated facts or as a structured network of shared semantic attributes.

Methodology

To probe the structural organization of these operators, we employed three primary techniques:

1. Tensor Network Compression

Rather than treating each relation's decoder matrix as an independent entity, we organized the collection of matrices into an order-3 tensor. We then applied low-rank decompositions via two types of tensor networks: SimpleOrder3Network and TriangleTensorNetwork. These architectures allow the model to represent the entire relational space using a fraction of the original parameters, testing the hypothesis that these operators share significant mutual information.

2. Cross-Evaluation Protocol

To identify semantic similarities between relations, we developed a "swap" test. We applied a linear decoder trained for one specific relation (e.g., city in country) to the subjects of a different relation (e.g., landmark in country). Success in this cross-evaluation implies that the two relations rely on a shared functional "property" within the model's latent space.

3. End-to-End Training

The tensor networks were trained to reconstruct LREs by minimizing the cross-entropy loss of predicted object tokens. During this process, the underlying LLM weights remained frozen, ensuring that the learned structure reflects the model's existing internal representations.

Experimental Setup and Datasets

The study utilized three distinct datasets to evaluate different aspects of relational structure:

  • Hernandez et al. (2023) Dataset: Comprising 47 mostly orthogonal relations (e.g., fruit inside color).
  • Extended Dataset: A new collection of 79 relations designed with intentional semantic overlaps, such as groups sharing properties like gender, geography, or chronology.
  • Mathematical Dataset: A controlled environment of 50 arithmetic relations (e.g., "number plus 6"). This provided a dense relational structure to test the limits of algorithmic generalization.

Key Insights: From Relations to Properties

Our analysis reveals that linear decoders in LLMs are not merely relation-specific; they function as property extractors. For instance, the decoders for country of capital city and country of food are effectively interchangeable. Both operators appear to isolate a "Country-of-X" property from the subject's embedding.

Extreme Redundancy and Block Structure

The relational knowledge within LLMs is highly compressible. We successfully compressed a collection of decoders—which would traditionally require 1.6 billion parameters—down to fewer than 1 million parameters without a significant loss in faithfulness.

Cross-evaluation further revealed a "block structure" in the knowledge map. Relations naturally cluster into groups (e.g., "Gender" or "Antonyms"). Within these blocks, decoders are highly compatible; however, they fail entirely when applied to relations outside their respective blocks.

Generalization via Latent Structure

In the Mathematical Dataset, the tensor network demonstrated near-perfect generalization to unseen relations. For example, after being trained on "plus 6" and "plus 8," the network could accurately decode "plus 7." This suggests that when the relational space is sufficiently dense, these networks can capture the latent logic of a domain and "fill in the gaps" of the model's knowledge.

Results and Performance

  • Compression Efficiency: Tensor networks significantly outperformed standard low-rank baselines. With fewer than 1 million parameters, they achieved higher prediction accuracy (faithfulness) than individual low-rank matrices totaling 788 million parameters.
  • Cross-Compatibility: In the Extended Dataset, we observed instances where a decoder for one relation (e.g., occupation gender) actually outperformed the native decoder for a semantically similar relation (characteristic gender). This confirms that the model prioritizes general properties over specific linguistic links.
  • Mathematical Faithfulness: The model achieved a mean faithfulness of 0.96 on held-out arithmetic relations, proving the ability of tensor networks to encode systematic relational logic.

Limitations and Future Work

While the results are promising, generalization in the Extended Dataset was limited to semantically proximal relations. Furthermore, this study focused on models in the 6B to 20B parameter range (e.g., GPT-J, Llama 3.1 8B, NeoX-20B). Future research should investigate whether these property-centric structures persist in larger-scale models or Mixture-of-Experts (MoE) architectures.

The discovery of this structured, property-based organization offers new avenues for model editing and the development of highly compressed, interpretable LLMs for deployment in resource-constrained environments.

Summary updated

BibTeX
@inproceedings{christ2025structure,
  author = {Miranda Anna Christ and Adrián Csiszárik and Gergely Becsó and Dániel Varga},
  title = {{The Structure of Relation Decoding Linear Operators in Large Language Models}},
  booktitle = {Advances in Neural Information Processing Systems},
  year = {2025},
  url = {https://openreview.net/forum?id=XsBzmJzJ2l},
}
Figure