More is not always better? Enhancing Many-Shot In-Context Learning with Differentiated and Reweighting Objectives
Xiaoqing Zhang, Ang Lv, Yuhan Liu, Flood Sung, Wei Liu, Jian Luan, Shuo Shang, Xiuying Chen, Rui Yan
Abstract
Large language models (LLMs) excel at few-shot in-context learning (ICL) without requiring parameter updates. However, as ICL demonstrations increase from a few to many, performance tends to plateau and eventually decline. We identify two primary causes for this trend: the suboptimal negative log-likelihood (NLL) optimization objective and the incremental data noise. To address these issues, we introduce DrICL, a novel optimization method that enhances model performance through Differentiated and Reweighting objectives. Globally, DrICL utilizes differentiated learning to optimize the NLL objective, ensuring that many-shot performance surpasses zero-shot levels. Locally, it dynamically adjusts the weighting of many-shot demonstrations by leveraging cumulative advantages inspired by reinforcement learning, thereby mitigating the impact of noisy data. Recognizing the lack of multi-task datasets with diverse many-shot distributions, we develop the Many-Shot ICL Benchmark (ICL-50)-a large-scale benchmark of 50 tasks that cover shot numbers from 1 to 350 within sequences of up to 8,000 tokens-for both fine-tuning and evaluation purposes. Experimental results demonstrate that LLMs enhanced with DrICL achieve significant improvements in many-shot setups across various tasks, including both in-domain and out-of-domain scenarios. We release the code and dataset hoping to facilitate further research in many-shot ICL.
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 9f619e77-00ce-449e-8b4e-2ea359ac3148Cited by top-tier papers5
- ICL-Router: In-Context Learned Model Representations for LLM RoutingChenxu Wang, Hao Li, Yiqun Zhang, Linyao Chen et al.AAAI 2026 · 11 citations
- Dynamic Retriever for In-Context Knowledge Editing via Policy OptimizationMahmud Wasif Nafee, Maiqi Jiang, Haipeng Chen, Yanfu ZhangEMNLP 2025 · 3 citations
- FedRW: Efficient Privacy-Preserving Data Reweighting for Enhancing Federated Learning of Language ModelsPukang Ye, Junwei Luo, Jiachen Shen, Saipan Zhou et al.NeurIPS 2025 · 1 citation
- MAPLE: Many-Shot Adaptive Pseudo-Labeling for In-Context LearningZihan Chen, Song Wang, Zhen Tan, Jundong Li et al.ICML 2025
- RA-VLA: Retrieval-Augmented VLA for Test-Time AdaptationSanghwan Jang, Minjin Jeon, Minsoo Kim, Seong Jin Choi et al.ICML 2026
Builds on10
- Language Models are Few-Shot LearnersTom B. Brown, Benjamin Mann, Nick Ryder, Melanie Subbiah et al.NeurIPS 2020 · 64,255 citations
- Measuring Massive Multitask Language UnderstandingDan Hendrycks, Collin Burns, Steven Basart, Andy Zou et al.ICLR 2021 · 7,905 citations
- Finetuned Language Models are Zero-Shot LearnersJason Wei, Maarten Bosma, Vincent Y. Zhao, Kelvin Guu et al.ICLR 2022 · 4,966 citations
- TruthfulQA: Measuring How Models Mimic Human FalsehoodsStephanie Lin, Jacob Hilton, Owain EvansACL 2022 · 3,228 citations
- Many-Shot In-Context LearningRishabh Agarwal, Avi Singh, Lei Zhang, Bernd Bohnet et al.NeurIPS 2024 · 271 citations
Related papers
- On Many-Shot In-Context Learning for Long-Context EvaluationKaijian Zou, Muhammad Khalifa, Lu WangACL 2025 · 6 citations
- Hierarchical Demonstration Order Optimization for Many-shot In-Context LearningYinhan He, Wendy Zheng, Song Wang, Zaiyi Zheng et al.NeurIPS 2025 · 2 citations
- Focused Large Language Models are Stable Many-Shot LearnersPeiwen Yuan, Shaoxiong Feng, Yiwei Li, Xinglin Wang et al.EMNLP 2024
- AdapShot: Adaptive Many-Shot In-Context Learning with Semantic-Aware KV Cache ReuseJie Ou, Jinyu Guo, Shiyao Guo, Yuang Li et al.ACL 2026
- From Few to Many: Self-Improving Many-Shot Reasoners Through Iterative Optimization and GenerationXingchen Wan, Han Zhou, Ruoxi Sun, Sercan Ö. ArikICLR 2025
