Reasoning Through Memorization: Nearest Neighbor Knowledge Graph Embeddings
On the map: LLM reasoning → Knowledge- and tool-augmented reasoning
Abstract (arXiv)
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.
Key facts. Cited by 12 papers in the map (data through 7 Oct 2026). Placed in Knowledge- and tool-augmented reasoning, one of 17 directions in LLM reasoning. Builds on 34 of its 52 references that are in the map. First posted on arXiv 14 Jan 2022.
Builds on
34 of 52 references.
References · 34
- 2018BERT: Pre-training of Deep Bidirectional Transformers for Language Understandingcited by 40,204
- 2019RoBERTa: A Robustly Optimized BERT Pretraining Approachcited by 13,266
- 2017Billion-scale similarity search with GPUscited by 2,477
- 2017Modeling Relational Data with Graph Convolutional Networkscited by 1,684
- 2021Improving language models by retrieving from trillions of tokenscited by 1,278
- 2015Aligning Books and Movies: Towards Story-like Visual Explanations by Watching Movies and Reading Bookscited by 1,041
- 2014Embedding Entities and Relations for Learning and Inference in Knowledge Basescited by 929
- 2016Complex Embeddings for Simple Link Predictioncited by 897
- 2019RotatE: Knowledge Graph Embedding by Relational Rotation in Complex Spacecited by 893
- 2019SpanBERT: Improving Pre-training by Representing and Predicting Spanscited by 832
- 2019Generalization through Memorization: Nearest Neighbor Language Modelscited by 788
- 2017Convolutional 2D Knowledge Graph Embeddingscited by 729
22 more
- 2020LUKE: Deep Contextualized Entity Representations with Entity-aware Self-attentioncited by 326
- 2019KG-BERT: BERT for Knowledge Graph Completioncited by 323
- 2019TuckER: Tensor Factorization for Knowledge Graph Completioncited by 290
- 2020Low-Dimensional Hyperbolic Knowledge Graph Embeddingscited by 195
- 2021KnowPrompt: Knowledge-aware Prompt-tuning with Synergistic Optimization for Relation Extractioncited by 180
- 2019Quaternion Knowledge Graph Embeddingscited by 175
- 2019Learning Attention-based Embeddings for Relation Prediction in Knowledge Graphscited by 125
- 2021Efficient Nearest Neighbor Language Modelscited by 93
- 2021Document-level Relation Extraction as Semantic Segmentationcited by 80
- 2021ConE: Cone Embeddings for Multi-Hop Reasoning over Knowledge Graphscited by 78
- 2020JAKET: Joint Pre-training of Knowledge Graph and Language Understandingcited by 73
- 2017Open-World Knowledge Graph Completioncited by 64
- 2019Long-tail Relation Extraction via Knowledge Graph Embeddings and Graph Convolution Networkscited by 61
- 2020Inductive Entity Representations from Text via Link Predictioncited by 61
- 2021MELM: Data Augmentation with Masked Entity Language Modeling for Low-Resource NERcited by 42
- 2020BERT-kNN: Adding a kNN Search Component to Pretrained Language Models for Better QAcited by 36
- 2021AliCG: Fine-grained and Evolvable Conceptual Graph Construction for Semantic Search at Alibabacited by 33
- 2021Meta-Knowledge Transfer for Inductive Knowledge Graph Embeddingcited by 31
- 2021GNN-LM: Language Modeling based on Global Contexts via GNNcited by 27
- 2019Relation Adversarial Network for Low Resource Knowledge Graph Completioncited by 24
- 2021Unsupervised Knowledge Graph Alignment by Probabilistic Reasoning and Semantic Embeddingcited by 18
- 2021KNN-BERT: Fine-Tuning Pre-Trained Models with KNN Classifiercited by 7
Built on by
Citing papers per year: 2022: 7; 2023: 3; 2024: 1; 2025: 1.
12 papers.
- 2023Unifying Large Language Models and Knowledge Graphs: A Roadmapcited by 663
- 2022OntoProtein: Protein Pretraining With Gene Ontology Embeddingcited by 70
- 2022From Discrimination to Generation: Knowledge Graph Completion with Generative Transformercited by 45
- 2022Ontology-enhanced Prompt-tuning for Few-shot Learningcited by 24
- 2022I Know What You Do Not Know: Knowledge Graph Embedding via Co-distillation Learningcited by 15
- 2023Logical Entity Representation in Knowledge-Graphs for Differentiable Rule Learningcited by 8
- 2022Contrastive Demonstration Tuning for Pre-trained Language Modelscited by 7
- 2022Schema-aware Reference as Prompt Improves Data-Efficient Knowledge Graph Constructioncited by 6
- 2024Large Language Model Enhanced Knowledge Representation Learning: A Surveycited by 6
- 2022LambdaKG: A Library for Pre-trained Language Model-Based Knowledge Graph Embeddingscited by 5
- 2025KG-BiLM: Knowledge Graph Embedding via Bidirectional Language Modelscited by 1
- 2023Revisiting k-NN for Fine-tuning Pre-trained Language Modelscited by 0
- 2025KG-BiLM: Knowledge Graph Embedding via Bidirectional Language Models4 Jun 2025
- 2024Large Language Model Enhanced Knowledge Representation Learning: A Survey1 Jul 2024
- 2023Unifying Large Language Models and Knowledge Graphs: A Roadmap14 Jun 2023
- 2023Logical Entity Representation in Knowledge-Graphs for Differentiable Rule Learning22 May 2023
- 2023Revisiting k-NN for Fine-tuning Pre-trained Language Models18 Apr 2023
- 2022Schema-aware Reference as Prompt Improves Data-Efficient Knowledge Graph Construction19 Oct 2022
- 2022LambdaKG: A Library for Pre-trained Language Model-Based Knowledge Graph Embeddings1 Oct 2022
- 2022I Know What You Do Not Know: Knowledge Graph Embedding via Co-distillation Learning21 Aug 2022
- 2022Contrastive Demonstration Tuning for Pre-trained Language Models9 Apr 2022
- 2022From Discrimination to Generation: Knowledge Graph Completion with Generative Transformer4 Feb 2022
- 2022Ontology-enhanced Prompt-tuning for Few-shot Learning27 Jan 2022
- 2022OntoProtein: Protein Pretraining With Gene Ontology Embedding23 Jan 2022
Similar, not cited
Close in wording, no citation either way
- 2025Injecting Knowledge Graphs into Large Language Models
- 2024On The Expressive Power of Knowledge Graph Embedding Methods
- 2025Towards Foundation Model on Temporal Knowledge Graph Reasoning
- 2026Multi-hop Reasoning and Retrieval in Embedding Space: Leveraging Large Language Models with Knowledge
- 2025Enhancing Knowledge Graph Completion with Entity Neighborhood and Relation Context
- 2026Learning Chain Of Thoughts Prompts for Predicting Entities, Relations, and even Literals on Knowledge Graphs
- 2023Knowledge Graphs are not Created Equal: Exploring the Properties and Structure of Real KGs
- 2026KoRe: Compact Knowledge Representations for Large Language Models