arXivDaily arXiv每日学术速递 周一至周五更新
arXiv 2308.08780cs.CLcs.AI
收藏

探索用于上下文学习的演示集成方法

Exploring Demonstration Ensembling for In-context Learning

University of Michigan(密歇根大学);LG AI Research(LG人工智能研究院);University of Illinois at Chicago(伊利诺伊大学芝加哥分校)

Muhammad Khalifa, Lajanugen Logeswaran, Moontae Lee, Honglak Lee, Lu Wang

AI总结:

针对上下文学习中演示拼接存在的贡献不可控、受输入长度限制等问题,提出演示集成方法DENSE,通过演示子集预测并组合输出概率,实验显示加权最大集成较普通拼接平均提升2.4个点。

摘要:

上下文学习(ICL)通过向语言模型(LMs)展示给定任务的输入-输出对示例(即演示)来运行。ICL的标准方法是将拼接后的演示与测试输入一同提示给LM。该方法存在若干问题:首先,拼接几乎无法控制每个演示对模型预测的贡献,当部分演示与测试示例无关时效果可能不佳;其次,由于部分Transformer模型存在输入长度限制,很难将大量示例纳入上下文,尤其是处理长输入任务时。本研究探索了演示集成(DENSE)作为简单拼接的替代方案。DENSE使用演示的子集(即桶)预测输出,随后组合每个子集产生的输出概率以生成最终预测。我们使用GPT-j研究了不同的集成方法,并在12项语言任务上开展实验。结果表明,加权最大集成的性能优于普通拼接,平均提升幅度高达2.4个点。代码可在https://github.com/mukhal/icl-ensembling获取。

英文摘要:

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.

机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。

↑