用多样性重排提升上下文学习的示例选择效果
Exploring the Role of Diversity in Example Selection for In-Context Learning
- 引入MMR算法平衡相似性与示例多样性
- 不同上下文规模下均显著提升任务性能
- 适合关注提示工程与模型泛化能力的研究者
上下文学习(ICL)因其无需大量训练数据且对噪声标签具有鲁棒性而备受关注。典型ICL流程通过稀疏或稠密嵌入相似度函数,选取与输入相关的局部示例。然而,仅依赖相似性可能导致主题偏差,影响下游性能。本文提出通过最大边际相关性(MMR)对检索到的上下文进行重排,以增强主题多样性。实验表明,在不同上下文规模和相似度函数下,多样性增强均带来一致的性能提升。代码已开源:https://github.com/janak11111/Diverse-ICL。
原文摘要 · Abstract (English)
In-Context Learning (ICL) has gained prominence due to its ability to perform tasks without requiring extensive training data and its robustness to noisy labels. A typical ICL workflow involves selecting localized examples relevant to a given input using sparse or dense embedding-based similarity functions. However, relying solely on similarity-based selection may introduce topical biases in the retrieved contexts, potentially leading to suboptimal downstream performance. We posit that reranking the retrieved context to enhance topical diversity can improve downstream task performance. To achieve this, we leverage maximum marginal relevance (MMR) which balances topical similarity with inter-example diversity. Our experimental results demonstrate that diversifying the selected examples leads to consistent improvements in downstream performance across various context sizes and similarity functions. The implementation of our approach is made available at https://github.com/janak11111/Diverse-ICL.
Thank you to arXiv for use of its open access interoperability. PaperDance 不是 arXiv 官方产品;中文卡片由大模型生成,请以原文为准。