Batch-ICL: Effective, Efficient, and Order-Agnostic In-Context Learning
In this paper, by treating in-context learning (ICL) as a meta-optimization process, we explain why LLMs are sensitive to the order of ICL examples. This understanding leads us to the development of Batch-ICL, an effective, efficient, and order-agnostic inference algorithm for ICL. Differing from the standard N-shot learning approach, Batch-ICL employs $N$ separate 1-shot forward computations and aggregates the resulting meta-gradients. These aggregated meta-gradients are then applied to the forward computation of a zero-shot query to generate the final prediction. This batch processing approach renders the LLM agnostic to the order of ICL examples. Through extensive experiments and analysis, we demonstrate that Batch-ICL consistently outperforms most permutations of ICL examples. In some cases, it even exceeds the performance of the best order for standard ICL, all while reducing the computational resources required. Furthermore, we develop a novel variant of Batch-ICL featuring multiple "epochs" of meta-optimization. This variant implicitly explores permutations of ICL examples, further enhancing ICL performance.
Code (1)
Tasks
In-Context LearningZero-Shot LearningSimilar Papers 제목 키워드 기반
Context agnostic trajectory prediction based on $λ$-architecture
Predicting the next position of movable objects has been a problem for at least the last three decades, referred to as trajectory prediction. In our days, the vast amounts of data being continuously produced add the big …
PredictionTrajectory PredictionQuantum Learning Theory Beyond Batch Binary Classification
Arunachalam and de Wolf (2018) showed that the sample complexity of quantum batch learning of boolean functions, in the realizable and agnostic settings, has the same form and order as the corresponding classical sample …
Binary ClassificationClassificationLearning TheoryCRUMB: Efficient Prior Fitted Network Inference via Distributionally Matched Context Batching
Prior-fitted networks (PFNs) are a promising class of tabular foundation models that perform in-context learning, whereby the entire labelled training set is supplied as context, and predictions for test queries are prod…
COrAL: Order-Agnostic Language Modeling for Efficient Iterative Refinement
Iterative refinement has emerged as an effective paradigm for enhancing the capabilities of large language models (LLMs) on complex tasks. However, existing approaches typically implement iterative refinement at the appl…
Code GenerationComputational EfficiencyGSM8KLanguage Modeling+1Universal Joint Source-Channel Coding for Modulation-Agnostic Semantic Communication
From the perspective of joint source-channel coding (JSCC), there has been significant research on utilizing semantic communication, which inherently possesses analog characteristics, within digital device environments. …
DecoderQuantizationSemantic Communication