Preprint
Machine Learning
Featured

FLAN

Jason Wei, Maarten Bosma, Vincent Y. Zhao, Kelvin Guu, Adams Wei Yu, Brian Lester, Nan Du, Andrew M. Dai, Quoc V. Le
September 1, 2021International Conference on Learning Representations5,241 citations

5.2k

Citations

471

Influential Citations

International Conference on Learning Representations

Venue

2021

Year

Abstract

An instruction-tuned language model developed through finetuning on various NLP datasets described by natural language instructions.

Analysis

Why This Paper Matters

Large language models (LLMs) like GPT-3 have shown remarkable few-shot learning abilities through in-context prompting, but their zero-shot performance often lags behind. The FLAN paper introduces a straightforward yet highly effective technique—instruction tuning—that bridges this gap. By fine-tuning a pretrained model on a diverse collection of tasks described via natural language instructions, the model learns to generalize to unseen tasks without any examples. This work is pivotal because it demonstrates that with proper training, LLMs can become more instruction-following and user-friendly, reducing the need for task-specific fine-tuning or complex prompt engineering.

How It Works

FLAN (Fine-tuned LAnguage Net) starts with LaMDA-PT, a 137B parameter decoder-only transformer pretrained on a large corpus of web documents, dialog data, and Wikipedia. The core innovation is instruction tuning: the model is fine-tuned on a mixture of 62 publicly available NLP datasets, each converted into natural language instruction templates. For every dataset, the authors manually create 10 unique templates that describe the task in different ways, including up to three "turned around" templates that invert the task (e.g., given a hypothesis, generate a premise).

Figure 1

Datasets are grouped into 12 task clusters (e.g., natural language inference, reading comprehension, translation). To evaluate zero-shot performance on unseen tasks, the authors adopt a rigorous hold-out strategy: for each evaluation cluster, they train a separate model on all other clusters, ensuring that no task type from the held-out cluster appears during instruction tuning. This conservative evaluation prevents any accidental exposure to similar tasks.

Comparing instruction tuning with pretrain–finetune and prompting

During instruction tuning, the model is trained with input sequences up to 1024 tokens and target sequences up to 256 tokens. To balance dataset sizes, each dataset contributes at most 30k examples, and mixing rates are capped at 3k. The training mixes all datasets and randomly samples from them, ensuring diverse exposure.

Top: an overview of instruction tuning and FLAN. Instruction tuning finetunes a pretrained language model on a mixture of tasks phrased as instructions. At inference time, we evaluate on an unseen task type; for instance, we could evaluate the model on natural language inference (NLI) when no NLI tasks were seen during instruction tuning. Bottom: performance of zero-shot FLAN, compared with zero-shot and few-shot GPT-3, on three unseen task types where instruction tuning improved performance substantially out of ten we evaluate. NLI datasets: ANLI R1–R3, CB, RTE. Reading comprehension datasets: BoolQ, MultiRC, OBQA. Closed-book QA datasets: ARC-easy, ARC-challenge, NQ, TriviaQA

Results

FLAN is evaluated on a wide range of unseen task types, including natural language inference (NLI), reading comprehension, closed-book QA, translation, commonsense reasoning, coreference resolution, and struct-to-text. The results are striking:

  • NLI: FLAN outperforms GPT-3 by a large margin on all five NLI datasets. By phrasing NLI as the more natural question "Does <premise> mean that <hypothesis>?", FLAN achieves much higher accuracy.
  • Reading comprehension: FLAN surpasses GPT-3 on BoolQ, MultiRC, and OBQA, with particularly strong gains on BoolQ.
  • Closed-book QA: FLAN outperforms GPT-3 on all four datasets (ARC-easy, ARC-challenge, NQ, TriviaQA) and compares favorably with GLaM.
  • Translation: FLAN outperforms zero-shot GPT-3 on all six translation directions (French-English, German-English, Romanian-English) but lags behind few-shot GPT-3 in most cases. It excels at translating into English but is weaker for English-to-other-language translation, likely due to the English-centric tokenizer and pretraining data.

Zero-shot performance of FLAN compared to LaMDA-PT 137B, GPT-3 175B, and GLaM 64B/64E on natural language inference, reading comprehension, closed-book QA, and translation. Performance of FLAN is the mean of up to 10 instructional templates per task. Supervised models were either T5, BERT, or translation models

However, instruction tuning does not improve performance on tasks that are similar to the original language modeling objective, such as commonsense reasoning and coreference resolution when formulated as sentence completions. For seven such tasks, FLAN only outperforms LaMDA-PT on three, indicating that instruction tuning is not universally beneficial.

Results for translation and struct-to-text tasks. [k] indicates the number of few-shot exemplars. #t indicates the number of templates that FLAN is evaluated on.

Results for eight NLU task clusters. All values shown are for accuracy (or exact match) except DROP, MultiRC, and SQuAD v1 and v2, which are F1. [k] indicates the number of few-shot exemplars. #t indicates the number of templates that FLAN is evaluated on

Significance

FLAN demonstrates that instruction tuning is a simple, scalable, and effective method for improving zero-shot learning in large language models. By training on a diverse set of tasks described via natural language instructions, the model learns to generalize to unseen tasks without any examples. This work has significant practical implications: it reduces the need for task-specific fine-tuning or complex prompt engineering, making LLMs more accessible and versatile for real-world applications. The paper also highlights the importance of task diversity and template design in instruction tuning, and it identifies limitations where instruction tuning does not help, guiding future research. FLAN has inspired subsequent work on instruction-tuned models like T0 and InstructGPT, cementing its influence on the trajectory of LLM development.