HyperAIHyperAI

Command Palette

Search for a command to run...

3 months ago

Reasoning Through Memorization: Nearest Neighbor Knowledge Graph Embeddings

Peng Wang Xin Xie Xiaohan Wang Ningyu Zhang

Reasoning Through Memorization: Nearest Neighbor Knowledge Graph Embeddings

Abstract

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.

Code Repositories

zjunlp/knn-kg
Official
pytorch
Mentioned in GitHub

Benchmarks

BenchmarkMethodologyMetrics
link-prediction-on-fb15k-237kNN-KGE
Hits@1: 0.280
Hits@10: 0.550
Hits@3: 0.404
MR: 185
MRR: 0.370
link-prediction-on-fb15k-237-indkNN-KGE
Hits@1: 0.223
Hits@10: 0.431
Hits@3: 0.32
MRR: 0.294

Build AI with AI

From idea to launch — accelerate your AI development with free AI co-coding, out-of-the-box environment and best price of GPUs.

AI Co-coding
Ready-to-use GPUs
Best Pricing
Get Started

Hyper Newsletters

Subscribe to our latest updates
We will deliver the latest updates of the week to your inbox at nine o'clock every Monday morning
Powered by MailChimp
Reasoning Through Memorization: Nearest Neighbor Knowledge Graph Embeddings | Papers | HyperAI