Context-aware Path Ranking for Knowledge Base Completion

Sahisnu Mazumder, Bing Liu

Knowledge Bases (KBs) such as Freebase and ConceptNet are vital for many AI applications, yet they are notoriously incomplete. Predicting missing facts, or KB completion, often relies on Path Ranking (PR) algorithms. While effective, traditional PR methods face significant challenges regarding scalability and "feature explosion" as graphs grow denser. This paper, presented at IJCAI-17, introduces Context-aware Path Ranking (C-PR), a method that uses semantic word embeddings to guide graph searches and prune irrelevant paths.

The Scalability Challenge in Path Ranking

Traditional PR algorithms look for paths between two entities to use as features for a classifier. However, exhaustive searches like Breadth-First Search (BFS) quickly exceed memory limits on large graphs. Furthermore, exploring every possible path generates millions of features, many of which are irrelevant noise. This "feature explosion" makes model training computationally expensive and reduces the interpretability of the results.

The C-PR Approach: Semantic Intuition

The core innovation of C-PR is Context-aware Path Finding. Instead of an exhaustive search, C-PR uses pre-trained word2vec embeddings to provide "semantic intuition" during graph traversal.

When searching for a path between a source ($h$) and a target ($t$), the algorithm employs a bidirectional random walk. At each step, it calculates the cosine similarity between potential neighboring nodes and the $(h, t)$ pair. A node is only explored if it is semantically relevant to the context of the query; generic or off-topic nodes are pruned. Unlike previous methods, C-PR uses dynamic thresholding based on the specific similarity between the source and target entities, ensuring the search stays "on topic."

Experimental Evaluation

The authors evaluated C-PR against several state-of-the-art baselines, including BB-PR (Bidirectional Random Walk) and SFE-PR (Sub-graph Feature Extraction), across three major datasets: Freebase (FB15k), WordNet, and ConceptNet 5.

Superior Accuracy and Efficiency

C-PR consistently outperformed baselines in Mean Average Precision (MAP) and F1 scores, particularly on the denser Freebase and ConceptNet datasets.

Performance comparison of C-PR against various baseline models across Freebase, WordNet, and ConceptNet.

Beyond accuracy, the efficiency gains were substantial. By pruning irrelevant paths, C-PR significantly reduced the feature set and memory footprint. For instance, on Freebase, C-PR generated an average of 834 features per relation, compared to over 4,000 for the bidirectional baseline.

Efficiency metrics including RAM consumption, training time, and average features per relation for C-PR and baselines.

As shown in the efficiency results, C-PR required only 7.2 GB of RAM for Freebase, whereas the exhaustive SFE-PR baseline required over 100 GB, making it impractical for large-scale applications.

Conclusion

Context-aware Path Ranking (C-PR) addresses the fundamental limitations of traditional PR algorithms by integrating semantic context into the graph search process. By effectively pruning the search space, C-PR achieves higher accuracy with a fraction of the computational resources. Furthermore, the resulting features are more discriminative and interpretable, providing a robust solution for large-scale Knowledge Base completion.

Summary updated

BibTeX
@inproceedings{mazumder2017context,
  author = {Sahisnu Mazumder and Bing Liu},
  title = {{Context-aware Path Ranking for Knowledge Base Completion}},
  booktitle = {International Joint Conference on Artificial Intelligence},
  year = {2017},
  doi = {10.24963/ijcai.2017/166},
}
Figure