Dual Debiasing for Noisy In-Context Learning for Text Generation
Open accessThe DOI matches its DataCite record; 32 of the 32 references it cites were found in a registry or an index; 6 of the 26 sources its claims cite were checked for support.
Abstract
In context learning (ICL) relies heavily on high quality demonstrations drawn from large annotated corpora. Existing approaches detect noisy annotations by ranking local perplexities, presuming that noisy samples yield higher perplexities than their clean counterparts. However, this assumption breaks down when the noise ratio is high and many demonstrations are flawed. We reexamine the perplexity based paradigm for text generation under noisy annotations, highlighting two sources of bias in perplexity: the annotation itself and the domain specific knowledge inherent in large language models (LLMs). To overcome these biases, we introduce a dual debiasing framework that uses synthesized neighbors to explicitly correct perplexity estimates, yielding a robust Sample Cleanliness Score. This metric uncovers absolute sample cleanliness regardless of the overall corpus noise level. Extensive experiments demonstrate our method's superior noise detection capabilities and show that its final ICL performance is comparable to that of a fully clean demonstration corpus. Moreover, our approach remains robust even when noise ratios are extremely high.
Overview
CoChat Summary
TL;DR
The paper proposes a dual-debiasing framework for noisy in-context learning in text generation, correcting perplexity-based sample cleanliness for intrinsic annotation bias and extrinsic domain bias using synthesized neighbors. It reports improved noise detection and ICL performance under high noise, sometimes comparable to clean demonstration settings.
Key findings
- The authors identify and mathematically formulate two biases in LLM perplexity for query-annotation matching: intrinsic bias from the annotation itself/LLM prior on \(y\), and extrinsic bias from domain-specific knowledge; they propose the Sample Cleanliness Score \(I(x,y)=\Phi/L_{\text{de-int}}\).
- Across NQ, WebQ, SciQ, and SQuAD under noise ratios 0.2–0.8 and Random/TopK/DPP retrievers, the method improves over baselines; at 0.8 noise on SciQ with TopK, it improves over naive ICL by 37.94 for irrelevant noise and 26.49 for relevant noise.
- Noise detection AUC improvement over naive per-token loss on NQ with 0.4 relevant noise: GPT-Neo-1.3B +0.2157, Gemma-2B +0.1403, Mistral-7B-v0.1 +0.1179, Llama-2-7B +0.1476; smaller GPT-Neo-1.3B shows negligible performance decline at 0.6 noise.
- Performance remains consistent for \(\gamma \in [0.4,0.9]\) and with fewer neighbors; failure analysis on WebQ 40% relevant noise found 36% of failed noisy-as-clean cases had annotation lengths >7 tokens, versus 14% of successfully detected clean and 12% of successfully detected noisy samples.
Methods
- Design: dual-debiasing for noisy ICL text generation. Intrinsic debiasing divides per-token NLL \(L(y|x)\) by \(L(y)\) to get \(L_{\text{de-int}}\); extrinsic debiasing estimates domain bias \(\Phi\) via synthesized neighbors \(N_{\text{DISC}}\) from corpus \(C\), bounded by edit distance \(\eta=\max(T,T_{\max})\), yielding Sample Cleanliness Score \(I=\Phi/L_{\text{de-int}}\).
- Pipeline: compute \(I\) for training samples, fit a 2-component GMM to detect noisy samples, threshold \(\gamma=0.5\), remove the noisy subset, then run standard ICL retrieval/inference on the clean subset. Baselines: Naive ICL, Random delete, LPR (Gao et al. 2024), Ours; retrievers Random, TopK, DPP.
- Data/sample: four text generation datasets—NQ (10,000 train/500 test), WebQ (1,261/1,213), SciQ (6,059/580), SQuAD (20,000/1,000)—with noise ratios [0.2,0.8] and relevant/irrelevant noise. Default inference LLM Llama-2-7B; metric models include Llama-2-7B, GPT-Neo-1.3B, Gemma-2b, Mistral-7B-v0.1; \(N_{\text{neighbor}}=50\); experiments on NVIDIA RTX A5000, each <30 min.
Limitations
- Stated: effectiveness relies on the quality and diversity of neighbor samples; limited or specialized domains may make appropriate neighbors challenging, affecting Sample Cleanliness Score accuracy. Applicability to classification or structured prediction remains unexplored.
- Stated potential risks: computational cost of neighbor generation and metric calculation increases linearly with the number of demonstration samples, with a possible practical upper limit to dataset size; the method may discard valid but unusual demonstrations that appear noisy due to uniqueness, especially in specialized domains.
- Text-evident: failure analysis shows annotation length affects detection—longer annotations create more complex probability distributions that obscure clean/noisy distinction; on WebQ 40% relevant noise, 36% of failed noisy-as-clean cases had annotation lengths >7 tokens. Evaluation is limited to four text generation datasets and noise generated following Gao et al. (2024).
Model-written summary. Check it against the paper before relying on it.
Integrity signals
Registry
Cites
Statistics
Figures










Verification
Claims the paper makes
2 Valid: 2 in part · 3 Not valid · 14 Not checked · 68 Own results and interpretations
The cited sources support only part of this claim — read each source’s verdict below.
In the paper
“This can be attributed to bias factors like the demonstration sample itself, LLM's prior knowledge (Fei et al., 2023;Zhao et al., 2021), and even LLM architectures (O' Brien and Lewis, 2023;Li et al., 2022).”
§ Dual Debiasing for Noisy In-Context Learning for Text Generation > 3.1 Motivation on Probability
What the sources say
- Supportedcites Fei et al., 2023 matched to “Mitigating Label Biases for In-context Learning” (2023) source
The citation is attached to the 'LLM's prior knowledge' factor. Fei et al. (2023) state in §2.1 A Typology of Label Biases that vanilla-label bias's 'one possible cause is the pre-training term frequencies of the label names' and that 'the model also relies on its prior knowledge of the task when making predictions... the association of words to the label names learned from pre-training is a potential pitfall'; §3 and §8 likewise tie label bias to knowledge acquired in pretraining. The same typology also covers the demonstration-sample effect (context-label bias), so the attributed factor is squarely this paper's point. (LLM, conf=0.85)
- Supportedcites Zhao et al., 2021 matched to “Calibrate Before Use: Improving Few-Shot Performance of Language Models” (2021) source
The citation to Zhao et al. (2021) is attached specifically to the 'LLM's prior knowledge' bias factor. Our copy states exactly that: Section 4 (Common Token Bias, p. 4) reports GPT-3 is 'biased towards outputting tokens that are common in its pretraining distribution', and the Introduction (p. 1) says the common token bias 'leads the model to prefer answers that are frequent in its pre-training data'; Section 5 (p. 5) summarizes the biases as arising 'due to the prompt and the model's intrinsic biases'. The other factors in the sentence (demonstration sample, architectures) carry their own citations and are not judged here. (LLM, conf=0.88)
- Could not verifycites O' Brien and Lewis, 2023 matched to “Contrastive Decoding Improves Reasoning in Large Language Models” (2023) sourceExperimental — accuracy not yet measured
Our copy of O'Brien and Lewis (2023) contains no passage attributing poor differentiation of a likelihood measure L(y|x) to LLM architectures, nor any statement that architecture is a bias factor. The closest material is the Introduction's account of bias as 'undesirable modes of the expert model's distribution, such as short or generic strings, which tend to be the most likely under any model, including the amateur' (§1, and §2.1/§2.2 on the contrastive objective), plus §3.5 CONTRASTIVE RANKING and the FLAN-T5 study ('CD can benefit non-LLaMA models') and §6 LIMITATIONS ('our investigation is also limited mainly to the LLaMA family') — none of which make the architecture-as-bias point the citation is offered for. Searched: LLM architecture bias, non-LLaMA/different architectures, model distribution bias, multiple-choice ranking likelihood; nothing contrary appears either. (LLM, conf=0.65)
plainstates a cause- Asserted: passes — The authors put it forward as true.
- Checkable: passes — It can be checked against evidence.
- Load-bearing: passes — The paper’s conclusions depend on it.
- Based: passes — The paper gives a reason why it holds.
- Supported
The cited sources support only part of this claim — read each source’s verdict below.
In the paper
“Intuitively, a well-pretrained LLM is more likely to assign higher probability to the correct annotation (or, the in-distribution annotation) than the noised one (or, out-of-distribution one), when conditioned on the same query x (Arora et al., 2021;Alon and Kamfonas, 2023;Gao et al., 2024)”
§ Dual Debiasing for Noisy In-Context Learning for Text Generation > 3.1 Motivation on Probability
What the sources say
- Partly supportedcites Arora et al., 2021 matched to “Types of Out-of-Distribution Texts and How to Detect Them” (2021) sourceExperimental — accuracy not yet measured
Our copy supports only the generic likelihood intuition behind the claim: in Section 3 (OOD Detection Methods) the density-estimation score is the language model's own likelihood of the text, s_PPL(x)=exp(1/T Σ log p_LM(x_t|x_{1:t-1})) computed with GPT-2 fine-tuned on the ID data (Section 5.1), and examples are flagged OOD when the score falls below a threshold; Sections 5.3 and 5.5 and Appendix C (Tables 2, 7, 9) show this separating ID from OOD text (e.g. PPL AUROC 97.9–98.9 on background-shift pairs, near-perfect on HANS). What the paper does not contain is the claim's specific formulation: it scores whole input texts from different domains, genres or shifted datasets, never a 'correct' versus 'noised' annotation compared for the same query, and its LM conditions only on the preceding tokens of the sequence (Appendix A on log p(x)), not on a fixed query x. The conditional p(y|x) that appears in the paper is the classifier's maximum softmax probability (Eq. 5, RoBERTa), which the paper treats as a separate calibration method, and its LM is fine-tuned on ID data rather than simply 'well-pretrained'. (LLM, conf=0.70)
- Partly supportedcites Alon and Kamfonas, 2023 matched to “Detecting Language Model Attacks with Perplexity” (2023) sourceExperimental — accuracy not yet measured
Our copy supports only the general direction of the intuition: Section 5 (Analysis) states 'Non-adversarial prompts using proper English generally exhibit low perplexity values relative to adversarial,' and Section 2 (Related Work) attributes this to GPT-2 having been 'primarily trained on web pages that were curated and filtered by humans for quality, and it was also optimized to have low perplexity,' with 'A human-like perception of what actual text looks like is likely why perplexity is effective'. However, the paper scores whole prompt sequences unconditionally (Eq. 2, Section 3 Methods) and contrasts adversarial-suffix attacks with regular prompts; it nowhere compares a correct versus a noised annotation conditioned on the same query x, nor treats annotation noise or in-distribution labels as such. The same-query conditional-likelihood framing is therefore not attributable to this source, and Section 5 also warns that some regular prompts exceed adversarial ones on the perplexity axis by an order of magnitude. (LLM, conf=0.68)
- Supportedcites Gao et al., 2024 matched to “On the Noise Robustness of In-Context Learning for Text Generation” (2024) source
The Introduction (Sec. 1) states the finding directly: 'We find that wrong answers generally result in a higher perplexity of large language models compared to correct ones, in response to the same question' — higher perplexity being lower probability, this is the claim's paraphrase, including its hedge ('generally' / 'more likely'). Sec. 4.1 (Perplexity deviation of noisy annotations) empirically confirms it for Llama2-7B across four datasets: 'examples with noisy annotations indeed obtain higher perplexity than those with clean annotations', with the perplexity computed on the concatenated (x, y) sequence conditioned on the preceding tokens, and Sec. 4.1 also notes the matching-perplexity component 'can be zero with correct outputs'. The only wording the source does not carry is the modifier 'well-pretrained' (it speaks of LLMs generally, e.g. Llama2-7B/13B, Mistral-7B, OPT-6.7B), and it adds that the deviation is marginal — a caveat, not a contradiction of the hedged claim. (LLM, conf=0.85)
hedgedstates an association- Asserted: passes — The authors put it forward as true.
- Checkable: passes — It can be checked against evidence.
- Load-bearing: passes — The paper’s conclusions depend on it.
- Based: passes — The paper gives a reason why it holds.
- Partly supported
A result the paper reports from its own data — it cites no other source for it, so there is none to check. The quote shows it is in the paper.
In the paper
“In short, the distribution of clean demonstrations' per-token NLL loss values overlaps heavily with that of noisy ones, which makes it almost impossible to determine whether a demonstration is clean or not given its L(y|x) value alone.”
§ Dual Debiasing for Noisy In-Context Learning for Text Generation > 3.1 Motivation on Probability
plain- Asserted: passes — The authors put it forward as true.
- Checkable: passes — It can be checked against evidence.
- Load-bearing: passes — The paper’s conclusions depend on it.
- Based: passes — The paper gives a reason why it holds.
A result the paper reports from its own data — it cites no other source for it, so there is none to check. The quote shows it is in the paper.
In the paper
“Moreover, our approach remains robust even when noise ratios are extremely high.”
- Also stated in: § 1 Introduction · plain
“We design a metric-based pipeline for addressing the challenges of noisy ICL, which is sufficiently robust even under extreme noise cases.”
§ Dual Debiasing for Noisy In-Context Learning for Text Generation > Abstract
plain- Asserted: passes — The authors put it forward as true.
- Checkable: passes — It can be checked against evidence.
- Load-bearing: passes — The paper’s conclusions depend on it.
- Based: passes — The paper gives a reason why it holds.
- Also stated in: § 1 Introduction · plain
A result the paper reports from its own data — it cites no other source for it, so there is none to check. The quote shows it is in the paper.
In the paper
“The results show that the performance remains consistent even as the number of neighbors increases.”
§ Dual Debiasing for Noisy In-Context Learning for Text Generation > Dataset Retriever Metric Model
plain- Asserted: passes — The authors put it forward as true.
- Checkable: passes — It can be checked against evidence.
- Load-bearing: passes — The paper’s conclusions depend on it.
- Based: passes — The paper gives a reason why it holds.
48 more claims
Create a free account to see all 87 claims and to verify the 19 references still open.
- It may state two separate claims as one. 14
- Probably not a substantial claim. 22
Self-check
Percentages, sums and reported differences re-computed from the paper’s own numbers.
Each contradiction between two passages listed here was confirmed by an independent check.
Rated minor: it would not touch a result — a value no result rests on, a p-value that stays on the same side of the significance level, or a conflict that is clerical, resolved elsewhere in the paper, or outside its own findings.
In the paper
§ Dual Debiasing for Noisy In-Context Learning for Text Generation > 3.3 Neighbor-based Extrinsic Debiasing
“However, different patterns emerge when examining demonstrations from Date vs Sports-Team under Gemma-2b, and Music-Band vs Number under GPT-Neo-2.7B.”
§ Dual Debiasing for Noisy In-Context Learning for Text Generation > 3.3 Neighbor-based Extrinsic Debiasing
“We observe a similar issue between Music-Band vs Number under Gemma-2b as shown in Figure 2d.”
Citations
Cites
Language Models are Few-Shot Learners
Brown, T. B., Mann, B., Ryder, N., Subbiah, M., Kaplan, J., Dhariwal, P., Neelakantan, A., Shyam, P., Sastry, G., Askell, A., et al. (2020) · arXiv · doi:10.48550/arxiv.2005.14165 · Cited by 23,372
LLaMA: Open and Efficient Foundation Language Models
Touvron, H., Lavril, T., Izacard, G., Martinet, X., Lachaux, M.-A., Lacroix, T., Rozière, B., Goyal, N., Hambro, E., Azhar, F., et al. (2023) · arXiv · doi:10.48550/arxiv.2302.13971 · Cited by 4,602
Chain-Of-Thought Prompting Elicits Reasoning in Large Language Models
Wei, J., Wang, X., Schuurmans, D., Bosma, M., Ichter, B., Xia, F., Chi, E., Le, Q. V., & Zhou, D. (2022) · Advances in Neural Information Processing Systems 35 · doi:10.52202/068431-1800 · Cited by 4,505
Natural Questions: A benchmark for question answering research
Kwiatkowski, T., Palomaki, J., Redfield, O., Collins, M., Parikh, A., Alberti, C., Epstein, D., Polosukhin, I., Devlin, J., Lee, K., et al. (2019) · Transactions of the Association for Computational Linguistics · doi:10.1162/tacl_a_00276 · Cited by 2,069
Rethinking the Role of Demonstrations: What Makes In-Context Learning Work?
Min, S., Lyu, X., Holtzman, A., Artetxe, M., Lewis, M., Hajishirzi, H., & Zettlemoyer, L. (2022) · Proceedings of the 2022 Conference on Empirical Methods in Natural Language Processing · doi:10.18653/v1/2022.emnlp-main.759 · Cited by 755
Rethinking the Role of Demonstrations: What Makes In-Context Learning Work?
Min, S., Lyu, X., Holtzman, A., Artetxe, M., Lewis, M., Hajishirzi, H., & Zettlemoyer, L. (2022) · arXiv · doi:10.48550/arxiv.2202.12837 · Cited by 752
A Survey on In-context Learning
Dong, Q., Li, L., Dai, D., Zheng, C., Ma, J., Li, R., Xia, H., Xu, J., Wu, Z., Chang, B., et al. (2024) · Proceedings of the 2024 Conference on Empirical Methods in Natural Language Processing · doi:10.18653/v1/2024.emnlp-main.64 · Cited by 649
Calibrate Before Use: Improving Few-Shot Performance of Language Models
Zhao, T. Z., Wallace, E., Feng, S., Klein, D., & Singh, S. (2021) · arXiv · doi:10.48550/arxiv.2102.09690 · Cited by 513
Jiang, A. Q., Sablayrolles, A., Mensch, A., Bamford, C., Chaplot, D. S., Casas, D. D. L., Bressand, F., Lengyel, G., Lample, G., Saulnier, L., et al. (2023) · arXiv · doi:10.48550/arxiv.2310.06825 · Cited by 340
Liu, S., Ye, H., Xing, L., & Zou, J. Y. (2023) · International Conference on Machine Learning · doi:10.48550/arxiv.2311.06668 · Cited by 328
Research works printed but not linked: 3
- Junnan Li, Richard Socher, and Steven CH Hoi. Dividemix: Learning with noisy labels as semi- supervised learning. In International Conference on Learning Representations.
- Alec Radford, Jeffrey Wu, Rewon Child, David Luan, Dario Amodei, Ilya Sutskever, et al. 2019. Language models are unsupervised multitask learners. OpenAI blog, 1(8):9.
- PMLR.
Cited by
Too Easily Fooled? Prompt Injection Breaks LLMs on Frustratingly Simple Multiple-Choice QuestionsPreprint
Guo, X., Huang, Z., Song, Z., & Zhang, J. (2025) · arXiv · doi:10.48550/arxiv.2508.13214 · Cited by 4
"Give a Positive Review Only": Can Hidden PDF Prompts Sway LLMs?Preprint
Guo, X., Huang, Z., Song, Z., & Zhang, J. (2025) · SSRN Electronic Journal · doi:10.2139/ssrn.5368453 · Cited by 1
Metadata
- Authors
- Liang, S., Ahn, S., Dhillon, P. S., & Zhou, J.
- Affiliations
- University of Michigan (US)
- Venue
- arXiv
- Publisher
- arXiv
- Published
- 2025
- ISSN
- 2331-8422 (ISSN-L)
- arXiv
- 2506.00418
- OpenAlex
- W6948342954
- Cited by
- 2
- References
- 26
- Citations by year
- 2025: 2
- Type
- posted content
- Language
- en
- Open access
- green
- arxiv.org
- Licence
- Locations
- arXiv (submittedVersion, cc-by-nc-nd)
- Funders
- National Science Foundation (2212174)
- National Institute on Aging
- National Institute of General Medical Sciences
- Topics
- Physical Sciences › Computer Science › Artificial Intelligence › Topic Modeling
- Physical Sciences › Computer Science › Artificial Intelligence › Natural Language Processing Techniques
- Physical Sciences › Computer Science › Artificial Intelligence › Adversarial Robustness in Machine Learning
- Keywords
- noisy annotations, text generation, large language models
About these checks
Registry, retraction, Cites and statistics results are computed, not judged, with one exception: a printed reference that no index lists is read once by a model before it counts as a citation error. Claims are extracted by a model and kept only when their quote appears verbatim in the text; each cited source is then checked, with a model’s help, for whether it says what the claim relies on. Those verdicts can be wrong — read the claim’s quote and the cited source before relying on one.
The claim verdicts this report counts are experimental: their accuracy is not yet measured.
A language model drew the claims from the paper on 2026-11-29, under version 3 of the claim definition (model deepseek-v4.1-flash, prompt extract-v3).
A second model labelled each claim on 2026-11-29 (model jev-1.13-20260917, definition revision gold-guideline-v0.2).
Cited sources are checked with a language model’s help (qwen3.8-omni-flash).
Statistics and arithmetic are recomputed, not judged.
Confidence bands are shown only for fields calibrated on our annotated test set. None is calibrated yet, so no band is shown.
What counts as a claim ›How we measure confidence ›How we check this ›
Are you an author, or do you see a problem with this page? Request a review
Data sources
Bibliographic data: Semantic Scholar, OpenAlex, Crossref.
Contains information from the Semantic Scholar Academic Graph Datasets, made available under the ODC Attribution License (ODC-BY 1.0).
Semantic Scholar’s data is described in: Kinney, R., et al. (2023). The Semantic Scholar Open Data Platform. arXiv:2301.10140.