Composing Relationships with Translations

Alberto García-Durán, Antoine Bordes, Nicolas Usunier

Abstract

Knowledge Base (KB) completion is a critical task for addressing the inherent incompleteness of large-scale graphs like Freebase. While translation-based models like TransE have shown promise, they often treat triples in isolation, failing to capture the rich compositional structure of the graph. This paper introduces RTransE, an extension that explicitly models paths between entities as sequences of translations. By training the model to recognize that a sequence of relationships should equal the sum of their individual translation vectors, RTransE significantly improves link prediction accuracy and multi-hop reasoning capabilities.

Introduction

Knowledge Bases such as Freebase and WordNet serve as vital resources for many AI applications but are notoriously incomplete. Embedding models represent entities and relations as low-dimensional vectors to predict missing links. The baseline model, TransE, represents a fact $(head, relation, tail)$ as a translation: $h + r \approx t$. However, TransE ignores the graph's structural context. For instance, if Albert is born in Paris and Paris is in France, the model should ideally infer that Albert’s nationality is French. RTransE addresses this "compositional reasoning" gap by treating relationship paths as meaningful sequences.

Methods

RTransE (Recurrent TransE) treats a path of relationships as a recurrent sequence of additions, focusing on the following key components:

  1. Compositional Training: For a path of length $p$, the model enforces $h + r_1 + r_2 + ...
  2. r_p \approx t$. The study specifically focuses on paths of length 2 (quadruples).
  3. Path Filtering: To avoid noise, the authors filter for "unambiguous" paths (e.g., 1-to-1 or 1-to-many relations). This prevents paths through highly connected, non-specific nodes (like a generic "Country" node) from degrading the model.
  4. Distance-Based Regularization: Unlike standard TransE which uses a ranking loss, RTransE adds a regularization term to minimize the absolute distance $||h + r - t||$. This prevents "cascading errors" where small inaccuracies accumulate over multiple hops.
  5. Reliability Weighting: A weighting factor ($\alpha$) prioritizes paths that frequently correspond to direct relationships in the training data, such as the path born_in + city_in_country being a reliable proxy for nationality.

Key Insights and Ideas

A core finding is that addition is sufficient for modeling composition in translation-based embeddings. While previous work used complex Recurrent Neural Networks (RNNs), RTransE demonstrates that simple vector addition is a natural, parameter-free way to model composition that scales efficiently.

Qualitative examples of multi-hop queries using RTransE vs TransE.

The model also distinguishes between "easy" and "hard" test triples. "Easy" triples are those where entities are already connected by another relation in the training set, providing compositional evidence. RTransE excels in these scenarios by explicitly leveraging that evidence.

Key Results

The model was evaluated on FB15k (a subset of Freebase) and FAMILY (a synthetic dataset with clear logical rules).

Performance comparison between TransE and RTransE on FB15k.

On FB15k, RTransE improved the Hits@10 metric from 71.5% to 76.2%. On triples where a path existed in the training data, RTransE outperformed TransE by over 4%. Furthermore, in multi-hop "quadruple" queries (e.g., Who is the [nationality] of the [actor] in [TV Show]?), RTransE achieved a Mean Rank of 114, significantly better than TransE’s 160, demonstrating superior path-following capabilities.

Conclusion

RTransE provides a simple yet powerful extension to TransE by incorporating compositional reasoning through additive paths. By addressing cascading errors and filtering for reliable paths, the model achieves state-of-the-art performance on link prediction and multi-hop queries. Future work may explore extending this approach to longer paths and automating the discovery of reasoning-worthy paths.

Summary updated

BibTeX
@inproceedings{garciaduran2015composing,
  author = {Alberto García-Durán and Antoine Bordes and Nicolas Usunier},
  title = {{Composing Relationships with Translations}},
  booktitle = {Conference on Empirical Methods in Natural Language Processing},
  year = {2015},
  doi = {10.18653/v1/d15-1034},
}
Figure