让大模型无限推理,同时控制计算成本。
InftyThink: Breaking the Length Limits of Long-Context Reasoning in Large Language Models
- 将长推理拆成多轮短推理+摘要,实现无限制深度
- 计算复杂度从二次方降为线性,性能提升3-11%
- 适合需要长链条推理的数学与逻辑任务
大语言模型在复杂推理任务上表现优异,但现有长上下文推理范式存在三大瓶颈:序列长度增长导致计算量呈二次方上升、受最大上下文长度限制、超出预训练窗口后性能下降。现有方法仅压缩推理链,未解决根本的扩展问题。为此,我们提出InftyThink,将单一推理过程转化为带中间摘要的迭代流程。通过交替执行短推理片段与精炼进展摘要,实现无限推理深度的同时保持计算开销恒定,形成独特的锯齿形内存模式,显著降低复杂度。我们还构建了将长上下文推理数据集转换为迭代格式的方法,将OpenR1-Math重构为33.3万条训练样本。跨多种模型架构的实验表明,该方法在降低计算成本的同时提升性能,Qwen2.5-Math-7B在MATH500、AIME24和GPQA_diamond上分别取得3%-11%的提升。本工作打破推理深度与效率的固有权衡,提供无需模型结构调整的可扩展复杂推理方案。
原文摘要 · Abstract (English)
Advanced reasoning in large language models has achieved remarkable performance on challenging tasks, but the prevailing long-context reasoning paradigm faces critical limitations: quadratic computational scaling with sequence length, reasoning constrained by maximum context boundaries, and performance degradation beyond pre-training context windows. Existing approaches primarily compress reasoning chains without addressing the fundamental scaling problem. To overcome these challenges, we introduce InftyThink, a paradigm that transforms monolithic reasoning into an iterative process with intermediate summarization. By interleaving short reasoning segments with concise progress summaries, our approach enables unbounded reasoning depth while maintaining bounded computational costs. This creates a characteristic sawtooth memory pattern that significantly reduces computational complexity compared to traditional approaches. Furthermore, we develop a methodology for reconstructing long-context reasoning datasets into our iterative format, transforming OpenR1-Math into 333K training instances. Experiments across multiple model architectures demonstrate that our approach reduces computational costs while improving performance, with Qwen2.5-Math-7B showing 3-11% improvements across MATH500, AIME24, and GPQA_diamond benchmarks. Our work challenges the assumed trade-off between reasoning depth and computational efficiency, providing a more scalable approach to complex reasoning without architectural modifications.
Thank you to arXiv for use of its open access interoperability. PaperDance 不是 arXiv 官方产品;中文卡片由大模型生成,请以原文为准。