Towards Understanding In-Context Learning with Contrastive Demonstrations and Saliency Maps

07/11/2023
by   Zongxia Li, et al.
0

We investigate the role of various demonstration components in the in-context learning (ICL) performance of large language models (LLMs). Specifically, we explore the impacts of ground-truth labels, input distribution, and complementary explanations, particularly when these are altered or perturbed. We build on previous work, which offers mixed findings on how these elements influence ICL. To probe these questions, we employ explainable NLP (XNLP) methods and utilize saliency maps of contrastive demonstrations for both qualitative and quantitative analysis. Our findings reveal that flipping ground-truth labels significantly affects the saliency, though it's more noticeable in larger LLMs. Our analysis of the input distribution at a granular level reveals that changing sentiment-indicative terms in a sentiment analysis task to neutral ones does not have as substantial an impact as altering ground-truth labels. Finally, we find that the effectiveness of complementary explanations in boosting ICL performance is task-dependent, with limited benefits seen in sentiment analysis tasks compared to symbolic reasoning tasks. These insights are critical for understanding the functionality of LLMs and guiding the development of effective demonstrations, which is increasingly relevant in light of the growing use of LLMs in applications such as ChatGPT. Our research code is publicly available at https://github.com/paihengxu/XICL.

READ FULL TEXT

page 4

page 6

page 7

research
02/25/2022

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

Large language models (LMs) are able to in-context learn – perform a new...
research
05/25/2022

Ground-Truth Labels Matter: A Deeper Look into Input-Label Demonstrations

Despite recent explosion in research interests, in-context learning and ...
research
05/16/2023

What In-Context Learning "Learns" In-Context: Disentangling Task Recognition and Task Learning

Large language models (LLMs) exploit in-context learning (ICL) to solve ...
research
08/17/2023

Exploring Demonstration Ensembling for In-context Learning

In-context learning (ICL) operates by showing language models (LMs) exam...
research
02/11/2023

Compositional Exemplars for In-context Learning

Large pretrained language models (LMs) have shown impressive In-Context ...
research
05/31/2023

Investigation of the Robustness of Neural Density Fields

Recent advances in modeling density distributions, so-called neural dens...
research
02/24/2022

Probing BERT's priors with serial reproduction chains

We can learn as much about language models from what they say as we lear...

Please sign up or login with your details

Forgot password? Click here to reset