Translating Embeddings for Modeling Multi-relational Data

Antoine Bordes, Nicolas Usunier, Alberto García-Durán, Jason Weston, Oksana YakhnenkoNeurIPS 2013

Overview

TransE is a seminal paper that introduced a surprisingly simple and effective way to model knowledge graphs: treating relationships as translations in a vector space. By enforcing the rule that a head entity plus a relationship vector should roughly equal the tail entity ($\mathbf{h} + \mathbf{r} \approx \mathbf{t}$), the authors created a model that is both highly scalable and more accurate than the complex tensor-based methods that preceded it.

Knowledge Bases (KBs) like Freebase or WordNet contain vast amounts of structured information in the form of triplets: (head entity, relation, tail entity)—for example, (Paris, capital_of, France). However, these KBs are notoriously incomplete.

The core challenge is "link prediction": how can we automatically predict missing facts? Previous attempts used complex latent attribute models or heavy tensor factorizations. While expressive, these models often suffered from two major issues:

  1. Overfitting: They had too many parameters relative to the available data.
  2. Scalability: They were computationally expensive and struggled to scale to KBs with millions of entities.

The TransE Method

The authors propose TransE, an energy-based model that represents both entities and relationships as vectors in the same low-dimensional $k$-dimensional space.

  • The Translation Intuition: The core idea is that a relationship is a translation from the head to the tail. If a triplet $(h, \ell, t)$ is true, then the embedding of the tail $\mathbf{t}$ should be close to the embedding of the head $\mathbf{h}$ plus the vector of the relationship $\boldsymbol{\ell}$.
  • Loss Function: The model uses a margin-based ranking loss. During training, the algorithm is shown "positive" triplets (real facts) and "corrupted" triplets (where the head or tail is replaced by a random entity). The goal is to ensure the "energy" (distance) of the positive triplet is lower than that of the corrupted triplet by at least a specific margin $\gamma$.
  • Constraints: To prevent the model from minimizing the loss by simply making the entity embeddings infinitely large, the authors enforce a constraint that the $L_2$-norm of each entity embedding must be 1.

Key Insights

  • Simplicity as a Regularizer: By restricting the relationship to a single vector (rather than a matrix or a tensor), TransE has far fewer parameters than its predecessors. This simplicity acts as a form of regularization, preventing overfitting and making the model easier to train.
  • Natural Hierarchy Modeling: Translations are a natural way to represent hierarchical data. In a tree structure, moving from a parent to a child is a consistent directional step, which a translation vector captures perfectly.
  • The 1-to-1 vs. Many-to-Many Dilemma: TransE is mathematically optimized for 1-to-1 relationships. If a relationship is "Many-to-One" (e.g., many cities are in the same country), the model struggles because it tries to force all those different city vectors to be the same after the translation.

Datasets and Key Results

The model was evaluated on three primary datasets: WordNet (WN), FB15k (a subset of Freebase), and FB1M (a massive scale-up from Freebase with 1 million entities and 17 million training samples).

Link prediction results on WN, FB15k, and FB1M datasets
  • State-of-the-Art Performance: TransE significantly outperformed existing models like SE (Structured Embeddings) and SME (Semantic Matching Energy) on link prediction tasks. On WordNet, it achieved a Hits@10 of 89.2% (meaning the correct answer was in the top 10 results nearly 90% of the time).
  • Superior Scalability: While previous models struggled with large datasets, TransE was successfully trained on the massive FB1M dataset, achieving a Hits@10 of 34%—a feat that was computationally prohibitive for more complex models at the time.
Parameter complexity comparison across models
  • Efficiency: TransE requires significantly less memory. For FB15k, TransE uses only 0.81 million parameters, compared to 87.8 million for the RESCAL model, highlighting its extreme parameter efficiency.

Limitations and Future Work

  • Complex Relations: As noted by the authors, TransE has theoretical flaws when dealing with 1-to-Many, Many-to-One, or Many-to-Many relations. If $(h, r, t_1)$ and $(h, r, t_2)$ are both true, TransE's logic implies $t_1 \approx t_2$, which is often false.
  • Ternary Dependencies: The model focuses on 2-way interactions. It may fail on datasets where the relationship depends heavily on a specific combination of head and tail that isn't purely additive.
  • Future Directions: The authors suggested combining KB embeddings with word embeddings from raw text to provide even better context for entity representation, a concept that helped spark a massive wave of research in joint Knowledge Graph Embedding (KGE) and NLP models.

Summary updated

BibTeX
@inproceedings{bordes2013translating,
  author = {Antoine Bordes and Nicolas Usunier and Alberto García-Durán and Jason Weston and Oksana Yakhnenko},
  title = {{Translating Embeddings for Modeling Multi-relational Data}},
  booktitle = {Advances in Neural Information Processing Systems},
  year = {2013},
  url = {https://openreview.net/forum?id=ryWiuD-ubr},
}
Figure