通过动态稀疏调度提升大模型长上下文强化学习效率,稳定且提速超2倍。
Sparrow: Sparse Rollout for Stable and Efficient Long-context RL of Large Language Models

- 动态调整注意力稀疏度,保持关键token匹配度稳定
- 在Qwen3系列模型上实现2.0x~2.4x的推理加速
- 适用于长文本推理与代码生成等高成本任务
尽管具备强大能力,基于可验证奖励的强化学习(RLVR)会产生极长思维链(COT),计算成本高昂。由于每步的强化学习开销主要来自长上下文滚动生成,稀疏注意力为加速密集滚动生成提供了可行路径。然而,稀疏滚动生成需权衡稳定性与效率:过度稀疏会导致训练崩溃,而过于宽松则无法获得足够加速。本文通过分析稀疏到密集策略间的不匹配现象,发现稀疏滚动生成崩溃并非由所有标记统一退化引起——即使在极端稀疏下,多数稀疏标记仍能与密集结果完美对齐。基于此,我们提出假设:只要轨迹中每个标记的策略不匹配度的下尾统计量始终高于临界阈值,稀疏训练即可保持稳定。为此,我们设计了一种动态稀疏调度策略,维持该尾部统计量恒定,并在Qwen3系列模型上验证了这一假设。保持尾部不匹配度接近一致阈值,通常可实现稳定训练。随后,利用成本模型寻找在该阈值约束下的最优稀疏调度,使训练时的滚动生成速度分别提升2.2倍、2.4倍和2.0倍(对应Qwen3-1.7B、Qwen3-4B、Qwen3-8B)。实证表明,该阈值可推广至更大模型(Qwen3-14B)及另一强化学习领域(编码)。此外,我们的分析自然引出了轻量级方法DistillSparse:基于稀疏滚动生成的低秩适配器(LoRA)知识蒸馏,允许更激进的稀疏度达到相同不匹配阈值,从而获得更高加速比。
原文摘要 · Abstract (English)
Despite being powerful, reinforcement learning with verifiable rewards (RLVR) induces extremely long COT, making it computationally expensive. Since RLVR per-step cost is dominated by long-context rollout generation, sparse attention offers a promising way to accelerate dense rollout. However, sparse rollouts require a delicate stability-efficiency tradeoff: overly aggressive sparsity causes collapse, while overly lenient sparsity gives insufficient speedup. In this work, we study this tradeoff through sparse-to-dense actor-policy mismatch. We first observe that sparse rollout collapse is not driven by uniform degradation across tokens: most sparse tokens align perfectly with dense even under aggressive sparsity. Motivated by this, we hypothesize that sparse rollout training remains stable if the lower tail of per-token actor-policy mismatch stays above a critical threshold throughout the trajectory. We introduce a dynamic sparsity schedule that keeps this tail statistic constant during generation and validate our hypothesis. Across Qwen3 thinking-family models, keeping the tail mismatch statistic near a consistent threshold generally enables stable training. We then use a cost model to find the sparsity schedule for maximum speedup under this mismatch threshold, achieving 2.2x, 2.4x, and 2.0x rollout speedups when training Qwen3-1.7B, Qwen3-4B, and Qwen3-8B. Empirically, we show the thresholds generalize to a larger model (Qwen3-14B) and another RL domain (coding). Finally, our analysis naturally motivates DistillSparse: lightweight LoRA-based distillation on sparse rollout lets more aggressive sparsity reach the same sparse-to-dense mismatch threshold, yielding higher speedup.
Thank you to arXiv for use of its open access interoperability. PaperDance 不是 arXiv 官方产品;中文卡片由大模型生成,请以原文为准。