Reasoning Through Memorization: Nearest Neighbor Knowledge Graph Embeddings

Peng Wang, Xin Xie, Xiaohan Wang, Ningyu Zhang
1/14/2022
cs.CLcs.AIcs.DB

Official code: zjunlp/KNN-KG (55 stars, Python, last commit 2023-07-31).

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.

Show full abstract

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.

View on arXivView PDF

Code Implementations(1)

zjunlp/KNN-KGOfficial100%

[NLPCC 2023] Reasoning Through Memorization: Nearest Neighbor Knowledge Graph Embeddings with Language Models

559Python, ShellDec 18, 20213 years ago
fb15k-237fb15k237inductiveinductive-reasoningkg+11 more

Similar Papers

Cite this paper

@article{wang2022reasoning,
  title  = {Reasoning Through Memorization: Nearest Neighbor Knowledge Graph Embeddings},
  author = {Peng Wang and Xin Xie and Xiaohan Wang and Ningyu Zhang},
  year   = {2022},
  eprint = {2201.05575},
  archivePrefix = {arXiv},
  url    = {https://arxiv.org/abs/2201.05575}
}

Add a badge to your README

Shows whether official code is linked for this paper.

Code of Paper badge
[![Code of Paper](https://codeofpaper.com/badge/2201.05575.svg)](https://codeofpaper.com/paper/2201.05575)

Discussion