Single-Rollout Asynchronous Optimization for Agentic Reinforcement Learning
arXiv · HuggingFace · ▲15
摘要(原文)
Reinforcement learning (RL) is becoming increasingly important for post-training large language models (LLMs). Previous RL pipelines for LLMs were mostly synchronous and batch-interleaved, which is inefficient for long-horizon agentic tasks. Recently, asynchronous RL has emerged as a more efficient alternative by updating the model as rollouts arrive. However, existing asynchronous RL systems often emphasize throughput, while leaving training stability and task effectiveness largely underexplored. For example, a key challenge is that group-wise sampling in the widely-used GRPO framework does not naturally fit asynchronous agentic training. In this paper, we present Single-rollout Asynchronous Optimization (SAO) to address the stability and off-policy challenges in asynchronous RL. To reduce off-policy effects and improve generalization, we replace group-wise sampling with single-rollout sampling, that is, using one rollout per prompt. We further improve this single-rollout strategy with practical value-model training designs. To improve optimization stability, we introduce a strict double-side token-level clipping strategy. SAO is able to train stably for one thousand steps and consistently outperform GRPO and its variants on agentic coding and reasoning benchmarks, such as SWE-Bench Verified, BeyondAIME, and IMOAnswerBench. We also demonstrate that single-rollout RL is particularly effective in a simulated online learning setting, where the model must adapt to changing evolving environments. To this end, SAO is successfully deployed in the agentic RL pipeline for training the open GLM-5.2 model (750B-A40B).
摘要(中译)
强化学习(Reinforcement Learning, RL)对于训练后的大型语言模型(Large Language Models, LLMs)变得越来越重要。以前针对LLMs的RL流程大多是同步和批量交错的,这对于长视野的代理任务来说效率低下。最近,异步RL作为一种更高效的替代方案出现,通过在滚动到达时更新模型。然而,现有的异步RL系统通常强调吞吐量,而在训练稳定性和任务有效性方面基本上没有深入探讨。例如,一个关键挑战是广泛使用的GRPO框架中的分组采样并不自然适应异步代理训练。在本文中,我们提出了单滚动异步优化(Single-rollout Asynchronous Optimization, SAO)来解决异步RL中的稳定性和非策略挑战。为了减少非策略效应并提高泛化能力,我们用单滚动采样替换了分组采样,即每个提示使用一个滚动。我们进一步改进了这个单滚动策略,采用了实用的价值模型训练设计。为了提高优化稳定性,我们引入了一种严格的双方令牌级剪切策略。SAO能够稳定地训练一千步,并且在代理编码和推理基准测试中始终优于GRPO及其变体,如SWE-Bench Verified、BeyondAIME和IMOAnswerBench。我们还证明了单滚动RL在模拟在线学习设置中特别有效,其中模型必须适应不断变化的环境。为此,SAO已成功部署在用于训练开放式GLM-5.2模型(750B-A40B)的代理RL流程中。
背景剖析
背景剖析
1. 技术背景
近年来,大型语言模型(LLMs)的发展从监督式预训练转向了强化学习(RL)后训练。这种转变的核心需求是提升模型的“智能性”——例如让模型能够自主解决复杂任务(如编程、数学推理)。然而,传统的RL流程存在效率瓶颈:大多数方案采用同步批处理方式,即策略生成一批轨迹后再统一优化。这种方式在处理“长 horizon”任务(如多步骤编码或推理)时效率极低,因为不同轨迹的完成时间差异大,导致GPU资源大量闲置。
2. 之前的问题
现有异步RL方法虽然解决了资源利用率问题,但引入了两个关键缺陷:
- 训练稳定性不足:异步环境中,轨迹可能由不同版本的旧策略生成,导致“离策略”(off-policy)问题加剧,训练波动大。
- 采样策略不匹配:传统方法(如GRPO)依赖“分组采样”,即每个提示生成一组响应后取平均,但这与异步环境冲突——分组必须等待最慢的轨迹完成,反而浪费资源。此外,分组采样无法适应在线场景(如动态环境反馈)。
3. 本文的解法
论文提出单轨迹异步优化(SAO),通过三个核心设计解决问题:
- 单轨迹采样:每个提示仅用一条轨迹更新模型,避免分组延迟,同时减少离策略效应。
- 严格的双向token级裁剪:直接使用轨迹生成时的概率分布,通过更精细的裁剪策略稳定训练。
- 改进的价值模型训练:更频繁更新价值函数,并冻结注意力层以减少噪声。
4. 切入角度
与先前工作相比,SAO的关键差异在于:
- 从“效率优先”到“效率与稳定性并重”:此前异步RL主要优化吞吐量,而SAO通过单轨迹采样和裁剪策略同时保证效率与训练稳定性。
- 适配在线场景:SAO的采样和优势估计(GAE)设计特别适合动态环境,而传统方法(如GRPO)更适用于静态批量任务。
这一方案在编码和数学基准测试中显著优于GRPO及其变体,并成功部署于GLM-5.2(750B参数)的训练中。


