CoChat

Dual Debiasing for Noisy In-Context Learning for Text Generation

Open access
Liang, Siqi, Ahn, Sumyeong, Dhillon, Paramveer S., Zhou, Jiayu · 2025 · arXiv

The 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

DataCite · 10.48550/arxiv.2506.00418

Cites

32 of 32 references verified0 citation errors · 0 not checkable

Statistics

Nothing to recompute.

Figures

Figure 1 Overview of noisy ICL and the proposed method: When noisy information is present in an ICL dataset, it can lead to performance degradation (Top case). However, if the noisy information is sufficiently removed, performance can be improved (Bottom case). In this paper, we go beyond the conventional perplexity score-based approach and propose a Sample Cleanliness Score, which is based on intrinsic/extrinsic debiased loss.
Figure 1 Overview of noisy ICL and the proposed method: When noisy information is present in an ICL dataset, it can lead to performance degradation (Top case). However, if the noisy information is sufficiently removed, performance can be improved (Bottom case). In this paper, we go beyond the conventional perplexity score-based approach and propose a Sample Cleanliness Score, which is based on intrinsic/extrinsic debiased loss.CC-BY-NC-ND · From the PDF
Figure 2 Distribution of L de-int for both clean and noisy versions of demonstrations for different topics. The L de-int values are calculated using Gemma-2b and GPT-Neo-2.7B .
Figure 2 Distribution of L de-int for both clean and noisy versions of demonstrations for different topics. The L de-int values are calculated using Gemma-2b and GPT-Neo-2.7B .CC-BY-NC-ND · From the PDF
Figure 3 Sample Cleanliness Score distributions on noisy NQ training set. A larger value indicates that it is more likely to be a clean sample. It shows the pattern of distinguishability between noisy and clean samples.
Figure 3 Sample Cleanliness Score distributions on noisy NQ training set. A larger value indicates that it is more likely to be a clean sample. It shows the pattern of distinguishability between noisy and clean samples.CC-BY-NC-ND · From the PDF
Figure 4 Sensitivity on neighbor number N neighbor under noise ratio 0 . 6 and TopK retriever. Left: SCIQ; right: NQ. The 'irrelevant'/'relevant' indicates the performance of our method under noise, and 'clean' indicates the performance of naive baseline under clean.
Figure 4 Sensitivity on neighbor number N neighbor under noise ratio 0 . 6 and TopK retriever. Left: SCIQ; right: NQ. The 'irrelevant'/'relevant' indicates the performance of our method under noise, and 'clean' indicates the performance of naive baseline under clean.CC-BY-NC-ND · From the PDF
Figure 5 Sensitivity of γ under noise ratio 0 . 6 and TopK retriever. Left: SCIQ; right: NQ. The 'irrelevant'/'relevant' indicates the performance of our method under noised setting, and 'clean' indicates the performance of naive ICL baseline under clean setting.
Figure 5 Sensitivity of γ under noise ratio 0 . 6 and TopK retriever. Left: SCIQ; right: NQ. The 'irrelevant'/'relevant' indicates the performance of our method under noised setting, and 'clean' indicates the performance of naive ICL baseline under clean setting.CC-BY-NC-ND · From the PDF
Figure 7 Distribution of L ( y | x ) for both noisy and clean samples on NQ. Heavy overlapping between the distributions of noisy and clean samples.
Figure 7 Distribution of L ( y | x ) for both noisy and clean samples on NQ. Heavy overlapping between the distributions of noisy and clean samples.CC-BY-NC-ND · From the PDF
Figure 6 Performance of our method under setting of noise ratio 0 . 6 using different number of neighbors.
Figure 6 Performance of our method under setting of noise ratio 0 . 6 using different number of neighbors.CC-BY-NC-ND · From the PDF
Figure 8 Comparison between using C in and C out on NQ under noise ratio 0 . 6 . Left: irrelevant noise; Right: relevant noise.
Figure 8 Comparison between using C in and C out on NQ under noise ratio 0 . 6 . Left: irrelevant noise; Right: relevant noise.CC-BY-NC-ND · From the PDF
Figure 9 Comparison between using C in and C out on SCIQ under noise ratio 0 . 6 . Left: irrelevant noise; Right: relevant noise.
Figure 9 Comparison between using C in and C out on SCIQ under noise ratio 0 . 6 . Left: irrelevant noise; Right: relevant noise.CC-BY-NC-ND · From the PDF
Figure 10 Annotation sequence length distribution for clean/noisy samples that our method failed/successfully detected under WebQ with 40% relevant noise using Llama-2-7B .
Figure 10 Annotation sequence length distribution for clean/noisy samples that our method failed/successfully detected under WebQ with 40% relevant noise using Llama-2-7B .CC-BY-NC-ND · From the PDF

Verification

Claims the paper makes

2 Valid: 2 in part · 3 Not valid · 14 Not checked · 68 Own results and interpretations

48 more claims

Create a free account to see all 87 claims and to verify the 19 references still open.

See all claims — free account
  • It may state two separate claims as one. 14
  • Probably not a substantial claim. 22

Create a free account to see these claims.

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.

1 of 1

Citations

Cites

Show all 32 references

Research works printed but not linked: 3

  1. Junnan Li, Richard Socher, and Steven CH Hoi. Dividemix: Learning with noisy labels as semi- supervised learning. In International Conference on Learning Representations.
  2. 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.
  3. PMLR.

Cited by

See all 2

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)
OpenAlex
W6948342954
Cited by
2
References
26
Citations by year
2025: 2
Type
posted content
Language
en
Open access
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.