Lune

EMNLP Findings2020

BERT-kNN: Adding a kNN Search Component to Pretrained Language Models for Better QA

Nora Kassner, Hinrich Schütze

Abstract

Khandelwal et al. (2020) use a k-nearestneighbor (kNN) component to improve language model performance. We show that this idea is beneficial for open-domain question answering (QA). To improve the recall of facts encountered during training, we combine BERT (Devlin et al., 2019) with a traditional information retrieval step (IR) and a kNN search over a large datastore of an embedded text collection. Our contributions are as follows: i) BERT-kNN outperforms BERT on cloze-style QA by large margins without any further training. ii) We show that BERT often identifies the correct response category (e.g., US city), but only kNN recovers the factually correct answer (e.g., "Miami"). iii) Compared to BERT, BERT-kNN excels for rare facts. iv) BERT-kNN can easily handle facts not covered by BERT's training set, e.g., recent events.

Ask Lune

Know this paper in minutes, not an afternoon.

Lune can read every page of it and the top-tier papers that cite it, and gives you its claims, its evidence and its limits, each one cited to the paper it comes from. No skimming, no AI slop.

8 top-tier papers have cited it since. Know what they found before your reviewers do.

Questions to start from

Lune can draw on

the full paper · the top-tier papers that cite it · related work

Get the answer

Free to start. No credit card required.

Lineage

  • Decoupling Knowledge from Memorization: Retrieval-augmented Prompt Learning cites Generalization through Memorization: Nearest Neighbor Language Models
  • Decoupling Knowledge from Memorization: Retrieval-augmented Prompt Learning cites Retrieval-Augmented Generation for Knowledge-Intensive NLP Tasks
  • kNN-TL: k-Nearest-Neighbor Transfer Learning for Low-Resource Neural Machine Translation cites Generalization through Memorization: Nearest Neighbor Language Models
  • Pre-training Limited Memory Language Models with Internal and External Knowledge cites Generalization through Memorization: Nearest Neighbor Language Models
  • Pre-training Limited Memory Language Models with Internal and External Knowledge cites Retrieval-Augmented Generation for Knowledge-Intensive NLP Tasks
  • ConvFiT: Conversational Fine-Tuning of Pretrained Language Models cites Generalization through Memorization: Nearest Neighbor Language Models
  • ConvFiT: Conversational Fine-Tuning of Pretrained Language Models cites Retrieval Augmented Language Model Pre-Training
  • Retrieval-Augmented Generation for Knowledge-Intensive NLP Tasks cites Generalization through Memorization: Nearest Neighbor Language Models
  • Retrieval Augmented Language Model Pre-Training cites Generalization through Memorization: Nearest Neighbor Language Models
Builds onCited byLeft to right by year; the more cited, the higher.

Cited by top-tier papers8

  1. Decoupling Knowledge from Memorization: Retrieval-augmented Prompt LearningXiang Chen, Lei Li, Ningyu Zhang, Xiaozhuan Liang et al.NeurIPS 2022 · 68 citations
  2. ConvFiT: Conversational Fine-Tuning of Pretrained Language ModelsIvan Vulic, Pei-Hao Su, Samuel Coope, Daniela Gerz et al.EMNLP 2021 · 30 citations
  3. kNN-TL: k-Nearest-Neighbor Transfer Learning for Low-Resource Neural Machine TranslationShudong Liu, Xuebo Liu, Derek F. Wong, Zhaocong Li et al.ACL 2023 · 14 citations
  4. Pre-training Limited Memory Language Models with Internal and External KnowledgeLinxi Zhao, Sofian Zalouk, Christian K. Belardi, Justin Lovelace et al.ICLR 2026 · 11 citations
  5. Augmentation with Projection: Towards an Effective and Efficient Data Augmentation Paradigm for DistillationZiqi Wang, Yuexin Wu, Frederick Liu, Daogao Liu et al.ICLR 2023 · 2 citations

Builds on3

  1. Retrieval-Augmented Generation for Knowledge-Intensive NLP TasksPatrick Lewis, Ethan Perez, Aleksandra Piktus, Fabio Petroni et al.NeurIPS 2020 · 19,162 citations
  2. Retrieval Augmented Language Model Pre-TrainingKelvin Guu, Kenton Lee, Zora Tung, Panupong Pasupat et al.ICML 2020 · 2,937 citations
  3. Generalization through Memorization: Nearest Neighbor Language ModelsUrvashi Khandelwal, Omer Levy, Dan Jurafsky, Luke Zettlemoyer et al.ICLR 2020 · 1,038 citations

Related papers

  1. The Inductive Bias of In-Context Learning: Rethinking Pretraining Example DesignYoav Levine, Noam Wies, Daniel Jannai, Dan Navon et al.ICLR 2022 · 43 citations
  2. End-to-End Training of Neural Retrievers for Open-Domain Question AnsweringDevendra Singh Sachan, Mostofa Patwary, Mohammad Shoeybi, Neel Kant et al.ACL 2021
  3. Why do Nearest Neighbor Language Models Work?Frank F. Xu, Uri Alon, Graham NeubigICML 2023 · 33 citations
  4. IELM: An Open Information Extraction Benchmark for Pre-Trained Language ModelsChenguang Wang, Xiao Liu, Dawn SongEMNLP 2022 · 3 citations
  5. Entity-aware Transformers for Entity SearchEmma J. Gerritse, Faegheh Hasibi, Arjen P. de VriesSIGIR 2022 · 27 citations
Dusk over the sea between two cliffs drawn in fine vertical lines