用强化学习选更优演示,提升小样本推理效果
Demonstration Selection for In-Context Learning via Reinforcement Learning
- 基于强化学习动态选择多样且相关的演示样本
- 在14个模型上验证,显著优于10种基线方法
- 适合需要高效提示设计的文本分类与推理任务
演示样本的多样性对提升模型泛化能力至关重要,能覆盖更广泛结构与概念。本文提出一种基于强化学习的关联-多样性增强选择(RDES)方法,用于优化少样本提示场景下文本分类与推理任务中参考演示的选择。RDES采用Q-learning和基于PPO的变体,动态筛选既多样(以标签分布衡量)又相关于任务目标的演示样本,实现参考数据的平衡表示,从而提升准确率与泛化性能。在多个基准数据集上的大量实验表明,该方法在14个开源与闭源大模型上均显著优于10种现有基线。评估涵盖不同演示数量下的表现,并进一步研究引入思维链(CoT)推理的效果,结果证明其可进一步提升预测性能。这些发现凸显了强化学习在自适应演示选择中的潜力,为解决ICL挑战提供了新思路。
原文摘要 · Abstract (English)
Diversity in demonstration selection is critical for enhancing model generalization by enabling broader coverage of structures and concepts. Constructing appropriate demonstration sets remains a key research challenge. This paper introduces the Relevance-Diversity Enhanced Selection (RDES), an innovative approach that leverages reinforcement learning (RL) frameworks to optimize the selection of diverse reference demonstrations for tasks amenable to in-context learning (ICL), particularly text classification and reasoning, in few-shot prompting scenarios. RDES employs frameworks like Q-learning and a PPO-based variant to dynamically identify demonstrations that maximize both diversity (quantified by label distribution) and relevance to the task objective. This strategy ensures a balanced representation of reference data, leading to improved accuracy and generalization. Through extensive experiments on multiple benchmark datasets, including diverse reasoning tasks, and involving 14 closed-source and open-source LLMs, we demonstrate that RDES significantly enhances performance compared to ten established baselines. Our evaluation includes analysis of performance across varying numbers of demonstrations on selected datasets. Furthermore, we investigate incorporating Chain-of-Thought (CoT) reasoning, which further boosts predictive performance. The results highlight the potential of RL for adaptive demonstration selection and addressing challenges in ICL.
Thank you to arXiv for use of its open access interoperability. PaperDance 不是 arXiv 官方产品;中文卡片由大模型生成,请以原文为准。