arXiv:2503.17587cs.LGcs.AI2025-03被引 4

用统计检验动态停止推理,让大模型少算却更准。

ConSol: Sequential Probability Ratio Testing to Find Consistent LLM Reasoning Paths Efficiently

  • 用序贯概率比检验自动判断何时够了,不再盲目多试。
  • 相同准确率下,采样量从40~64次降到15次以内,省70%计算量。
  • 适合追求高效推理的开发者和部署场景,开源代码可直接用。

近期大型语言模型(如 OpenAI o3-mini、DeepSeek-R1、QWQ-32B)通过生成中间推理步骤来解决复杂任务,但显著增加计算成本。自一致性方法通过聚合40至64个推理路径提升准确率,但后期采样收益递减。本文提出利用序贯概率比检验(SPRT)动态终止采样,在达到足够一致性时提前停止。我们针对LLM特性校准了SPRT参数,提升对分布众数的敏感度。实验表明,该方法在保持与自一致性相当准确率的同时,大幅降低计算开销。为促进透明与复现,代码与数据已开源:https://github.com/LiuzLab/consol,或通过 pip install consol 获取。

原文摘要 · Abstract (English)

Recent advancements in large language models (LLMs) integrating explicit reasoning, such as OpenAI's o3-mini, DeepSeek-R1, and QWQ-32B, enable smaller models to solve complex tasks by generating intermediate reasoning steps prior to providing answers. However, this approach significantly increases computational costs, both monetarily and environmentally. The widely-used self-consistency method further exacerbates these costs by aggregating multiple reasoning paths to improve accuracy, often requiring between 40 to 64 samples per task. Although aggregation effectively reduces variance and bias, additional sampling can lead to diminishing returns when early samples yield consistent results. To address inefficiencies, we propose leveraging Sequential Probability Ratio Testing (SPRT) to dynamically terminate sampling once sufficient consistency is achieved. We calibrate SPRT parameters specifically for LLM applications, accounting for sensitivity to detect the mode of the distribution. Our experiments demonstrate that incorporating SPRT significantly enhances token efficiency, achieving comparable accuracy to self-consistency methods but at a substantially reduced computational cost. To promote transparency and facilitate reproducibility, we have made the source code and datasets used in our experiments publicly available at our GitHub repository: https://github.com/LiuzLab/consol, or available as a PyPI package: pip install consol. We hope that this resource will support further research and encourage the development of new methods building upon our work.

大模型推理效率优化统计检验

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