Data Curation Alone Can Stabilize In-context Learning
38373Authors
nan
Abstract
AbstractIn-context learning (ICL) enables large language models (LLMs) to perform new tasks by prompting them with a sequence of training examples. However, it is known that ICL is very sensitive to the choice of training examples: randomly sampling examples from a training set leads to high variance in performance. In this paper, we show that carefully curating a subset of training data greatly stabilizes ICL performance without any other changes to the ICL algorithm (e.g., prompt retrieval or calibration). We introduce two methods to choose training subsets—both score training examples individually, then select the highest-scoring ones. CondAcc scores a training example by its average dev-set ICL accuracy when combined with random training examples, while Datamodels learns linear regressors that estimate how the presence of each training example influences LLM outputs. Across five tasks and two LLMs, sampling from stable subsets selected by CondAcc and Datamodels improves average accuracy over sampling from the entire training set by 7.7% and 6.3%, respectively. Surprisingly, the stable subset examples are not especially diverse in content or low in perplexity, in contrast with other work suggesting that diversity and perplexity are important when prompting LLMs.
Keywords
Full Content
Proceedings of the 61st Annual Meeting of the Association for Computational Linguistics Volume 1: Long Papers, pages 8123–8144 July 9-14, 2023 ©2023 Association for Computational Linguistics Data Curation Alone Can Stabilize In-context Learning Ting-Yun Chang and Robin Jia University of Southern California {tingyun,robinjia}@usc.edu Abstract In-context learning (ICL) enables large lan- guage models (LLMs) to perform new tasks by prompting them with a sequence of training ex- amples. However, it is known that ICL is very sensitive to the choice of training examples: randomly sampling examples from a training set leads to high variance in performance. In this paper, we show that carefully curating a subset of training data greatly stabilizes ICL performance without any other changes to the ICL algorithm (e.g., prompt retrieval or cali- bration). We introduce two methods to choose training subsets—both score training examples individually, then select the highest-scoring ones. CONDACC scores a training example by its average dev-set ICL accuracy when com- bined with random training examples, while DATAMODELS learns linear regressors that es- timate how the presence of each training exam- ple influences LLM outputs. Across five tasks and two LLMs, sampling from stable subsets selected by CONDACC and DATAMODELS im- proves average accuracy over sampling from the entire training set by 7.7% and 6.3%, respec- tively. Surprisingly, the stable subset examples are not especially diverse in content or low in perplexity, in contrast with other work suggest- ing that diversity and perplexity are important when prompting LLMs. 1 Introduction In-context learning (ICL) is a new paradigm for few-shot learning with pretrained large language models (LLMs) without any parameter updates. In ICL, an LLM can perform a new task simply by conditioning on a prompt1 consisting of a sequence of labeled training examples. First introduced by GPT-3 (Brown et al., 2020), ICL with LLMs has reached state-of-the-art few-shot performance across many tasks (Rae et al., 2021; Smith et al., 1Prior work has different definitions of prompt; in this paper, we fix the task templates and follow Rubin et al. (2021) to denote prompt as a sequence of training examples for ICL. All OneShot TopPrompts CondAcc Datamodels 0.5 0.6 0.7 0.8 0.9 Test Accuracy Figure 1: 4-shot ICL performance of GPTJ on SST2. Each boxplot summarizes the results of 50 sampled prompts. Compared with baselines (blue), our methods (pink) can greatly stablilize performance, having higher average accuracy (red diamonds) and lower variance. 2022; Thoppilan et al., 2022; Chowdhery et al., 2022). Compared with alternatives that use fine- tuning (Devlin et al., 2018; Schick and Schütze, 2020; Gao et al., 2020), ICL does not require task- specific training, which enables its use with very large language models, and it uses a unified model for all tasks, enabling easier deployment. Despite its impressive few-shot performance, ICL often exhibits unintuitive behavior (Min et al., 2022). The standard ICL approach is to randomly sample a few examples from a training set to con- struct a prompt (Brown et al., 2020); however, prior work (Liu et al., 2021; Zhao et al., …
Content truncated to 500 words
Labeled Text
AbstractIn-context learning (ICL) enables large language models (LLMs) to perform new tasks by prompting them with a sequence of training examples. However, it is known that ICL is very sensitive to the choice of training examples: randomly sampling examples from a training set leads to high variance in performance. In this paper, we show that carefully curating a subset of training data greatly stabilizes ICL performance without any other changes to the ICL algorithm (e.g., prompt retrieval or calibration). We introduce two methods to choose training subsets—both score training examples individually, then select the highest-scoring ones. CondAcc scores a training example by its average dev-set ICL accuracy when combined with random training examples, while Datamodels learns linear regressors that estimate how the presence of each training example influences LLM outputs. Across five tasks and two LLMs, sampling from stable subsets selected by CondAcc and Datamodels improves average accuracy over sampling from the entire training set by 7.7% and 6.3%, respectively. Surprisingly, the stable subset examples are not especially diverse in content or low in perplexity, in contrast with other work suggesting that diversity and perplexity are important when prompting LLMs.
Publication Details
- Paper ID:
- 38373
- Year:
- 2023
- Publication:
- TIPSTER
- Publication Type:
- conf
- DOI:
- nan