Towards Understanding In-Context Learning with Contrastive Demonstrations and Saliency Maps
Not on the map. Why?
Abstract (arXiv)
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.
Key facts. Cited by 35 papers in the map (data through 7 Oct 2026). Builds on 17 of its 21 references that are in the map. First posted on arXiv 11 Jul 2023.
Builds on
17 of 21 references.
References · 17
- 2020Language Models are Few-Shot Learnerscited by 32,199
- 2022Training language models to follow instructions with human feedbackcited by 15,712
- 2022PaLM: Scaling Language Modeling with Pathwayscited by 5,304
- 2016"Why Should I Trust You?": Explaining the Predictions of Any Classifiercited by 5,040
- 2017Axiomatic Attribution for Deep Networkscited by 3,350
- 2023A Survey of Large Language Modelscited by 2,537
- 2013Deep Inside Convolutional Networks: Visualising Image Classification Models and Saliency Mapscited by 2,348
- 2022Rethinking the Role of Demonstrations: What Makes In-Context Learning Work?cited by 1,413
- 2021Calibrate Before Use: Improving Few-Shot Performance of Language Modelscited by 1,371
- 2017SmoothGrad: removing noise by adding noisecited by 1,097
- 2021An Explanation of In-context Learning as Implicit Bayesian Inferencecited by 915
- 2023A Survey on Multimodal Large Language Modelscited by 898
5 more
- 2022What learning algorithm is in-context learning? Investigations with linear modelscited by 671
- 2023Larger language models do in-context learning differentlycited by 386
- 2020Visual News: Benchmark and Challenges in News Image Captioningcited by 121
- 2022Complementary Explanations for Effective In-Context Learningcited by 71
- 2023DocumentCLIP: Linking Figures and Main Body Text in Reflowed Documentscited by 7
Built on by
Citing papers per year: 2023: 6; 2024: 12; 2025: 12; 2026: 5.
35 papers.
Sort:
By area:
- 2023HallusionBench: An Advanced Diagnostic Suite for Entangled Language Hallucination and Visual Illusion in Large Vision-Language Modelscited by 572
- 2023Explainability for Large Language Models: A Surveycited by 331
- 2024In-Context Learning with Long-Context Models: An In-Depth Explorationcited by 126
- 2023Better to Ask in English: Cross-Lingual Evaluation of Large Language Models for Healthcare Queriescited by 82
- 2023From Language Modeling to Instruction Following: Understanding the Behavior Shift in LLMs after Instruction Tuningcited by 56
- 2024Explainable Artificial Intelligence: A Survey of Needs, Techniques, Applications, and Future Directioncited by 46
- 2023Neuron-Level Knowledge Attribution in Large Language Modelscited by 37
- 2024Generalized Out-of-Distribution Detection and Beyond in Vision Language Model Era: A Surveycited by 36
- 2024XAI meets LLMs: A Survey of the Relation between Explainable AI and Large Language Modelscited by 23
- 2025Explainable Chain-of-Thought Reasoning: An Empirical Analysis on State-Aware Reasoning Dynamicscited by 16
- 2025The Geometry of Prompting: Unveiling Distinct Mechanisms of Task Adaptation in Language Modelscited by 14
- 2025LLaMAs Have Feelings Too: Unveiling Sentiment and Emotion Representations in LLaMA Models Through Probingcited by 14
23 more
- 2025Interpretation Meets Safety: A Survey on Interpretation Methods and Tools for Improving LLM Safetycited by 10
- 2024Memorization in In-Context Learningcited by 6
- 2024PromptExp: Multi-granularity Prompt Explanation of Large Language Modelscited by 6
- 2024Chain-of-Thought in Large Language Models: Decoding, Projection, and Activationcited by 6
- 2024Towards detecting unanticipated bias in Large Language Modelscited by 3
- 2024Evaluating the Reliability of Self-Explanations in Large Language Modelscited by 3
- 2024Multimodal Contrastive In-Context Learningcited by 3
- 2025Reassessing the Role of Chain-of-Thought in Sentiment Analysis: Insights and Limitationscited by 3
- 2025Towards Transparent AI: A Survey on Explainable Language Modelscited by 3
- 2026NoLan: Mitigating Object Hallucinations in Large Vision-Language Models via Dynamic Suppression of Language Priorscited by 3
- 2026From Actions to Understanding: Conformal Interpretability of Temporal Concepts in LLM Agentscited by 3
- 2025Which Words Matter Most in Zero-Shot Prompts?cited by 2
- 2025Large Language Models Struggle to Describe the Haystack without Human Help: Human-in-the-loop Evaluation of Topic Modelscited by 2
- 2025Can Large Language Models Simulate Human Responses? A Case Study of Stated Preference Experiments in the Context of Heating-related Choicescited by 2
- 2026Understanding the Dynamics of Demonstration Conflict in In-Context Learningcited by 2
- 2026Large language models reorganize representational geometry during in-context learningcited by 2
- 2024Rethinking Distance Metrics for Counterfactual Explainabilitycited by 1
- 2025NEAT: Concept driven Neuron Attribution in LLMscited by 1
- 2023Anticipating Driving Behavior through Deep Learning-Based Policy Predictioncited by 0
- 2024DeepFM-Crispr: Prediction of CRISPR On-Target Effects via Deep Learningcited by 0
- 2025Validity Arguments For Constructed Response Scoring Using Generative Artificial Intelligence Applicationscited by 0
- 2025GraphGhost: Tracing Structures Behind Large Language Modelscited by 0
- 2026From Feature-Based Models to Generative AI: Validity Evidence for Constructed Response Scoringcited by 0
- 2026Large language models reorganize representational geometry during in-context learning16 May 2026
- 2026From Actions to Understanding: Conformal Interpretability of Temporal Concepts in LLM Agents27 Mar 2026
- 2026Understanding the Dynamics of Demonstration Conflict in In-Context Learning3 Mar 2026
- 2026From Feature-Based Models to Generative AI: Validity Evidence for Constructed Response Scoring1 Mar 2026
- 2026NoLan: Mitigating Object Hallucinations in Large Vision-Language Models via Dynamic Suppression of Language Priors25 Feb 2026
- 2025GraphGhost: Tracing Structures Behind Large Language Models7 Oct 2025
- 2025Towards Transparent AI: A Survey on Explainable Language Models25 Sep 2025
- 2025Explainable Chain-of-Thought Reasoning: An Empirical Analysis on State-Aware Reasoning Dynamics29 Aug 2025
- 2025NEAT: Concept driven Neuron Attribution in LLMs21 Aug 2025
- 2025Interpretation Meets Safety: A Survey on Interpretation Methods and Tools for Improving LLM Safety5 Jun 2025
- 2025LLaMAs Have Feelings Too: Unveiling Sentiment and Emotion Representations in LLaMA Models Through Probing22 May 2025
- 2025Can Large Language Models Simulate Human Responses? A Case Study of Stated Preference Experiments in the Context of Heating-related Choices7 Mar 2025
23 more
- 2025Large Language Models Struggle to Describe the Haystack without Human Help: Human-in-the-loop Evaluation of Topic Models20 Feb 2025
- 2025The Geometry of Prompting: Unveiling Distinct Mechanisms of Task Adaptation in Language Models11 Feb 2025
- 2025Which Words Matter Most in Zero-Shot Prompts?5 Feb 2025
- 2025Reassessing the Role of Chain-of-Thought in Sentiment Analysis: Insights and Limitations15 Jan 2025
- 2025Validity Arguments For Constructed Response Scoring Using Generative Artificial Intelligence Applications4 Jan 2025
- 2024Chain-of-Thought in Large Language Models: Decoding, Projection, and Activation5 Dec 2024
- 2024Rethinking Distance Metrics for Counterfactual Explainability18 Oct 2024
- 2024PromptExp: Multi-granularity Prompt Explanation of Large Language Models16 Oct 2024
- 2024DeepFM-Crispr: Prediction of CRISPR On-Target Effects via Deep Learning9 Sep 2024
- 2024Explainable Artificial Intelligence: A Survey of Needs, Techniques, Applications, and Future Direction30 Aug 2024
- 2024Multimodal Contrastive In-Context Learning23 Aug 2024
- 2024Memorization in In-Context Learning21 Aug 2024
- 2024Generalized Out-of-Distribution Detection and Beyond in Vision Language Model Era: A Survey31 Jul 2024
- 2024XAI meets LLMs: A Survey of the Relation between Explainable AI and Large Language Models21 Jul 2024
- 2024Evaluating the Reliability of Self-Explanations in Large Language Models19 Jul 2024
- 2024In-Context Learning with Long-Context Models: An In-Depth Exploration30 Apr 2024
- 2024Towards detecting unanticipated bias in Large Language Models3 Apr 2024
- 2023Neuron-Level Knowledge Attribution in Large Language Models19 Dec 2023
- 2023HallusionBench: An Advanced Diagnostic Suite for Entangled Language Hallucination and Visual Illusion in Large Vision-Language Models23 Oct 2023
- 2023Better to Ask in English: Cross-Lingual Evaluation of Large Language Models for Healthcare Queries19 Oct 2023
- 2023From Language Modeling to Instruction Following: Understanding the Behavior Shift in LLMs after Instruction Tuning30 Sep 2023
- 2023Explainability for Large Language Models: A Survey2 Sep 2023
- 2023Anticipating Driving Behavior through Deep Learning-Based Policy Prediction20 Jul 2023
- 2025Explainable Chain-of-Thought Reasoning: An Empirical Analysis on State-Aware Reasoning Dynamicscited by 16
- 2024Chain-of-Thought in Large Language Models: Decoding, Projection, and Activationcited by 6
- 2025Reassessing the Role of Chain-of-Thought in Sentiment Analysis: Insights and Limitationscited by 3
- 2025Can Large Language Models Simulate Human Responses? A Case Study of Stated Preference Experiments in the Context of Heating-related Choicescited by 2
- 2025GraphGhost: Tracing Structures Behind Large Language Modelscited by 0
- 2025GraphGhost: Tracing Structures Behind Large Language Models7 Oct 2025
- 2025Explainable Chain-of-Thought Reasoning: An Empirical Analysis on State-Aware Reasoning Dynamics29 Aug 2025
- 2025Can Large Language Models Simulate Human Responses? A Case Study of Stated Preference Experiments in the Context of Heating-related Choices7 Mar 2025
- 2025Reassessing the Role of Chain-of-Thought in Sentiment Analysis: Insights and Limitations15 Jan 2025
- 2024Chain-of-Thought in Large Language Models: Decoding, Projection, and Activation5 Dec 2024
- 2023HallusionBench: An Advanced Diagnostic Suite for Entangled Language Hallucination and Visual Illusion in Large Vision-Language Modelscited by 572
- 2024Generalized Out-of-Distribution Detection and Beyond in Vision Language Model Era: A Surveycited by 36
- 2026NoLan: Mitigating Object Hallucinations in Large Vision-Language Models via Dynamic Suppression of Language Priorscited by 3
- 2026NoLan: Mitigating Object Hallucinations in Large Vision-Language Models via Dynamic Suppression of Language Priors25 Feb 2026
- 2024Generalized Out-of-Distribution Detection and Beyond in Vision Language Model Era: A Survey31 Jul 2024
- 2023HallusionBench: An Advanced Diagnostic Suite for Entangled Language Hallucination and Visual Illusion in Large Vision-Language Models23 Oct 2023
- 2023Explainability for Large Language Models: A Surveycited by 331
- 2024In-Context Learning with Long-Context Models: An In-Depth Explorationcited by 126
- 2023Better to Ask in English: Cross-Lingual Evaluation of Large Language Models for Healthcare Queriescited by 82
- 2023From Language Modeling to Instruction Following: Understanding the Behavior Shift in LLMs after Instruction Tuningcited by 56
- 2024Explainable Artificial Intelligence: A Survey of Needs, Techniques, Applications, and Future Directioncited by 46
- 2023Neuron-Level Knowledge Attribution in Large Language Modelscited by 37
- 2024XAI meets LLMs: A Survey of the Relation between Explainable AI and Large Language Modelscited by 23
- 2025The Geometry of Prompting: Unveiling Distinct Mechanisms of Task Adaptation in Language Modelscited by 14
- 2025LLaMAs Have Feelings Too: Unveiling Sentiment and Emotion Representations in LLaMA Models Through Probingcited by 14
- 2024Memorization in In-Context Learningcited by 6
- 2024PromptExp: Multi-granularity Prompt Explanation of Large Language Modelscited by 6
- 2024Towards detecting unanticipated bias in Large Language Modelscited by 3
12 most cited of 25 All 25 (JSON)
- 2026Large language models reorganize representational geometry during in-context learning16 May 2026
- 2026Understanding the Dynamics of Demonstration Conflict in In-Context Learning3 Mar 2026
- 2026From Feature-Based Models to Generative AI: Validity Evidence for Constructed Response Scoring1 Mar 2026
- 2025Towards Transparent AI: A Survey on Explainable Language Models25 Sep 2025
- 2025NEAT: Concept driven Neuron Attribution in LLMs21 Aug 2025
- 2025LLaMAs Have Feelings Too: Unveiling Sentiment and Emotion Representations in LLaMA Models Through Probing22 May 2025
- 2025Large Language Models Struggle to Describe the Haystack without Human Help: Human-in-the-loop Evaluation of Topic Models20 Feb 2025
- 2025The Geometry of Prompting: Unveiling Distinct Mechanisms of Task Adaptation in Language Models11 Feb 2025
- 2025Which Words Matter Most in Zero-Shot Prompts?5 Feb 2025
- 2025Validity Arguments For Constructed Response Scoring Using Generative Artificial Intelligence Applications4 Jan 2025
- 2024Rethinking Distance Metrics for Counterfactual Explainability18 Oct 2024
- 2024PromptExp: Multi-granularity Prompt Explanation of Large Language Models16 Oct 2024
12 newest of 25 All 25 (JSON)
Similar, not cited
Close in wording, no citation either way
- 2024Does In-Context Learning Really Learn? Rethinking How Large Language Models Respond and Solve Tasks via In-Context Learning
- 2025On the Relationship Between the Choice of Representation and In-Context Learning
- 2026The Alchemy of Thought: Understanding In-Context Learning Through Supervised Classification
- 2024From Introspection to Best Practices: Principled Analysis of Demonstrations in Multimodal In-Context Learning
- 2026When Correct Demonstrations Hurt: Rethinking the Role of Exemplars in In-Context Learning
- 2025An Empirical Study on Configuring In-Context Learning Demonstrations for Unleashing MLLMs' Sentimental Perception Capability
- 2022Can In-context Learners Learn a Reasoning Concept from Demonstrations?
- 2025What do vision-language models see in the context? Investigating multimodal in-context learning