马尔可夫思考者:推理的架构无关线性扩展
The Markovian Thinker: Architecture-Agnostic Linear Scaling of Reasoning
AI总结:
针对强化学习训练长思维链推理大语言模型时状态无界导致二次方计算成本的问题,提出马尔可夫思考范式及Delethink实例,实现线性计算与恒定内存,在多样基准上性能匹配或超越现有方法,为高效推理LLM开辟路径。
摘要:
强化学习(RL)最近成为训练能生成长思维链(LongCoT)的推理大语言模型(LLM)的有效方法。然而,标准RL“思考环境”中,状态由提示词加所有先前推理token构成,导致状态无界,迫使基于注意力的策略随思维长度增加付出二次方计算成本。我们重新审视环境本身,提出马尔可夫思考范式:策略在推理时仅基于固定大小的状态,将思考长度与上下文大小解耦,直接实现线性计算与恒定内存。我们用Delethink实例化该想法,这是一种将推理结构化为固定大小块的RL环境:每个块内模型正常思考,块边界处环境重置上下文并以简短延续信息重新初始化提示词。通过RL,策略学会在每个块末尾生成足够的文本状态以实现重置后推理的无缝延续。在该环境中训练的R1-Distill 1.5B模型以8K-token块推理但思考长度达24K,性能匹配或超过以24K预算训练的LongCoT-RL;测试时扩展中,Delethink持续提升而LongCoT趋于平稳。线性计算效果显著:经验估计平均思考长度96K时,LongCoT-RL需27个H100月计算资源,Delethink仅需7个。RL初始化分析显示,现成推理模型(1.5B-120B)在多样基准上常零样本生成马尔可夫轨迹,为RL的规模化有效应用提供正样本。研究表明,重新设计思考环境是强大手段,可实现无二次开销的超长推理,为高效、可扩展的推理LLM开辟路径。
英文摘要:
Reinforcement learning (RL) has recently become a strong recipe for training reasoning LLMs that produce long chains of thought (LongCoT). Yet the standard RL "thinking environment", where the state is the prompt plus all prior reasoning tokens, makes the state unbounded and forces attention-based policies to pay quadratic compute as thoughts lengthen. We revisit the environment itself. We propose Markovian Thinking, a paradigm in which the policy advances reasoning while conditioning on a constant-size state, decoupling thinking length from context size. As an immediate consequence this yields linear compute with constant memory. We instantiate this idea with Delethink, an RL environment that structures reasoning into fixed-size chunks. Within each chunk, the model thinks as usual; at the boundary, the environment resets the context and reinitializes the prompt with a short carryover. Through RL, the policy learns to write a textual state near the end of each chunk sufficient for seamless continuation of reasoning after reset. Trained in this environment, an R1-Distill 1.5B model reasons in 8K-token chunks yet thinks up to 24K tokens, matching or surpassing LongCoT-RL trained with a 24K budget. With test-time scaling, Delethink continues to improve where LongCoT plateaus. The effect of linear compute is substantial: we empirically estimate at 96K average thinking length LongCoT-RL costs 27 H100-months vs. 7 for Delethink. Analysis at RL initialization shows off-the-shelf reasoning models (1.5B-120B) often sample Markovian traces zero-shot across diverse benchmarks, providing positive samples that make RL effective at scale. Our results show that redesigning the thinking environment is a powerful lever: it enables very long reasoning without quadratic overhead and opens a path toward efficient, scalable reasoning LLMs.
机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。