Lune

EMNLP2022Top-tier venue

Nearest Neighbor Zero-Shot Inference

Weijia Shi, Julian Michael, Suchin Gururangan, Luke Zettlemoyer

Abstract

Retrieval-augmented language models (LMs) use non-parametric memory to substantially outperform their non-retrieval counterparts on perplexity-based evaluations, but it is an open question whether they achieve similar gains in few- and zero-shot end-task accuracy. We extensively study one such model, the k-nearest neighbor LM (kNN-LM), showing that the gains marginally transfer. The main challenge is to achieve coverage of the verbalizer tokens that define the different end-task class labels. To address this challenge, we also introduce kNN-Prompt, a simple and effective kNN-LM with automatically expanded fuzzy verbalizers (e.g. to expand "terrible" to also include "silly" and other task-specific synonyms for sentiment classification). Across nine diverse end-tasks, using kNN-Prompt with GPT-2 large yields significant performance boosts over strong zeroshot baselines (13.4% absolute improvement over the base LM on average). We also show that other advantages of non-parametric augmentation hold for end tasks; kNN-Prompt is effective for domain adaptation with no further training, and gains increase with the size of the retrieval model.

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.

19 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

  • How Do Large Language Models Capture the Ever-changing World Knowledge? A Review of Recent Advances cites Language Models are Few-Shot Learners
  • How Do Large Language Models Capture the Ever-changing World Knowledge? A Review of Recent Advances cites Retrieval-Augmented Generation for Knowledge-Intensive NLP Tasks
  • How Do Large Language Models Capture the Ever-changing World Knowledge? A Review of Recent Advances cites Retrieval Augmented Language Model Pre-Training
  • PromptCap: Prompt-Guided Image Captioning for VQA with GPT-3 cites Language Models are Few-Shot Learners
  • PromptCap: Prompt-Guided Image Captioning for VQA with GPT-3 cites Finetuned Language Models are Zero-Shot Learners
  • Knowledge Card: Filling LLMs' Knowledge Gaps with Plug-in Specialized Language Models cites Retrieval-Augmented Generation for Knowledge-Intensive NLP Tasks
  • Knowledge Card: Filling LLMs' Knowledge Gaps with Plug-in Specialized Language Models cites Retrieval Augmented Language Model Pre-Training
  • Language Models are Few-Shot Learners cites Retrieval-Augmented Generation for Knowledge-Intensive NLP Tasks
  • SILO Language Models: Isolating Legal Risk In a Nonparametric Datastore cites Language Models are Few-Shot Learners
  • SILO Language Models: Isolating Legal Risk In a Nonparametric Datastore cites Retrieval Augmented Language Model Pre-Training
  • Finetuned Language Models are Zero-Shot Learners cites Language Models are Few-Shot Learners
  • TIARA: Multi-grained Retrieval for Robust Question Answering over Large Knowledge Base cites Language Models are Few-Shot Learners
  • Calibrate Before Use: Improving Few-shot Performance of Language Models cites Language Models are Few-Shot Learners
Builds onCited byLeft to right by year; the more cited, the higher.

Cited by top-tier papers19

  1. PromptCap: Prompt-Guided Image Captioning for VQA with GPT-3Yushi Hu, Hang Hua, Zhengyuan Yang, Weijia Shi et al.ICCV 2023 · 91 citations
  2. SILO Language Models: Isolating Legal Risk In a Nonparametric DatastoreSewon Min, Suchin Gururangan, Eric Wallace, Weijia Shi et al.ICLR 2024 · 91 citations
  3. Knowledge Card: Filling LLMs' Knowledge Gaps with Plug-in Specialized Language ModelsShangbin Feng, Weijia Shi, Yuyang Bai, Vidhisha Balachandran et al.ICLR 2024 · 56 citations
  4. TIARA: Multi-grained Retrieval for Robust Question Answering over Large Knowledge BaseYiheng Shu, Zhiwei Yu, Yuhan Li, Börje F. Karlsson et al.EMNLP 2022 · 39 citations
  5. How Do Large Language Models Capture the Ever-changing World Knowledge? A Review of Recent AdvancesZihan Zhang, Meng Fang, Ling Chen, Mohammad-Reza Namazi-Rad et al.EMNLP 2023 · 22 citations

Builds on14

  1. Language Models are Few-Shot LearnersTom B. Brown, Benjamin Mann, Nick Ryder, Melanie Subbiah et al.NeurIPS 2020 · 64,255 citations
  2. Retrieval-Augmented Generation for Knowledge-Intensive NLP TasksPatrick Lewis, Ethan Perez, Aleksandra Piktus, Fabio Petroni et al.NeurIPS 2020 · 19,162 citations
  3. Finetuned Language Models are Zero-Shot LearnersJason Wei, Maarten Bosma, Vincent Y. Zhao, Kelvin Guu et al.ICLR 2022 · 4,966 citations
  4. Retrieval Augmented Language Model Pre-TrainingKelvin Guu, Kenton Lee, Zora Tung, Panupong Pasupat et al.ICML 2020 · 2,937 citations
  5. Calibrate Before Use: Improving Few-shot Performance of Language ModelsZihao Zhao, Eric Wallace, Shi Feng, Dan Klein et al.ICML 2021 · 1,843 citations

Related papers

  1. Adaptation Approaches for Nearest Neighbor Language ModelsRishabh Bhardwaj, George Polovets, Monica SunkaraACL Findings 2023 · 7 citations
  2. Retrieval-Augmented Retrieval: Large Language Models are Strong Zero-Shot RetrieverTao Shen, Guodong Long, Xiubo Geng, Chongyang Tao et al.ACL Findings 2024 · 29 citations
  3. AdaPrompt: Adaptive Model Training for Prompt-based NLPYulong Chen, Yang Liu, Li Dong, Shuohang Wang et al.EMNLP Findings 2022 · 44 citations
  4. Why do Nearest Neighbor Language Models Work?Frank F. Xu, Uri Alon, Graham NeubigICML 2023 · 33 citations
  5. TransPrompt: Towards an Automatic Transferable Prompting Framework for Few-shot Text ClassificationChengyu Wang, Jianing Wang, Minghui Qiu, Jun Huang et al.EMNLP 2021 · 39 citations
Dusk over the sea between two cliffs drawn in fine vertical lines