Rethinking the Role of Demonstrations: What Makes In-Context Learning
Work?
- URL: http://arxiv.org/abs/2202.12837v1
- Date: Fri, 25 Feb 2022 17:25:19 GMT
- Title: Rethinking the Role of Demonstrations: What Makes In-Context Learning
Work?
- Authors: Sewon Min, Xinxi Lyu, Ari Holtzman, Mikel Artetxe, Mike Lewis,
Hannaneh Hajishirzi, Luke Zettlemoyer
- Abstract summary: Large language models (LMs) are able to in-context learn by conditioning on a few input-label pairs (demonstrations) and making predictions for new inputs.
We show that ground truth demonstrations are in fact not required -- randomly replacing labels in the demonstrations barely hurts performance.
We find that other aspects of the demonstrations are the key drivers of end task performance.
- Score: 112.72413411257662
- License: http://creativecommons.org/licenses/by/4.0/
- Abstract: 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, 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.
Related papers
- What Do Speech Foundation Models Not Learn About Speech? [30.524282767961463]
We analyze speech foundation models such as Whisper, Seamless, Wav2Vec, HuBERT, and Qwen2-Audio.
We first evaluate the models in a zero-shot setting, followed by fine-tuning on layer-wise features extracted from these models.
Our results provide insights into the models' capacity for generalization, the characteristics of their layer-wise representations, and the degree of transformation required for downstream task adaptation.
arXiv Detail & Related papers (2024-10-16T18:34:07Z) - Demonstration Notebook: Finding the Most Suited In-Context Learning Example from Interactions [8.869100154323643]
We propose a novel prompt engineering workflow built around a novel object called the "demonstration notebook"
This notebook helps identify the most suitable in-context learning example for a question by gathering and reusing information from the LLM's past interactions.
Our experiments show that this approach outperforms all existing methods for automatic demonstration construction and selection.
arXiv Detail & Related papers (2024-06-16T10:02:20Z) - The Impact of Demonstrations on Multilingual In-Context Learning: A Multidimensional Analysis [23.757767581876063]
In-context learning is a popular inference strategy where large language models solve a task using only a few labeled demonstrations.
We show that the effectiveness of demonstrations varies significantly across models, tasks, and languages.
We also find that strong instruction-following models including Llama 2-Chat, GPT-3.5, and GPT-4 are largely insensitive to the quality of demonstrations.
arXiv Detail & Related papers (2024-02-20T12:53:31Z) - In-context Learning with Retrieved Demonstrations for Language Models: A Survey [23.24271704145876]
Few-shot in-context learners (ICL) are adept at adapting to new tasks with just a few demonstrations in the input context.
Instead of using a fixed set of demonstrations, one recent development is to retrieve demonstrations tailored to each input query.
We discuss and compare different design choices for retrieval models, retrieval training procedures, and inference algorithms.
arXiv Detail & Related papers (2024-01-21T23:34:42Z) - Identifying and Analyzing Task-Encoding Tokens in Large Language Models [55.03191279766383]
In this paper, we identify and analyze task-encoding tokens on whose representations the task performance depends.
We show that template and stopword tokens are the most prone to be task-encoding.
Our work sheds light on how large language models (LLMs) learn to perform a task from demonstrations, deepens our understanding of the varied roles different types of tokens play in LLMs, and provides insights for avoiding instability from improperly utilizing task-encoding tokens.
arXiv Detail & Related papers (2024-01-20T20:55:21Z) - Scaling In-Context Demonstrations with Structured Attention [75.41845145597875]
We propose a better architectural design for in-context learning.
Structured Attention for In-Context Learning replaces the full-attention by a structured attention mechanism.
We show that SAICL achieves comparable or better performance than full attention while obtaining up to 3.4x inference speed-up.
arXiv Detail & Related papers (2023-07-05T23:26:01Z) - Unified Demonstration Retriever for In-Context Learning [56.06473069923567]
Unified Demonstration Retriever (textbfUDR) is a single model to retrieve demonstrations for a wide range of tasks.
We propose a multi-task list-wise ranking training framework, with an iterative mining strategy to find high-quality candidates.
Experiments on 30+ tasks across 13 task families and multiple data domains show that UDR significantly outperforms baselines.
arXiv Detail & Related papers (2023-05-07T16:07:11Z) - ICL-D3IE: In-Context Learning with Diverse Demonstrations Updating for
Document Information Extraction [56.790794611002106]
Large language models (LLMs) have demonstrated remarkable results in various natural language processing (NLP) tasks with in-context learning.
We propose a simple but effective in-context learning framework called ICL-D3IE.
Specifically, we extract the most difficult and distinct segments from hard training documents as hard demonstrations.
arXiv Detail & Related papers (2023-03-09T06:24:50Z) - Robustness of Demonstration-based Learning Under Limited Data Scenario [54.912936555876826]
Demonstration-based learning has shown great potential in stimulating pretrained language models' ability under limited data scenario.
Why such demonstrations are beneficial for the learning process remains unclear since there is no explicit alignment between the demonstrations and the predictions.
In this paper, we design pathological demonstrations by gradually removing intuitively useful information from the standard ones to take a deep dive of the robustness of demonstration-based sequence labeling.
arXiv Detail & Related papers (2022-10-19T16:15:04Z)
This list is automatically generated from the titles and abstracts of the papers in this site.
This site does not guarantee the quality of this site (including all information) and is not responsible for any consequences.