Our new X account is live! Follow @wizwand_team for updates
WorkDL logo mark

Meta-training with Demonstration Retrieval for Efficient Few-shot Learning

About

Large language models show impressive results on few-shot NLP tasks. However, these models are memory and computation-intensive. Meta-training allows one to leverage smaller models for few-shot generalization in a domain-general and task-agnostic manner; however, these methods alone results in models that may not have sufficient parameterization or knowledge to adapt quickly to a large variety of tasks. To overcome this issue, we propose meta-training with demonstration retrieval, where we use a dense passage retriever to retrieve semantically similar labeled demonstrations to each example for more varied supervision. By separating external knowledge from model parameters, we can use meta-training to train parameter-efficient models that generalize well on a larger variety of tasks. We construct a meta-training set from UnifiedQA and CrossFit, and propose a demonstration bank based on UnifiedQA tasks. To our knowledge, our work is the first to combine retrieval with meta-training, to use DPR models to retrieve demonstrations, and to leverage demonstrations from many tasks simultaneously, rather than randomly sampling demonstrations from the training set of the target task. Our approach outperforms a variety of targeted parameter-efficient and retrieval-augmented few-shot methods on QA, NLI, and text classification tasks (including SQuAD, QNLI, and TREC). Our approach can be meta-trained and fine-tuned quickly on a single GPU.

Aaron Mueller, Kanika Narang, Lambert Mathias, Qifan Wang, Hamed Firooz• 2023

Related benchmarks

TaskDatasetResultRank
Text ClassificationTREC (test)
Accuracy91.7
113
Natural Language InferenceMNLI (matched)
Accuracy72.9
110
Natural Language InferenceMNLI (mismatched)
Accuracy69.6
68
Natural Language InferenceQNLI (test)
Accuracy84.4
27
ClassificationMRPC (test)
Macro F173.4
9
Question AnsweringSQuAD MRQA few-shot
F1 Score93.5
5
Question AnsweringBioASQ MRQA few-shot
F1 Score94.2
5
Question AnsweringQASC MRQA few-shot
F1 Score99.1
5
Question AnsweringTriviaQA MRQA few-shot
F1 Score80.7
5
Question AnsweringTbQA MRQA few-shot
F1 Score83.2
5
Showing 10 of 10 rows

Other info

Code

Follow for update