多样性在大语言模型上下文学习中的作用
The Role of Diversity in In-Context Learning for Large Language Models
AI总结:
本文系统研究示例多样性对上下文学习的影响,通过多任务实验证明多样性感知选择能提升复杂任务性能与分布外鲁棒性,并提出理论框架解释其益处。
摘要:
上下文学习(ICL)是当前大语言模型(LLMs)的一项关键能力,其中示例的选择对性能起着重要作用。虽然现有方法大多侧重于选择与查询最相似的示例,但多样性在示例选择中的影响仍未得到充分探索。我们通过在从情感分类到更具挑战性的数学和代码问题等一系列任务上的实验,系统地研究了多样性在上下文示例选择中的作用。在 Llama-3.1、Gemma-2 和 Mistral-v0.3 系列模型上的实验表明,具有多样性感知的选择方法能够提升性能,尤其是在数学和代码等复杂任务上,并增强对分布外查询的鲁棒性。为了支持这些发现,我们引入了一个理论框架,用以解释在上下文示例选择中引入多样性的益处。
英文摘要:
In-context learning (ICL) is a crucial capability of current large language models (LLMs), where the selection of examples plays a key role in performance. While most existing approaches focus on selecting the most similar examples to the query, the impact of diversity in example selection remains underexplored. We systematically investigate the role of diversity in in-context example selection through experiments across a range of tasks, from sentiment classification to more challenging math and code problems. Experiments on Llama-3.1, Gemma-2, and Mistral-v0.3 families of models show that diversity-aware selection methods improve performance, particularly on complex tasks like math and code, and enhance robustness to out-of-distribution queries. To support these findings, we introduce a theoretical framework that explains the benefits of incorporating diversity in in-context example selection.
机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。