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 * Work done while working at SUSTech as a visiting scholar.
Ask about this paper
Your agent reads all of it.
Lune indexed this paper to the last equation, along with the top-tier papers that cite it. Ask a question and the answer quotes them.
Your agent calls
Luneget_paper_fulltext
Free to start. No credit card required.
Terminal
Install the CLIlune papers fulltext 2cfd599c-5d5e-4405-a0c6-d4973e4ab232Cited 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 on32
- 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
- Mixture of Demonstrations for In-Context LearningSong Wang, Zihan Chen, Chengshuai Shi, Cong Shen et al.NeurIPS 2024 · 21 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
- Revisiting Demonstration Selection Strategies in In-Context LearningKeqin Peng, Liang Ding, Yancheng Yuan, Xuebo Liu et al.ACL 2024
- Rethinking the Role of Demonstrations: What Makes In-Context Learning Work?Sewon Min, Xinxi Lyu, Ari Holtzman, Mikel Artetxe et al.EMNLP 2022 · 634 citations
- D.Va: Validate Your Demonstration First Before You Use ItQi Zhang, Zhiqing Xiao, Ruixuan Xiao, Lirong Gao et al.ACL 2025
