MAPLE: Many-Shot Adaptive Pseudo-Labeling for In-Context Learning
Zihan Chen, Song Wang, Zhen Tan, Jundong Li, Cong Shen
TL;DR
MAPLE addresses the data bottleneck in many-shot in-context learning by using influence-based selection to pseudo-label informative unlabeled samples and by adaptively choosing demonstrations per query. It constructs a labeled-unlabeled graph to identify high-impact unlabeled samples and forms a high-quality demonstration pool, then tailors demonstrations to each test input via a secondary pseudo-labeled graph. The approach yields consistent improvements across eight real-world tasks and shows robustness across different LLMs, while analyzing the trade-offs with demonstration quantity and order. Practically, MAPLE reduces labeling costs while delivering strong performance in long-context ICL scenarios.
Abstract
In-Context Learning (ICL) empowers Large Language Models (LLMs) to tackle diverse tasks by incorporating multiple input-output examples, known as demonstrations, into the input of LLMs. More recently, advancements in the expanded context windows of LLMs have led to many-shot ICL, which uses hundreds of demonstrations and outperforms few-shot ICL, which relies on fewer examples. However, this approach is often hindered by the high cost of obtaining large amounts of labeled data. To address this challenge, we propose Many-Shot Adaptive Pseudo-LabEling, namely MAPLE, a novel influence-based many-shot ICL framework that utilizes pseudo-labeled samples to compensate for the lack of label information. We first identify a subset of impactful unlabeled samples and perform pseudo-labeling on them by querying LLMs. These pseudo-labeled samples are then adaptively selected and tailored to each test query as input to improve the performance of many-shot ICL, without significant labeling costs. Extensive experiments on real-world datasets demonstrate the effectiveness of our framework, showcasing its ability to enhance LLM adaptability and performance with limited labeled data.
