Research map / Architectures and efficiency / Attention and transformers
The Structure of Relation Decoding Linear Operators in Large Language Models
Read the paperCheck your idea against 108,967 papers
AI-extracted summary. Written by AI from the paper's full text. Numbers and claims can be wrong or missing context, so check the paper before you cite or build on it.
Shows that collections of linear relation decoders in GPT-J and other LLMs can be compressed by order-3 tensor networks and that they organize into shared coarse-grained property extractors rather than relation-specific maps.
Problem
Linear relational embedding (LRE) decoders for individual relations are known to work, but their collective structure, redundancy, and generalization to new relations in transformer LLMs are not understood.
Approach
Stack many relation decoder matrices as an order-3 tensor and compress them with small tensor networks trained end-to-end on the LM task loss; introduce a cross-evaluation protocol (applying each relation's decoder to other relations' subjects) as an empirical semantic similarity measure, revealing property-based rather than relation-specific organization.
Key results
- Order-3 tensor networks with under 1M parameters outperform individually stored low-rank baselines, compared with about 788M parameters for stacking 47 matrices (mean faithfulness 0.41 for the Jacobian reference).
- On the extended dataset, tensor-network LREs have mean test faithfulness 0.42 vs. 0.30 for majority-guess, beating majority in 49 of 79 relations.
- On the arithmetic mathematical dataset, held-out relation generalization reaches mean faithfulness 0.96 (std 0.031), with max 0.991.
Measured effects reported in the paper
| What was changed | Where | Measured | Effect |
|---|---|---|---|
| Use an order-3 tensor network to represent the relation decoders collectively | GPT-J relation decoders · Dataset of [cite], compression experiment | mean faithfulness | Helped |
| Omit the additional relation embedder (ablation) | Order-3 tensor network · Dataset of [cite], compression experiment | mean faithfulness | Helped |
| Add an additional relation embedder (ablation) | Tensor network · Extended dataset, relation-wise generalization | faithfulness | No clear effect |
| Replace semantic relation embeddings with randomized relation representations (ablation) | Tensor network · Mathematical dataset, held-out subject-object pairs | faithfulness | Hurt |
| Replace semantic relation embeddings with randomized relation representations (ablation) | Tensor network · Mathematical dataset, training examples | faithfulness | No clear effect |
| Replace subject and object embeddings with fixed random vectors (ablation) | Tensor network · Mathematical dataset, training and held-out pairs | faithfulness | Hurt |
| Train on mathematical relations with a tensor network | GPT-J relation decoders · Mathematical dataset, test set | faithfulness | Helped |
| Use tensor-network relation decoders for sample-wise generalization | GPT-J relation decoders · Extended dataset, sample-wise test | mean faithfulness: 0.30 -> 0.42 | Helped |
| Generalize to held-out relations using the tensor network | GPT-J relation decoders · Extended dataset, relation-wise test | faithfulness | Mixed |
| Use tensor-network decoders across semantically related relations | GPT-J relation decoders · Extended dataset, cross-evaluation | faithfulness | Helped |
Surprising findings
- Off-diagonal cross-evaluation faithfulness often exceeds 0.7, indicating that different relation decoders work on other relations' subjects.
- Relation-wise generalization on the extended dataset is limited to relations semantically close to training relations, and adding relation embedders did not help.
Limitations
- Experiments are limited to small models (6B, 8B, 20B) and do not cover larger, instruction-tuned, or MoE models.
- The relation datasets are a small and biased subset of possible relations.
- Generalization to held-out relations on general language data is low; only arithmetic relations generalize well.
Experimental setup
Datasets: Dataset of Hernandez et al. 2023 (47 relations) Extended dataset (79 relations) Mathematical dataset (50 arithmetic relations)
Benchmarks: Dataset of Hernandez et al. 2023 (47 relations) Extended dataset (79 relations) Mathematical dataset
Metrics: faithfulness (top-1 object token accuracy) parameter count
Baselines: Individually trained low-rank LRE matrices Jacobian-based LRE decoder (Hernandez et al. 2023) Majority-guess baseline
Builds on: Linear Relational Embedding (Hernandez et al. 2023) Jacobian-based LRE approximation
Closest papers by meaning
- Linearity of Relation Decoding in Transformer Language Models (ICLR 2024 · similarity 0.93)
- Linear Decoding of Morphology Relations in Language Models (Student Abstract) (AAAI 2025 · similarity 0.88)
- Geometric Factual Recall in Transformers (NeurIPS 2026 · similarity 0.87)
- Transformers need glasses! Information over-squashing in language tasks (NeurIPS 2024 · similarity 0.87)
- Emergence of Linear Truth Encodings in Language Models (NeurIPS 2025 · similarity 0.87)
- Relation Also Knows: Rethinking the Recall and Editing of Factual Associations in Auto-Regressive Transformer Language Models (AAAI 2025 · similarity 0.86)
Writing a paper in this area? scime draft is a free LaTeX editor with AI included, real-time co-authors and a check of your references and venue rules before you submit. It also imports OpenAI Prism projects.
