mlsanityData to 7 Oct 2026

Not All Demonstration Examples are Equally Beneficial: Reweighting Demonstration Examples for In-Context Learning

arXiv 2310.08309 ↗First posted 12 Oct 2023cs.CLcited by 9

Not on the map. Why?

Abstract (arXiv)

Large Language Models (LLMs) have recently gained the In-Context Learning (ICL) ability with the models scaling up, allowing them to quickly adapt to downstream tasks with only a few demonstration examples prepended in the input sequence. Nonetheless, the current practice of ICL treats all demonstration examples equally, which still warrants improvement, as the quality of examples is usually uneven. In this paper, we investigate how to determine approximately optimal weights for demonstration examples and how to apply them during ICL. To assess the quality of weights in the absence of additional validation data, we design a masked self-prediction (MSP) score that exhibits a strong correlation with the final ICL performance. To expedite the weight-searching process, we discretize the continuous weight space and adopt beam search. With approximately optimal weights obtained, we further propose two strategies to apply them to demonstrations at different model positions. Experimental results on 8 text classification tasks show that our approach outperforms conventional ICL by a large margin. Our code are publicly available at https:github.com/Zhe-Young/WICL.

Key facts. Cited by 9 papers in the map (data through 7 Oct 2026). Builds on 20 of its 39 references that are in the map. First posted on arXiv 12 Oct 2023.

Builds on

20 of 39 references.

References · 20

  1. 2020Language Models are Few-Shot Learnerscited by 32,199
  2. 2022Emergent Abilities of Large Language Modelscited by 2,483
  3. 2015Character-level Convolutional Networks for Text Classificationcited by 2,293
  4. 2022Rethinking the Role of Demonstrations: What Makes In-Context Learning Work?cited by 1,413
  5. 2021Calibrate Before Use: Improving Few-Shot Performance of Language Modelscited by 1,371
  6. 2021What Makes Good In-Context Examples for GPT-3?cited by 1,184
  7. 2021Fantastically Ordered Prompts and Where to Find Them: Overcoming Few-Shot Prompt Order Sensitivitycited by 1,122
  8. 2021An Explanation of In-context Learning as Implicit Bayesian Inferencecited by 915
  9. 2022Out of One, Many: Using Language Models to Simulate Human Samplescited by 737
  10. 2018Learning to Reweight Examples for Robust Deep Learningcited by 670
  11. 2021True Few-Shot Learning with Language Modelscited by 343
  12. 2022Demystifying Prompts in Language Models via Perplexity Estimationcited by 215
8 more
  1. 2022Active Example Selection for In-Context Learningcited by 195
  2. 2021Efficient Large Scale Language Modeling with Mixtures of Expertscited by 175
  3. 2021Noisy Channel Language Model Prompting for Few-Shot Text Classificationcited by 163
  4. 2022Ground-Truth Labels Matter: A Deeper Look into Input-Label Demonstrationscited by 116
  5. 2023Finding Support Examples for In-Context Learningcited by 104
  6. 2022Z-ICL: Zero-Shot In-Context Learning with Pseudo-Demonstrationscited by 70
  7. 2021FLEX: Unifying Evaluation for Few-Shot NLPcited by 67
  8. 2021True Few-Shot Learning with Prompts -- A Real-World Perspectivecited by 38

Built on by

Cited by year (2026 to 7 Oct)

Citing papers per year: 2024: 6; 2025: 2; 2026: 1.

9 papers.