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.
TEGEE: Task dEfinition Guided Expert Ensembling for Generalizable and Few-shot Learning
HKUST(香港科技大学);University of Manchester(曼彻斯特大学);Institute of Automation, CAS(中国科学院自动化研究所);University of Chinese Academy of Sciences(中国科学院大学);M-A-P;Beijing University of Posts and Telecommunications(北京邮电大学);Ohio State University(俄亥俄州立大学);University of Waterloo(滑铁卢大学);Peking University(北京大学);BAAI(北京智源人工智能研究院)
Exploring Imbalanced Annotations for Effective In-Context Learning
Department of Statistics and Data Science, Southern University of Science and Technology(南方科技大学统计与数据科学系);School of Economics and Finance, Xi’an Jiaotong University(西安交通大学经济金融学院);School of Mathematics and Statistics, Xi’an Jiaotong University(西安交通大学数学与统计学学院)
Exploring the Compositional Deficiency of Large Language Models in Mathematical Reasoning
School of Computer Science, Fudan University(复旦大学计算机科学学院);Shanghai Key Laboratory of Intelligent Information Processing, Fudan University(复旦大学上海智能信息处理重点实验室)
How Far Can In-Context Alignment Go? Exploring the State of In-Context Alignment
School of Computer Science and Technology, Beijing Institute of Technology(北京理工大学计算机科学与技术学院);Beijing Institute of Technology Southeast Academy of Information Technology(北京理工大学东南信息技术研究院)
GPTKB v1.5: A Massive Knowledge Base for Exploring Factual LLM Knowledge
ScaDS.AI Dresden/Leipzig & TU Dresden, Germany(德国德累斯顿/莱比锡ScaDS.AI & 德累斯顿工业大学);VNU University of Engineering and Technology, Hanoi, Vietnam(越南河内国立大学工程与技术大学)