TransE: Translation as a Decoder
Summary
The TransE model, a foundational knowledge graph embedding technique, represents relations as simple vector displacements (h + r ≈ t) in a d-dimensional space. Entities and relations are learned as vectors, with a score function s(h,r,t) = γ − ‖h+r−t‖. While elegant, TransE exhibits critical geometric rigidities. It struggles with many-to-many relations, forcing co-answers and co-parents to collapse onto the same point, as demonstrated with a family graph where Carol and Dave merge. Symmetric relations like "spouse" or "siblingOf" are forced to have near-zero displacement vectors (e.g., ‖r‖ ≈ 0.14 for "spouse"), effectively vanishing. This leads to a characteristic performance fingerprint: a steep climb from Hits@1 (e.g., 0.01 on WN18RR) to Hits@3 (e.g., 0.39 on WN18RR), indicating it finds neighborhoods but fails to distinguish individual entities within collapsed clusters.
Key takeaway
For machine learning engineers evaluating knowledge graph embedding models, understand that TransE's simplicity as a pure translation model introduces fundamental geometric limitations. If your graph contains many-to-many or symmetric relations, expect entity collapse and vanishing displacements, leading to poor Hits@1 performance despite reasonable Hits@3. You should consider models that incorporate richer operators, such as bilinear or rotational components, to accurately represent complex relational patterns and avoid these inherent rigidities.
Key insights
TransE models relations as simple vector translations, but this geometric rigidity causes entity collapse for many-to-many and symmetric relations.
Principles
- A translation Fᵣ(𝐱) = 𝐱 + 𝐫 is single-valued and injective.
- Many-to-many relations force entity collapse in TransE.
- Symmetric relations force TransE's displacement vector to vanish (𝐫 = 𝟎).
Method
TransE trains by manufacturing negative triples from true (h,r,t) facts, corrupting heads or tails. It uses a logistic loss to push true scores up and corrupted scores down, with entity vectors renormalized to the unit sphere before each use.
In practice
- Diagnose TransE rigidity by observing a steep Hits@1 to Hits@3 climb.
- Plot 2D embeddings to visualize entity collapse for many-to-many relations.
- Check relation vector norms; symmetric relations will have near-zero norms.
Topics
- Knowledge Graph Embeddings
- TransE Model
- Geometric Operators
- Entity Collapse
- Relation Cardinality
- Symmetric Relations
Code references
Best for: AI Scientist, Machine Learning Engineer, AI Student
Related on AIssential
Editorial summary, takeaway, and curation by AIssential. Original article published by Agus’s Substack.