Manuscript Offprint

arXiv:2609.03941

Headroom-Drift Replay: A Primitive for Principled Replay Control in GRPO

Hyun Bin Park, Du-Seong Chang

Open access. PaperVantage converted this article to text, so layout and figures may differ from the original.

Abstract

RL-based post-training for reasoning models is increasingly bottlenecked by repeated fresh rollout generation, particularly in agentic settings where environment interaction dominates wall-clock cost. Replay can reduce this burden by reusing past trajectories, but existing methods typically embed it within larger training pipelines involving exploration, experience restructuring, or mixed-policy optimization. This makes replay's own contribution difficult to isolate. We ask a focused question: how far can principled replay selection alone go? We introduce Headroom-Drift Replay, a group-level replay control primitive for GRPO that separates reuse into two decisions. Headroom ranks stored groups by remaining learning value, while Drift gates them by compatibility with the current policy. The fresh on-policy stream remains unchanged, and the method adds no auxiliary generation or training machinery. Across mathematical reasoning, multimodal reasoning, and Agentic Search benchmarks, this single intervention outperforms naive replay and matches or exceeds broader replay methods on Avg Mean@32. In Agentic Search, where environment interaction dominates cost, it delivers comparable quality at materially lower wall-clock time.

Figure

Figure

Figure 1: Summary of two representative views. (a) In mathematical reasoning, Headroom-Drift Replay leads on Avg Mean@32 over all baselines. (b) In agentic search, Headroom-Drift combines the highest Avg Best@32 with competitive wall-clock cost.

1 Introduction

Reinforcement learning (RL) has become a central ingredient in post-training language models for reasoning (Ouyang et al., 2022; Bai et al., 2022), but it often incurs substantial cost through repeated fresh rollout generation. This burden is especially high in GRPO-style training and grows further in agentic settings, where interaction with external environments adds significant wall-clock overhead (Wang et al., 2026a; Liu et al., 2026a,b). Replay offers a natural remedy by reusing previously collected trajectories. Yet naive reuse is often insufficient for stable learning. The question is not whether to replay, but how to control replay itself: which stored experience should re-enter training, and under what conditions.

A stored replay group can fail for two distinct reasons. It may still contain useful learning signal but have become too stale under the current policy. Conversely, it may remain close to the current policy while offering little room for further learning. Reliable replay therefore requires two separate judgments: whether a group still offers learning value and whether it remains compatible with the current policy.

Prior work has shown that replay can improve sample efficiency in reasoning-oriented RL, but existing methods typically couple it with auxiliary mechanisms. This makes replay itself difficult to study as a standalone control problem. We therefore isolate replay-side control within GRPO (Shao et al., 2024; Guo et al., 2025) and ask how far it can go on its own.

Headroom-Drift Replay is a group-level replay control primitive for GRPO built around separate judgments of learning value and current-policy compatibility. Headroom measures the remaining room to shift probability toward good actions and away from bad ones. Policy Drift measures how far the current policy has moved from the policy that generated the group and gates out stale groups. Reuse operates on full groups rather than individual responses, preserving the within-group comparison structure central to GRPO. Together, these two controls form the only addition to standard GRPO; the fresh on-policy stream remains unchanged. This design isolates the effect of replay-side control on training dynamics.

Empirically, Headroom-Drift outperforms naive replay across mathematical reasoning, multimodal reasoning, and Agentic Search, and matches or exceeds methods that combine replay with additional training machinery. The strongest evidence comes from mathematical reasoning under the fullest baseline set. In Agentic Search, where environment interaction dominates wall-clock cost, the benefit takes a different form: Headroom-Drift outperforms on-policy scaling in both quality and per-step efficiency because the selected trajectories remain informative enough to substitute for costly fresh environment interaction. Multimodal reasoning shows that the same control principle extends beyond text-only settings.

Our contributions are threefold:

(i) We formulate replay in GRPO as a two-part control problem—retaining learning value while ensuring current-policy compatibility—and instantiate it in Headroom-Drift Replay, a group-level replay control primitive that requires no auxiliary training machinery.

(ii) We construct role-aligned baselines that isolate distinct control questions—on-policy budget matching, fresh-data scaling, naive replay volume, strong non-replay alternatives, and broader replay methods with auxiliary machinery—and show across mathematical reasoning, Agentic Search, and multimodal reasoning that this primitive outperforms naive replay and matches or exceeds broader replay methods.

(iii) We analyze how principled replay control behaves across training, covering same-buffer counterfactual comparisons, replay-age compatibility and lifetime exposure concentration, multi-reward ingress dynamics, and the relationship between replay and entropy collapse.

References (92)

  • Constitutional AI: Harmlessness from AI Feedback
  • IMPALA: Scalable distributed deep-RL with importance weighted actor-learner architectures
  • Nature, 645(8081):633–638, 2025 (opens the publisher in a new tab)
  • RePO: Replay-enhanced policy optimization, 2025 (opens arXiv in a new tab)
  • Entropy-preserving reinforcement learning (opens arXiv in a new tab)
  • Agentic reinforcement learning with implicit step rewards (opens arXiv in a new tab)
  • GEM: A gym for generalist LLMs
  • The energy loss phenomenon in RLHF: A new perspective on mitigating reward hacking
  • MiniMax, Aili Chen, Aonian Li, Bangwei Gong, Binyang Jiang, Bo Fei, Bo Yang, et al. MiniMax-M1: Scaling test-time compute efficiently with lightning attention, 2025. URL https://arxiv.org/abs/2506.13585. (opens arXiv in a new tab)
  • Safe and efficient off-policy reinforcement learning
  • Training language models to follow instructions with human feedback (opens the publisher in a new tab)
  • Prioritized experience replay (opens arXiv in a new tab)
  • DeepSeekMath: Pushing the Limits of Mathematical Reasoning in Open Language Models
  • Buffer Matters: Unleashing the power of off-policy reinforcement learning in large language model reasoning (opens arXiv in a new tab)
  • EFRame: Deeper reasoning via exploration-filter-replay reinforcement learning framework, 2025 (opens arXiv in a new tab)
  • Information gain-based policy optimization: A simple and effective approach for multi-turn LLM agents (opens arXiv in a new tab)
  • On the entropy dynamics in reinforcement fine-tuning of large language models, 2026b (opens arXiv in a new tab)
  • BAPO: Stabilizing off-policy reinforcement learning for LLMs via balanced policy optimization with adaptive clipping
  • An open-source LLM reinforcement learning system at scale (opens the publisher in a new tab)
  • Escaping policy contraction: Contraction-aware PPO (CaPPO) for stable language model fine-tuning
  • ExGRPO: Learning to reason from prior successes (opens arXiv in a new tab)
  • Group Sequence Policy Optimization
  • We first fix replay-state conventions, including the distinction between reference, cached, current-policy, and runtime Headroom
  • The reference Headroom is the immutable generation-time score
  • If a buffered group is scanned at step $t$, then its cached priority is refreshed after selection using the runtime value from the same current-policy reevaluation pass; otherwise the cached value remains unchanged
  • The mixed actor batch is
  • Proposition 2 and Corollaries 2.1–2.2 are stated against the immutable reference quantity $H^{\mathrm{ref}}(g)$ and the conceptual current-policy quantity $H_{t}^{\mathrm{cur}}(g)$ because Policy Drift is defined relative to the generation-time policy
  • To make this explicit, define the replay indicator
  • The cached priority is then updated after selection according to
  • \end{cases}$$
  • As stated in the main method description, the binary-reward setting uses mixed-outcome-only ingress; the present section clarifies how that same ingress principle should be specialized when multiple reward components jointly determine the final reward
  • Under that setting, excluding groups that were all-failure or all-success under $s_i^+$ functioned as an appropriate replay-ingress criterion
  • Accordingly, $s_i^+ = 1[r_i > 0]$ no longer corresponds exclusively to correctness: an incorrect response may still receive 0.1 for satisfying the format requirement, whereas a correct response may receive 0.9 even when the format requirement is violated
  • Under the $s_i^+$-based definition, all such groups are treated uniformly as all-success groups, even though they differ in whether they contain answer-correct responses
  • Accordingly, the direct cause of ingress collapse was not that the model had made almost all samples correct, but that the $s_i^+$-based definition failed to separate answer and format signals and counted format-only positives as success
  • Because formatting contributes to the final reward, two responses can receive different rewards even when both are answer-incorrect
  • The sine function relates the angle of a side (adjacent) to the ratio of the opposite side to the hypotenuse
  • These groups contain no answer-correct samples, and their within-group reward variance is driven entirely by formatting
  • the original rule treats answer-driven and format-driven variation as equally replay-worthy
  • Let a group consist of $G$ sampled responses, and let $i \in \{1, \ldots, G\}$ index the responses within the group
  • Such groups contain no answer-correct samples at all, and their within-group reward variation is driven entirely by formatting rather than answer correctness
  • The answer-based indicator is instantiated from the task reward structure as
  • The top panel shows the raw trajectories (faint) together with their running averages (bold), while the bottom panel shows the score difference between the two runs over the same window
  • The upper panel indicates that the smoothed score trajectory remains above that of the original rule for most of the comparison range, while the lower panel shows a mostly positive gap rather than a single-point spike
  • This section summarizes how those quantities behave empirically in training
  • The accepted and rejected empirical CDFs overlap substantially in the low-age regime, and rejection remains visible even for the youngest replay ages
  • Figure 13 shows how this mechanism behaves in practice
  • As shown in Panel (A), early steps can often fill the replay target after scanning only a shallow prefix, whereas later steps increasingly require deep scans and sometimes fail to fill the target at all
  • Rather, it is an adaptive prefix-truncation process in which Headroom ordering determines where replay mass is concentrated, while Policy Drift and the replay budget determine how deep the scan must go to recover enough admissible groups
  • (A) Age histogram normalized separately within the accepted and rejected populations
  • To test this, we bucket groups by the decile of their initial stored Headroom at buffer entry, then measure how often those groups are replayed over their lifetime
  • Low-Headroom deciles exhibit both small mean replay counts and low replay-at-least-once probabilities, whereas the upper deciles show markedly stronger
  • Bars show the mean lifetime replay count $N_{rep}$ for groups in each initial stored-Headroom decile, and the line shows the probability that a group is replayed at least once
  • The uppermost deciles are clearly favored, but they do not form a strictly monotone sequence, and some lower-decile groups are still replayed
  • The quantities $N_T^{\text{rep}}(g)$ and $W_T(g)$ from Appendix A allow us to distinguish two different views of replay concentration: how many groups fall into each replay-count cohort, and how much total replay exposure mass those cohorts account for
  • Although high-$N_{rep}$ cohorts are small in population share, they account for a much larger share of total replay-use events
  • (A) Cohort share by lifetime replay count $N_{rep}$, showing what fraction of groups are replayed 0,1,2
  • A replay rule may appear sparse if viewed only through the fraction of groups that are ever replayed, yet still exert substantial influence on optimization if the repeatedly reused groups receive a large share of total replay exposure
  • Terminology differs across studies, but the core concern is consistent: even when reward or score improves, the policy distribution can become overly concentrated, making subsequent training brittle
  • Taken together, these studies establish entropy collapse as an informative signal of broader training failure
  • However, this pattern alone is insufficient evidence of more stable learning
  • All three runs use the same Qwen2.5-Math-1.5B model, GRPO training framework, and dataset
  • ><tr><td rowspan=
  • A run may look delayed simply because it progresses more slowly: if it reaches comparable training-score levels later, its transition into low-entropy regions will also appear later on the raw progress axis, even when the underlying collapse dynamics are unchanged
  • Let $\hat{S}$ denote the training score and $H$ denote policy entropy
  • Table 10 summarizes the score-conditioned delays of the three runs under these criteria, and Figure 16 visualizes the corresponding entropy trajectories and marker timings
  • Under $H_L = 0.03$, GRPO on-policy larger (b384) shows a shorter post-anchor entry delay than Headroom-Drift Replay (b256+r128) (207 vs. 237 in Table 10)
  • At matched score levels, both low-entropy entry and rebound are delayed under replay
  • This pattern makes a purely slower-learning explanation unlikely and motivates a working interpretation
  • The replay groups actually used for updates span source ages from 1 to 7 steps; 66.00% come from sources at least 2 steps old, and 44.06% from sources at least 3 steps old
  • Importantly, this recency bias does not collapse to a single age: Table 11(B) shows a mixed-age structure (mean distinct source ages per update: 4.07; updates with at least three ages: 85.71%; updates containing both age = 1 and age ≥ 3: 76.79%)
  • The gray curve shows the number of newly ingressed groups added to the replay buffer at each step, while the orange curve shows the number of replay groups actually used for the update
  • This structure weakens in pre-collapse and then contracts sharply in collapse: mean source age falls to 2.24 and then 1.26, the age = 1 share rises to 42.13% and then 76.47%, the age ≥ 3 share drops to 33.50% and then 2.94%, and mean distinct ages decrease to 3.80 and then 1.67
  • The importance-ratio denominator is therefore always anchored at the generation-time policy $\pi_{\text{gen}(g)}$; only the numerator is recomputed under the current policy $\pi_{\theta_t}$ at each PPO update
  • At the configured maximum sequence lengths, the stored token sequences, generation-time log-probabilities, and GRPO advantages total approximately 448 MiB at full capacity
  • This early termination ensures that selection cost scales with $K_{\text{rep}}$ and the number of candidates actually scanned, rather than with the full buffer size
  • This cached-Headroom refresh is applied to every scanned group regardless of whether it passes or fails the Policy Drift gate, and requires no additional forward pass
  • Because the actor batch is split into mini-batches by sequential slicing, this prefix layout causes replay groups to occupy the earlier mini-batches and on-policy groups to occupy the later ones
  • The number of discarded groups is at most $u-1$; when $u=1$, no truncation occurs
  • A naive sequential partition can concentrate long sequences on a single GPU, leaving other GPUs idle while that GPU finishes
  • This appendix develops both sides of that claim: we first show that the two gates define qualitatively different compatibility regions, and then compare them empirically on mathematical reasoning
  • Because the L2 gate operates on a second moment, its threshold is more naturally compared on the root-mean-square scale: $\sqrt{\tau_2} \approx 0.032$
  • Figure 19 summarizes step-aligned trajectories over 500 steps
  • L2 attains better late-stage validation accuracy while maintaining lower replay mismatch, despite matched or lower replay-budget fulfillment
  • The two gates achieve similar replay-budget fulfillment through the middle phase of training
  • Table 13 summarizes the thresholds used across the evaluated runs
  • The three decade-spaced conditions are designed to probe distinct gate states rather than locate a narrow performance optimum
  • acceptance measures whether the gate supplies enough replay, while replay KL measures whether the admitted groups remain compatible with the current policy
  • Specifically, it is the mean of $D_{\text{KL}}(\pi_\theta \parallel \pi_{\theta_{\text{old}}})$ across token positions in the replay batch
  • Under MODERATE, replay KL remains stable throughout training
  • Under LOOSE, it increases monotonically and reaches a large multiple of the MODERATE level in the final interval
  • This appears to be due to the near-absence of replay, which prevents the run from benefiting from replay-based acceleration