Rethinking the Role of Demonstrations: What Makes In-Context Learning Work?
By Sewon Min, Xinxi Lyu, Ari Holtzman, Mikel Artetxe, Michael Lewis, Hannaneh Hajishirzi, Luke S. Zettlemoyer. 2022
2,090 citations recorded by the source corpus.
Large language models (LMs) are able to in-context learn—perform a new task via inference alone by conditioning on a few input-label pairs (demonstrations) and making predictions for new inputs. However, there has been little understanding of how the model learns and which aspects of the demonstrations contribute to end task performance. In this paper, we show that ground truth demonstrations are in fact not required—randomly replacing labels in the demonstrations barely hurts performance on a range of classification and multi-choce tasks, consistently over 12 different models including GPT-3. Instead, we find that other aspects of the demonstrations are the key drivers of endtask performance, including the fact that they provide a few examples of (1) the label space, (2) the distribution of the input text, and (3) the overall format of the sequence. Together, our analysis provides a new way of understanding how and why in-context learning works, while opening up new questions about how much can be learned from large language models through inference alone.
Subfields: Artificial Intelligence, 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
- Mohit Bansal
- Luke S. Zettlemoyer
- Percy Liang
- Jianfeng Gao
- Yejin Choi
- Graham Neubig
- Quoc V. Le
- Hannaneh Hajishirzi
In Prompting & Reasoning
- Denny Zhou
- Luke S. Zettlemoyer
- Wenhu Chen
- Hannaneh Hajishirzi
- Swaroop Mishra
- Jason Wei
- Xinyun Chen
- Timo Schick
Citations in the corpus
- Chain of Thought Prompting Elicits Reasoning in Large Language Models (2022, background): “There is no shortage of work showing that prompts affect language models in unexpected ways (Min et al., 2022).”
- OPT-IML: Scaling Language Model Instruction Meta Learning through the Lens of Generalization (2022, background): “We present validation set results for instructiontuning with different settings for MetaICL, aggregated by generalization level and task category under both 0 and 5-shot settings, in Table 8.”
- Emergent Abilities of Large Language Models (2022, neutral): “Moreover, better exploration of what makes prompting successful (Wei et al., 2021a; Xie et al., 2022; Min et al., 2022; Olsson et al., 2022) could lead to insights on how to elicit emergent abilities at a smaller model scale.”
- OPT: Open Pre-trained Transformer Language Models (2022, background): “, 2020), and understanding why and how prompting works (Liu et al., 2021; Min et al., 2022).”
- Augmented Language Models: a Survey (2023, background): “…size (Wei et al., 2022b; Chung et al., 2022), and performance depends heavily on the format in which examples are presented (Jiang et al., 2020; Min et al., 2022), the choice of few-shot examples, and the order in which they are presented (Kumar and Talukdar, 2021; Lu et al., 2022b; Zhou et…”
- Large Language Models are Zero-Shot Reasoners (2022, positive): “In contrast, the performance gain becomes much less when using examples with different answer types (to MultiArith), confirming prior work [Min et al., 2022] that suggests LLMs mostly leverage the few-shot examples to infer the repeated format rather than the task itself in-context.”
- Can language models learn from explanations in context? (2022, background): “For example, Min et al. (2022) make the interesting observation that GPT-3 can perform nearly as well on common tasks like entailment even with random answers in the prompt, and therefore question whether the models are really “learning” in context.”
- STaR: Bootstrapping Reasoning With Reasoning (2022, background): “Based on [30], this is unlikely to meaningfully affect [6]’s few-shot performance.”
- Selection-Inference: Exploiting Large Language Models for Interpretable Logical Reasoning (2022, background): “, 2021), and because (Min et al., 2022) have demonstrated that additional shots beyond 4 result in limited increase in multi-choice accuracy”
- Socratic Models: Composing Zero-Shot Multimodal Reasoning with Language (2022, background): “Zero-shot and few-shot prompting recently have been shown to be highly effective for transfer learning (Brown et al., 2020; Xie et al., 2021; Min et al., 2022).”
- Flamingo: a Visual Language Model for Few-Shot Learning (2022, background): “[76] show that the mapping from input to output generally has limited impact on few-shot performance, as opposed to specifying the overall format of the examples.”
- GPTScore: Evaluate as You Desire (2023, methodology): “Essentially, it skillfully utilizes the pre-trained model’s zero-shot instruction (Chung et al., 2022) and in-context learning (Brown et al., 2020; Min et al., 2022) ability to deal with complex and ever-changing evaluation needs while solving multiple evaluation challenges that have plagued many…”
- Few-Shot Parameter-Efficient Fine-Tuning is Better and Cheaper than In-Context Learning (2022, background): “[9] analyze how ICL works and show that ICL can still perform well when incorrect labels are provided for the in-context examples.”
- Do Prompt-Based Models Really Understand the Meaning of Their Prompts? (2021, background): “One particularly noteworthy finding is that Min et al. (2022) show that models learn just as well with incorrect labels as opposed to correct labels in priming, concluding that prompts are helping models to learn the distribution of the input text and space of possible labels (as opposed to…”
- Impact of Pretraining Term Frequencies on Few-Shot Reasoning (2022, background): “…(2021) further demonstrate that shuffling word order during pretraining has minimal impact on an LMs’ accuracy on downstream tasks, and, concurrent with this work, Min et al. (2022) similarly find that shuffling labels in in-context learning demonstrations has a minimal impact on few-shot accuracy.”
- Learning To Retrieve Prompts for In-Context Learning (2021, background): “Recently, Min et al. (2022) showed that the model does not rely on the ground truth input-label mapping provided in the demonstrations as much as previously thought.”
- Program of Thoughts Prompting: Disentangling Computation from Reasoning for Numerical Reasoning Tasks (2022, background): “Recently, there have been several works (Xie et al., 2021; Min et al., 2022) aiming to understand how and why in-context learning works.”
- The Unlocking Spell on Base LLMs: Rethinking Alignment via In-Context Learning (2023, methodology): “Inspired by the observation that ICL is highly sensitive to the style of demonstration examples (Min et al., 2022), we propose to restyle the instruction outputs in ICL.”