Nearest Neighbor Zero-Shot Inference

05/27/2022
by   Weijia Shi, et al.
0

We introduce kNN-Prompt, a simple and effective technique to use k-nearest neighbor (kNN) retrieval augmentation (Khandelwal et al., 2021) for zero-shot inference with language models (LMs). Key to our approach is the introduction of fuzzy verbalizers which leverage the sparse kNN distribution for downstream tasks by automatically associating each classification label with a set of natural language tokens. Across eleven diverse end-tasks (spanning text classification, fact retrieval and question answering), using kNN-Prompt with GPT-2 Large yields significant performance boosts over zero-shot baselines (14 absolute improvement over the base LM on average). Extensive experiments show that kNN-Prompt is effective for domain adaptation with no further training, and that the benefits of retrieval increase with the size of the model used for kNN retrieval. Overall, we show that augmenting a language model with retrieval can bring significant gains for zero-shot inference, with the possibility that larger retrieval models may yield even greater benefits.

READ FULL TEXT

page 1

page 2

page 3

page 4

research
10/31/2022

Zero-Shot Text Classification with Self-Training

Recent advances in large pretrained language models have increased atten...
research
11/15/2022

Adaptation Approaches for Nearest Neighbor Language Models

Semi-parametric Nearest Neighbor Language Models (kNN-LMs) have produced...
research
02/07/2023

Augmenting Zero-Shot Dense Retrievers with Plug-in Mixture-of-Memories

In this paper we improve the zero-shot generalization ability of languag...
research
05/29/2022

Decoupling Knowledge from Memorization: Retrieval-augmented Prompt Learning

Prompt learning approaches have made waves in natural language processin...
research
10/25/2020

Discriminative Nearest Neighbor Few-Shot Intent Detection by Transferring Natural Language Inference

Intent detection is one of the core components of goal-oriented dialog s...
research
04/27/2023

Large Language Models are Strong Zero-Shot Retriever

In this work, we propose a simple method that applies a large language m...
research
10/11/2022

Retrieval Augmentation for T5 Re-ranker using External Sources

Retrieval augmentation has shown promising improvements in different tas...

Please sign up or login with your details

Forgot password? Click here to reset