Single-Rollout Asynchronous Optimization: A New Paradigm for LLM Agent RL Training

    This article introduces Single-Rollout Asynchronous Optimization (SAO), a novel reinforcement learning training framework designed to overcome the bottlenecks of long-horizon agent training in large language models. By replacing group-based sampling with single-rollout sampling, SAO eliminates pipeline bubbles, reduces off-policy effects, and shifts the optimization focus to value model bias control. Key technical mechanisms include Direct Two-sided Importance Sampling (DIS), reinforced value model training, structured credit assignment for multi-turn trajectories, and context compression. The article also covers system-level coordination, empirical results, and practical recommendations for developers.

    Single-Rollout Asynchronous Optimization: A New Paradigm for RL Training of LLM Agents

    1. Background: Bottlenecks in Long-Horizon Agent Training

    As Large Language Models (LLMs) are increasingly used in agent scenarios such as code generation, tool calling, and multi-step reasoning, post-training reinforcement learning (RL) has evolved from single-turn optimization to long-horizon trajectory optimization. A typical agent execution trajectory may contain dozens of interaction rounds and tens of thousands of tokens in context, posing three levels of challenges for training frameworks:

    1. Soaring sampling costs: Methods represented by Group Relative Policy Optimization (GRPO) require generating a group of rollouts (typically 8 to 16) per input task to estimate advantages through intra-group normalization. In long-horizon scenarios, group-based sampling multiplies compute overhead, and the significant variance in generation time among multiple long trajectories causes severe pipeline bubbles.
    2. Uncontrolled context length: Multi-turn interactions continuously expand the context. Without compression, the computational cost of attention grows quadratically, rapidly degrading training throughput.
    3. Off-policy issues in asynchronous training: To improve hardware utilization, modern training systems generally adopt an asynchronous architecture that decouples generation from training. Rollouts are generated by older versions of the policy, while parameters have been updated for multiple rounds. Directly training on these rollouts introduces significant off-policy bias, leading to training instability or even collapse.

    Single-Rollout Asynchronous Optimization (SAO) is a training framework proposed to address the above issues. Proposed by an academic research team, it has been deployed and validated in the agent RL pipeline of a Mixture-of-Experts (MoE) LLM with tens of billions of active parameters. It can stably train for thousands of steps and multiply end-to-end training throughput on long-horizon coding tasks.

    2. Core Idea: Replacing Group-Based Sampling with Single-Rollout Sampling

    The fundamental design decision of SAO is: generate only one rollout per input task, and once this trajectory is generated, it can immediately enter the training queue.

    This decision seems simple but simultaneously resolves three contradictions:

    • Eliminating intra-group waiting: Group-based sampling must wait for all trajectories of the same task to be generated before calculating relative advantages. The single-rollout approach naturally supports “generate-and-train,” significantly improving pipeline utilization.
    • Reducing off-policy effects: Because the latency from generation to consumption is drastically shortened, the drift between the behavioral policy and the target policy is smaller, making the importance ratio distribution more concentrated.
    • Transferring advantage estimation responsibility: Instead of relying on intra-group sample comparisons, the responsibility of baseline estimation is handed back to the value model, which is why SAO must simultaneously reinforce value model training.

    From an algorithmic structure perspective, single-rollout sampling shifts “variance reduction on the sampling side” to “bias control on the value side,” thereby changing the optimization focus of the entire system.

    3. Key Technical Mechanisms

    3.1 Direct Two-sided Importance Sampling (DIS)

    In an asynchronous pipeline, rollouts are generated by a lagging policy. SAO introduces a Direct Two-sided Importance Sampling mechanism, applying both upper and lower bounds to the importance ratio. The upper bound prevents gradient spikes caused by exploding ratios of individual tokens, while the lower bound truncates the reverse bias caused by samples whose probabilities significantly increase under the new policy. Compared to single-sided clipping (e.g., only truncating the upper bound), two-sided clipping more strictly controls the effective step size of policy updates in asynchronous scenarios, maintaining stability over hundreds or even thousands of steps.

    3.2 Reinforced Value Model

    Since intra-group baselines are abandoned, the quality of the value model directly determines the reliability of the advantage signal. SAO reinforces the value model in three directions:

    • Increased update frequency: The value model is updated twice for every single update of the policy model, ensuring that value estimates always closely track the drift of the policy distribution, reducing the systematic lag in advantage estimation and thereby lowering training variance.
    • Parameter freezing strategy: The attention module parameters are frozen, optimizing only the projection parts in the MoE layers. Practice shows that fully updating the value model easily causes severe fluctuations during long training sessions; freezing most representations and training only a few parameters can significantly improve stability while maintaining fitting capacity.
    • Expanded pre-training data scale: Before RL begins, larger-scale offline data is used to pre-heat the value model, preventing the injection of noise into the policy due to inaccurate early-stage value estimates.

    3.3 Multi-Turn Agent Trajectory Processing

    Long-horizon agent trajectories consist of alternating “model actions” and “environment observations.” SAO makes targeted modifications to Generalized Advantage Estimation (GAE): skipping the tokens corresponding to observation information and propagating advantage signals only between the action tokens generated by the model. The intuition is that content returned by the environment (e.g., tool outputs, execution results) is not a product of model decisions; assigning advantages to it is meaningless and dilutes sparse reward signals. Restricting credit assignment strictly to action intervals is equivalent to performing a structured sparsification at the sequence level, making reward propagation in long trajectories more efficient.

    3.4 Context Compression Support

    To address the context expansion issue in long-horizon tasks, SAO supports context compression on the trajectory side: summarizing or pruning redundant observations in historical interactions to shorten the effective sequence length while retaining key decision-making information. This mechanism, combined with system-level techniques such as attention optimization and sequence parallelism, is a major source of throughput improvement in long-horizon coding RL.

    4. System-Level Coordination: Async Framework and Scheduling Optimization

    Beyond algorithms, the implementation of SAO relies on systematic upgrades to the accompanying asynchronous RL framework, mainly reflected in two aspects:

    • Generation-training decoupling: The inference cluster continuously produces trajectories and writes them to a buffer, while the training cluster consumes them in batches. The two align policy snapshots via version numbers, coordinating with DIS to control version deviation.
    • Joint scheduling and load balancing: Addressing the high variance in trajectory length characteristic of agent tasks, joint scheduling is performed between the routing layer and the training system. It dynamically balances the request pressure across inference instances and groups batches by length, reducing resource idling caused by long-tail trajectories. In tests, this optimization improved end-to-end training throughput for long-horizon coding RL by more than two times.

    For teams looking to build similar capabilities in-house, general cloud infrastructure can provide support: an elastic GPU container platform hosts the dual inference and training clusters, object storage saves trajectories and checkpoints, message queues decouple sample flow, and logging and monitoring services ensure observability for long tasks. For instance, general products from Baidu AI Cloud (such as container platforms, object storage, and monitoring services) can cover these requirements, helping teams focus their efforts on the algorithms themselves.

    5. Empirical Results

    On public benchmarks, SAO demonstrates continuous advantages over GRPO and its variants. On math reasoning benchmarks, SAO’s accuracy is significantly higher than the group-based sampling baseline; it also achieves a clear lead on real-world software engineering task benchmarks. More importantly is the shape of the training curve—SAO can steadily progress for over a thousand steps under asynchronous conditions without advantage collapse or value divergence, which is particularly critical for ultra-large-scale models requiring prolonged post-training.

    6. Practical Recommendations and Conclusion

    For developers preparing to adopt single-rollout asynchronous training in long-horizon agent scenarios, the following points are recommended:

    1. Assess task reward density first: The sparser the reward, the greater the benefit of value model pre-heating.
    2. Strictly control policy version lag: When the version difference is too large, even two-sided importance sampling cannot fully correct it. Fallbacks such as rate limiting or discarding expired samples should be implemented.
    3. Advantage propagation in the action interval must be strictly aligned with token masking engineering to prevent observation tokens from leaking into the loss.
    4. Context compression strategies need to be coordinated with evaluation to prevent performance regression caused by the loss of key information during compression.

    Overall, SAO represents the evolution of LLM post-training from “synchronous group-based sampling” to “asynchronous single-rollout + strong value model.” It trades a simpler sampling structure for higher system efficiency while maintaining training stability through precise off-policy correction and value-side design, providing a reusable paradigm for long-horizon agent RL in ultra-large-scale models.