Calibrate Before Use: Improving Few-Shot Performance of Language Models

By Tony Zhao, Eric Wallace, Shi Feng, Daniel Klein, Sameer Singh. 2021

1,964 citations recorded by the source corpus.

GPT-3 can perform numerous tasks when provided a natural language prompt that contains a few training examples. We show that this type of few-shot learning can be unstable: the choice of prompt format, training examples, and even the order of the training examples can cause accuracy to vary from near chance to near state-of-the-art. We demonstrate that this instability arises from the bias of language models towards predicting certain answers, e.g., those that are placed near the end of the prompt or are common in the pre-training data. To mitigate this, we first estimate the model's bias towards each answer by asking for its prediction when given the training prompt and a content-free test input such as "N/A". We then fit calibration parameters that cause the prediction for this input to be uniform across answers. On a diverse set of tasks, this contextual calibration procedure substantially improves GPT-3 and GPT-2's average accuracy (up to 30.0% absolute) and reduces variance across different choices of the prompt.

Subfields: Artificial Intelligence, Large Language Models, Prompting & Reasoning

How researchers see this paper

The researchers whose trusted networks rank it highest, strongest advocate first. Every researcher gets a different order.

In Artificial Intelligence

  1. Mohit Bansal
  2. Luke S. Zettlemoyer
  3. Jianfeng Gao
  4. Percy Liang
  5. Yejin Choi
  6. Graham Neubig
  7. Hannaneh Hajishirzi
  8. Quoc V. Le

In Large Language Models

  1. Luke S. Zettlemoyer
  2. Hinrich Schütze
  3. Yejin Choi
  4. Mohit Bansal
  5. Timo Schick
  6. Hannaneh Hajishirzi
  7. Jianfeng Gao
  8. Michael Lewis

In Prompting & Reasoning

  1. Luke S. Zettlemoyer
  2. Hannaneh Hajishirzi
  3. Denny Zhou
  4. Timo Schick
  5. Hinrich Schütze
  6. Swaroop Mishra
  7. Yejin Choi
  8. Michael Lewis

Citations in the corpus