Generative Calibration for In-context Learning
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
- 2020Language Models are Few-Shot Learnerscited by 32,419
- 2023LLaMA: Open and Efficient Foundation Language Modelscited by 14,132
- 2022Chain-of-Thought Prompting Elicits Reasoning in Large Language Modelscited by 12,459
- 2019Sentence-BERT: Sentence Embeddings using Siamese BERT-Networkscited by 9,170
- 2022Self-Consistency Improves Chain of Thought Reasoning in Language Modelscited by 5,708
- 2022OPT: Open Pre-trained Transformer Language Modelscited by 3,512
- 2022Emergent Abilities of Large Language Modelscited by 2,512
- 2015Character-level Convolutional Networks for Text Classificationcited by 2,330
- 2015A large annotated corpus for learning natural language inferencecited by 1,847
- 2022Rethinking the Role of Demonstrations: What Makes In-Context Learning Work?cited by 1,434
- 2021Calibrate Before Use: Improving Few-Shot Performance of Language Modelscited by 1,392
- 2020Making Pre-trained Language Models Better Few-shot Learnerscited by 1,256
29 more
- 2021What Makes Good In-Context Examples for GPT-3?cited by 1,195
- 2021Fantastically Ordered Prompts and Where to Find Them: Overcoming Few-Shot Prompt Order Sensitivitycited by 1,135
- 2021An Explanation of In-context Learning as Implicit Bayesian Inferencecited by 938
- 2023RWKV: Reinventing RNNs for the Transformer Eracited by 827
- 2022Transformers learn in-context by gradient descentcited by 732
- 2022GPT-NeoX-20B: An Open-Source Autoregressive Language Modelcited by 713
- 2021Learning To Retrieve Prompts for In-Context Learningcited by 648
- 2017A systematic study of the class imbalance problem in convolutional neural networkscited by 513
- 2023Larger language models do in-context learning differentlycited by 394
- 2018Detecting and Correcting for Label Shift with Black Box Predictorscited by 366
- 2021True Few-Shot Learning with Language Modelscited by 344
- 2021Surface Form Competition: Why the Highest Probability Answer Isn't Always Rightcited by 263
- 2021Noisy Channel Language Model Prompting for Few-Shot Text Classificationcited by 165
- 2021Meta-learning via Language Model In-context Tuningcited by 164
- 2023What In-Context Learning "Learns" In-Context: Disentangling Task Recognition and Task Learningcited by 152
- 2023Large Language Models Are Latent Variable Models: Explaining and Finding Good Demonstrations for In-Context Learningcited by 149
- 2022Impact of Pretraining Term Frequencies on Few-Shot Reasoningcited by 142
- 2023Language Model Crossover: Variation through Few-Shot Promptingcited by 122
- 2019Regularized Learning for Domain Adaptation under Label Shiftscited by 120
- 2022Ground-Truth Labels Matter: A Deeper Look into Input-Label Demonstrationscited by 116
- 2023Mitigating Label Biases for In-context Learningcited by 89
- 2023Meta-in-context learning in large language modelscited by 59
- 2022Prototypical Calibration for Few-shot Learning of Language Modelscited by 58
- 2023Measuring Inductive Biases of In-Context Learning with Underspecified Demonstrationscited by 49
- 2023Skill-Based Few-Shot Selection for In-Context Learningcited by 46
- 2020Interpretation of NLP models through input marginalizationcited by 44
- 2023Investigating the Effectiveness of Task-Agnostic Prefix Prompt for Instruction Followingcited by 33
- 2023In-Context Demonstration Selection with Cross Entropy Differencecited by 17
- 2023Improving Probability-based Prompt Selection Through Unified Evaluation and Analysiscited by 13
Built on by
Citing papers per year: 2024: 11; 2025: 5; 2026: 4.
20 papers.
Sort:
By area:
- 2024Aligning with Human Judgement: The Role of Pairwise Preference in Large Language Model Evaluatorscited by 149
- 2024Why Tabular Foundation Models Should Be a Research Prioritycited by 106
- 2024Thermometer: Towards Universal Calibration for Large Language Modelscited by 38
- 2024Beyond Performance: Quantifying and Mitigating Label Bias in LLMscited by 25
- 2025Restoring Calibration for Aligned Large Language Models: A Calibration-Aware Fine-Tuning Approachcited by 25
- 2024Enhancing In-context Learning via Linear Probe Calibrationcited by 16
- 2024Confidence Calibration of Classifiers with Many Classescited by 11
- 2024Rectifying Demonstration Shortcut in In-Context Learningcited by 9
- 2024Token-based Decision Criteria Are Suboptimal in In-context Learningcited by 9
- 2024Shortcut Learning in In-Context Learning: A Surveycited by 8
- 2024A Survey of RWKVcited by 6
- 2026Exploring the Effects of Alignment on Numerical Bias in Large Language Modelscited by 3
8 more
- 2024PICLe: Pseudo-Annotations for In-Context Learning in Low-Resource Named Entity Detectioncited by 2
- 2025StaICC: Standardized Evaluation for Classification Task in In-context Learningcited by 2
- 2025Mitigating Label Length Bias in Large Language Modelscited by 2
- 2026Frictive Policy Optimization for LLMs: Epistemic Intervention, Risk-Sensitive Control, and Reflective Alignmentcited by 2
- 2025D.Va: Validate Your Demonstration First Before You Use Itcited by 1
- 2025Mechanistic Fine-tuning for In-context Learningcited by 0
- 2026Mitigating Scoring Bias in LLM-as-a-Judge via Random Number Generationcited by 0
- 2026Beyond Post-Hoc Temperature Scaling: Bilevel Optimization for LLM Calibrationcited by 0
- 2026Beyond Post-Hoc Temperature Scaling: Bilevel Optimization for LLM Calibration7 Aug 2026
- 2026Mitigating Scoring Bias in LLM-as-a-Judge via Random Number Generation6 Aug 2026
- 2026Frictive Policy Optimization for LLMs: Epistemic Intervention, Risk-Sensitive Control, and Reflective Alignment28 Apr 2026
- 2026Exploring the Effects of Alignment on Numerical Bias in Large Language Models23 Jan 2026
- 2025Mitigating Label Length Bias in Large Language Models18 Nov 2025
- 2025Mechanistic Fine-tuning for In-context Learning20 May 2025
- 2025Restoring Calibration for Aligned Large Language Models: A Calibration-Aware Fine-Tuning Approach4 May 2025
- 2025D.Va: Validate Your Demonstration First Before You Use It19 Feb 2025
- 2025StaICC: Standardized Evaluation for Classification Task in In-context Learning27 Jan 2025
- 2024A Survey of RWKV19 Dec 2024
- 2024PICLe: Pseudo-Annotations for In-Context Learning in Low-Resource Named Entity Detection16 Dec 2024
- 2024Confidence Calibration of Classifiers with Many Classes5 Nov 2024
8 more
- 2024Shortcut Learning in In-Context Learning: A Survey4 Nov 2024
- 2024Token-based Decision Criteria Are Suboptimal in In-context Learning24 Jun 2024
- 2024Beyond Performance: Quantifying and Mitigating Label Bias in LLMs4 May 2024
- 2024Why Tabular Foundation Models Should Be a Research Priority2 May 2024
- 2024Aligning with Human Judgement: The Role of Pairwise Preference in Large Language Model Evaluators25 Mar 2024
- 2024Rectifying Demonstration Shortcut in In-Context Learning14 Mar 2024
- 2024Thermometer: Towards Universal Calibration for Large Language Models20 Feb 2024
- 2024Enhancing In-context Learning via Linear Probe Calibration22 Jan 2024
- 2024Enhancing In-context Learning via Linear Probe Calibrationcited by 16
- 2024Enhancing In-context Learning via Linear Probe Calibration22 Jan 2024
- 2024Why Tabular Foundation Models Should Be a Research Prioritycited by 106
- 2024Thermometer: Towards Universal Calibration for Large Language Modelscited by 38
- 2024Beyond Performance: Quantifying and Mitigating Label Bias in LLMscited by 25
- 2024Confidence Calibration of Classifiers with Many Classescited by 11
- 2024Rectifying Demonstration Shortcut in In-Context Learningcited by 9
- 2024Token-based Decision Criteria Are Suboptimal in In-context Learningcited by 9
- 2024Shortcut Learning in In-Context Learning: A Surveycited by 8
- 2024A Survey of RWKVcited by 6
- 2026Exploring the Effects of Alignment on Numerical Bias in Large Language Modelscited by 3
- 2024PICLe: Pseudo-Annotations for In-Context Learning in Low-Resource Named Entity Detectioncited by 2
- 2025StaICC: Standardized Evaluation for Classification Task in In-context Learningcited by 2
- 2025Mitigating Label Length Bias in Large Language Modelscited by 2
12 most cited of 17 All 17 (JSON)
- 2026Beyond Post-Hoc Temperature Scaling: Bilevel Optimization for LLM Calibration7 Aug 2026
- 2026Mitigating Scoring Bias in LLM-as-a-Judge via Random Number Generation6 Aug 2026
- 2026Frictive Policy Optimization for LLMs: Epistemic Intervention, Risk-Sensitive Control, and Reflective Alignment28 Apr 2026
- 2026Exploring the Effects of Alignment on Numerical Bias in Large Language Models23 Jan 2026
- 2025Mitigating Label Length Bias in Large Language Models18 Nov 2025
- 2025Mechanistic Fine-tuning for In-context Learning20 May 2025
- 2025D.Va: Validate Your Demonstration First Before You Use It19 Feb 2025
- 2025StaICC: Standardized Evaluation for Classification Task in In-context Learning27 Jan 2025
- 2024A Survey of RWKV19 Dec 2024
- 2024PICLe: Pseudo-Annotations for In-Context Learning in Low-Resource Named Entity Detection16 Dec 2024
- 2024Confidence Calibration of Classifiers with Many Classes5 Nov 2024
- 2024Shortcut Learning in In-Context Learning: A Survey4 Nov 2024
12 newest of 17 All 17 (JSON)