Manuscript Offprint

arXiv:2610.20814

Gibbs-Gap Policy Optimization for Off-Policy RL with Verifiable Rewards

Xuanchang Zhang, Tong Zhang

Abstract

Reinforcement learning with verifiable rewards often trains language models on responses generated by a different, possibly stale behavior policy. Correcting this mismatch with learner-to-behavior importance weights can introduce high variance for long responses. We introduce Gibbs-Gap Policy Optimization (GGPO), which minimizes a log-mean-exp contrast of KL-adjusted rewards among responses to the same prompt, without learner-to-behavior importance weights. We derive GGPO from KL-regularized policy optimization: on policy, its population loss is exactly the KL-regularized optimality gap, and under suitable coverage the learner's single-response expected reward is at least the behavior policy's best-of-K reward, minus terms for the raw finite-group loss, regularization, and finite training data. We characterize reference refresh through exact Gibbs-target composition and a finite-data final-policy reward bound under local reference control and tokenwise behavior mismatch. This refresh is empirically important: in an ablation, fixed-reference GGPO scores 32.96 on the five-benchmark problem-weighted average, versus 46.58 with the default refresh schedule. Experiments on mathematical reasoning further show that GGPO outperforms GRPO and AGRO under training-inference mismatch and on fixed offline data, while maintaining its performance as controlled policy staleness grows. 1^{1}

1 Introduction

Reinforcement learning with verifiable rewards (RLVR) improves language-model reasoning by using automatic checks to evaluate task outcomes (Guo et al., 2025). In group-based methods, the model generates several responses to each prompt, and differences in their rewards provide a learning signal (Shao et al., 2024; Yu et al., 2025). These groups also suggest a natural performance target. If selecting the highest-reward response from a group improves on drawing a single response, we would like to train a learner whose individual responses approach the reward of that selection procedure. This motivation also underlies reward-ranked fine-tuning methods such as RAFT (Dong et al., 2023) and reasoning variants such as RAFT++ (Xiong et al., 2025). In practice, however, the policy that generates the group may differ from the learner being trained. During asynchronous generation, responses can arrive from an earlier policy version; even within a rollout batch, sequential learner updates can make the remaining responses stale (Noukhovitch et al., 2025; Zheng et al., 2025a). We refer to the policy generating these responses as the behavior policy πbeh\pi_{beh}, and to the policy being trained as the learner πθ\pi_{\theta}. The distinction is also relevant in offline training, where sampled responses remain fixed while the learner continues to change. Moreover, synchronizing policy parameters does not necessarily eliminate the mismatch: training and inference can use different implementations or numerical precision (MiniMax et al., 2025; Zhong et al., 2026).

A standard way to account for this mismatch is importance sampling, which weights behavior-policy data by the learner-to-behavior likelihood ratio πθ/πbeh\pi_{\theta}/\pi_{beh}. For an autoregressive response, this ratio is a product of conditional token ratios. Small differences at individual token positions can

1^{1}Code is available at https://github.com/thunderous77/GGPO.

therefore accumulate over a long response, producing highly variable weights and making the update sensitive to a few sampled responses. Practical methods control these contributions through clipping, truncation, or masking (Schulman et al., 2017; Yu et al., 2025; Zhong et al., 2026; Ling Team et al., 2025; Zheng et al., 2025b). These choices involve both where to apply the correction, such as at the token or response level, and how strongly to limit it. They can reduce variance, but also introduce bias. This tradeoff motivates an alternative: learn directly from behavior-policy response groups through an objective that retains a quantitative connection to the learner's reward, without requiring learner-to-behavior importance weights in the update.

We introduce Gibbs-Gap Policy Optimization (GGPO), which learns from contrasts in KL-adjusted rewards among responses to the same prompt, without learner-to-behavior importance weights. Under bounded coverage, its finite-group loss controls the gap between the learner's single-response expected reward and the reward obtained by best-of-K selection from the behavior policy. Thus the response groups serve both as training data and as a reward benchmark for the learner. Groups of order K suffice for this comparison, and a uniform generalization bound extends it to finite data.

The construction follows from KL-regularized duality, which identifies a Gibbs policy whose adjusted reward is constant across responses. GGPO measures departures from this condition through contrasts within each group. On policy, its population loss equals the regularized optimality gap. For finite groups, we establish the reward comparison directly, without requiring accurate estimation of that population loss.

A fixed reference defines a single Gibbs target. Refreshing the reference to the current learner changes that target, allowing successive rounds to build on earlier progress. We characterize how exact targets compose across rounds and bound the reward of averaged outputs when updates are imperfect, under coverage and bounded adjusted-reward spread. Under binary rewards and local reference control, a finite-data guarantee bounds the final policy's reward using aggregate tokenwise mismatch and achieved fitting accuracy. Under its assumptions, the expected reward of one response from the trained policy can approach that of selecting the best of K responses from the initial policy. Section 5 summarizes this guarantee; Appendix B.1 gives the precise result.

GGPO builds on earlier work on off-policy consistency. AGRO (Tang et al., 2026) minimizes the variance of the same adjusted reward and identifies the same regularized optimum under common support. Although the two objectives share this target, they measure departures from it differently. We compare their objectives and guarantees in Section 2 and evaluate GGPO against GRPO and AGRO under training-inference mismatch, controlled policy staleness, and offline training.

Our contributions are:

• An off-policy group objective with a direct reward guarantee. GGPO minimizes the log-mean-exp contrast of KL-adjusted rewards within behavior-policy response groups, without learner-to-behavior importance weights. On policy, its population value is exactly the KL-regularized optimality gap. Off policy, coverage bounds that gap. Its raw finite-group loss bounds the gap between the learner's single-response expected reward and the behavior policy's best-of-K reward, with explicit terms for the loss, regularization, reference-behavior mismatch, and group size. A uniform empirical bound and oracle inequality extend this comparison to finite data.

• A characterization of periodic reference refresh. When each round exactly fits its Gibbs target, T refresh rounds at temperature β\beta implement one Gibbs update at temperature β/T\beta/T. This explains how refresh changes the target across rounds. For imperfect updates, a finite-data guarantee controls the final policy reward using aggregate tokenwise mismatch and achieved inner optimization accuracy. An ablation shows that periodic refresh substantially improves GGPO under the default training setting.

• Evaluation across behavior–learner mismatch regimes. On five mathematical-reasoning benchmarks and two model sizes, GGPO outperforms GRPO and its closest objective-level comparator AGRO under training-inference mismatch. It maintains its accuracy as the synchronization delay grows from N = 8 to N = 128, while GRPO and AGRO decline. At N = 128, token-level TIS improves GRPO, while GGPO achieves higher accuracy under the same synchronization delay. On a fixed offline rollout pool, GGPO has the highest MATH-500 accuracy at every checkpoint from 160 updates onward.

References (100)

  • On the Theory of Policy Gradient Methods: Optimality, Approximation, and Distribution Shift
  • Asymmetric REINFORCE for off-policy reinforcement learning: Balancing positive and negative rewards
  • Online difficulty filtering for reasoning oriented reinforcement learning
  • Enabling Token-wise Importance Sampling in Off-Policy RLVR with Proximal KL Regularization
  • Global optimality guarantees for policy gradient methods
  • Accelerating RL for LLM reasoning with optimal advantage regression
  • Noise contrastive alignment of language models with explicit rewards
  • Evaluating Large Language Models Trained on Code
  • Revisiting reinforcement learning for LLM reasoning from a cross-domain perspective
  • RAFT: Reward ranked finetuning for generative foundation model alignment
  • IMPALA: Scalable distributed deep-RL with importance weighted actor-learner architectures
  • Contrastive policy gradient: Aligning LLMs on sequence-level scores in a supervised-friendly fashion
  • REBEL: Reinforcement learning via regressing relative rewards
  • A theory of regularized Markov decision processes
  • Nature, 645(8081):633–638, 2025
  • Olympiad-Bench: A challenging benchmark for promoting AGI with olympiad-level bilingual multimodal scientific problems
  • Measuring mathematical problem solving with the MATH dataset
  • Stable asynchrony: Variance-controlled off-policy RL for LLMs
  • Kimi Team et al. Kimi k1.5: Scaling reinforcement learning with LLMs. arXiv preprint arXiv:2501.12599, 2025. (opens arXiv in a new tab)
  • Efficient memory management for large language model serving with PagedAttention
  • Solving quantitative reasoning problems with language models
  • Trust region masking for long-horizon LLM reinforcement learning
  • Let's verify step by step
  • Scaling reinforcement learning for trillion-scale thinking model (opens arXiv in a new tab)
  • Understanding R1-Zero-Like Training: A Critical Perspective
  • Decoupled weight decay regularization
  • Score centering stabilizes off-policy reinforcement learning (opens arXiv in a new tab)
  • MiniMax, Aili Chen, Aonian Li, Bangwei Gong, et al. MiniMax-M1: Scaling test-time compute efficiently with lightning attention. arXiv preprint arXiv:2506.13585, 2025. (opens arXiv in a new tab)
  • Bridging the gap between value and policy based reinforcement learning
  • Trust-PCL: An off-policy trust region method for continuous control
  • Asynchronous RLHF: Faster and more efficient off-policy RL for language models
  • Direct preference optimization: Your language model is secretly a reward model
  • A short variational proof of equivalence between policy gradients and soft Q learning (opens arXiv in a new tab)
  • Offline regularised reinforcement learning for large language models alignment (opens arXiv in a new tab)
  • LLMs can learn to reason via off-policy RL. arXiv preprint arXiv:2602.19362, 2026 (opens arXiv in a new tab)
  • Proximal Policy Optimization Algorithms
  • DeepSeekMath: Pushing the Limits of Mathematical Reasoning in Open Language Models
  • HybridFlow: A flexible and efficient RLHF framework
  • Maximum likelihood reinforcement learning
  • RL-finetuning LLMs from on- and off-policy data with a single algorithm
  • Rényi divergence and Kullback–Leibler divergence
  • A minimalist approach to LLM reasoning: from rejection sampling to reinforce (opens arXiv in a new tab)
  • Qwen3 Technical Report
  • DAPO: An open-source LLM reinforcement learning system at scale
  • Linear convergence of natural policy gradient methods with log-linear policies
  • Revisiting reinforcement learning with verifiable rewards from a contrastive perspective (opens arXiv in a new tab)
  • Rethinking importance sampling in LLM policy optimization: A cumulative token perspective (opens arXiv in a new tab)
  • Stabilizing reinforcement learning with LLMs: Formulation and practices (opens arXiv in a new tab)
  • Group Sequence Policy Optimization
  • Diagnosing training inference mismatch in LLM reinforcement learning (opens arXiv in a new tab)
  • We work with a finite action space $\mathcal{A}$, with policies positive on $\mathcal{A}$ and finite displayed expectations
  • The argument begins with the scalar dual, whose residual provides a measure of departure from the Gibbs optimum
  • Fix a prompt $x$, temperature $\beta > 0$, reward $r(x, a)$, and positive reference policy $\pi_{\mathrm{ref}}(\cdot \mid x)$
  • Moreover, $\Phi_{x}^{\prime}(\nu) = 1 - Z_{\beta} e^{-\nu/\beta}$ and $\Phi_{x}^{\prime\prime}(\nu) = Z_{\beta} e^{-\nu/\beta}/\beta > 0$, so its minimum is $\Phi_{x}(\beta \log Z_{\beta}) = V_{\beta}^{*}(x)$
  • Under positive support, zero loss forces $R_\theta$ constant, so $\pi_\theta \propto \pi_{\text{ref}} e^{r/\beta}$ and hence $\pi_\theta = \pi^*$
  • If $\pi_\theta$, $\pi_{\text{ref}}$, and $\pi_{\text{beh}}$ are positive on $\mathcal{A}$, this zero condition also implies $\pi_\theta = \pi^*$
  • Hence $H_m = 0$ implies two independent copies always agree on the sampled support, so $X$ and $R_\theta$ are constant there
  • At a threshold $t \in [0, 1]$, write $p = \pi_{\text{beh}} \{r > t\}$, $v = \pi_\theta \{r > t\}$, and $d_k = 1 - (1 - p)^k$
  • Take expectations in Eq
  • The class-wide coverage bound $C$ can still exceed one for other candidates
  • These assumptions apply to all possible groups, not only observed responses
  • Fix the behavior and reference policies and candidate class before drawing n independent unfiltered groups, with raw losses in $[0, \Lambda]$ and the uniform loss cover specified above
  • Rearranging and rounding 10/3 up to 4 gives both
  • A union bound therefore makes these inequalities hold for every center with probability at least $1 - \delta$
  • Both their population and empirical losses then differ by at most $\eta$
  • Lemma 18 uses this conclusion with the local loss bound $\Lambda = \beta$ and makes it simultaneous across rounds
  • The oracle terms separate approximation, empirical optimization, and statistics
  • The objective value then equals the reverse-KL regularized gap, while the frozen- $\pi_{\text{beh}}$ derivative is the forward-KL/cross-entropy gradient toward $\pi^*$
  • The implemented loss is given in Eq
  • Thus $\beta$ affects the implemented update through $q$, not through a remaining global multiplier
  • Let $\mathcal{S}$ be the $k$ responses of a mixed-reward group with verifier reward one, and write $\Delta_i = \log[\pi_\theta(a_i \mid x)/\pi_{\text{ref}}(a_i \mid x)]$
  • For AGRO, equal learner-to-reference log ratios within the group cancel in leave-one-out centering, giving an advantage sum of $k(m - k)/(m - 1)$
  • A lone correct response $(k=1)$ can never be penalized this way
  • MaxRL derives this update from an on-policy maximum-likelihood formulation, whereas GGPO derives its log-mean-exp loss from KL-regularized duality and permits behavior-learner mismatch without learner-to-behavior importance weights
  • The log-ratio difference $\Delta_i - \Delta_j$ controls the relative weights of equally rewarded responses without attenuation by $\beta$
  • For binary reward with reference success probability $s \in (0,1)$, the zero-loss Gibbs policy succeeds with probability $se^{1/\beta}/(1-s+se^{1/\beta}) < 1$
  • Selection of action $a$ requires at least one draw of $a$, hence $u_K(a \mid x) \leq K\pi_0(a \mid x)$
  • Use the common coverage, residual-range, and group-size bounds $C$, $D$, and $m$ from the proposition
  • For $s \in [0, 1]$, the normalized weight $e^{sz_i} / \sum_j e^{sz_j}$ of every group member is at least $e^{-D} / m$
  • Since both density ratios have $\pi_{\text{beh},t}$-mean one
  • The population contrastive loss can be written as the centered log moment
  • Equation (4) of Tang et al. (2026) gives the leave-one-out finite-group stochastic gradient of this variance objective
  • For a fixed group of size $m \geq 2$, write $\bar{R} = m^{-1} \sum_i R_i$ and $A_m = (2m)^{-1} \sum_i (R_i - \bar{R})^2$, the half-variance with denominator $m$
  • Also $\mathrm{Var}_{q_s}(R) \leq \sum_i q_{s,i}(R_i - \bar{R})^2 \leq \sum_i (R_i - \bar{R})^2 = 2mA_m$, which gives the inequality
  • (5) and (14) use sequence coverage, which can grow rapidly with response length
  • Here we assume binary rewards and initial correct-response coverage
  • Its conditional normalizer $Z(s) = \mathbb{E}_{\mu}[e^{r/\beta} \mid s]$ lies in $[1, e^{1/\beta}]$ because rewards are binary
  • The errors below allow approximate fitting within the constrained class
  • The finite-data guarantees therefore depend on the complexity of the group-loss functions
  • Fix nonnegative bounds $\alpha$, $\xi$, and $\eta$, and an integer $M \geq 1$
  • A uniform bound over the candidate class before sampling is sufficient but stronger than necessary
  • Let $V_{\log} < \infty$ be a deterministic bound such that
  • For a chosen $0 < \nu \leq 1$, the additional bound
  • The learner-to-behavior token condition is separate from the learner-to-reference constraint in Assumption 1
  • Fix a comparator policy $\pi_{\star}$ and use the following coverage condition
  • Suppose Assumptions 1, 2, and 3 hold, and use the sampling procedure above
  • The scalar $\pi$ in the constants is the circle constant
  • Under the same local reference, sampling, approximation, and initial coverage conditions, retain T, z, and X from Theorem 13
  • When each behavior policy is the current frozen reference, $\mathcal{C}_\infty \leq e^{H/\beta} < \sqrt{e}$ by Assumption 1, giving $n = O(zX)$
  • Their proofs are given there

Couldn't load all references. Reload the page to try again.