Divide, Reweight, and Conquer: A Logit Arithmetic Approach for In-Context Learning
Not on the map. Why?
Abstract (arXiv)
In-Context Learning (ICL) emerges as a key feature for Large Language Models (LLMs), allowing them to adapt to new tasks by leveraging task-specific examples without updating model parameters. However, ICL faces challenges with increasing numbers of examples due to performance degradation and quadratic computational costs. In this paper, we propose Logit Arithmetic Reweighting Approach (LARA), a novel framework that enhances ICL by using logit-based ensembling of multiple demonstrations. Our approach divides long input demonstrations into parallelizable shorter inputs to significantly reduce memory requirements, and then effectively aggregate the information by reweighting logits of each group via a non-gradient optimization approach. We further introduce Binary LARA (B-LARA), a variant that constrains weights to binary values to simplify the search space and reduces memory usage by filtering out less informative demonstration groups. Experiments on BBH and MMLU demonstrate that LARA and B-LARA outperform all baseline methods in both accuracy and memory efficiency. We also conduct extensive analysis to show that LARA generalizes well to scenarios of varying numbers of examples from limited to many-shot demonstrations.
Key facts. Cited by 9 papers in the map (data through 7 Oct 2026). Builds on 33 of its 37 references that are in the map. First posted on arXiv 14 Oct 2024.
Builds on
33 of 37 references.
References · 33
- 2020Language Models are Few-Shot Learnerscited by 32,199
- 2024The Llama 3 Herd of Modelscited by 14,192
- 2020Measuring Massive Multitask Language Understandingcited by 7,768
- 2022Emergent Abilities of Large Language Modelscited by 2,483
- 2022Beyond the Imitation Game: Quantifying and extrapolating the capabilities of language modelscited by 1,970
- 2021What Makes Good In-Context Examples for GPT-3?cited by 1,184
- 2024Gemma: Open Models Based on Gemini Research and Technologycited by 889
- 2022Contrastive Decoding: Open-ended Text Generation as Optimizationcited by 598
- 2023Learning to Compress Prompts with Gist Tokenscited by 379
- 2023LoraHub: Efficient Cross-Task Generalization via Dynamic LoRA Compositioncited by 359
- 2024LLMLingua-2: Data Distillation for Efficient and Faithful Task-Agnostic Prompt Compressioncited by 343
- 2023Fine-Tuning Language Models with Just Forward Passescited by 337
21 more
- 2023In-Context Learning Creates Task Vectorscited by 302
- 2023Effective Long-Context Scaling of Foundation Modelscited by 301
- 2023Function Vectors in Large Language Modelscited by 292
- 2024Long-context LLMs Struggle with Long In-context Learningcited by 285
- 2023LLMLingua: Compressing Prompts for Accelerated Inference of Large Language Modelscited by 279
- 2023RECOMP: Improving Retrieval-Augmented LMs with Compression and Selective Augmentationcited by 253
- 2023In-context Vectors: Making In Context Learning More Effective and Controllable Through Latent Space Steeringcited by 240
- 2024SafeDecoding: Defending against Jailbreak Attacks via Safety-Aware Decodingcited by 233
- 2023EvoPrompt: Connecting LLMs with Evolutionary Algorithms Yields Powerful Prompt Optimizerscited by 189
- 2022Rationale-Augmented Ensembles in Language Modelscited by 111
- 2022Prompt Compression and Contrastive Conditioning for Controllability and Toxicity Reduction in Language Modelscited by 96
- 2024Tuning Language Models by Proxycited by 88
- 2022Structured Prompting: Scaling In-Context Learning to 1,000 Examplescited by 81
- 2024In-context Learning with Retrieved Demonstrations for Language Models: A Surveycited by 69
- 2023Controlled Text Generation via Language Model Arithmeticcited by 51
- 2023In-Context Learning with Many Demonstration Examplescited by 39
- 2024Offset Unlearning for Large Language Modelscited by 33
- 2023DPZero: Private Fine-Tuning of Language Models without Backpropagationcited by 26
- 2023FwdLLM: Efficient FedLLM using Forward Gradientcited by 25
- 2020Versatile Black-Box Optimizationcited by 22
- 2023Semantic Compression With Large Language Modelscited by 17
Built on by
Citing papers per year: 2025: 6; 2026: 3.
9 papers.
- 2025Efficient Test-Time Scaling via Self-Calibrationcited by 74
- 2025Parallel-R1: Towards Parallel Thinking via Reinforcement Learningcited by 59
- 2026Parallel-Probe: Towards Efficient Parallel Thinking via 2D Probingcited by 13
- 2025Don't Throw Away Your Pretrained Modelcited by 9
- 2025Linear-Time Demonstration Selection for In-Context Learning via Gradient Estimationcited by 8
- 2026RelayLLM: Efficient Reasoning via Collaborative Decodingcited by 7
- 2025CGES: Confidence-Guided Early Stopping for Efficient and Accurate Self-Consistencycited by 6
- 2025POSS: Position Specialist Generates Better Draft for Speculative Decodingcited by 2
- 2026The Single-Multi Evolution Loop for Self-Improving Model Collaboration Systemscited by 1
- 2026The Single-Multi Evolution Loop for Self-Improving Model Collaboration Systems5 Feb 2026
- 2026Parallel-Probe: Towards Efficient Parallel Thinking via 2D Probing3 Feb 2026
- 2026RelayLLM: Efficient Reasoning via Collaborative Decoding8 Jan 2026
- 2025CGES: Confidence-Guided Early Stopping for Efficient and Accurate Self-Consistency4 Nov 2025
- 2025Don't Throw Away Your Pretrained Model10 Oct 2025
- 2025Parallel-R1: Towards Parallel Thinking via Reinforcement Learning9 Sep 2025
- 2025Linear-Time Demonstration Selection for In-Context Learning via Gradient Estimation27 Aug 2025
- 2025POSS: Position Specialist Generates Better Draft for Speculative Decoding4 Jun 2025
- 2025Efficient Test-Time Scaling via Self-Calibration25 Feb 2025