Single-Rollout Asynchronous Optimization: Architecture and Practice for Long-Horizon RL in LLMs
Reinforcement learning (RL) is critical for enhancing complex reasoning and agent execution capabilities in large language models (LLMs) during the post-training phase. However, maintaining RL gains across long execution trajectories poses significant challenges. This article explores the Single-rollout Asynchronous Optimization (SAO) framework, an innovative engineering and algorithmic solution designed to overcome the throughput bottlenecks and off-policy biases of traditional group sampling methods in long-horizon RL. We delve into SAO's core mechanisms—including Direct Bilateral Importance Sampling (DIS), value model reinforcement, and sparse advantage propagation—alongside its system architecture, engineering practices, and superior performance in complex reasoning and coding tasks.
In the post-training phase of large-scale language models, reinforcement learning (RL) has become a key method for improving complex reasoning and Agent execution capabilities. As Agent tasks become more complex, models must maintain the capability gains brought by RL across longer execution trajectories. Traditional group sampling optimization methods face severe throughput bottlenecks and off-policy deviation issues in long-horizon tasks. To break this limitation, researchers have proposed the Single-rollout Asynchronous Optimization (SAO) framework, providing an efficient engineering and algorithmic solution for long-horizon RL.
1. Core Challenges in Long-Horizon RL
In real-world Agent scenarios (e.g., complex code repair, multi-step math reasoning), models often interact with environments across multiple rounds, generating long trajectories containing numerous observations and actions. Traditional RL algorithms (such as Group Relative Policy Optimization) typically require multiple group-based samples of the same input task to calculate intra-group relative advantages. While effective for short-context tasks, this mechanism exposes two major pain points in long-horizon Agent tasks:
- Compute Waste and Throughput Bottleneck: Multiple sampling incurs massive computational overhead. Coupled with long trajectories, memory consumption is extremely high, making efficient end-to-end training difficult.
- Exacerbated Off-Policy Bias: In asynchronous training frameworks, a time lag often exists between Rollout generation and policy updates. Generating long trajectories takes more time, meaning the policy model’s weights have already iterated by the time training data is obtained. This makes the data more “off-policy,” thereby affecting training stability and generalization.
2. SAO Core Mechanisms: Single-Rollout and Asynchronous Optimization
The core idea of the SAO framework is to replace traditional group sampling with single-rollout sampling. Under the SAO mechanism, each input task generates only one rollout trajectory immediately usable for training. This change brings several significant advantages: first, it drastically reduces the computation and memory footprint during the sampling phase; second, the single trajectory is immediately used for training upon generation, significantly shortening the latency from generation to usage. This fundamentally reduces the off-policy impact in asynchronous training and improves the model’s generalization in long-horizon tasks.
To compensate for the potential excessive gradient variance from single sampling, SAO implements multiple deep algorithmic optimizations:
2.1 Direct Bilateral Importance Sampling (DIS)
To correct the distribution difference between the behavior policy and the target policy in async RL, SAO introduces DIS. DIS considers not only the probability ratio of the current policy to the sampling policy but also corrects distribution deviations from a bilateral dimension. This effectively reduces gradient estimation bias in async training, ensuring more accurate policy update directions.
2.2 Value Model Reinforcement
Since single-trajectory sampling lacks intra-group relative comparison, the value model bears greater responsibility in assessing state advantages. SAO adopts the following measures to strengthen the value model:
- Increased Update Frequency: For every policy model update, the value model is updated twice. This asymmetric update strategy effectively reduces training variance, allowing the value network to fit the returns of long-horizon trajectories more accurately.
- Parameter Isolation and MoE Optimization: The attention module parameters in the value model are fixed, and only the projection layers of the Mixture of Experts (MoE) are optimized. This design reduces parameter fluctuations during training without losing core representation capabilities, enhancing the stability of value assessment.
- Expanded Pretraining Data Scale: Before entering the RL phase, the value model is fully pretrained using a richer dataset to provide a more robust baseline evaluation capability.
2.3 Sparse Propagation of Advantage Signals
In multi-round Agent trajectories, observation information returned by the environment often occupies a large number of tokens. Computing Generalized Advantage Estimation (GAE) for all tokens is computationally expensive, and propagating advantage signals for observation information—which is not controlled by the model—makes little sense. SAO skips the token-level GAE computation for observation information, propagating advantage signals only among the action tokens generated by the model. This sparse advantage propagation mechanism improves computational efficiency and focuses the policy gradient on the model’s own decision-making actions.
3. System Architecture and Engineering Practice
Algorithmic innovation relies on underlying infrastructure. In the actual deployment of SAO, the research team conducted a system-level reconstruction of the post-training infrastructure, mainly including a distributed index sharing component, the SAO engine, and a high-performance asynchronous RL scheduling framework.
3.1 Joint Scheduling and Load Balancing
In the async RL pipeline, the Router distributes inference requests to generation nodes, while the training system pulls data for gradient updates. In traditional architectures, these two are often independent, easily causing resource idleness or queue blocking. The scheduling framework paired with SAO has been upgraded from both algorithmic and system efficiency perspectives. It optimizes the joint scheduling between the Router and the training system for Agent and async RL tasks. The system can dynamically perceive training steps and Rollout generation speed, adjusting routing strategies and load balancing in real time to ensure maximum GPU utilization.
3.2 Context Compression and Storage Optimization
Long-horizon coding tasks can easily generate trajectory contexts of tens of thousands of tokens. SAO natively supports context compression technology, performing lossless or lossy compression on redundant historical interaction information before feeding the trajectory into the training engine. Combined with efficient read/write operations of the underlying distributed storage components, this drastically alleviates the pressure on memory and communication bandwidth caused by long-sequence training. Thanks to these system-level optimizations, the end-to-end training throughput of long-horizon Coding RL has increased by more than 2.3 times.
For enterprise developers, in such complex asynchronous training scenarios, relying on high-performance container platforms, fast object storage, and 10G/100G network environments provided by cloud providers (such as Baidu AI Cloud) can better support the joint scheduling of MoE architecture models and large-scale heterogeneous computing clusters, ensuring stable and efficient training tasks.
4. Performance and Application Benefits
The SAO framework has demonstrated outstanding performance in multiple industry benchmarks. In terms of training stability, this solution can stably train for over 1,000 steps without crashing or performance degradation, which is highly challenging in long-horizon Agent RL.
In specific task evaluations, SAO consistently outperforms traditional group sampling algorithms and their variants on Agent coding and math reasoning benchmarks. For example, on mainstream math reasoning evaluation sets, SAO achieved an accuracy of 97.3%, significantly higher than the 84.2% of traditional group sampling algorithms; on mainstream code repair evaluation sets, SAO’s accuracy reached 29.8%, verifying its immense potential in complex engineering code understanding and generation.
5. Conclusion
Single-rollout Asynchronous Optimization (SAO) represents a significant technical evolution for long-horizon Agent tasks in the post-training phase of large models. Through single-trajectory sampling, bilateral importance sampling, and fine-tuned optimizations for the value model, SAO successfully breaks the computational and latency bottlenecks of traditional group sampling. Paired with a highly coordinated distributed scheduling framework, SAO not only achieves a substantial leap in end-to-end training throughput but also makes significant breakthroughs in high-intelligence-density tasks like math and coding. In the future, as asynchronous RL frameworks continue to evolve, the performance of large models in complex Agent scenarios will be even more promising.
