分析了上下文搜索在推理中的增益机制,揭示何时能指数级提升模型表现。
When Does In-Context Search Help? A Sampling-Complexity Theory of Reflection-Driven Reasoning
- 将上下文搜索建模为推理轨迹的近似推断,利用自省反馈更新后验。
- 当反思能准确定位早期错误时,只需多项式次数尝试即可实现指数级性能提升。
- 理论预测在真实大模型上得到验证,适用于需要逐步优化推理的任务。
通过将上下文搜索建模为对推理轨迹的近似推断(基模型定义先验,自省提供反馈以更新后验),本文研究了推理时的采样复杂度——即达到高成功率所需的序列尝试次数。研究发现,当自省能可靠定位早期错误时,上下文搜索可带来指数级改进,仅需多项式数量的尝试即可解决零样本通过率呈指数级低的问题;而当该特性不成立时,基于历史尝试的条件化并无渐近优势,等价于并行采样。进一步表明,这种收益具有鲁棒性且可学习:近似后验更新即可,且在搜索轨迹上进行交叉熵训练可实现所需行为,样本复杂度为多项式。最后,在可验证奖励的分阶段强化学习框架下,最优策略扩展实现了相同的后验重加权规则。理论的关键定性预测在真实大模型上得到验证。
原文摘要 · Abstract (English)
Training large language models (LLMs) with extended reasoning has enabled in-context search, in which models iteratively generate, critique, and revise solution attempts. We provide a theoretical analysis of in-context search by modeling it as approximate inference over reasoning traces, where the base model defines a prior and self-reflection provides feedback for posterior updates, and study the resulting inference-time sampling complexity - the number of sequential attempts needed to achieve high success probability. We show that when reflections reliably localize early mistakes, in-context search can yield exponential improvements over the base model, solving problems with exponentially small zero-shot pass rates using only a polynomial number of sequential attempts, whereas when this property fails, conditioning on past attempts offers no asymptotic benefit over parallel sampling. We further show that these gains are robust and learnable: approximate posterior updates suffice, and cross-entropy training on search rollouts recovers the required behavior with polynomial sample complexity. Finally, we show that under a stagewise abstraction of reinforcement learning with verifiable rewards, the optimal policy extension implements the same posterior reweighting rule. We validate key qualitative predictions of the theory on real large reasoning models.
Thank you to arXiv for use of its open access interoperability. PaperDance 不是 arXiv 官方产品;中文卡片由大模型生成,请以原文为准。