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 WuarXiv 2026

Reinforcement Learning (RL) has become the "secret sauce" for turning Large Language Models (LLMs) into reasoning powerhouses like OpenAI’s o1 or DeepSeek-R1. However, training these models is notoriously slow. The primary culprit? Rollout generation. Generating thousands of autoregressive responses to calculate rewards can consume up to 80% of total training time, leaving expensive GPUs sitting idle while they wait for data.

A new paper from researchers at HKU, USTC, Alibaba, and Southeast University introduces ReFlow, a system-algorithm co-design that uses experience replay to decouple training from generation, boosting throughput by over 2x without sacrificing model quality.

TL;DR

ReFlow accelerates LLM RL post-training by up to 2.06× by introducing a "dual replay data cycle" that reuses recent trajectories to keep trainers busy. It combines this with an elastic resource pool that reallocates GPUs between rollout and training roles in seconds to handle the highly dynamic nature of LLM workloads.

What Problem Does This Paper Address?

The standard LLM RL workflow is a game of "hurry up and wait." In synchronous RL, the trainer must wait for all rollout workers to finish generating responses before it can update the model. Because response lengths vary wildly (the "long-tail" problem), many GPUs sit idle (see Figure 1(a)).

Asynchronous RL tries to fix this by letting the trainer use "stale" data from previous model versions while new rollouts are being generated. However, this creates a "staleness dilemma": too little asynchrony doesn't hide the latency, but too much asynchrony makes training unstable and degrades model performance. Furthermore, LLM workloads are dynamic. As a model learns to reason better, its responses often get longer, meaning a resource split (e.g., 50/50 between rollout and training) that worked at the start of training becomes inefficient halfway through.

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

Methods: The ReFlow Architecture

ReFlow moves away from the "generate-then-train" mindset by treating experience as a reusable resource.

  1. Dual Replay Data Cycle: Unlike traditional LLM RL which consumes each trajectory once, ReFlow maintains a replay buffer. If rollout generation is slow, the trainer can pull recent (but slightly off-policy) samples from the buffer to keep the gradient updates flowing. To maintain stability, they use a data refeed boundary ($\sigma$) to cap the replay fraction and a loss reweighting ($\tau$) strategy to down-weight replayed samples.
  2. Unified AsyncHybrid Worker: Reallocating GPUs between stages usually requires a "cold start" (restarting engines, rebuilding communication groups), which can take minutes. ReFlow’s hybrid workers can switch roles in seconds by offloading inactive model modules (like the inference engine during training) to CPU memory instead of tearing them down.
  3. Adaptive Scheduler: A producer-consumer model monitors GPU idle ratios and production rates in real-time. It automatically shifts GPUs between rollout and training to find the "sweet spot" for the current workload.

Datasets

The authors evaluated ReFlow using the Qwen3 model family (4B to 32B parameters) across several demanding tasks:

  • Single-turn Reasoning: Mathematical reasoning using the DAPO-Math-17K benchmark.
  • Multi-turn Agentic RL: Coding tasks on the APPS dataset, where the model iteratively writes and tests code.
  • Tool-Interactive Reasoning: Using ReTool, where the model invokes a code sandbox to solve math problems.

Key Insights and Ideas

  • Replay as a System Decoupler: While experience replay is a classic RL trick for data efficiency, ReFlow proves it is equally powerful as a system optimization tool to break data dependencies.
  • The Variance-Bias Tradeoff: The authors provide a theoretical justification showing that appropriately weighted replay can actually reduce gradient variance compared to using only fresh data, leading to more stable training.
  • Workloads are Moving Targets: Figure 4 in the paper (shown below) highlights how mean response lengths evolve during training. Static system configurations are doomed to be inefficient because the "bottleneck" shifts as the model's behavior changes.
Figure 4: Diverse and evolving generation characteristics un- der different training configurations, demonstrating the highly dynamic workload pattern of LLM RL.

Key Results

  • Massive Throughput Gains: ReFlow achieved speedups of 1.19× to 2.06× over state-of-the-art systems like VeRL.
  • Eliminating Idle Time: In Qwen3-8B training, ReFlow slashed trainer idle ratios from 55.8% down to 15.5%.
  • Fast Rebalancing: Thanks to the Unified AsyncHybrid Worker, shifting resources between rollout and training takes less than 10 seconds, compared to the minutes required by traditional reinitialization.
  • Stable Convergence: Despite using replayed data, ReFlow reached comparable or better reward levels than synchronous baselines, often reaching target performance significantly faster in wall-clock time.

Limitations and Future Work

While ReFlow shows impressive gains, the authors note a few areas for further exploration:

  • Replay Filtering: Currently, ReFlow uses random sampling for the replay buffer. More sophisticated "priority" sampling (e.g., keeping only high-reward or high-advantage trajectories) could further improve data efficiency.
  • Scaling to "Infinite" Horizons: The current system is tested on agentic tasks up to a few turns. Extremely long-horizon tasks might introduce new staleness challenges that require even tighter system-algorithm coordination.
  • Self-Improvement Loops: The authors suggest ReFlow could be a foundational framework for more compute-intensive paradigms like recursive self-improvement.

Summary updated

BibTeX
@misc{tian2026reflow,
  author = {Yukun Tian and Junwei Su and Haofeng Xu and Lansong Diao and Zhengping Qian and Weibo Zhao and Wenchao Zhou and Ruiting Zhou and Chuan Wu},
  title = {{ReFlow: Replay-Driven Decoupling for Efficient RL Post-Training}},
  year = {2026},
  eprint = {2610.21640},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2610.21640},
}
Figure