TasksSotADatasetsPapersMethodsSubmitAbout
Papers With Code 2

A community resource for machine learning research: papers, code, benchmarks, and state-of-the-art results.

Explore

Notable BenchmarksAll SotADatasetsPapersMethods

Community

Submit ResultsAbout

Data sourced from the PWC Archive (CC-BY-SA 4.0). Built by the community, for the community.

Papers/Reasoning Through Memorization: Nearest Neighbor Knowledge...

Reasoning Through Memorization: Nearest Neighbor Knowledge Graph Embeddings

Peng Wang, Xin Xie, Xiaohan Wang, Ningyu Zhang

2022-01-14Knowledge Graph EmbeddingKnowledge Graph EmbeddingsGraph EmbeddingMemorizationLink Prediction
PaperPDFCode(official)

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.

Results

TaskDatasetMetricValueModel
Link PredictionFB15k-237-indHits@10.223kNN-KGE
Link PredictionFB15k-237-indHits@100.431kNN-KGE
Link PredictionFB15k-237-indHits@30.32kNN-KGE
Link PredictionFB15k-237-indMRR0.294kNN-KGE
Link PredictionFB15k-237Hits@10.28kNN-KGE
Link PredictionFB15k-237Hits@100.55kNN-KGE
Link PredictionFB15k-237Hits@30.404kNN-KGE
Link PredictionFB15k-237MR185kNN-KGE
Link PredictionFB15k-237MRR0.37kNN-KGE

Related Papers

SMART: Relation-Aware Learning of Geometric Representations for Knowledge Graphs2025-07-17What Should LLMs Forget? Quantifying Personal Data in LLMs for Right-to-Be-Forgotten Requests2025-07-15Reasoning or Memorization? Unreliable Results of Reinforcement Learning Due to Data Contamination2025-07-14Entropy-Memorization Law: Evaluating Memorization Difficulty of Data in LLMs2025-07-08Topic Modeling and Link-Prediction for Material Property Discovery2025-07-08Graph Collaborative Attention Network for Link Prediction in Knowledge Graphs2025-07-05Understanding Generalization in Node and Link Prediction2025-07-01MMReason: An Open-Ended Multi-Modal Multi-Step Reasoning Benchmark for MLLMs Toward AGI2025-06-30