Introduction
In-Context Learning (ICL) has emerged as a powerful paradigm for Large Language Models (LLMs), enabling them to perform new tasks by observing a few demonstration examples. However, the effectiveness of ICL is highly sensitive to the quality of these examples. In real-world scenarios, demonstration databases are often "noisy," containing incorrect labels or irrelevant information. Standard methods for filtering noise often rely on perplexity, but these are frequently confounded by the model's internal biases.
To address this, researchers have introduced a Dual Debiasing framework. This method utilizes a novel Sample Cleanliness Score that accounts for both intrinsic and extrinsic biases, allowing LLMs to maintain high performance even when up to 80% of the demonstration data is corrupted.
The Dual Debiasing Framework
The core challenge in noise detection for ICL is that LLMs are biased. A model might assign high perplexity to a correct answer simply because the domain is unfamiliar (extrinsic bias) or low perplexity to an incorrect answer because the text is common (intrinsic bias).
The proposed framework calculates a Sample Cleanliness Score by addressing two primary bias types:
- Intrinsic Bias: This refers to the model's inherent preference for certain strings regardless of the context. The authors mitigate this by normalizing the conditional loss of an answer given a query by the marginal loss of the answer itself.
- Extrinsic Bias: This is domain-specific bias. To account for the fact that some topics are naturally more "surprising" to the model, the authors use synthesized neighbors. By pairing a query with random annotations, they estimate an "expected" loss for that specific topic, which is then used to normalize the final score.
The pipeline involves calculating these scores for the entire database, using a Gaussian Mixture Model (GMM) to cluster samples into "clean" and "noisy" groups, and then performing ICL using only the identified clean subset.
Experimental Evaluation
The method was evaluated on four diverse text generation benchmarks: Natural Questions (NQ), Web Questions (WebQ), SciQ, and SQuAD. These datasets cover a range of domains from general web search to specialized scientific knowledge.
Key Insights
The Impact of the Domain Gap
A critical finding of this research is the visualization of the "Domain Gap." Different topics, such as "Location" versus "Sports Team," exhibit naturally different perplexity distributions.
Without debiasing, a clean example in a difficult domain might appear noisier than a truly incorrect example in an easy domain. The Dual Debiasing approach levels this playing field, providing an absolute measure of cleanliness that remains robust even in extreme noise scenarios.
Efficiency and Scalability
The researchers found that smaller models (e.g., GPT-Neo-1.3B) can serve as efficient "auditors." These smaller models can calculate cleanliness scores effectively, which can then be used to curate data for much larger inference models. This suggests that the computational overhead of debiasing can be minimized.
Results
The Dual Debiasing method demonstrated remarkable robustness to extreme noise. On the SciQ dataset with 80% irrelevant noise, the method improved performance by 37.94 points over naive ICL. In many instances, the performance achieved using a cleansed, originally noisy dataset was nearly indistinguishable from performance using a perfectly clean dataset. The method consistently outperformed existing baselines like Local Perplexity Ranking (LPR), particularly as noise levels exceeded 40%.
Limitations and Future Directions
While highly effective, the method's performance is tied to the quality of synthesized neighbors used for extrinsic debiasing. In extremely low-resource or highly specialized domains, generating representative neighbors may be challenging. Additionally, qualitative analysis indicates that the scoring system is less effective for very long annotations (over 7 tokens), where complex probability distributions can obscure the cleanliness signal. Future research may explore adaptive debiasing techniques tailored to sequence length and broader task types beyond text generation.
Summary updated