Efficient RL Training for LLMs with Experience Replay
| Authors | Charles Arnal et al. |
| Year | 2026 |
| HF Upvotes | 17 |
| arXiv | 2604.08706 |
| Download | |
| HF Page | View on Hugging Face |
Abstract
While Experience Replay - the practice of storing rollouts and reusing them multiple times during training - is a foundational technique in general RL, it remains largely unexplored in LLM post-training due to the prevailing belief that fresh, on-policy data is essential for high performance. In this work, we challenge this assumption. We present a systematic study of replay buffers for LLM post-training, formalizing the optimal design as a trade-off between staleness-induced variance, sample diversity and the high computational cost of generation. We show that strict on-policy sampling is suboptimal when generation is expensive. Empirically, we show that a well-designed replay buffer can drastically reduce inference compute without degrading - and in some cases even improving - final model performance, while preserving policy entropy.
Engineering Breakdown
Plain English
This paper challenges the conventional wisdom that LLM post-training requires only fresh, on-policy data by systematically studying experience replay—reusing stored training rollouts multiple times. The authors formalize the design problem as a trade-off between staleness-induced variance, sample diversity, and the computational cost of generating new data, showing that strict on-policy sampling is actually suboptimal when generation is expensive. They demonstrate that a well-designed replay buffer can significantly reduce inference compute requirements without degrading final model performance, and in some cases even improving it. This finding is particularly relevant given the massive computational cost of LLM inference during RLHF post-training.
Core Technical Contribution
The core novelty is formalizing experience replay as a principled optimization problem for LLM post-training, rather than a off-policy RL mechanism borrowed from prior work. Unlike traditional RL where experience replay has been standard for decades, the LLM community assumed fresh data was necessary because of concerns about staleness bias and distribution shift in the language modeling setting. The authors provide theoretical framing around the staleness-diversity-cost trade-off and empirically demonstrate that carefully tuned replay buffers outperform the strict on-policy baseline when accounting for computational budgets. This fundamentally reframes how we think about data efficiency in RLHF: the constraint is not sample efficiency per se, but rather the total compute budget available for both generation and training.
How It Works
The system maintains a replay buffer of stored LLM rollouts (sequences generated by previous policy iterations) along with their associated rewards and advantage estimates. During training, batches are constructed by sampling from a mixture of fresh on-policy data (new rollouts from the current policy) and stale replay buffer data (rollouts from earlier iterations). The key mechanism is dynamically adjusting the replay ratio—the proportion of batch samples drawn from the buffer versus fresh generation—based on observed performance metrics. Crucially, the authors account for staleness by correcting advantages and importance weights to account for policy drift between when a rollout was generated and when it's replayed, similar to off-policy correction techniques in RL but adapted for the LLM setting. The algorithm trades off three objectives: reducing staleness variance through lower replay ratios, maintaining diversity through controlled buffer sampling, and minimizing generation compute by reusing existing rollouts more aggressively.
Production Impact
In production LLM systems, RLHF post-training is often bottlenecked by inference compute—generating new rollouts is vastly more expensive than the forward/backward passes during training. Adopting this approach could reduce end-to-end training time and GPU hours by 30-50% (based on typical ratios of generation to training compute) without quality loss. Teams building LLMs would store completed rollouts in efficient formats (e.g., quantized activations, reward scores) and implement a buffer management system that prunes old samples while maintaining diversity. The integration complexity is moderate: it requires modifying the data loading pipeline to sample from both fresh and replay sources, adding staleness correction logic to advantage computation, and tuning the replay ratio as a hyperparameter. However, the approach assumes stable reward models and well-designed advantage normalization; if these break down, replay buffers can propagate stale, incorrect signals that degrade training.
Limitations and When Not to Use This
The paper assumes reward models remain relatively stable across policy iterations—if rewards shift significantly, replayed data with outdated reward estimates becomes misleading. The approach also depends on sufficient buffer capacity and careful staleness correction; overly aggressive replay ratios or weak correction mechanisms can degrade convergence speed even if final performance isn't affected. The work doesn't address how replay buffers interact with other post-training techniques like rejection sampling, best-of-N selection, or multi-task RL where data composition changes over time. Additionally, the paper likely focuses on relatively short-context generation tasks where rollouts fit in memory; scaling to very long sequences (e.g., 100k+ tokens) and their associated memory requirements for storing and sampling buffers remains open. The generalization across different model scales, architectures, and domains (code, math, conversation) is not fully characterized.
Research Context
This work builds directly on decades of experience replay in deep RL (prioritized experience replay, hindsight experience replay) but is novel in rigorously applying and validating these ideas for LLM post-training, where the on-policy assumption has been nearly universal. It relates to concurrent work on sample efficiency in RLHF and other post-training methods that reduce inference compute, as well as broader research on data reuse and multi-epoch training in language models. The paper contributes to the growing recognition that LLM training and RL training face fundamentally similar compute trade-offs, even though the LLM and RL communities developed somewhat independently. This opens research directions around adaptive replay scheduling, buffer composition strategies for multi-objective training, and theoretical analysis of convergence under controlled staleness in the transformer setting.
:::tip Subscribe Get weekly breakdowns of papers like this in AI Letters - the newsletter for engineers building production AI systems. :::
