Modeling Relation Paths for Representation Learning of Knowledge Bases

Yankai Lin, Zhiyuan Liu, Huan-Bo Luan, Maosong Sun, Siwei Rao, Song Liu

Abstract: Knowledge base (KB) completion is a critical task for AI applications. While translation-based models like TransE have shown promise by embedding entities and relations into vector spaces, they often fail to capture complex inference patterns across multi-hop relation paths. This paper introduces PTransE (Path-based TransE), a framework that incorporates multi-step relation paths as additional training signals. By employing a Path-Constraint Resource Allocation (PCRA) algorithm for path reliability and exploring various semantic composition methods, PTransE significantly improves the quality of KB embeddings.

Introduction

Knowledge Bases (KBs) such as Freebase and Wikidata serve as foundational components for modern AI, powering search engines and voice assistants. However, these KBs are notoriously incomplete. Representation learning addresses this by embedding entities (e.g., "Steve Jobs") and relations (e.g., "FounderOf") into a low-dimensional vector space.

The established baseline, TransE, treats a relation as a simple translation: $\text{vector(head)} + \text{vector(relation)} \approx \text{vector(tail)}$. While effective, TransE only considers direct, one-hop relations. It misses the rich inference patterns hidden in multi-hop paths—for instance, inferring nationality from a sequence of "BornIn" and "CityInCountry" relations.

Methodology: PTransE

The authors propose PTransE, which generalizes the translation principle to multi-step paths. The model optimizes a loss function that encourages entity embeddings to satisfy both direct triples ($h + r \approx t$) and path-based triples ($h + \text{path} \approx t$).

Comparison of TransE and PTransE objectives across KB structure, triples, and optimization goals.

Path Reliability and Representation

To make path-based learning effective, PTransE addresses two primary challenges:

  1. Path Reliability: Not all paths are semantically meaningful. The authors developed the Path-Constraint Resource Allocation (PCRA) algorithm, which treats the KB as a flow network. It measures the "resource" flow from a head to a tail entity through a specific path; only high-flow, reliable paths are utilized for training.
  2. Path Representation: The model must compose a sequence of relations into a single vector. Three methods were evaluated: Addition (ADD), Multiplication (MUL), and Recurrent Neural Networks (RNN). Interestingly, the simple ADD method performed best, likely because its linear nature aligns with the translation logic of TransE.

Experimental Evaluation

The researchers evaluated PTransE on standard benchmarks: FB15K (14,951 entities, 1,345 relations) for KB completion and FB40K for relation extraction from text.

Key Results

PTransE demonstrated significant improvements over previous state-of-the-art models. In entity prediction on the FB15K "Filter" metric, PTransE achieved a Hits@10 of 84.6%, a substantial leap from the original TransE (47.1%) and TransR (68.7%).

Quantitative comparison of PTransE against baseline models on Mean Rank and Hits@10 metrics.

Beyond KB completion, PTransE also improved relation extraction from text. When combined with text-based models, the enhanced embeddings led to higher precision across various recall levels, proving that better internal KB logic translates to better natural language understanding.

Conclusion

PTransE represents a major advancement in KB representation learning by successfully incorporating multi-hop reasoning into the embedding process. While modeling paths increases computational complexity, the gains in predictive accuracy are substantial. Future work may involve extending this path-based approach to other embedding architectures like TransH or TransR and incorporating more complex logical rules.

Summary updated

BibTeX
@inproceedings{lin2015modeling,
  author = {Yankai Lin and Zhiyuan Liu and Huan-Bo Luan and Maosong Sun and Siwei Rao and Song Liu},
  title = {{Modeling Relation Paths for Representation Learning of Knowledge Bases}},
  booktitle = {Conference on Empirical Methods in Natural Language Processing},
  year = {2015},
  doi = {10.18653/v1/d15-1082},
}
Figure