mlsanityData to 14 Oct 2026

Generative Calibration for In-context Learning

arXiv 2310.10266 ↗First posted 16 Oct 2023cs.CLcited by 20

Not on the map. Why?

Abstract (arXiv)

As one of the most exciting features of large language models (LLMs), in-context learning is a mixed blessing. While it allows users to fast-prototype a task solver with only a few training examples, the performance is generally sensitive to various configurations of the prompt such as the choice or order of the training examples. In this paper, we for the first time theoretically and empirically identify that such a paradox is mainly due to the label shift of the in-context model to the data distribution, in which LLMs shift the label marginal p(y) while having a good label conditional p(x|y). With this understanding, we can simply calibrate the in-context predictive distribution by adjusting the label marginal, which is estimated via Monte-Carlo sampling over the in-context model, i.e., generation of LLMs. We call our approach as generative calibration. We conduct exhaustive experiments with 12 text classification tasks and 12 LLMs scaling from 774M to 33B, generally find that the proposed method greatly and consistently outperforms the ICL as well as state-of-the-art calibration methods, by up to 27% absolute in macro-F1. Meanwhile, the proposed method is also stable under different prompt configurations.

Key facts. Cited by 20 papers in the map (data through 14 Oct 2026). Builds on 41 of its 63 references that are in the map. First posted on arXiv 16 Oct 2023.

Builds on

41 of 63 references.

References · 41

  1. 2020Language Models are Few-Shot Learnerscited by 32,419
  2. 2023LLaMA: Open and Efficient Foundation Language Modelscited by 14,132
  3. 2022Chain-of-Thought Prompting Elicits Reasoning in Large Language Modelscited by 12,459
  4. 2019Sentence-BERT: Sentence Embeddings using Siamese BERT-Networkscited by 9,170
  5. 2022Self-Consistency Improves Chain of Thought Reasoning in Language Modelscited by 5,708
  6. 2022OPT: Open Pre-trained Transformer Language Modelscited by 3,512
  7. 2022Emergent Abilities of Large Language Modelscited by 2,512
  8. 2015Character-level Convolutional Networks for Text Classificationcited by 2,330
  9. 2015A large annotated corpus for learning natural language inferencecited by 1,847
  10. 2022Rethinking the Role of Demonstrations: What Makes In-Context Learning Work?cited by 1,434
  11. 2021Calibrate Before Use: Improving Few-Shot Performance of Language Modelscited by 1,392
  12. 2020Making Pre-trained Language Models Better Few-shot Learnerscited by 1,256
29 more
  1. 2021What Makes Good In-Context Examples for GPT-3?cited by 1,195
  2. 2021Fantastically Ordered Prompts and Where to Find Them: Overcoming Few-Shot Prompt Order Sensitivitycited by 1,135
  3. 2021An Explanation of In-context Learning as Implicit Bayesian Inferencecited by 938
  4. 2023RWKV: Reinventing RNNs for the Transformer Eracited by 827
  5. 2022Transformers learn in-context by gradient descentcited by 732
  6. 2022GPT-NeoX-20B: An Open-Source Autoregressive Language Modelcited by 713
  7. 2021Learning To Retrieve Prompts for In-Context Learningcited by 648
  8. 2017A systematic study of the class imbalance problem in convolutional neural networkscited by 513
  9. 2023Larger language models do in-context learning differentlycited by 394
  10. 2018Detecting and Correcting for Label Shift with Black Box Predictorscited by 366
  11. 2021True Few-Shot Learning with Language Modelscited by 344
  12. 2021Surface Form Competition: Why the Highest Probability Answer Isn't Always Rightcited by 263
  13. 2021Noisy Channel Language Model Prompting for Few-Shot Text Classificationcited by 165
  14. 2021Meta-learning via Language Model In-context Tuningcited by 164
  15. 2023What In-Context Learning "Learns" In-Context: Disentangling Task Recognition and Task Learningcited by 152
  16. 2023Large Language Models Are Latent Variable Models: Explaining and Finding Good Demonstrations for In-Context Learningcited by 149
  17. 2022Impact of Pretraining Term Frequencies on Few-Shot Reasoningcited by 142
  18. 2023Language Model Crossover: Variation through Few-Shot Promptingcited by 122
  19. 2019Regularized Learning for Domain Adaptation under Label Shiftscited by 120
  20. 2022Ground-Truth Labels Matter: A Deeper Look into Input-Label Demonstrationscited by 116
  21. 2023Mitigating Label Biases for In-context Learningcited by 89
  22. 2023Meta-in-context learning in large language modelscited by 59
  23. 2022Prototypical Calibration for Few-shot Learning of Language Modelscited by 58
  24. 2023Measuring Inductive Biases of In-Context Learning with Underspecified Demonstrationscited by 49
  25. 2023Skill-Based Few-Shot Selection for In-Context Learningcited by 46
  26. 2020Interpretation of NLP models through input marginalizationcited by 44
  27. 2023Investigating the Effectiveness of Task-Agnostic Prefix Prompt for Instruction Followingcited by 33
  28. 2023In-Context Demonstration Selection with Cross Entropy Differencecited by 17
  29. 2023Improving Probability-based Prompt Selection Through Unified Evaluation and Analysiscited by 13

Built on by

Cited by year (2026 to 14 Oct)

Citing papers per year: 2024: 11; 2025: 5; 2026: 4.

20 papers.

Sort:

By area:

  1. 2024Aligning with Human Judgement: The Role of Pairwise Preference in Large Language Model Evaluatorscited by 149
  2. 2024Why Tabular Foundation Models Should Be a Research Prioritycited by 106
  3. 2024Thermometer: Towards Universal Calibration for Large Language Modelscited by 38
  4. 2024Beyond Performance: Quantifying and Mitigating Label Bias in LLMscited by 25
  5. 2025Restoring Calibration for Aligned Large Language Models: A Calibration-Aware Fine-Tuning Approachcited by 25
  6. 2024Enhancing In-context Learning via Linear Probe Calibrationcited by 16
  7. 2024Confidence Calibration of Classifiers with Many Classescited by 11
  8. 2024Rectifying Demonstration Shortcut in In-Context Learningcited by 9
  9. 2024Token-based Decision Criteria Are Suboptimal in In-context Learningcited by 9
  10. 2024Shortcut Learning in In-Context Learning: A Surveycited by 8
  11. 2024A Survey of RWKVcited by 6
  12. 2026Exploring the Effects of Alignment on Numerical Bias in Large Language Modelscited by 3
8 more
  1. 2024PICLe: Pseudo-Annotations for In-Context Learning in Low-Resource Named Entity Detectioncited by 2
  2. 2025StaICC: Standardized Evaluation for Classification Task in In-context Learningcited by 2
  3. 2025Mitigating Label Length Bias in Large Language Modelscited by 2
  4. 2026Frictive Policy Optimization for LLMs: Epistemic Intervention, Risk-Sensitive Control, and Reflective Alignmentcited by 2
  5. 2025D.Va: Validate Your Demonstration First Before You Use Itcited by 1
  6. 2025Mechanistic Fine-tuning for In-context Learningcited by 0
  7. 2026Mitigating Scoring Bias in LLM-as-a-Judge via Random Number Generationcited by 0
  8. 2026Beyond Post-Hoc Temperature Scaling: Bilevel Optimization for LLM Calibrationcited by 0