On the Noise Robustness of In-Context Learning for Text Generation
Hongfu Gao, Feipeng Zhang, Wenyu Jiang, Jun Shu, Feng Zheng, Hongxin Wei
Abstract
Large language models (LLMs) have shown impressive performance on downstream tasks by in-context learning (ICL), which heavily relies on the quality of demonstrations selected from a large set of annotated examples. Recent works claim that in-context learning is robust to noisy demonstrations in text classification. In this work, we show that, on text generation tasks, noisy annotations significantly hurt the performance of in-context learning. To circumvent the issue, we propose a simple and effective approach called Local Perplexity Ranking (LPR), which replaces the "noisy" candidates with their nearest neighbors that are more likely to be clean. Our method is motivated by analyzing the perplexity deviation caused by noisy labels and decomposing perplexity into inherent perplexity and matching perplexity. Our key idea behind LPR is thus to decouple the matching perplexity by performing the ranking among the neighbors in semantic space. Our approach can prevent the selected demonstrations from including mismatched input-label pairs while preserving the effectiveness of the original selection methods. Extensive experiments demonstrate the effectiveness of LPR, improving the EM score by up to 18.75 on common benchmarks with noisy annotations. Our code is available at https://github.com/ml-stat-Sustech/Local-Perplexity-Ranking
Ask Lune
Know this paper in minutes, not an afternoon.
Lune can read every page of it and the top-tier papers that cite it, and gives you its claims, its evidence and its limits, each one cited to the paper it comes from. No skimming, no AI slop.
11 top-tier papers have cited it since. Know what they found before your reviewers do.
Lune can draw on
the full paper · the top-tier papers that cite it · related work
Free to start. No credit card required.
Lineage
- Fantastically Ordered Prompts and Where to Find Them: Overcoming Few-Shot Prompt Order Sensitivity cites Language Models are Few-Shot Learners
- Large Language Models are Zero-Shot Reasoners cites Fantastically Ordered Prompts and Where to Find Them: Overcoming Few-Shot Prompt Order Sensitivity
- Large Language Models are Zero-Shot Reasoners cites Language Models are Few-Shot Learners
- Large Language Models are Zero-Shot Reasoners cites Chain-of-Thought Prompting Elicits Reasoning in Large Language Models
- More is not always better? Enhancing Many-Shot In-Context Learning with Differentiated and Reweighting Objectives cites Language Models are Few-Shot Learners
- Language Models are Few-Shot Learners cites The Curious Case of Neural Text Degeneration
- TestNUC: Enhancing Test-Time Computing Approaches and Scaling through Neighboring Unlabeled Data Consistency cites Chain-of-Thought Prompting Elicits Reasoning in Large Language Models
- Can LLMs Reason Over Non-Text Modalities in a Training-Free Manner? A Case Study with In-Context Representation Learning cites Language Models are Few-Shot Learners
- Can LLMs Reason Over Non-Text Modalities in a Training-Free Manner? A Case Study with In-Context Representation Learning cites Chain-of-Thought Prompting Elicits Reasoning in Large Language Models
Cited by top-tier papers11
- More is not always better? Enhancing Many-Shot In-Context Learning with Differentiated and Reweighting ObjectivesXiaoqing Zhang, Ang Lv, Yuhan Liu, Flood Sung et al.ACL 2025 · 9 citations
- Can LLMs Reason Over Non-Text Modalities in a Training-Free Manner? A Case Study with In-Context Representation LearningTianle Zhang, Wanlong Fang, Jonathan Woo, Paridhi Latawa et al.NeurIPS 2025 · 6 citations
- Exploring the Noise Robustness of Online Conformal PredictionHuajun Xi, Kangdao Liu, Hao Zeng, Wenguang Sun et al.NeurIPS 2025 · 4 citations
- What Makes a Good Curriculum? Disentangling the Effects of Data Ordering on LLM Mathematical ReasoningYaning Jia, Chunhui Zhang, Xingjian Diao, Xiangchi Yuan et al.ACL 2026 · 4 citations
- TestNUC: Enhancing Test-Time Computing Approaches and Scaling through Neighboring Unlabeled Data ConsistencyHenry Peng Zou, Zhengyao Gu, Yue Zhou, Yankai Chen et al.ACL 2025 · 3 citations
Builds on38
- Language Models are Few-Shot LearnersTom B. Brown, Benjamin Mann, Nick Ryder, Melanie Subbiah et al.NeurIPS 2020 · 64,255 citations
- Chain-of-Thought Prompting Elicits Reasoning in Large Language ModelsJason Wei, Xuezhi Wang, Dale Schuurmans, Maarten Bosma et al.NeurIPS 2022 · 22,562 citations
- Large Language Models are Zero-Shot ReasonersTakeshi Kojima, Shixiang Shane Gu, Machel Reid, Yutaka Matsuo et al.NeurIPS 2022 · 8,168 citations
- The Curious Case of Neural Text DegenerationAri Holtzman, Jan Buys, Li Du, Maxwell Forbes et al.ICLR 2020 · 4,112 citations
- Fantastically Ordered Prompts and Where to Find Them: Overcoming Few-Shot Prompt Order SensitivityYao Lu, Max Bartolo, Alastair Moore, Sebastian Riedel et al.ACL 2022 · 1,494 citations
Related papers
- Dual Debiasing for Noisy In-Context Learning for Text GenerationSiqi Liang, Sumyeong Ahn, Paramveer Dhillon, Jiayu ZhouACL Findings 2025 · 1 citation
- Mixture of Demonstrations for In-Context LearningSong Wang, Zihan Chen, Chengshuai Shi, Cong Shen et al.NeurIPS 2024 · 21 citations
- In-Context Demonstration Selection with Cross Entropy DifferenceDan Iter, Reid Pryzant, Ruochen Xu, Shuohang Wang et al.EMNLP Findings 2023 · 4 citations
- Ground-Truth Labels Matter: A Deeper Look into Input-Label DemonstrationsKang Min Yoo, Junyeob Kim, Hyuhng Joon Kim, Hyunsoo Cho et al.EMNLP 2022 · 40 citations
- Debiasing In-Context Learning by Instructing LLMs How to Follow DemonstrationsLvxue Li, Jiaqi Chen, Xinyu Lu, Yaojie Lu et al.ACL Findings 2024 · 5 citations
