用排序方法精准选例,让大模型少试多准。
Data Efficient Sample Selection for In-Context Learning
- 将示例选择转为子集排序问题,用可微排序训练非线性代理模型。
- 在开源大模型上比强基线提升8.08%-15.9%准确率,样本消耗低。
- 适合追求高效少样本适配的开发者,尤其在查询多变场景下更优。
上下文学习(ICL)使大语言模型无需微调即可适应新任务,但如何从大量示例中选出最优组合仍具挑战。现有方法未建模示例与下游性能间的复杂关系,通常采用静态的任务级选择,一次离线选定子集,难以泛化到未见查询。本文提出DearICL(Data Efficient Algorithm for Ranking ICL samples),将示例选择建模为子集排序问题。DearICL使用非线性代理模型,结合可微排序目标与间隙指数强化学习算法,在边缘臂充分采样的基础上实现细粒度区分,支持实例级子集排序。在开源大模型的示例选择基准上,DearICL相比强线性基线提升8.08%-15.9%准确率,且样本复杂度低。代码与数据:https://github.com/VenkteshV/DearICL。
原文摘要 · Abstract (English)
The In-context learning (ICL) paradigm aids large language models (LLMs) to adapt to new tasks without need for fine-tuning. However, selecting an optimal combination of demonstration examples from a large pool of example subsets is a challenging problem. Existing approaches for selection do not model the complex relationship between ICL samples and downstream LLM performance. They typically perform static task-level selection, choosing subsets once offline, which can fail to generalize to unseen queries. We introduce DearICL (Data Efficient Algorithm for Ranking) ICL samples, a new framework that models demonstration example selection as a subset ranking problem. DearICL employs a non-linear surrogate employing a differentiable sorting objective within a gap-index bandit algorithm. The gap-index based approach enables fine-grained separation of good arms and borderline arms, which is used as an auxiliary objective to train the non-linear surrogate through sufficient sampling of borderline arms, supporting instance-level subset ranking. On exemplar selection benchmarks with open-source LLMs, DearICL achieves 8.08-15.9% accuracy gains over strong linear bandit baselines, with low sample complexity. Code and data: https://github.com/VenkteshV/DearICL.
Thank you to arXiv for use of its open access interoperability. PaperDance 不是 arXiv 官方产品;中文卡片由大模型生成,请以原文为准。