arXiv:2502.00330cs.LGcs.AI2025-02ICLR被引 18

通过迭代优化与生成,让少样本推理变多样本更有效

From Few to Many: Self-Improving Many-Shot Reasoners Through Iterative Optimization and Generation

  • 用贝叶斯优化找关键示范例,再生成新推理路径
  • 在符号推理等任务上显著提升模型表现
  • 适合需要高效利用示例的复杂推理场景

近期长上下文大语言模型的发展催生了多示例上下文学习(many-shot ICL)新范式,即在提示中加入远超传统少样本数量的示例可带来性能提升。然而,这种提升的驱动因素尚不明确,单纯增加示例数量是否最优仍未知。本文分析发现:1)多示例性能仍主要依赖少数关键示例;2)识别这些关键示例(优化)并用它们生成新推理路径(生成),可进一步提升效果。受此启发,我们提出BRIDGE算法,交替执行贝叶斯优化以发现关键示例集,和生成步骤将该集合用于扩展推理路径回多示例设置。在Gemini、Claude和Mistral等不同规模的LLMs上,实验显示BRIDGE在符号推理、数值推理和代码生成等多样任务中均取得显著提升。

原文摘要 · Abstract (English)

Recent advances in long-context large language models (LLMs) have led to the emerging paradigm of many-shot in-context learning (ICL), where it is observed that scaling many more demonstrating examples beyond the conventional few-shot setup in the context can lead to performance benefits. However, despite its promise, it is unclear what aspects dominate the benefits and whether simply scaling to more examples is the most effective way of improving many-shot ICL. In this work, we first provide an analysis of the factors driving many-shot ICL, and we find that 1) many-shot performance can still be attributed to often a few disproportionately influential examples and 2) identifying such influential examples ("optimize") and using them as demonstrations to regenerate new examples ("generate") can lead to further improvements. Inspired by the findings, we propose BRIDGE, an algorithm that alternates between the optimize step with Bayesian optimization to discover the influential sets of examples and the generate step to reuse this set to expand the reasoning paths of the examples back to the many-shot regime automatically. On Gemini, Claude, and Mistral LLMs of different sizes, we show that BRIDGE to significant improvements across a diverse set of tasks, including symbolic reasoning, numerical reasoning, and code generation.

多示例学习推理优化生成增强

Thank you to arXiv for use of its open access interoperability. PaperDance 不是 arXiv 官方产品;中文卡片由大模型生成,请以原文为准。