arXiv:2610.21640cs.LGOct 2026

Manuscript Offprint

arXiv:2610.21640

ReFlow: Replay-Driven Decoupling for Efficient RL Post-Training

Yukun Tian, Junwei Su, Haofeng Xu, Lansong Diao, Zhengping Qian, Weibo Zhao, Wenchao Zhou, Ruiting Zhou, Chuan Wu

Abstract

Reinforcement learning (RL) has been a critical paradigm for improving large language model (LLM) reasoning and agentic capabilities, but its efficiency remains a major bottleneck. Existing RL systems commonly rely on asynchronous execution to overlap rollout generation with policy optimization for enhanced efficiency. However, this approach faces inherent limitations: mild policy staleness offers only limited training efficiency gains, whereas aggressive asynchrony can degrade model quality and yields diminishing efficiency gains. The dynamic nature of LLM RL and multi-turn agentic workloads further challenges RL system design, as resource demands shift over time, making static resource allocation and generation strategy inefficient.

This paper presents ReFlow, a system-algorithm co-designed RL framework for efficient LLM post-training. Its key insight is that, unlike existing RL frameworks which consume each trajectory only once, experience replay of recent trajectories enables effective sample reuse, thereby amortizing the high cost of rollout generation without incurring excessive policy staleness. To fully exploit this opportunity, ReFlow adopts a decoupled and adaptive architecture with three key designs: a dual replay data cycle supports efficient experience reuse while balancing training throughput and optimization stability; an elastic resource pool enables dynamic resource placement to accommodate evolving RL workloads; an adaptive scheduler coordinates generation strategies and resource allocation to improve resource utilization and boost generation throughput. Experiments across representative single-turn reasoning and multi-turn agentic RL tasks show that ReFlow improves training throughput by up to 2.06×2.06\times over state-of-the-art synchronous and asynchronous RL systems, while maintaining comparable or better model performance.

Figure

(a) Synchronous RL Workflow.

(b) Asynchronous RL Workflow.

Figure 1: Typical LLM RL workflow: (a) synchronous RL; (b) asynchronous RL. W denotes different versions of weights.

1 Introduction

Reinforcement learning (RL) has been widely adopted in post-training large language models (LLMs), enabling model alignment with human preferences [31, 39], enhanced reasoning [11, 30] and interactive agentic capabilities [4, 10]. In RL post-training, the pretrained LLM iteratively generates responses to prompts, receives reward signals from human or automated feedback, and updates its policy to maximize expected return. In practice, this workflow is typically decomposed into two primary stages—rollout generation and policy training—with data dependency (Fig. 1 (a)). During rollout generation, rollout workers use the behavior policy, i.e., the LLM, to produce responses and collect batches of trajectories; subsequently, actor workers perform policy optimization on the accumulated fresh on-policy samples and update the behavior policy with new parameters.

Despite its effectiveness, this RL workflow introduces significant system efficiency challenges in large-scale RL training. Rollout generation is particularly expensive for LLMs, as responses are generated autoregressively and can account for around 80% of total training time [37], with multi-turn agentic RL further amplifying this cost. Moreover, response lengths and interaction turns vary substantially across prompts, re-

∗^{*}Corresponding author.

sulting in severe GPU underutilization in synchronous RL training (① in Fig. 1 (a), where trainer needs to collect a batch of on-policy data to start policy optimization). To mitigate these inefficiencies, recent systems increasingly adopt asynchronous RL (Fig. 1 (b)), where rollout generation and policy training proceed concurrently on disaggregated resources, and the trainer updates the policy with stale samples generated by rollout workers using earlier policy versions. By enabling trainers and rollout workers to operate in parallel, asynchronous RL execution can significantly reduce long-tail generation bubbles and improve hardware utilization. As LLM RL workloads continue to scale in terms of model size, context length, and interaction complexity, such asynchronous designs are rapidly evolving from a performance optimization into a practical requirement [10, 25].

Introducing asynchrony alone does not guarantee efficient or stable RL training, as policy staleness can degrade model performance. Therefore, effective asynchronous RL systems must jointly balance execution efficiency, algorithmic stability, and resource utilization, raising key challenges at the intersection of distributed systems and RL algorithms.

Challenge #1: Residual data dependencies still limit system efficiency. Asynchronous RL allows the trainer to use trajectories generated from slightly stale policies, reducing resource under-utilization from waiting for long-tail generation. However, existing asynchronous RL systems still incur undesirable GPU idling bubbles due to residual coupling of training and generation. As shown in Fig. 1 (b), the trainer may still block until enough rollout generation data is collected to form a batch. This phenomenon is particularly pronounced in LLM RL, where rollout time dominates overall execution time and varies substantially due to diverse response lengths and potentially complex environmental interactions.

Challenge #2: Limited system–algorithm co-optimization fails to meet the joint requirements of efficiency and stability. Effective asynchronous RL requires jointly optimizing system efficiency and algorithmic stability. Stale-policy rollouts can destabilize learning if not properly controlled, leading to a staleness dilemma: small staleness cannot hide long-tail generation latency [13, 23, 43, 51], while excessive staleness causes severe policy mismatch and training instability [6, 29]. Although recent algorithmic correction methods can improve RL robustness, they often overlook system-level efficiency and yield only limited performance gain [29, 45].

Challenge #3: Non-adaptive system designs fail to accommodate dynamic and heterogeneous RL workloads. Compared with conventional distributed training, LLM RL workloads are more dynamic and heterogeneous. Rollout generation is dominated by autoregressive decoding and environmental interaction, whose costs vary significantly across samples due to diverse response lengths and unpredictable tool-execution latency. In contrast, cost of policy training is relatively regular and batch-oriented. Moreover, these costs evolve during training and vary across models, tasks, and hardware platforms, causing shifting resource demands of different RL stages over time. Non-adaptive resource allocation designs in existing asynchronous RL systems [6, 23, 24] are therefore inherently inefficient: fixed configurations like resource allocation and generation concurrency can cause severe GPU load imbalance and resource under-utilization. On the other hand, naive runtime resource reconfiguration is also expensive, as it requires cold-starting generation and training engines on new devices and rebuilding communication groups, often leaving all GPUs idle for several minutes.

Our Approach. We propose ReFlow, a fully decoupled and adaptive asynchronous RL framework for efficient LLM post-training. ReFlow aims to accelerate training by reducing the demand for expensive rollouts through system–algorithm codesign. Our key insight is that, beyond widely-adopted policy asynchrony, experience replay [21] offers an additional, underexplored opportunity to improve LLM RL efficiency. By carefully reusing recently generated samples, we enable experience replay in RL post-training to significantly reduce the demand for costly new rollouts without introducing excessive policy mismatch for model optimization. This is particularly valuable in multi-turn agentic RL, where trajectories involve long-term interactions. We also provide theoretical guarantee that experience replay can reduce gradient variance and stabilize training. Together, these properties enable more flexible and efficient asynchronous execution.

Based on this insight, ReFlow is designed to fully exploit experience replay to achieve efficient LLM RL post-training:

First, ReFlow introduces a carefully designed dataflow named dual replay data cycle that turns experience replay into improvements in both system throughput and training convergence. ReFlow redesigns the dataflow and component interactions of existing asynchronous RL systems, decoupling rollout generation from policy training. In its replay-driven cyclic dataflow, training batches are constructed from a mixture of fresh, stale, and selected replayed samples, reducing the need for costly new rollouts while keeping policy mismatch under control. It also adjusts the rollout budget and training batch composition accordingly at each iteration to balance efficiency and stability. To better manage the dataflow, ReFlow inserts a replay buffer as an intermediate data layer. The buffer enables global staleness control over fresh and replayed data, and exposes extensible sampling and filtering interfaces for customized data selection, forming another replay data cycle inside experience buffer.

Second, to address dynamic resource demands of LLM RL and new workload patterns introduced by experience replay, ReFlow employs an elastic resource pool for efficient runtime resource scaling. By shifting the overhead of resource reallocation from system reinitialization to lightweight worker state transitions and reassignment, ReFlow allows compute resources to be reallocated between rollout generation and policy training within seconds, ensuring efficient fresh-sample generation to reduce policy mismatch and preserve training stability. ReFlow further incorporates an adaptive scheduler that continuously optimizes generation strategies and resource allocation based on replay requirements and runtime system metrics. By adapting to diverse and evolving system demands in replay-driven RL, the scheduler sustains both high resource utilization and stable fresh-sample supply.

We deploy ReFlow on clusters with up to 128 GPUs and evaluate it on representative single-turn reasoning and multi-turn agentic RL tasks against state-of-the-art RL systems. Results show that ReFlow improves training throughput by up to 2.06×2.06\times while maintaining comparable or even better model performance, demonstrating its scalability and efficiency.

References (43)