mlsanityData to 7 Oct 2026

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

arXiv 2307.05052 ↗First posted 11 Jul 2023cs.CL cs.AIcited by 35

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

  1. 2020Language Models are Few-Shot Learnerscited by 32,199
  2. 2022Training language models to follow instructions with human feedbackcited by 15,712
  3. 2022PaLM: Scaling Language Modeling with Pathwayscited by 5,304
  4. 2016"Why Should I Trust You?": Explaining the Predictions of Any Classifiercited by 5,040
  5. 2017Axiomatic Attribution for Deep Networkscited by 3,350
  6. 2023A Survey of Large Language Modelscited by 2,537
  7. 2013Deep Inside Convolutional Networks: Visualising Image Classification Models and Saliency Mapscited by 2,348
  8. 2022Rethinking the Role of Demonstrations: What Makes In-Context Learning Work?cited by 1,413
  9. 2021Calibrate Before Use: Improving Few-Shot Performance of Language Modelscited by 1,371
  10. 2017SmoothGrad: removing noise by adding noisecited by 1,097
  11. 2021An Explanation of In-context Learning as Implicit Bayesian Inferencecited by 915
  12. 2023A Survey on Multimodal Large Language Modelscited by 898
5 more
  1. 2022What learning algorithm is in-context learning? Investigations with linear modelscited by 671
  2. 2023Larger language models do in-context learning differentlycited by 386
  3. 2020Visual News: Benchmark and Challenges in News Image Captioningcited by 121
  4. 2022Complementary Explanations for Effective In-Context Learningcited by 71
  5. 2023DocumentCLIP: Linking Figures and Main Body Text in Reflowed Documentscited by 7

Built on by

Cited by year (2026 to 7 Oct)

Citing papers per year: 2023: 6; 2024: 12; 2025: 12; 2026: 5.

35 papers.

Sort:

By area:

  1. 2023HallusionBench: An Advanced Diagnostic Suite for Entangled Language Hallucination and Visual Illusion in Large Vision-Language Modelscited by 572
  2. 2023Explainability for Large Language Models: A Surveycited by 331
  3. 2024In-Context Learning with Long-Context Models: An In-Depth Explorationcited by 126
  4. 2023Better to Ask in English: Cross-Lingual Evaluation of Large Language Models for Healthcare Queriescited by 82
  5. 2023From Language Modeling to Instruction Following: Understanding the Behavior Shift in LLMs after Instruction Tuningcited by 56
  6. 2024Explainable Artificial Intelligence: A Survey of Needs, Techniques, Applications, and Future Directioncited by 46
  7. 2023Neuron-Level Knowledge Attribution in Large Language Modelscited by 37
  8. 2024Generalized Out-of-Distribution Detection and Beyond in Vision Language Model Era: A Surveycited by 36
  9. 2024XAI meets LLMs: A Survey of the Relation between Explainable AI and Large Language Modelscited by 23
  10. 2025Explainable Chain-of-Thought Reasoning: An Empirical Analysis on State-Aware Reasoning Dynamicscited by 16
  11. 2025The Geometry of Prompting: Unveiling Distinct Mechanisms of Task Adaptation in Language Modelscited by 14
  12. 2025LLaMAs Have Feelings Too: Unveiling Sentiment and Emotion Representations in LLaMA Models Through Probingcited by 14
23 more
  1. 2025Interpretation Meets Safety: A Survey on Interpretation Methods and Tools for Improving LLM Safetycited by 10
  2. 2024Memorization in In-Context Learningcited by 6
  3. 2024PromptExp: Multi-granularity Prompt Explanation of Large Language Modelscited by 6
  4. 2024Chain-of-Thought in Large Language Models: Decoding, Projection, and Activationcited by 6
  5. 2024Towards detecting unanticipated bias in Large Language Modelscited by 3
  6. 2024Evaluating the Reliability of Self-Explanations in Large Language Modelscited by 3
  7. 2024Multimodal Contrastive In-Context Learningcited by 3
  8. 2025Reassessing the Role of Chain-of-Thought in Sentiment Analysis: Insights and Limitationscited by 3
  9. 2025Towards Transparent AI: A Survey on Explainable Language Modelscited by 3
  10. 2026NoLan: Mitigating Object Hallucinations in Large Vision-Language Models via Dynamic Suppression of Language Priorscited by 3
  11. 2026From Actions to Understanding: Conformal Interpretability of Temporal Concepts in LLM Agentscited by 3
  12. 2025Which Words Matter Most in Zero-Shot Prompts?cited by 2
  13. 2025Large Language Models Struggle to Describe the Haystack without Human Help: Human-in-the-loop Evaluation of Topic Modelscited by 2
  14. 2025Can Large Language Models Simulate Human Responses? A Case Study of Stated Preference Experiments in the Context of Heating-related Choicescited by 2
  15. 2026Understanding the Dynamics of Demonstration Conflict in In-Context Learningcited by 2
  16. 2026Large language models reorganize representational geometry during in-context learningcited by 2
  17. 2024Rethinking Distance Metrics for Counterfactual Explainabilitycited by 1
  18. 2025NEAT: Concept driven Neuron Attribution in LLMscited by 1
  19. 2023Anticipating Driving Behavior through Deep Learning-Based Policy Predictioncited by 0
  20. 2024DeepFM-Crispr: Prediction of CRISPR On-Target Effects via Deep Learningcited by 0
  21. 2025Validity Arguments For Constructed Response Scoring Using Generative Artificial Intelligence Applicationscited by 0
  22. 2025GraphGhost: Tracing Structures Behind Large Language Modelscited by 0
  23. 2026From Feature-Based Models to Generative AI: Validity Evidence for Constructed Response Scoringcited by 0

Similar, not cited

Close in wording, no citation either way

  1. 2024Does In-Context Learning Really Learn? Rethinking How Large Language Models Respond and Solve Tasks via In-Context Learning
  2. 2025On the Relationship Between the Choice of Representation and In-Context Learning
  3. 2026The Alchemy of Thought: Understanding In-Context Learning Through Supervised Classification
  4. 2024From Introspection to Best Practices: Principled Analysis of Demonstrations in Multimodal In-Context Learning
  5. 2026When Correct Demonstrations Hurt: Rethinking the Role of Exemplars in In-Context Learning
  6. 2025An Empirical Study on Configuring In-Context Learning Demonstrations for Unleashing MLLMs' Sentimental Perception Capability
  7. 2022Can In-context Learners Learn a Reasoning Concept from Demonstrations?
  8. 2025What do vision-language models see in the context? Investigating multimodal in-context learning