PPKE: Knowledge Representation Learning by Path-based Pre-training
TL;DR
PPKE (Path-based Pre-training for Knowledge Embeddings) shifts Knowledge Graph learning from looking at isolated triples to modeling multi-step "relation paths." By using a Transformer-based masked entity prediction task, the model captures rich graph contextual information, setting new state-of-the-art benchmarks for link and relation prediction.
What Problem Does This Paper Address?
Knowledge Graphs (KGs) like Freebase or WordNet are massive networks of facts stored as triples: (Head Entity, Relation, Tail Entity). Most traditional Knowledge Representation Learning (KRL) models treat these triples as independent units.
However, KGs have a complex topological structure. An entity isn't just defined by its direct links, but by the paths surrounding it. For example, knowing that Barack Obama was born in Hawaii and Hawaii is in the USA provides a "graph context" that implies a relationship between Obama and the USA. Traditional models often ignore these multi-step paths, missing out on the deeper structural logic of the graph. The authors argue that just as we understand a word by its context in a sentence, we should understand an entity by its context in the graph.
Methods
The authors propose a two-stage framework: Path-based Pre-training followed by Finetuning.
- Input Representation: To handle paths of different lengths, they unify triples and paths into a single format: $\{h, t, r_1, \dots, r_n\}$. Crucially, they move the entities ($h$ and $t$) to the front of the sequence to avoid "position bias" caused by varying path lengths.
- Architecture: They employ a Transformer encoder. Transformers are naturally suited for this because their self-attention mechanism can weigh the importance of different relations in a path relative to the entities.
- Pre-training Task (Masked Entity Prediction): Borrowing from NLP (like BERT’s Masked Language Modeling), they mask one entity in a path and train the model to predict it. For example, given
[Barack Obama] [MASK] [place of birth] [country], the model must predict[USA]. - Finetuning: The pre-trained model is then fine-tuned on specific downstream tasks:
- Link Prediction: Predicting a missing head or tail entity in a triple.
- Relation Prediction: Predicting the relationship between two known entities.
Datasets
The model was evaluated on three standard benchmark datasets:
- FB15k-237: A subset of Freebase where inverse relations are removed to make the task harder.
- WN18RR: A subset of WordNet (a lexical database of English).
- FB15k: The original Freebase subset, primarily used here for relation prediction tasks.
For pre-training, the authors extracted millions of "quadruples" (2-step relation paths) from these graphs to serve as the contextual training data.
Key Insights and Ideas
- The Distributional Hypothesis for Graphs: The paper successfully extends the linguistic idea that "you shall know a word by the company it keeps" to KGs. An entity's identity is effectively encoded in the paths that pass through it.
- Path Reliability: Not all paths are useful (e.g., Inception → Director → Nolan → Child → Rory doesn't mean Inception has a direct link to Rory). By using a pre-training objective, the model learns to weigh which paths are actually inferential and which are "noise."
- Structural Integration: Unlike previous models that used paths as external features or logic rules, PPKE integrates path information directly into the model's parameters during the pre-training phase.
Key Results
PPKE consistently outperformed previous state-of-the-art (SOTA) models like RotatE and CoKE:
- Link Prediction: On the WN18RR dataset, PPKE achieved an MRR (Mean Reciprocal Rank) of 48.5, a significant jump over CoKE (47.5).
- Relation Prediction: On FB15k, it reached 96.8% Hits@1, outperforming KG-BERT (96.0%).
- Ablation Study: The authors proved that pre-training is the "secret sauce." Without the path-based pre-training phase, the model's performance dropped significantly (e.g., Hits@10 on WN18RR fell from 57.3 to 55.0).
Limitations and Future Work
- Path Depth: The current study focuses primarily on 2-step paths (quadruples). While effective, deeper paths (3-step or more) might provide even richer context, though they would drastically increase computational complexity.
- Computational Resources: Pre-training on tens of millions of paths is expensive. For the largest datasets, the authors had to subsample the available paths due to hardware limits.
- Future Directions: The authors suggest incorporating a "relation prediction" objective directly into the pre-training phase (rather than just masking entities) and exploring a wider variety of graph contextual information beyond simple linear paths.
Summary updated