Reasoning Through Memorization: Nearest Neighbor Knowledge Graph Embeddings

14 Jan 2022  ยท  Peng Wang, Xin Xie, Xiaohan Wang, Ningyu Zhang ยท

Previous knowledge graph embedding approaches usually map entities to representations and utilize score functions to predict the target entities, yet they typically struggle to reason rare or emerging unseen entities. In this paper, we propose kNN-KGE, a new knowledge graph embedding approach with pre-trained language models, by linearly interpolating its entity distribution with k-nearest neighbors. We compute the nearest neighbors based on the distance in the entity embedding space from the knowledge store. Our approach can allow rare or emerging entities to be memorized explicitly rather than implicitly in model parameters. Experimental results demonstrate that our approach can improve inductive and transductive link prediction results and yield better performance for low-resource settings with only a few triples, which might be easier to reason via explicit memory. Code is available at https://github.com/zjunlp/KNN-KG.

PDF Abstract

Results from the Paper


Task Dataset Model Metric Name Metric Value Global Rank Uses Extra
Training Data
Result Benchmark
Link Prediction FB15k-237 kNN-KGE MRR 0.370 # 10
Hits@10 0.550 # 11
Hits@3 0.404 # 8
Hits@1 0.280 # 8
MR 185 # 19
Link Prediction FB15k-237-ind kNN-KGE Hits@3 0.32 # 1
Hits@1 0.223 # 1
Hits@10 0.431 # 1
MRR 0.294 # 1

Methods


No methods listed for this paper. Add relevant methods here