Rethinking the Role of Demonstrations: What Makes In-Context Learning Work?

29967

Authors

nan

Abstract

AbstractLarge 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.

Keywords

nan

Full Content

Proceedings of the 2022 Conference on Empirical Methods in Natural Language Processing, pages 11048 - 11064 December 7-11, 2022 ©2022 Association for Computational Linguistics Rethinking the Role of Demonstrations: What Makes In-Context Learning Work? Sewon Min1,2 Xinxi Lyu1 Ari Holtzman1 Mikel Artetxe2 Mike Lewis2 Hannaneh Hajishirzi1,3 Luke Zettlemoyer1,2 1University of Washington 2Meta AI 3Allen Institute for AI {sewon,alrope,ahai,hannaneh,lsz}@cs.washington.edu {artetxe,mikelewis}@meta.com Abstract Large language models (LMs) are able to in- context learn—perform a new task via infer- ence alone by conditioning on a few input-label pairs (demonstrations) and making predictions for new inputs. However, there has been lit- tle 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 end task 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. 1 Introduction Large language models (LMs) have shown impres- sive performance on downstream tasks by simply conditioning on a few input-label pairs (demonstra- tions); this type of inference has been referred to as in-context learning (Brown et al., 2020). Despite in- context learning consistently outperforming zero- shot inference on a wide range of tasks (Zhao et al., 2021; Liu et al., 2021), there is little understanding of how it works and which aspects of the demon- strations contribute to end task performance. In this paper, we show that ground truth demon- strations are in fact not required for effective in- context learning (Section 4). Specifically, replac- ing the labels in demonstrations with random labels barely hurts performance in a range of classifica- tion and multi-choice tasks (Figure 1). The result MetaICL (774M) GPT-J (6B) GPT-3 (175B) 25 30 35 40 45 50 55 60 65 Macro-F1 (%) Classification No Demos Demos w/ gold labels Demos w/ random labels MetaICL (774M) GPT-J (6B) GPT-3 (175B) 35 40 45 50 55 60 65 70 75 Accuracy (%) Multi-choice No Demos Demos w/ gold labels Demos w/ random labels Figure 1: Results in classification (top) and multi-choice tasks (bottom), using three LMs with varying size. Re- ported on six datasets on which GPT-3 is evaluated; the channel method is used. See Section 4 for the full results. In-context learning performance drops only marginally when labels in the demonstrations are replaced by ran- dom labels. is consistent over 12 different models including the GPT-3 family (Radford et al., 2019; Min et al., 2021b; Wang and Komatsuzaki, 2021; Artetxe et al., 2021; Brown et al., …

Content truncated to 500 words

Labeled Text

AbstractLarge 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.

Publication Details

Paper ID:
29967
Year:
2022
Publication:
TIPSTER
Publication Type:
conf
DOI:
nan