Exploring Demonstration Ensembling for In-context Learning
Not on the map. Why?
Abstract (arXiv)
In-context learning (ICL) operates by showing language models (LMs) examples of input-output pairs for a given task, i.e., demonstrations. The standard approach for ICL is to prompt the LM with concatenated demonstrations followed by the test input. This approach suffers from some issues. First, concatenation offers almost no control over the contribution of each demo to the model prediction. This can be sub-optimal when some demonstrations are irrelevant to the test example. Second, due to the input length limit of some transformer models, it might be infeasible to fit many examples into the context, especially when dealing with long-input tasks. In this work, we explore Demonstration Ensembling (DENSE) as an alternative to simple concatenation. DENSE predicts outputs using subsets (i.e., buckets) of the demonstrations and then combines the output probabilities resulting from each subset to produce the final prediction. We study different ensembling methods using GPT-j and experiment on 12 language tasks. Our experiments show weighted max ensembling to outperform vanilla concatenation by as large as 2.4 average points. Code available at https://github.com/mukhal/icl-ensembling.
Key facts. Cited by 8 papers in the map (data through 7 Oct 2026). Builds on 20 of its 30 references that are in the map. First posted on arXiv 17 Aug 2023.
Builds on
20 of 30 references.
References · 20
- 2020Language Models are Few-Shot Learnerscited by 32,199
- 2018Think you have Solved Question Answering? Try ARC, the AI2 Reasoning Challengecited by 4,710
- 2018Can a Suit of Armor Conduct Electricity? A New Dataset for Open Book Question Answeringcited by 2,114
- 2020MiniLM: Deep Self-Attention Distillation for Task-Agnostic Compression of Pre-Trained Transformerscited by 1,414
- 2022Rethinking the Role of Demonstrations: What Makes In-Context Learning Work?cited by 1,413
- 2021Calibrate Before Use: Improving Few-Shot Performance of Language Modelscited by 1,371
- 2020Making Pre-trained Language Models Better Few-shot Learnerscited by 1,255
- 2021What Makes Good In-Context Examples for GPT-3?cited by 1,184
- 2021Fantastically Ordered Prompts and Where to Find Them: Overcoming Few-Shot Prompt Order Sensitivitycited by 1,122
- 2021Learning To Retrieve Prompts for In-Context Learningcited by 641
- 2021MetaICL: Learning to Learn In Contextcited by 450
- 2020TweetEval: Unified Benchmark and Comparative Evaluation for Tweet Classificationcited by 414
8 more
- 2021Learning How to Ask: Querying LMs with Mixtures of Soft Promptscited by 376
- 2021True Few-Shot Learning with Language Modelscited by 343
- 2018Hate Speech Dataset from a White Supremacy Forumcited by 196
- 2020CLIMATE-FEVER: A Dataset for Verification of Real-World Climate Claimscited by 195
- 2021Noisy Channel Language Model Prompting for Few-Shot Text Classificationcited by 163
- 2022Rationale-Augmented Ensembles in Language Modelscited by 111
- 2020Effective Transfer Learning for Identifying Similar Questions: Matching User Questions to COVID-19 FAQscited by 48
- 2018QuaRel: A Dataset and Models for Answering Questions about Qualitative Relationshipscited by 46
Built on by
Citing papers per year: 2024: 2; 2025: 5; 2026: 1.
8 papers.
- 2024Learning to Reason via Program Generation, Emulation, and Searchcited by 9
- 2025Should You Use Your Large Language Model to Explore or Exploit?cited by 8
- 2025Linear-Time Demonstration Selection for In-Context Learning via Gradient Estimationcited by 8
- 2024Improving In-Context Learning with Small Language Model Ensemblescited by 4
- 2026Ensembling Language Models with Sequential Monte Carlocited by 2
- 2025Semantic Captioning: Benchmark Dataset and Graph-Aware Few-Shot In-Context Learning for SQL2Textcited by 1
- 2025More Bias, Less Bias: BiasPrompting for Enhanced Multiple-Choice Question Answeringcited by 1
- 2025Beyond Plain Demos: A Demo-centric Anchoring Paradigm for In-Context Learning in Alzheimer's Disease Detectioncited by 0
- 2026Ensembling Language Models with Sequential Monte Carlo5 Mar 2026
- 2025More Bias, Less Bias: BiasPrompting for Enhanced Multiple-Choice Question Answering25 Nov 2025
- 2025Beyond Plain Demos: A Demo-centric Anchoring Paradigm for In-Context Learning in Alzheimer's Disease Detection10 Nov 2025
- 2025Linear-Time Demonstration Selection for In-Context Learning via Gradient Estimation27 Aug 2025
- 2025Should You Use Your Large Language Model to Explore or Exploit?31 Jan 2025
- 2025Semantic Captioning: Benchmark Dataset and Graph-Aware Few-Shot In-Context Learning for SQL2Text6 Jan 2025
- 2024Improving In-Context Learning with Small Language Model Ensembles29 Oct 2024
- 2024Learning to Reason via Program Generation, Emulation, and Search25 May 2024