More is not always better? Enhancing Many-Shot In-Context Learning with Differentiated and Reweighting Objectives

Fuente: arXiv
Salvato in:
Dettagli Bibliografici
Autori principali: Zhang, Xiaoqing, Lv, Ang, Liu, Yuhan, Sung, Flood, Liu, Wei, Luan, Jian, Shang, Shuo, Chen, Xiuying, Yan, Rui
Natura: Preprint
Pubblicazione: 2025
Soggetti:
Accesso online:
Tags: Aggiungi Tag
Nessun Tag, puoi essere il primo ad aggiungerne!!
_version_ 1866912396861243392
author Zhang, Xiaoqing
Lv, Ang
Liu, Yuhan
Sung, Flood
Liu, Wei
Luan, Jian
Shang, Shuo
Chen, Xiuying
Yan, Rui
author_facet Zhang, Xiaoqing
Lv, Ang
Liu, Yuhan
Sung, Flood
Liu, Wei
Luan, Jian
Shang, Shuo
Chen, Xiuying
Yan, Rui
contents 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 \textit{DrICL}, a novel optimization method that enhances model performance through \textit{Differentiated} and \textit{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 \textit{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\footnote{https://github.com/xiaoqzhwhu/DrICL}.
format Preprint
id arxiv_https___arxiv_org_abs_2501_04070
institution arXiv
publishDate 2025
record_format arxiv
spellingShingle More is not always better? Enhancing Many-Shot In-Context Learning with Differentiated and Reweighting Objectives
Zhang, Xiaoqing
Lv, Ang
Liu, Yuhan
Sung, Flood
Liu, Wei
Luan, Jian
Shang, Shuo
Chen, Xiuying
Yan, Rui
Machine Learning
Artificial Intelligence
Computation and Language
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 \textit{DrICL}, a novel optimization method that enhances model performance through \textit{Differentiated} and \textit{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 \textit{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\footnote{https://github.com/xiaoqzhwhu/DrICL}.
title More is not always better? Enhancing Many-Shot In-Context Learning with Differentiated and Reweighting Objectives
topic Machine Learning
Artificial Intelligence
Computation and Language
url https://arxiv.org/abs/2501.04070