Skip to main content
QUICK REVIEW

[Paper Review] Making Pre-trained Language Models Better Few-shot Learners

Tianyu Gao, Adam Fisch|arXiv (Cornell University)|Dec 31, 2020
Topic ModelingComputer Science46 references128 citations
TL;DR

LM-BFF combines prompt-based fine-tuning, automatic prompt generation, and selective demonstrations to greatly improve few-shot learning with medium-sized language models, achieving up to 30% absolute gains over standard fine-tuning. It demonstrates strong task-agnostic performance across classification and regression with RoBERTa-large in few-shot settings.

ABSTRACT

The recent GPT-3 model (Brown et al., 2020) achieves remarkable few-shot performance solely by leveraging a natural-language prompt and a few task demonstrations as input context. Inspired by their findings, we study few-shot learning in a more practical scenario, where we use smaller language models for which fine-tuning is computationally efficient. We present LM-BFF--better few-shot fine-tuning of language models--a suite of simple and complementary techniques for fine-tuning language models on a small number of annotated examples. Our approach includes (1) prompt-based fine-tuning together with a novel pipeline for automating prompt generation; and (2) a refined strategy for dynamically and selectively incorporating demonstrations into each context. Finally, we present a systematic evaluation for analyzing few-shot performance on a range of NLP tasks, including classification and regression. Our experiments demonstrate that our methods combine to dramatically outperform standard fine-tuning procedures in this low resource setting, achieving up to 30% absolute improvement, and 11% on average across all tasks. Our approach makes minimal assumptions on task resources and domain expertise, and hence constitutes a strong task-agnostic method for few-shot learning.

Motivation & Objective

  • Motivate practical few-shot learning with moderately-sized LMs (e.g., RoBERTa/BERT) instead of huge models like GPT-3.
  • Develop a task-agnostic, simple set of techniques to improve fine-tuning with minimal data.
  • Evaluate prompt-based fine-tuning and demonstration strategies across multiple NLP tasks (classification and regression).
  • Provide an automated workflow for generating prompts and demonstrations to reduce manual engineering.

Proposed method

  • Prompt-based fine-tuning that treats downstream tasks as masked language modeling with label words.
  • Automatic prompt generation via (i) automatic selection of label words (verbalizers) and (ii) automatic generation of templates using a T5-based search.
  • Dynamic and selective demonstrations where a single per-class example is sampled and paired with the input to form minimal demonstration sets.
  • A systematic evaluation across 8 single-sentence and 7 sentence-pair tasks, using multiple random splits to assess stability.
  • Comparison with standard fine-tuning and GPT-3-style in-context learning under few-shot settings.

Experimental results

Research questions

  • RQ1Can prompt-based fine-tuning with automatically generated prompts match or exceed manually designed prompts in few-shot regimes?
  • RQ2Does incorporating demonstrations with careful sampling improve performance beyond standard fine-tuning for medium-sized LMs?
  • RQ3How do automatic label-word selection and automated template generation contribute to robust few-shot learning across tasks (classification and regression)?
  • RQ4What is the impact of demonstrations sampling strategy and template quality on few-shot performance?
  • RQ5Is the approach task-agnostic and resource-efficient enough to be practical for real-world use?

Key findings

  • Prompt-based fine-tuning substantially outperforms standard fine-tuning in few-shot settings.
  • Automatic prompt generation (templates and label words) can match or outperform manual prompts across several tasks.
  • Incorporating demonstrations with carefully designed sampling strategies yields additional gains in few-shot performance.
  • The combined LM-BFF methods achieve up to 30% absolute improvement and 11% average improvement across evaluated tasks.
  • On RoBERTa-large with 32 training examples, many binary SST-2-like tasks reach around 90% accuracy.

Read this paper

Open the full text in the Nubint reader and ask about any passage as you read.

Read this paper on Nubint

This review was generated by AI from the original paper. Please check the paper before citing it.