Skip to content

Menu

WorksComputer Science

On the Origin and Evolution of Training-Inference Mismatch in LLM Reinforcement Learning

Download PDFView on arXiv

Ask your agent about this work

Your agent reads this work through Valency, with its citations and similar works. Paste this at the start of a chat.

Use the Valency MCP. Work: W_s8p3wavm. Fetch it with get_paper_by_id, then find its nearest works with find_similar_papers and tell me what it adds.

Works with any MCP client. Not connected yet? Connect your agent

Abstract

On-policy reinforcement learning for large language models assumes that training responses are sampled from the current policy. In practice, an inference engine samples the responses and a separate trainer computes the gradients, and the training-inference mismatch between the two makes the training data off-policy. The mismatch has two sources, the numerics of the engine and the stale weights of asynchronous sampling, and a correction that stabilizes training under one source can fail under the other. We ask which property of a mismatch source decides the correction it needs. Evaluating the trainer at the sampler's weights splits each sampled-token error exactly into a numerical discrepancy of the engine and a policy lag of the trainer, and we follow both through training. The numerical discrepancy stays approximately constant, so it biases the updates by a nearly fixed amount, and centering the score at each prefix removes its leading bias. The policy lag is produced by the trainer's own updates: the bias it leaves enters the next update, which enlarges the next lag and closes a feedback loop. Importance weighting cuts this loop only while the lag ratio stays concentrated, and on Qwen3-1.7B it fails at the step where the effective sample size of the ratio falls below one half. From this account we derive the discrepancy-lag correction (DLC), which centers the numerical discrepancy, clips the lag ratio against the sampler's weights and resynchronizes the sampler when this effective sample size falls below one half. Under a stale sampler, DLC keeps the KL divergence from on-policy training within twice the KL between two independent on-policy trainings on Qwen3-0.6B and Qwen3-1.7B, and its resynchronization prevents collapses that the per-token corrections leave and that a KL measured on the sampler's prefixes does not detect.

Code: https://github.com/Skylanding/Training-Inference-Mismatch

Introduction

Reinforcement learning for language models [1, 6, 3] typically runs two systems on the same weights. Inference engines such as vLLM [4, 5, 6] sample the responses, and a trainer computes the policy gradient on them. The engine computes token probabilities with its own kernels and precision, so its distribution qq differs from the trainer’s distribution pp even at identical weights [7, 8], and low-precision samplers widen the gap. Asynchronous systems such as ARL [9] and PipelineRL [10] add a second source, since the sampler keeps the weights of the last synchronization while the trainer moves on. Training on samples from qq with gradients of pp is therefore off-policy. We call the whole gap between qq and pp, from both sources, the training-inference mismatch. Prior work addresses this mismatch with three corrections [7, 11, 12]: (1) truncated importance sampling weights each sampled token by the truncated ratio p/qp/q; (2) score centering subtracts the sampler’s mean score at each prefix and thereby removes the drift, the part of the update that depends on the advantages only through their mean; (3) PPO clips the ratio of the trainer to a reference policy at each token.

The outcome of these corrections depends on the source of the mismatch. Score centering keeps training stable with a quantized sampler and falls behind importance sampling with a stale one, while PPO trains under staleness and fails under quantization [11]. Under staleness alone the collapse of asynchronous GRPO scales with the product of staleness and learning rate [13], and importance-weighted asynchronous training loses its effective sample size before it diverges [14]. The behavior of a correction therefore depends jointly on the estimator and on the process that produces the mismatch. At a single prefix, however, the untruncated ratio and centering both remove the drift, so the source must act through what each correction leaves after the drift and through how that remainder evolves during training. The question is which property of a mismatch source decides the correction it needs.

We trace the mismatch to its origin in the two layers of the system and follow its evolution during training. The infrastructure decides how far the sampler departs from the trainer, and the algorithm corrects what reaches the gradient. Once the infrastructure aligns sampling, reporting and token sequences, the mismatch reaches the algorithm as a numerical discrepancy and a policy lag, and the trainer’s log-probability at the sampler’s weights splits the sampled-token error exactly into these two terms, as Figure 1 illustrates. The numerical discrepancy originates in the engine and stays approximately fixed during training. The policy lag originates in the trainer’s own updates, the residual bias it leaves enters the next update, and the next update sets the next lag. Corrections of the policy lag therefore have to keep this loop from amplifying the update. Our contributions follow this account.

Figure 1. Origin of the training-inference mismatch and the correction built on it. The trainer’s forward pass at the sampler’s weights splits the mismatch exactly into the numerical discrepancy and the policy lag, and the gradient estimator receives a constant offset from the first and a growing lag ratio from the second. DLC subtracts the offset, clips the lag ratio inside the loop through the update and resynchronizes the sampler when the effective sample size of the lag ratio falls below one half (a). Under a stale sampler, DLC keeps Qwen3-1.7B at the noise floor through step 40, while importance sampling leaves the floor once its effective sample size falls below one half at step 11 (b). The three DLC trainings resynchronize the sampler when the effective sample size of their lag ratio falls below one half, and the effective sample size of importance sampling stays below one half after step 11 (c).

① Following the factorization of the importance ratio at the sampler’s weights [15], we split the sampled-token error exactly into the numerical discrepancy and the policy lag. After centering removes the drift, the remaining bias consists of a prefix, a continuation, a token and a tail term, which keep a fixed size for the numerical discrepancy and grow with the accumulated update for the policy lag.

  1. For the policy lag, the token and prefix terms enter the next update and close a loop, which locates the part of the known staleness bias [13, 16] that survives centering. As a consequence, the excess update norm of score centering over importance sampling has a positive quadratic term in the product ηk\eta_k of learning rate and step count. Ratio weighting removes the token term within its validity range, which ends where the effective sample size of the lag ratio falls below one half. On Qwen3-1.7B the heavy tail of the ratio brings this crossing to step 11, three steps before the Gaussian prediction, and importance sampling leaves the noise floor at that step.

  1. The discrepancy-lag correction (DLC) centers the numerical discrepancy, clips the lag ratio against the sampler’s weights [17] and resynchronizes the sampler at the end of the validity range. Under a stale sampler DLC keeps the deviation from on-policy training within twice the noise floor on Qwen3-0.6B and Qwen3-1.7B, and on Qwen3-1.7B the resynchronization prevents the collapses that the clip alone leaves.

Background

Training-inference mismatch

Table 1 lists the mismatch by the layer that corrects it. Once the infrastructure aligns sampling, reporting and token sequences, only the weight version and the engine numerics reach the algorithm, and only the weight version changes with the update. The other three rows of the infrastructure layer concern what the sampler reports and what the trainer receives. Top-p sampling and processed log-probabilities make the reported qq differ from the distribution that drew the token, so the sampler has to report the drawn distribution. Retokenization of the decoded text can change the token sequence, and passing token ids to the trainer keeps the sequence identical on both sides. Filtering responses by their reward and deferring long responses in partial rollouts make the composition of the batch depend on the outcome, and outcome-independent batching keeps the batch a sample of qq. These three mismatches vanish under the configuration of § 3, so the weight version and the engine numerics remain as the two sources that the algorithm has to correct. In the algorithm layer, the weight version gives the policy lag, which grows with the update, and decoupled PPO and M2PO weight the ratio of the trainer to the sampler’s weights, while VCPO scales the learning rate by the effective sample size. The engine numerics give the numerical discrepancy, which stays approximately fixed in training, and truncated importance sampling and score centering correct it at each sampled token.

MismatchSourceCorrection
Infrastructure layer
Weight versionasynchronous rolloutsynchronization, bounded staleness [9, 10]
Engine numericslow precision, kernelsbatch-invariant kernels [18], FP16 training [19]
Sampling and reportingtop-p, processed log-probabilitiesreport the drawn distribution
Sequence identityretokenizationpass token ids to the trainer
Response selectionfiltering, partial rolloutsoutcome-independent batching
Algorithm layer
Policy lag ℓt\ell_tweight version, grows with the updatedecoupled PPO [20], M2PO [21], VCPO [14]
Numerical discrepancy ete_tengine numerics, approx. fixed in trainingtruncated importance sampling [7], score centering [11]

Table 1. Training-inference mismatch and its corrections in the two layers.

Yao et al. [7] reported that vLLM and FSDP give different token probabilities at identical weights and introduced truncated importance sampling, and Liu et al. [8] traced the gap to engine numerics, quantization and kernels and proposed sequence-level variants. Zheng et al. [22] showed that the token-level objective approximates the sequence-level one only when both the numerical gap and the staleness are small. Engineering work reduces the numerical discrepancy through batch-invariant kernels [18], deterministic inference across tensor-parallel sizes [23], FP16 training [19], an FP32 language-model head [24] and router replay for mixture-of-experts models [25]. Zhong et al. [26] isolate the numerical discrepancy against a bitwise-aligned reference engine, and Yu et al. [27] model it as a displacement of the logits and calibrate the importance weight accordingly. For quantized samplers in synchronous training, AIS and QaRL weight the discrepancy factor separately from the PPO ratio [28, 29], and Chen et al. [30] calibrate the clip range to the quantization noise. QeRL instead trains with a quantized sampler and uses its quantization noise for exploration [31]. QUADS aligns the quantization errors of the sampler and the trainer for mixture-of-experts models in 4-bit floating point [32].

Marek and Ryabinin [11] trace the instability under mismatch to the drift, the term of the policy gradient that § 3 defines, and remove it by subtracting the sampler’s mean score at each prefix. In their experiments the outcome of each correction depends on the mismatch source. With a quantized sampler, score centering alone trains best, and with a sampler synchronized every 64 steps, importance sampling with centering trains while score centering alone falls behind. PPO survives staleness and collapses under quantization and under synthetic weight noise. The authors attribute the stale case to the covariance that score centering takes under the sampler and the survival of PPO to a clip designed for ratios from policy movement. Our account places the sampler inside a training loop, since the sampler is a biased copy of the trainer that synchronizes back to it. § 4 separates the part of the mismatch that moves with the trainer from the part that stays fixed, and § 5 follows the remainder after centering for the moving part through training.

Off-policy correction and staleness

Truncated and clipped importance weights have a long history in off-policy reinforcement learning [33, 34, 35], and ACER combines truncation with a bias-correction term over the full action set [36] Asynchronous systems bound the staleness and weight each token by its ratio to the logged rollout policy [9, 10, 37], decoupled PPO separates a proximal policy from the behavior policy [20], and GSPO clips the ratio at the sequence level [38]. Guan et al. [15] show that the importance ratio factors into a training-inference discrepancy and a policy staleness and that this factorization needs the trainer’s log-probabilities at the old weights. Song et al. [13] trace the collapse of asynchronous GRPO to a staleness-induced update bias that positive feedback across synchronization periods sustains, and COPC couples the correction of the policy ratio with that of the advantage estimate [39]. Adaptive schemes control the update through statistics of the ratio. For example, M2PO bounds the second moment of the importance weights [21], VCPO scales the learning rate by the effective sample size [14], and Guan et al. [15] reset the proximal reference when the share of unmasked tokens falls below 0.9. Other studies act on the update itself in three ways [40]. GAC finds that successive gradients of asynchronous training stay aligned and projects the update off the stale-aligned direction [16], SAT shrinks one side of the PPO trust region with the log-ratio as a proxy for staleness [41], and GMC-GRPO caps the importance mass of each group and bounds the bias of trajectory-level weighted estimators [42]. GAC, SAT and GMC-GRPO analyze the update without centering and do not separate the policy lag from the numerical discrepancy. The discrepancy-lag correction of § 7 builds on the factorization of Guan et al. [15], gives each factor its own correction according to whether it enters the training loop and uses the second moment of the lag ratio to resynchronize the sampler’s weights.

Setup

Sampler, trainer and corrections

The trainer at weights θ\theta has next-token distribution pθp_\theta, and the sampler draws responses yy from qq. Each sampled token yty_t at prefix hth_t has score st=∇θlog⁡pθ(yt∣ht)s_t = \nabla_\theta\log p_\theta(y_t \mid h_t) and advantage AtA_t, the reward minus the group mean ([1, 43, 6]). At a fixed prefix we write pvp_v and qvq_v for the probabilities of token vv, ss for the score and aa for the expected advantage after the token ([6]), both as functions of vv. On policy the mean score is zero because the probabilities sum to one, so an advantage that is constant at the prefix has zero expected contribution. Under the sampler the update at the prefix splits into two terms (Marek and Ryabinin [11]),

Eq[as]=Eq[a]Eq[s]+Cov⁡q(a,s),Eq[s]=Eq[s]−Ep[s]=−∇θKL⁡(q∥pθ).(1)\begin{aligned} \mathbb{E}_q[a s] &= \mathbb{E}_q[a]\mathbb{E}_q[s] + \operatorname{Cov}_q(a,s),\\ \mathbb{E}_q[s] &= \mathbb{E}_q[s] - \mathbb{E}_p[s] = -\nabla_\theta\operatorname{KL}(q \mathbin{\|} p_\theta). \tag*{(1)} \end{aligned}

We write aˉ=Eq[a]\bar{a} = \mathbb{E}_q[a] for the expected advantage of the prefix and sˉ=Eq[s]\bar{s} = \mathbb{E}_q[s] for the sampler’s mean score. The first term aˉ sˉ\bar{a}\,\bar{s} is the drift, a term that depends on the advantages only through their mean. By the second line the drift is a gradient step on the KL from the sampler to the trainer with step size aˉ\bar{a}. As a consequence, the drift distills the trainer toward the sampler on prefixes with positive expected advantage and pushes it away on prefixes with negative expected advantage. Group centering sets the mean advantage of each prompt to zero, whereas prefixes on the way to a correct answer have positive expected advantage and prefixes after an error have negative expected advantage. The drift is therefore nonzero on the prefixes that carry the learning signal.

The corrections differ in how they treat the two terms. The policy gradient averages AtstA_t s_t over the sampled tokens. Importance sampling multiplies each term by the truncated ratio min⁡(p/q,2)\min(p/q, 2). The untruncated ratio would cancel the drift, but its truncation on rare tokens brings part of the drift back. Score centering replaces sts_t by st−sˉts_t - \bar{s}_t, so that the centered update equals the covariance term of Equation (1) taken under qq. The sampler reports its log-probabilities on its top-128 tokens HH. As in verl (Sheng et al. [46]), the tail takes the trainer’s probabilities scaled by the ratio of the two tail masses,

κ=1−∑Hqv1−∑Hpv.\kappa= \frac{1-\sum_{H}q_v}{1-\sum_{H}p_v}.

Since the full-vocabulary mean score under pp is zero, the mean score that score centering subtracts reduces to s^t=∑v∈H(qv−κpv)sv\hat{s}_t = \sum_{v\in H}(q_v-\kappa p_v)s_v. Importance sampling with centering weights each token as importance sampling does and subtracts the sampler’s mean of the weighted score. PPO clips the ratio of pθp_\theta to a reference policy, which is either the trainer at the sampler’s weights or the trainer before each batch ([20, 9]).

Mismatch sources and training

The reference sampler runs vLLM in BF16 with CUDA graphs and yields on-policy training. The quantized sampler stores the weights in FP8 (Micikevicius et al. [47]) with 128×128128 \times128 blocks, quantizes the activations dynamically and keeps an FP8 KV cache. The stale sampler runs in BF16 and synchronizes every 64 steps, so within the 40 training steps it keeps the initial weights θ0\theta_0 and the accumulated update is Δ=θ−θ0\Delta= \theta- \theta_0. The combined source quantizes the stale weights θ0\theta_0 in the same way. The four samplers draw at temperature one without truncation and pass token ids to the trainer, so the sampling, reporting and sequence mismatches of Table 1 vanish.

We train Qwen3-0.6B and Qwen3-1.7B (Qwen Team [48]) in non-thinking mode on Countdown with rewards ±1\pm1, 64 prompts with eight samples per step and SGD (Chang et al. [49]) at learning rate 10−210^{-2}, and train each configuration three times for 40 steps. These short trainings, together with replay of the sampler on shared checkpoints, keep the measurements on trajectories that have not collapsed. The deviation of a trained model is its full-vocabulary KL to the on-policy model trained with the same configuration on fixed prefixes from θ0\theta_0, averaged over the three pairs and divided by the noise floor, the mean KL between two independently trained on-policy models. Test accuracy is measured on 64 Countdown problems outside the training set with eight samples each. Section A collects the notation.

Numerical Discrepancy and Self-Induced Policy Lag

Source dependence of the corrections

Table 2 shows that our 40-step trainings reproduce the source dependence of the corrections. Under quantization, importance sampling and score centering, alone or combined, stay at the noise floor while the policy gradient reaches 13 times the floor, and score centering matches the 46.5% test accuracy of on-policy training. Under staleness, score centering reaches 32 times the floor and ends at 12.2%, while importance sampling with centering stays at 2.1 times the floor and ends at 32.0%. Our PPO runs take the trainer before each batch as the reference of the clip and reach 699 times the floor under staleness. In the experiments of Marek and Ryabinin [11], PPO trains under staleness, and § 6 traces this difference to the reference policy. Panels a and b of Figure 2 follow these deviations over training.

CorrectionQuantized sampler: Deviation at step 20Quantized sampler: Deviation at step 40Quantized sampler: AccuracyStale sampler: Deviation at step 20Stale sampler: Deviation at step 40Stale sampler: AccuracyQuantized and stale: Deviation at step 20Quantized and stale: Deviation at step 40Quantized and stale: Accuracy
Reference
Initial model θ0\theta_0––8.2––8.2––8.2
On-policy training1.001.0046.51.001.0046.51.001.0046.5
Baselines
Policy gradient1.5912.726.41783450.245.01070.2
PPO w/o clip3143360.04665340.0–––
PPO7.5214.326.28176990.0–––
Importance sampling0.430.7443.2<u>1.16</u>4.5020.91.253.9127.1
Score centering<u>0.53</u><u>0.80</u>46.53.9131.712.24.1928.118.4
Importance sampling with centering<u>0.53</u>1.11<u>46.0</u>0.862.1032.0<u>1.20</u><u>2.61</u>30.5
DLC (ours)–––0.861.93<u>31.7</u>0.962.17<u>30.3</u>

Table 2. The corrections under each mismatch source on Qwen3-0.6B. The deviation is the KL to on-policy training as a multiple of the noise floor at steps 20 and 40, and lower values are better. Test accuracy is in percent at step 40, the last training step, and higher values are better. PPO uses the trainer before each batch as its reference, and DLC is the correction of § 7. Among the baselines and DLC, the best value in each column is in bold and the second best is underlined, and a dash marks a correction without a run under that source.

Figure 2. Deviation of the corrections and the growth of the discrepancy and the lag. The colour of each cell gives the deviation of a Qwen3-0.6B run as a multiple of the noise floor on a log scale, averaged over the three runs, and Table 2 lists the values at step 40. Without a policy lag DLC reduces to score centering, so DLC has a run only under the two stale sources. Under quantization the corrections stay near the floor (a), whereas under staleness score centering leaves it and importance sampling with centering and DLC stay closest to it (b). The sequence offset stays constant under quantization and grows under staleness (c). The numerical discrepancy of the quantized sampler stays near 0.02 nats per token while the policy lag of a stale sampler grows by two orders of magnitude on both model sizes (d). With both sources combined, the numerical discrepancy keeps the size it has under quantization alone, and the lag reaches the stale value by step 40 (e). The accumulated update of the combined source follows that of the stale runs, with the hatched bars for the combined source and the vertical lines spanning the three runs (f).

Exact split of the sampled-token error

The untruncated ratio and centering both remove the drift at a prefix, so the corrections differ in what they leave, and the mismatch enters this remainder through the sampled-token error δt=log⁡pθ(yt∣ht)−log⁡q(yt∣ht)\delta_t = \log p_{\theta}(y_t \mid h_t) - \log q(y_t \mid h_t). The sampler differs from the trainer in its weights and in its engine, and a third log-probability at the sampler’s weights θold\theta_{\mathrm{old}} with the trainer’s numerics changes one attribute at a time and thereby splits the error exactly,

δt=log⁡pθ(yt∣ht)−log⁡pθold(yt∣ht)+log⁡pθold(yt∣ht)−log⁡q(yt∣ht).(2)\delta_t = \log p_{\theta}(y_t \mid h_t) - \log p_{\theta_{\mathrm{old}}}(y_t \mid h_t) + \log p_{\theta_{\mathrm{old}}}(y_t \mid h_t) - \log q(y_t \mid h_t). \tag*{(2)}

We call ℓt\ell_t the policy lag and ete_t the numerical discrepancy. The split is the logarithm of the factorization of the importance ratio into a policy-staleness factor and a training-inference discrepancy factor at the sampler’s weights ([20, 9, 15]), and the trainer’s reference forward pass at θold\theta_{\mathrm{old}} supplies its middle term.

The two terms follow different dynamics during training on both model sizes. The error of the quantized sampler is numerical discrepancy, about 0.02 nats per token throughout training, and the stale error is policy lag, with numerical discrepancy below 10−310^{-3}, and the quantization error and the lag separate by step 5 in panel d of Figure 2. Summed over a response, the quantization error gives a constant sequence offset while the magnitude of the stale offset grows by about 0.7 nats per step, as panel c shows. To first order the lag of a token is the accumulated update projected on its score, ℓt≈ΔTs,t\ell_t \approx\Delta T_{s,t}, so the policy lag is self-induced and grows only because the trainer moves. Its mean μ\mu under the sampler is minus the per-token KL from the sampler’s weights to the trainer when the numerical discrepancy is zero. The first-order term has mean zero, so μ\mu measures the spread of the per-token lag at second order.

The numerical discrepancy does not depend on Δ\Delta, so it biases each step by the same amount without feeding into later errors, and centering removes its first-order bias, as the quantization columns of Table 2 show. The runs that combine quantization with staleness test this split. Their numerical discrepancy keeps the value it has under quantization alone in panel e of Figure 2, and their accumulated update stays within ten percent of that of the stale runs for both score centering and importance sampling in panel f. Their lag starts up to twice as large and reaches the stale value by step 40, and their deviations keep the stale order.

Training Loop of the Policy Lag

Links of the loop

Under staleness the infrastructure keeps the sampler at θ0\theta_0, so the version gap equals the accumulated update, and a training step kk runs through three links. In lag growth the accumulated update Δk\Delta_k sets the lag of each sampled token, in the residual bias the lag sets the bias bkb_k that the correction leaves, and in bias accumulation the bias enters the next update,

Δk+1=Δk+η(gk+bk)≈(I−ηM)Δk+ηgk,(3)\Delta_{k+1} = \Delta_k + \eta\left(g_k + b_k\right) \approx\left(I-\eta M\right)\Delta_k + \eta g_k, \tag*{(3)}

with learning rate η\eta and on-policy gradient gkg_k. The second step uses the fact that the bias is linear in the accumulated update to first order, bk≈−MΔkb_k \approx-M\Delta_k, where MM collects the per-token weights that the correction leaves and Equation (5) gives its form. Along an eigenvector of MM with eigenvalue λ\lambda, a step multiplies the bias-driven part of Δ\Delta by 1−ηλ1-\eta\lambda, so that part grows where λ<0\lambda< 0 until the next synchronization resets Δ\Delta to zero. Up to step 20 the magnitude of the mean lag stays between 110 and 150 times ∥Δ∥2\lVert\Delta\rVert^2 under both corrections in panel a of Figure 3, so score centering and importance sampling produce the same lag per unit of movement and differ in how far Δ\Delta moves.

Figure 3. Measurements of the three links of the loop. We measure the three links under a stale sampler on Qwen3-0.6B. The mean lag grows with ∥Δ∥2\lVert\Delta\rVert^2 at the same rate under score centering and importance sampling, inside the grey band of 110 to 150 times ∥Δ∥2\lVert\Delta\rVert^2 (a), and tokens with negative advantage carry the larger lag only under score centering (b). The residual bias of score centering grows linearly in ∥Δ∥\lVert\Delta\rVert while that of importance sampling stays at the gradient noise (c). The predicted bias aligns with the measured one above the gradient noise (d), the update depends on the learning rate only through ηk\eta k (e), and the excess update norm of score centering over importance sampling follows the quadratic loop fit (f).

Residual bias of each correction

By Equation (1) centering removes the drift exactly and leaves Cov⁡q(a,s)\operatorname{Cov}_q(a,s), while the on-policy update at the same prefix is Cov⁡p(a,s)\operatorname{Cov}_p(a,s) because the on-policy mean score is zero. Over a response the remaining bias follows from replacing one distribution at a time. Let μtπ\mu_t^\pi be the distribution of the prefix hth_t under π\pi, atπa_t^\pi the expected advantage after yty_t when π\pi generates the rest of the response and s^t\hat{s}_t the head estimate of s^t\hat{s}_t from § 3. Score centering subtracts s^t\hat{s}_t, so at each prefix its update equals Cov⁡q(atq,st)+Eq[atq](sˉt−s^t)\operatorname{Cov}_{q}(a_t^q,s_t)+\mathbb{E}_{q}[a_t^q](\bar{s}_t-\hat{s}_t), and its bias bcb_c is exactly

bc=∑t[Eμtq(∑vqvatq(v)(sv−s^t))−Eμtp(∑vpvatp(v)sv)]=∑t[EμtqCov⁡q(atq,st)−EμtpCov⁡p(atp,st)+EμtqEq[atq](sˉt−s^t)]=∑t[(Eμtq−Eμtp)Cov⁡q(atq,st)+EμtpCov⁡q(atq−atp,st)+Eμtp(Cov⁡q(atp,st)−Cov⁡p(atp,st))+EμtqEq[atq](sˉt−s^t)].(4)\begin{aligned} b_c &= \sum_t \left[\mathbb{E}_{\mu_t^q}\left(\sum_v q_v a_t^q(v)(s_v-\hat{s}_t)\right)-\mathbb{E}_{\mu_t^p}\left(\sum_v p_v a_t^p(v)s_v\right)\right]\\ &= \sum_t \left[\mathbb{E}_{\mu_t^q}\operatorname{Cov}_{q}(a_t^q,s_t)-\mathbb{E}_{\mu_t^p}\operatorname{Cov}_{p}(a_t^p,s_t)+\mathbb{E}_{\mu_t^q}\mathbb{E}_{q}[a_t^q](\bar{s}_t-\hat{s}_t)\right]\\ &= \sum_t \left[(\mathbb{E}_{\mu_t^q}-\mathbb{E}_{\mu_t^p})\operatorname{Cov}_{q}(a_t^q,s_t)+\mathbb{E}_{\mu_t^p}\operatorname{Cov}_{q}(a_t^q-a_t^p,s_t)\right.\\ &\qquad\left.+\mathbb{E}_{\mu_t^p}\left(\operatorname{Cov}_{q}(a_t^p,s_t)-\operatorname{Cov}_{p}(a_t^p,s_t)\right)+\mathbb{E}_{\mu_t^q}\mathbb{E}_{q}[a_t^q](\bar{s}_t-\hat{s}_t)\right]. \tag*{(4)} \end{aligned}

where the last step adds and subtracts EμtpCov⁡q(atq,st)\mathbb{E}_{\mu_t^p}\operatorname{Cov}_{q}(a_t^q,s_t) and EμtpCov⁡q(atp,st)\mathbb{E}_{\mu_t^p}\operatorname{Cov}_{q}(a_t^p,s_t) and uses the linearity of the covariance in its first argument. In the order of the last two lines, we call the four terms the prefix term, the continuation term, the token term and the tail term. The tail term depends on the head HH that the sampler reports, so the infrastructure sets it. The other three terms come from the sampled-token error δt=ℓt+et\delta_t=\ell_t+e_t. The numerical discrepancy gives them the same size at each step, and the policy lag gives them a part that grows with Δ\Delta.

Under quantization the sequence offset stays at 8.9 nats on long responses while the residual bias stays at the gradient noise, so the size of the offset alone does not bias the update. Under staleness, score centering leaves the floor near step 12, where the growing offset reaches the same size, so the deviation follows the covariance of the offset with the gradient that the policy lag supplies.

The importance weight of the prefix hth_t from the sampler to the trainer is eSte^{S_t} with St=∑t′<tδt′S_t=\sum_{t'<t}\delta_{t'}, and the continuation term has the same form with the error summed after tt. For the token term, a first-order expansion of the sampler in the lag shows that the centered update at a prefix differs from the on-policy update by the lag weighted with the deviation of the advantage from its on-policy mean Aˉt=Ep[a]\bar{A}_t=\mathbb{E}_{p}[a] at the prefix, as Section F derives step by step. The ratio of importance sampling cancels the token term on tokens whose ratio stays below the truncation at 2, and the truncated tokens keep the excess of their ratio over 2 as a weight. Adding the linearized prefix term and then substituting the first-order lag ΔTst\Delta^\mathsf{T}s_t of each token under staleness gives

bc≈−∑tE[((At−Aˉt)ℓt+AtSt)st]≈−McΔ,Mc=∑tE[st((At−Aˉt)st+At∑t′<tst′)T],bw≈−∑tE[At(St+max⁡(eℓt−2,0))st]≈−MwΔ,Mw=∑tE[Atst∑t′<tst′T].(5)\begin{aligned} b_c &\approx-\sum_t \mathbb{E}\left[((A_t-\bar{A}_t)\ell_t+A_tS_t)s_t\right]\approx-M_c\Delta,\qquad M_c=\sum_t\mathbb{E}\left[s_t\left((A_t-\bar{A}_t)s_t+A_t\sum_{t'<t}s_{t'}\right)^\mathsf{T}\right],\\ b_w &\approx-\sum_t\mathbb{E}\left[A_t(S_t+\max(e^{\ell_t}-2,0))s_t\right]\approx-M_w\Delta,\qquad M_w=\sum_t\mathbb{E}\left[A_ts_t\sum_{t'<t}s_{t'}^\mathsf{T}\right]. \tag*{(5)} \end{aligned}

where bwb_w is the bias of importance sampling and its second step takes the tokens inside the validity range, on which the truncation weight is zero. Both biases are policy gradients with per-token weights built from the lag, and these weights give MM of Equation (3). Score centering keeps the token term (At−Aˉt)ℓt(A_t-\bar{A}_t)\ell_t, which importance sampling removes. The prediction below keeps the token and prefix terms.

The measured residual bias agrees with these forms for both corrections. We measure bb as the corrected gradient minus the on-policy gradient on the same batch and compare it with the gradient noise, the difference of two independent on-policy gradients. Under score centering, ∥b∥\lVert b\rVert grows linearly in ∥Δ∥\lVert\Delta\rVert with R2R^2 of 0.95 to 0.99 per run and reaches 2.5 times the gradient noise by step 40, whereas under importance sampling ∥b∥\lVert b\rVert stays within the noise, as panel c of Figure 3 shows. The weights of Equation (5) also predict bb from one backward pass on the same batch. Up to step 20 the prediction aligns with the measured bias at a cosine of up to 0.55, against at most 0.07 for the gradient noise, mainly through the prefix term in panel d. The linearized prefix weight StS_t grows with the position while the exact weight eSt−1e^{S_t}-1 stays above −1-1, so the prediction overstates the norm. With exact weights the overstatement falls below eight times and the cosine stays above the noise, as Section G shows.

Loop gain

Through bias accumulation the bias changes the lag of token tt by ηstTbk\eta s_t^{\mathsf{T}}b_k beyond the gradient. Projected through ℓt≈ΔTst\ell_t \approx\Delta^{\mathsf{T}}s_t, the token term of score centering changes each lag per step by −ηEt′[(stTst′)(At′−Aˉt′)ℓt′]-\eta\mathbb{E}_{t'}[(s_t^{\mathsf{T}}s_{t'})(A_{t'}-\bar{A}_{t'})\ell_{t'}] over the tokens t′t' of the batch. Each token with an advantage below its prefix mean therefore enlarges the lag magnitude on the tokens whose scores align with its own, itself included, and this enlargement produces the negative eigenvalues of MM. Grouping the sampled tokens by advantage confirms this sign, since under score centering the mean lag at step 20 is −0.66-0.66 on tokens with negative advantage and −0.37-0.37 on tokens with positive advantage, while under importance sampling the two groups agree in panel b of Figure 3.

The learning rate separates the loop from a bias that is fixed in Δ\Delta. Unrolling Equation (3) to second order, as Section H details, gives Δk≈ηk gˉ−12(ηk)2Mgˉ\Delta_k \approx\eta k\ \bar{g}-\frac{1}{2}(\eta k)^2M\bar{g} for a mean on-policy gradient gˉ\bar{g}, which depends on η\eta and kk only through the distance ηk\eta k. Under a bias fixed in Δ\Delta the excess update norm E=∥Δc∥−∥Δw∥E=\lVert\Delta_c\rVert-\lVert\Delta_w\rVert of score centering over importance sampling is linear in ηk\eta k, and the loop adds a quadratic term. In panel e of Figure 3 the runs at half the learning rate fall on the curves of the original ones, and in panel f the fit E=a ηk+c(ηk)2E=a\ \eta k+c(\eta k)^2 over both learning rates gives c=0.52c=0.52 at R2=0.987R^2=0.987, against 0.90 for the linear term alone. The quadratic coefficient is positive in each of the six fits by learning rate and run. The dependence on ηk\eta k also agrees with the stability boundary of asynchronous GRPO, which lies at a constant product of synchronization interval and learning rate (Song et al., [13]). Beyond step 20 the lag under score centering passes one nat, and the first-order loop ends at this size. The lag then spreads over the response, so that the 1% of tokens with the largest lag carry 78% of the summed lag at step 5 and 11% at step 40.

Validity Range of Importance Weighting

Tail of the ratio

Ratio weighting cuts the loop with a weight that itself depends on the lag. The importance sampling ratio of a token under staleness is ρt=eℓt\rho_t=e^{\ell_t}, with mean one under qq, so a negative mean lag comes with a spread of ratios and an effective sample size 1/Eq[ρt2]1/\mathbb{E}_q[\rho_t^2] as a fraction of the batch, which equals e2μe^{2\mu} for a Gaussian lag by the derivation of § 17. On Qwen3-0.6B the mean lag under importance sampling stays below 0.3 nats in magnitude through step 40. At step 40 a Gaussian lag with the measured μ\mu predicts that 28% of the tokens have a ratio below 0.5, whereas 11% do in panel a of Figure 4, so most tokens stay near ratio one and the lag concentrates on few of them (Vehtari et al., [50]). On Qwen3-1.7B the updates per step are larger, and the training logs give the second moment of the ratio at each step. The measured effective sample size agrees with the Gaussian value at step 10 and falls below one half at step 11, at a mean lag of −0.15-0.15 nats per token. The Gaussian value crosses one half three steps later, at step 14 in panel b.

Figure 4. Validity range of importance weighting under staleness. Fewer tokens fall below a ratio of 0.5 than a Gaussian lag predicts (a). On Qwen3-1.7B the effective sample size of importance sampling therefore drops below one half at step 11, three steps before the Gaussian value, with the purple and grey dotted lines at the two crossings (b), and the deviation of importance sampling leaves the floor from step 11 on (c).

The validity range of ratio weighting therefore ends earlier than e2μe^{2\mu} indicates, at a mean lag of −0.15-0.15 nats per token on Qwen3-1.7B against the Gaussian −0.35-0.35. Past this range the truncated tokens bias the update, and on Qwen3-1.7B the deviation of importance sampling leaves the floor at the step where the effective sample size crosses one half and grows to 152 times the floor by step 30, as panel c of Figure 4 shows. Under a constant policy lag of two to twelve steps, Huang et al. [14] observe the same order for sequence-level importance sampling, whose effective sample size collapses before the KL to the sampler grows.

Reference policy of PPO

The same derivation fixes the role of the PPO reference policy. With the reference at the sampler’s weights, the clipped ratio is eℓte^{\ell_t}, so the clip bounds the token term as the importance sampling ratio does and leaves the numerical discrepancy outside the ratio as drift. With the reference at the trainer before each batch, the policy lag stays outside the ratio, and the clip bounds only the movement between the updates within a batch. Our PPO runs take four updates per batch, and PPO without clip takes the same updates with the clip removed. Under staleness, PPO with the batch reference deviates at least as far as PPO without clip, at 699 against 534 times the floor in Table 2, while the sampler-weight reference of DLC stays at 1.9. Under quantization, PPO stays at the level of the policy gradient with one update per batch, so the clip removes the cost of the extra updates and leaves the drift of the numerical discrepancy. Marek and Ryabinin [11] attribute this asymmetry to a clip designed for ratios that come from policy movement, and Chen et al. [30] observe that quantization noise in the ratio pushes negative-advantage tokens outside the clip range. The position of the reference policy therefore accounts for the asymmetry. With the sampler’s weights as reference, the policy lag lies inside the ratio of PPO and the numerical discrepancy outside it, so the clip contains the lag under staleness and leaves the drift of the discrepancy under quantization. Our runs test the batch reference directly and the sampler reference through DLC, which shares its clipped ratio.

Discrepancy-Lag Correction

Method

The discrepancy-lag correction (DLC) assigns each term of Equation (4) to the layer that can remove it. Inside the algorithm, the policy lag needs its token term removed and the numerical discrepancy needs its drift removed. The lag that the algorithm cannot reach, in the prefix and continuation terms and on the tokens past the validity range, goes back to the infrastructure through a resynchronization of the sampler. The trainer runs one extra forward pass at the sampler’s weights θold\theta_{\mathrm{old}} with its own numerics. On each sampled token this pass gives ℓt\ell_t and ete_t through Equation (2), and on the sampler’s top-128 tokens HH it gives the log-probabilities of pθoldp_{\theta_{\mathrm{old}}} that the centering term below needs.

The policy lag lies inside the loop, so its correction has to remove the token term (At−Aˉt)ℓt(A_t-\bar{A}_t)\ell_t of Equation (5), which sets the loop gain. Ratio weighting removes this term, and for that purpose the lag factor of the ratio suffices. DLC therefore clips the lag ratio ρt=eℓt\rho_t=e^{\ell_t} with the PPO clip against the sampler’s weights, so that token tt enters the update with the weight mtρtm_t\rho_t. The clip indicator mtm_t drops a token with positive advantage when its ratio exceeds 1+ε1+\varepsilon and a token with negative advantage when its ratio leaves the interval from 1−ε1-\varepsilon to cc, with ε=0.2\varepsilon=0.2 and the dual-clip bound c=3c=3 of verl. Inside the clip range this weight is the lag ratio, as for importance sampling under staleness, so it removes the token term to the same order, and Section K shows that the lag enters the token term of DLC only through its product with the numerical discrepancy.

The sampled tokens come from qq, so the numerical discrepancy between qq and pθoldp_{\theta_{\mathrm{old}}} remains in the clipped update. At a prefix with a constant advantage AA the clipped update has the expectation A∑vqvmvρvsvA\sum_v q_v m_v\rho_v s_v under the sampler, which is nonzero for q≠pθoldq\ne p_{\theta_{\mathrm{old}}} and is the drift of Equation (1) for this estimator. Weighting by pθold/qp_{\theta_{\mathrm{old}}}/q would cancel this drift only without truncation, so DLC instead subtracts the expectation itself at each sampled token, as score centering subtracts sˉ\bar{s}, and the subtracted term then follows the clip. The sampler reports qq only on its head HH, and on the tail DLC takes qv=κpθold(v)q_v=\kappa p_{\theta_{\mathrm{old}}}(v) with the ratio of the tail masses κ=(1−∑v∉Hqv)/(1−∑v∉Hpθold(v))\kappa=(1-\sum_{v\notin H}q_v)/(1-\sum_{v\notin H}p_{\theta_{\mathrm{old}}}(v)) and leaves the clip inactive, so that qvmvρv=κpθ(v)q_vm_v\rho_v=\kappa p_\theta(v) there. The update of DLC then follows in three steps,

g^DLC=∑tAt(mtρtst−∑vqvmvρvsv)=∑tAt(mtρtst−∑v∈Hqvmvρvsv−κ∑v∉Hpθ(v)sv)=∑tAt(mtρtst−Ct),Ct=∑v∈H(qvmvρv−κpθ(v))sv.(6)\begin{aligned} \hat{g}_{\mathrm{DLC}}&=\sum_t A_t\left(m_t\rho_t s_t-\sum_v q_vm_v\rho_vs_v\right)\\ &=\sum_t A_t\left(m_t\rho_t s_t-\sum_{v\in H}q_vm_v\rho_vs_v-\kappa\sum_{v\notin H}p_\theta(v)s_v\right)\\ &=\sum_t A_t\left(m_t\rho_t s_t-C_t\right),\qquad C_t=\sum_{v\in H}\left(q_vm_v\rho_v-\kappa p_\theta(v)\right)s_v. \tag*{(6)} \end{aligned}

The first line subtracts the sampler’s expectation of the clipped score at prefix hth_t, the second line splits this expectation into the head that the sampler reports and the estimated tail, and the third line uses ∑vpθ(v)sv=0\sum_v p_\theta(v)s_v=0 to write the tail sum as minus the same sum over the head. The two terms of the last line divide the work between the numerical discrepancy and the policy lag. The weighted score mtρtstm_t\rho_ts_t carries the lag ratio and removes the token term of the policy lag inside the clip range. The centering term CtC_t is the sampler’s mean of this weighted score, so under the sampler a constant advantage at a prefix contributes zero up to the tail estimate, as it does on policy, and the drift of the numerical discrepancy vanishes. Only the head log-probabilities of the sampler and of pθoldp_{\theta_{\mathrm{old}}} enter CtC_t, and § 20 gives the loss that yields the update in one backward pass. Guan et al. [15] weight both factors of the ratio, and DLC weights the lag factor and centers the discrepancy factor.

The clip keeps the validity range of ratio weighting unchanged. Tokens whose lag ratio leaves the clip range drop out of the update, so their part of the token term returns, as it does for the truncated tokens of importance sampling. The share of these tokens grows as the lag ratio spreads, and § 6 places the end of the range where the effective sample size falls to one half. DLC therefore copies the trainer’s weights to the sampler when the effective sample size of the lag ratio falls below one half of the batch. The resynchronization removes the lag through the infrastructure, since it resets Δ\Delta, the lag and the prefix offset to zero and moves the reference of the clip to the trainer’s weights. Samplers that update their weights during generation keep this assignment, with the generating weights of each token as the reference of the clip and the admission of a response conditioned on its effective sample size in place of the resynchronization.

DLC reduces to the earlier corrections in two limits. With θ=θold\theta=\theta_{\mathrm{old}} the lag ratio is one and the clip is inactive, so CtC_t becomes the mean score that score centering subtracts and DLC reduces to score centering. With q=pθoldq=p_{\theta_{\mathrm{old}}} and an inactive clip, κ=1\kappa=1 and CtC_t vanishes, so DLC reduces to PPO with the sampler’s weights as reference. Compared with importance sampling with centering, DLC adds one forward pass of the trainer at θold\theta_{\mathrm{old}} per step and stores the same top-128 log-probabilities of the sampler. Its hyperparameters are the clip range, the head size and the resynchronization threshold, which the experiments keep at 0.2, 128 and one half. Table 3 writes each correction as a per-token gradient, and Algorithm 1 lists one training step of DLC. The corrections differ mainly in the denominator of their ratio. The three importance sampling corrections and VCPO divide by qq, so their weight and its truncation act on the numerical discrepancy as well as on the lag. PPO with sampler reference, M2PO and DLC divide by pθoldp_{\theta_{\mathrm{old}}} and weight the lag alone, and of the three only DLC removes the drift of the numerical discrepancy by centering. PPO with batch reference divides by the trainer before the batch, so neither the discrepancy nor the lag enters its ratio. The adaptive controls differ in what they act on, since VCPO slows the update as the effective sample size falls, whereas importance sampling with resynchronization and DLC move the sampler to the trainer and reset the lag.

MethodPer-token gradientRatio denominatorCenteringAdaptive control
Corrections at each token
Policy gradientAtstA_t s_t–✗–
Importance samplingwtAtstw_t A_t s_tqq✗–
Score centeringAt(st−sˉt)A_t (s_t-\bar{s}_t)–✓–
Importance sampling with centeringAt(wtst−∑vqvwvsv)A_t (w_t s_t-\sum_v q_v w_v s_v)qq✓–
Importance sampling with resynchronizationwtAtstw_t A_t s_tqq✗1/Eq[ρt2]<121/\mathbb{E}_q[\rho_t^2] < \frac{1}{2}
Reference policy of the PPO clip
PPO with batch referencemtbrtAtstm_t^b r_t A_t s_tpθbatchp_{\theta_{\mathrm{batch}}}✗K=4K=4
PPO with sampler referencemtρtAtstm_t \rho_t A_t s_tpθoldp_{\theta_{\mathrm{old}}}✗–
Methods for stale samplers
M2POmtM2ρtAtstm_t^{\mathrm{M2}}\rho_t A_t s_tpθoldp_{\theta_{\mathrm{old}}}✗–
VCPOwˉiA^ist\bar{w}_i \hat{A}_i s_tqq✗η(E[wˉi2])−1/2\eta\left(\mathbb{E}[\bar{w}_i^2]\right)^{-1/2}
DLC (ours)At(mtρtst−Ct)A_t(m_t\rho_t s_t-C_t)pθoldp_{\theta_{\mathrm{old}}}✓1/Eq[ρt2]<121/\mathbb{E}_q[\rho_t^2] < \frac{1}{2}

Table 3. Table 3 Per-token gradients of the corrections. The ratio denominator decides which component of the sampled-token error enters the weight, with qq for the discrepancy and the lag together and pθoldp_{\theta_{\mathrm{old}}} for the lag alone. Here wt=min⁡(pθ/q,2)w_t=\min(p_\theta/q,2), ρt=pθ/pθold\rho_t=p_\theta/p_{\theta_{\mathrm{old}}}, rt=pθ/pθbatchr_t=p_\theta/p_{\theta_{\mathrm{batch}}} for the trainer before each batch, and mtm_t and mtbm_t^b are the clip indicators of Equation (6) on ρt\rho_t and rtr_t. The M2PO baseline masks tokens by mtM2m_t^{\mathrm{M2}} until the second moment of ρt\rho_t is at most 0.04. VCPO weights response ii by wˉi=min⁡(∏t′pθ/q,8)\bar{w}_i=\min(\prod_{t'}p_\theta/q,8) and replaces its advantage by A^i\hat{A}_i with an off-policy baseline. In the last column the sampler resynchronizes when the effective sample size 1/Eq[ρt2]1/\mathbb{E}_q[\rho_t^2] falls below one half, VCPO scales the learning rate by the inverse root of the second moment of wˉi\bar{w}_i, and KK counts the updates per batch.

Algorithm 1 Training step of DLC

Input: trainer weights θ\theta, sampler weights θold\theta_{\mathrm{old}}, advantages AA from the group rewards

  1. Sample responses with the sampler at θold\theta_{\mathrm{old}} and record log qq on each sampled token and on the top-128 tokens HH

  2. Run the trainer’s forward pass at θold\theta_{\mathrm{old}} for log pθoldp_{\theta_{\mathrm{old}}} on the same tokens

  3. Split each sampled-token error into the policy lag ℓt\ell_t and the numerical discrepancy ete_t by Equation (2)

  4. Compute the effective sample size 1/Eq[ρt2]1/\mathbb{E}_q[\rho_t^2] of the lag ratio ρt=eℓt\rho_t=e^{\ell_t}

  5. Take one SGD step on the update ∑tAt(mtρtst−Ct)\sum_t A_t(m_t\rho_t s_t-C_t) with the centering term CtC_t of Equation (6)

  6. if the effective sample size is below one half of the batch then

  7. Copy the trainer’s weights to the sampler, so that θold\theta_{\mathrm{old}} becomes θ\theta

Deviation and test accuracy

On Qwen3-0.6B in Table 4 the DLC runs reach a deviation of 1.9 times the floor under staleness, and Table 2 gives 2.2 with both sources, against 2.1 and 2.6 for importance sampling with centering. On Qwen3-1.7B DLC stays within 1.2 times the floor through step 40 and ends at 0.6. In panels a and b of Figure 5, resynchronizing importance sampling at the same threshold lowers its deviation from 1.15 to 2.6 times the floor. On Qwen3-1.7B each DLC run resynchronizes once in 40 steps, at steps 20, 35 and 36, when the effective sample size of the lag ratio falls below one half. Importance sampling with resynchronization reaches the same threshold two, four and five times in its three runs, and a fixed interval would have to resynchronize it every 11 steps to keep it inside the validity range.

CorrectionQwen3-0.6B Deviation at step 10203040AccuracyQwen3-1.7B Deviation at step 10203040Accuracy
Reference
Initial model θ0\theta_0––––8.2––––33.4
On-policy training1.01.01.01.046.51.01.01.01.057.6
Baselines
Policy gradient2.01781163450.2–––––
PPO4078177986990.0–––––
Score centering0.73.914.231.712.23.611.68.77.615.9
Importance sampling0.31.22.44.520.91.423.81521150.5
Importance sampling with centering0.50.91.52.132.0–––––
Importance sampling with resynchronization–––––0.82.72.32.636.6
DLC (ours)0.30.91.31.931.70.61.10.80.651.9

Table 4. DLC and the baseline corrections under a stale sampler. The deviation is the KL to on-policy training as a multiple of the noise floor at steps 10, 20, 30 and 40, and lower values are better. Test accuracy is in percent on the Countdown test problems at step 40, and higher values are better. The grey rows give the initial model θ0\theta_0 and on-policy training. Among the baselines and DLC, the best value in each column is in bold and the second best is underlined, and a dash marks a correction without a run on that model.

Figure 5. DLC against importance sampling, importance sampling with resynchronization and DLC without resynchronization on Qwen3-1.7B under staleness. DLC stays at the floor and resynchronization brings importance sampling back near it (a), since each resynchronization, marked by a triangle in the row of its run, restores the effective sample size (b). The DLC models track on-policy training in test accuracy, whereas two runs of DLC without resynchronization and one of importance sampling with resynchronization fall below θ0\theta_0 (c). The collapses without resynchronization coincide with a jump of the trainer’s mass on tokens to which θ0\theta_0 gives probability below 10−310^{-3}, and this mass stays low under DLC (d).

Test accuracy measures the trainer on its own responses and broadly orders the corrections as the deviation does. On Qwen3-0.6B under staleness, DLC and importance sampling with centering end at 31.7% and 32.0% at step 40, against 46.5% for on-policy training and 12.2% for score centering. Each of these checkpoints scores at or above θ0\theta_0, so the gap reflects accuracy that the runs have not yet reached. On Qwen3-1.7B the three DLC models end at 51.9% on average against 57.6% for on-policy training, each within 7 percentage points of its on-policy counterpart in panel c. Importance sampling with

resynchronization averages 36.6%, since one of its runs collapses. Section C extends the comparison to Qwen3-8B, where DLC and importance sampling with centering stay within about three times the floor while score centering reaches 89 times, and to continuous asynchrony on Qwen3-1.7B, where DLC ends at 1.2 times the floor.

Mass off the support of the initial policy

DLC without resynchronization keeps the clip and the centering and shows why DLC needs the resynchronization. On Qwen3-1.7B two of its three runs fall below the accuracy of θ0\theta_0 by step 40 and produce answers of about 26 tokens, and the collapsed run of importance sampling with resynchronization writes responses up to the length limit. The deviation of these runs, computed on the sampler’s prefixes, stays at the floor. Centering, ratio weighting and clipping act on the tokens that the sampler draws, so a shift toward tokens that the stale sampler rarely draws remains outside the reach of these three corrections. The trainer’s own responses measure such a shift through their sequence KL to θ0\theta_0, Epθ[∑tlog⁡pθ(yt∣ht)−log⁡pθ0(yt∣ht)]\mathbb{E}_{p_\theta}\left[\sum_t \log p_\theta(y_t \mid h_t)-\log p_{\theta_0}(y_t \mid h_t)\right], and through the off-support share of this KL, the fraction on tokens with pθ0(yt)<10−3p_{\theta_0}(y_t)<10^{-3}. At the two collapses of DLC without resynchronization the off-support share reaches about 90%, against at most 14% before them, as panel d of Figure 5 shows. Across the Qwen3-1.7B checkpoints the off-support share ranks the drop below θ0\theta_0 at a Spearman correlation of 0.80, above the 0.74 of the deviation. On the sampler’s prefixes, the next-token KL of the collapsed runs stays within the range of the runs that keep learning. The shift therefore starts on prefixes that the stale sampler does not reach. Resynchronization moves the sampler and the reference of the clip to the trainer’s weights, so the trainer’s responses become the sampler’s responses again. Under DLC the off-support share stays at or below 11% through step 40, and the three runs stay above the accuracy of θ0\theta_0.

Conclusion

Training-inference mismatch reaches the gradient as two components with different dynamics. The numerical discrepancy of the engine stays approximately fixed during training, so removing its drift suffices. The policy lag comes from the trainer’s own updates and feeds back through the residual bias of centering into later updates, and ratio weighting cuts this loop only until the effective sample size of the lag ratio falls below one half. DLC follows this account: it centers the discrepancy, clips the lag ratio and resynchronizes the sampler at that crossing, which keeps a stale sampler within twice the noise floor and prevents the collapses that the off-support share of the trainer’s own responses reveals.

Reproducibility

Section B lists the training configuration, the mismatch sources and the measurement protocol, and § 20 gives the loss of DLC. The trainings run in verl with vLLM samplers, three per configuration on Qwen3-0.6B and Qwen3-1.7B, and the offline measurements use fixed checkpoints and fixed probe prefixes.

Notation

Table 5 collects the symbols of the main text.

SymbolMeaningSymbolMeaning
qqsampler distributionst,Ats_t, A_tscore and advantage of the sampled token
pθp_\thetatrainer distribution at weights θ\thetaa,sa, sexpected advantage and score as functions of the token
θ0\theta_0initial weightsaˉ,sˉ\bar{a}, \bar{s}sampler means Eq[a]\mathbb{E}_q[a] and Eq[s]\mathbb{E}_q[s] at a prefix
θold\theta_{\mathrm{old}}sampler’s weightsAˉt\bar{A}_ton-policy mean Ep[a]\mathbb{E}_p[a] at prefix hth_t
Δ\Deltaaccumulated update θ−θ0\theta-\theta_0H,s^tH, \hat{s}_ttop-128 head and the head estimate of sˉt\bar{s}_t
δt\delta_tsampled-token error log⁡pθ−log⁡q\log p_\theta-\log qκ\kapparatio of the tail masses
ℓt\ell_tpolicy lag log⁡pθ−log⁡pθold\log p_\theta-\log p_{\theta_{\mathrm{old}}}b,Mb, Mresidual bias and its linear map, b≈−MΔb\approx-M\Delta
ete_tnumerical discrepancy log⁡pθold−log⁡q\log p_{\theta_{\mathrm{old}}}-\log qηk\eta klearning rate times step count
StS_tprefix offset ∑t′<tδt′\sum_{t'<t}\delta_{t'}ρt\rho_tlag ratio pθ/pθold=eℓtp_\theta/p_{\theta_{\mathrm{old}}}=e^{\ell_t}
μ\mumean lag Eq[ℓt]\mathbb{E}_q[\ell_t] per tokenmt,Ctm_t, C_tclip indicator and centering term of DLC

Table 5. Notation. Quantities with index tt belong to the sampled token yty_t at prefix hth_t, and expectations Eq\mathbb{E}_q run over the sampler’s responses.

Experimental Details

The trainings use verl [46] with FSDP2, BF16 compute and FP32 master weights. Each step draws 64 Countdown prompts with eight responses at temperature 1, with a maximum of 135 prompt and 377 response tokens. The advantage is the reward ±1\pm1 minus the group mean without standard-deviation normalization [51], the loss is averaged over tokens, and one SGD step at learning rate 10−210^{-2} without momentum, warmup or weight decay follows each batch. To test bias accumulation, we repeat the stale score centering and importance sampling runs at a learning rate of 5⋅10−35\cdot10^{-3}. The runs on Qwen3-1.7B use the same configuration with checkpoints every five steps.

The probe prefixes are the prefixes of responses from θ0\theta_0 to a fixed set of prompts. The deviation is the full-vocabulary KL from the trained model to the paired on-policy model, averaged over these prefixes. The residual bias bb is the corrected gradient minus the on-policy gradient on the same regenerated batch, and the gradient noise is the difference of two independent on-policy gradients. The off-support share is the fraction of the sequence KL of the trainer’s own responses to θ0\theta_0 on tokens with pθ0(yt)<10−3p_{\theta_0}(y_t)<10^{-3}, computed on 256 responses of the run to the test prompts. Table 6 reports the deviation both as the ratio of the mean KL to the mean floor, used in the text, and as the mean of the per-run ratios.

CorrectionQuantized sampler: Ratio of meansQuantized sampler: Mean of ratiosStale sampler: Ratio of meansStale sampler: Mean of ratiosQuantized and stale: Ratio of meansQuantized and stale: Mean of ratios
Policy gradient12.716.4345516107–
PPO w/o clip336429534718––
PPO14.319.5699804––
Importance sampling0.741.094.506.313.914.79
Score centering0.801.2231.745.128.135.7
Importance sampling with centering1.111.532.102.512.613.64
DLC (ours)––1.932.702.172.76

Table 6. Deviation at step 40 on Qwen3-0.6B under the two statistics. The ratio of means is the value of the text and of Table 2, and the mean of ratios gives the same order of the corrections up to the swap of DLC and importance sampling with centering under the stale sampler. Dashes mark corrections without a run or without per-run values under that source.

Step Cost, a Larger Model and Continuous Asynchrony

Table 7 splits the wall-clock time of a training step on Qwen3-1.7B under a stale sampler into generation, the forward pass at the sampler’s weights and the parameter update, averaged over the three runs of each correction. DLC adds two costs to the step. The sampler reports its top-128 head, which doubles the generation time as it does for score centering, and the trainer computes the head log-probabilities at the sampler’s weights in a forward pass that PPO with the sampler’s weights as reference also needs. In our implementation about 19 of the 54 seconds of this forward come from a second reference forward on the KL path of verl, whose output does not enter the loss at a zero KL coefficient. The resynchronization copies the trainer’s weights to the sampler once per run in 40 steps and takes at most 1.5 seconds per copy, against about 4500 seconds of training per run. On-policy training copies the weights after each step and spends 1.2 seconds per step on the copy.

CorrectionGenerationForward at the sampler’s weightsUpdateStepCopies in 40 steps
Reference
On-policy training6.50.137.150.440
Corrections
Score centering14.70.142.162.20
Importance sampling6.70.140.853.20
Importance sampling with resynchronization7.00.139.552.73.7
DLC w/o resynchronization14.556.641.7118.20
DLC (ours)13.754.240.1113.21

Table 7. Wall-clock time per training step on Qwen3-1.7B under a stale sampler. Times are seconds per step averaged over 40 steps and three runs, and the step time also contains the advantage computation and the bookkeeping of verl. The last column counts the weight copies to the sampler in 40 steps.

On Qwen3-8B, one run per correction trains under the stale sampler of the main text, and Table 8 gives the deviation and the test accuracy at step 40. DLC and importance sampling with centering stay within about three times the noise floor, at 3.1 and 2.9, while policy gradient and M2PO end at zero accuracy and PPO at 20.7%. Score centering reaches 89 times the floor, so on the larger model the policy lag again leaves the reach of centering. DLC ends at 49.6% test accuracy, against 51.8% for importance sampling with centering and 55.3% for on-policy training.

CorrectionDeviationAccuracy
Reference
Initial model θ0\theta_0–35.4
On-policy training1.055.3
Baselines
Policy gradient64700.0
PPO110020.7
Score centering89.151.4
Importance sampling6.251.0
Importance sampling with centering2.951.8
Importance sampling with resynchronization5.250.4
M2PO107680.0
VCPO14.042.6
DLC (ours)3.149.6

Table 8. Corrections on Qwen3-8B under a stale sampler at step 40. The deviation is the KL to on-policy training as a multiple of the noise floor, and the accuracy is the test accuracy in percent. Each row is one run.

In continuous asynchronous training the sampler receives the trainer’s weights after each step, so each token carries the version that generated it. With a maximum version gap of four on Qwen3-1.7B, the sampled tokens lag the trainer by 2.85 versions on average, and DLC clips the ratio against the generating version of each token. The admission variant defers a response whose effective sample size of the lag ratio falls below one half and regenerates it with the newer weights. Table 9 gives one run per correction at step 40 together with the time per step. DLC ends at 1.2 times the floor and 55.9% test accuracy, and the admission variant ends at 0.8 times the floor after deferring 0.3% of the responses, 68 in 40 steps.

CorrectionDeviationAccuracyStep time
Reference
Initial model θ0\theta_0–33.4–
On-policy training1.056.8–
Baselines
Policy gradient1880.051.8
Importance sampling1.452.943.7
M2PO2.423.878.3
DLC (ours)1.255.980.1
DLC with admission (ours)0.855.394.2

Table 9. Corrections on Qwen3-1.7B under continuous asynchrony at step 40. The sampler receives the weights after each step with a maximum version gap of four. The deviation and the accuracy are as in Table 8, and the step time is the mean wall-clock time per step in seconds. Each row is one run.

Drift and the Corrections at a Prefix

This section fixes one prefix and writes sums over the vocabulary VV, with pvp_v, qvq_v, svs_v and ava_v as in § 3. The score has mean zero on policy, since the probabilities sum to one,

Ep[s]=∑v∈Vpv∇θlog⁡pv=∑v∈V∇θpv=∇θ∑v∈Vpv=0.(7)\mathbb{E}_{p}[s] = \sum_{v \in V} p_v \nabla_{\theta} \log p_v = \sum_{v \in V} \nabla_{\theta} p_v = \nabla_{\theta} \sum_{v \in V} p_v = 0. \tag*{(7)}

The on-policy update at the prefix is therefore Ep[a s]=Ep[(a−Ep[a])s]=Cov⁡p(a,s)\mathbb{E}_{p}[a\,s] = \mathbb{E}_{p}[(a-\mathbb{E}_{p}[a])s] = \operatorname{Cov}_{p}(a,s), and a constant shift of the advantage leaves it unchanged. The sampler’s probabilities do not depend on θ\theta, so the gradient of the KL from the sampler to the trainer is

∇θKL⁡(q∥pθ)=∇θ∑vqv(log⁡qv−log⁡pv)=−∑vqvsv=−Eq[s],(8)\nabla_{\theta}\operatorname{KL}(q\mathbin{\|}p_{\theta}) = \nabla_{\theta}\sum_{v}q_v(\log q_v-\log p_v) = -\sum_{v}q_v s_v = -\mathbb{E}_{q}[s], \tag*{(8)}

which together with Equation (7) gives the second line of Equation (1). The first line of Equation (1) is the definition of the covariance. Under the sampler a constant shift cc of the advantage adds c sˉc\,\bar{s} to the uncorrected update, whereas the centered update stays unchanged because Eq[s−sˉ]=0\mathbb{E}_{q}[s-\bar{s}]=0. Score centering thus gives the sampler’s update the invariance to a constant advantage that the on-policy update has.

The untruncated ratio reweights the sampler’s tokens to the trainer’s, Eq[(p/q) a s]=∑vpvavsv=Ep[a s]\mathbb{E}_{q}[(p/q)\,a\,s]=\sum_{v}p_v a_v s_v=\mathbb{E}_{p}[a\,s] on tokens with qv>0q_v>0, so it removes the drift together with the rest of the bias at the prefix. The truncated weight wv=min⁡(pv/qv,2)w_v=\min(p_v/q_v,2) falls short of the ratio by pv/qv−wv=max⁡(pv/qv−2,0)p_v/q_v-w_v=\max(p_v/q_v-2,0), which gives

Eq[was]=∑vqv(pvqv−max⁡(pvqv−2,0))avsv=Ep[as]−∑vqvmax⁡(pvqv−2,0)avsv=Ep[as]−aˉ∑vqvmax⁡(pvqv−2,0)sv−∑vqvmax⁡(pvqv−2,0)(av−aˉ)sv.(9)\mathbb{E}_{q}[w a s] = \sum_v q_v \left(\frac{p_v}{q_v} - \max\left(\frac{p_v}{q_v}-2,0\right)\right)a_v s_v = \mathbb{E}_{p}[a s] - \sum_v q_v \max\left(\frac{p_v}{q_v}-2,0\right)a_v s_v = \mathbb{E}_{p}[a s] - \bar{a}\sum_v q_v \max\left(\frac{p_v}{q_v}-2,0\right)s_v - \sum_v q_v \max\left(\frac{p_v}{q_v}-2,0\right)(a_v-\bar{a})s_v. \tag*{(9)}

The second term of the last line depends on the advantages only through their mean aˉ\bar{a}, so the truncation brings back a drift on the truncated tokens, and the third term is a covariance on the same tokens. Both terms vanish when the ratio stays below 2 on the tokens of the prefix.

The sampler reports qq on its head HH only. The tail of the estimate takes κpv\kappa p_v for v∉Hv \notin H, and κ\kappa matches the tail mass of the sampler, ∑v∉Hκpv=κ(1−∑v∈Hpv)=1−∑v∈Hqv\sum_{v\notin H}\kappa p_v=\kappa\left(1-\sum_{v\in H}p_v\right)=1-\sum_{v\in H}q_v. With this tail the estimate of the mean score follows in two steps,

s^=∑v∈Hqvsv+κ∑v∉Hpvsv=∑v∈Hqvsv−κ∑v∈Hpvsv=∑v∈H(qv−κpv)sv,(10)\hat{s}=\sum_{v\in H}q_v s_v+\kappa\sum_{v\notin H}p_v s_v=\sum_{v\in H}q_v s_v-\kappa\sum_{v\in H}p_v s_v=\sum_{v\in H}(q_v-\kappa p_v)s_v, \tag*{(10)}

where the second step replaces ∑v∉Hpvsv\sum_{v\notin H}p_v s_v by −∑v∈Hpvsv-\sum_{v\in H}p_v s_v through Equation (7). The estimate therefore needs the trainer’s scores on the head alone. Its error is

sˉ−s^=∑v∉Hqvsv−κ∑v∉Hpvsv=∑v∉H(qv−κpv)sv,(11)\bar{s}-\hat{s}=\sum_{v\notin H}q_v s_v-\kappa\sum_{v\notin H}p_v s_v=\sum_{v\notin H}(q_v-\kappa p_v)s_v, \tag*{(11)}

which vanishes when the sampler’s tail is proportional to the trainer’s tail and which enters Equation (4) as the tail term.

Exact Split of the Sampled-Token Error

The split of Equation (2) is the logarithm of the factorization of the importance ratio at the sampler’s weights,

pθ(yt∣ht)q(yt∣ht)=pθ(yt∣ht)pθold(yt∣ht)⋅pθold(yt∣ht)q(yt∣ht)=eℓteet.(12)\frac{p_\theta(y_t\mid h_t)}{q(y_t\mid h_t)} = \frac{p_\theta(y_t\mid h_t)}{p_{\theta_{\mathrm{old}}}(y_t\mid h_t)} \cdot \frac{p_{\theta_{\mathrm{old}}}(y_t\mid h_t)}{q(y_t\mid h_t)} =e^{\ell_t}e^{e_t}. \tag*{(12)}

Both probabilities in ete_t are evaluated at the sampler’s weights θold\theta_{\mathrm{old}}, so ete_t depends on θold\theta_{\mathrm{old}}, on the engine and on the token, and between two synchronizations it stays the same for a given token while the trainer moves. The lag depends on the trainer only through pθp_\theta. With the version gap Δθold=θ−θold\Delta_{\theta_{\mathrm{old}}}=\theta-\theta_{\mathrm{old}} and the score stθolds_t^{\theta_{\mathrm{old}}} at the sampler’s weights, a Taylor expansion of log⁡pθ\log p_\theta around θold\theta_{\mathrm{old}} gives

ℓt=Δθold⊤stθold+12Δθold⊤∇θ2log⁡pθold(yt∣ht)Δθold+O(∥Δθold∥3).(13)\ell_t=\Delta_{\theta_{\mathrm{old}}}^{\top}s_t^{\theta_{\mathrm{old}}} +\frac{1}{2}\Delta_{\theta_{\mathrm{old}}}^{\top}\nabla_\theta^2\log p_{\theta_{\mathrm{old}}}(y_t\mid h_t)\Delta_{\theta_{\mathrm{old}}} +O(\lVert\Delta_{\theta_{\mathrm{old}}}\rVert^3). \tag*{(13)}

Under staleness the sampler keeps θold=θ0\theta_{\mathrm{old}}=\theta_0, so Δθold=Δ\Delta_{\theta_{\mathrm{old}}}=\Delta. The scores at θ\theta and at θ0\theta_0 differ by a term of first order in Δ\Delta, so replacing stθolds_t^{\theta_{\mathrm{old}}} by sts_t in the first term changes ℓt\ell_t at second order, which gives ℓt≈Δ⊤st\ell_t\approx\Delta^\top s_t of Section 4.

With et=0e_t=0 the sampled tokens follow pθoldp_{\theta_{\mathrm{old}}}, and at a prefix the mean lag is

μ=Epθold[ℓ]=∑vpθold(v)(log⁡pθ(v)−log⁡pθold(v))=−KL⁡(pθold∥pθ).(14)\mu=\mathbb{E}_{p_{\theta_{\mathrm{old}}}}[\ell] =\sum_v p_{\theta_{\mathrm{old}}}(v)\left(\log p_\theta(v)-\log p_{\theta_{\mathrm{old}}}(v)\right) =-\operatorname{KL}(p_{\theta_{\mathrm{old}}}\mathbin\Vert p_\theta). \tag*{(14)}

The first term of Equation (13) has mean Δθold⊤Epθold[sθold]=0\Delta_{\theta_{\mathrm{old}}}^{\top}\mathbb{E}_{p_{\theta_{\mathrm{old}}}}[s^{\theta_{\mathrm{old}}}]=0 by Equation (7) at θold\theta_{\mathrm{old}}. The second term has mean −12Δθold⊤FθoldΔθold-\frac{1}{2}\Delta_{\theta_{\mathrm{old}}}^{\top}F_{\theta_{\mathrm{old}}}\Delta_{\theta_{\mathrm{old}}}, since the expected Hessian of the log-probability is minus the Fisher information Fθold=Epθold[sθold(sθold)⊤]F_{\theta_{\mathrm{old}}}=\mathbb{E}_{p_{\theta_{\mathrm{old}}}}\left[s^{\theta_{\mathrm{old}}}(s^{\theta_{\mathrm{old}}})^{\top}\right]. The mean lag is thus quadratic in the version gap,

μ=−12Δθold⊤FθoldΔθold+O(∥Δθold∥3),Var⁡pθold(ℓ)=Δθold⊤FθoldΔθold+O(∥Δθold∥3),(15)\mu=-\frac{1}{2}\Delta_{\theta_{\mathrm{old}}}^{\top}F_{\theta_{\mathrm{old}}}\Delta_{\theta_{\mathrm{old}}}+O(\lVert\Delta_{\theta_{\mathrm{old}}}\rVert^3), \qquad \operatorname{Var}_{p_{\theta_{\mathrm{old}}}}(\ell)=\Delta_{\theta_{\mathrm{old}}}^{\top}F_{\theta_{\mathrm{old}}}\Delta_{\theta_{\mathrm{old}}}+O(\lVert\Delta_{\theta_{\mathrm{old}}}\rVert^3), \tag*{(15)}

where the variance comes from the first term of Equation (13). Panel a of Figure 3 measures the ratio of ∣μ∣|\mu| to ∥Δ∥2\|\Delta\|^2, which by Equation (15) equals half the Fisher curvature along the direction of Δ\Delta. The two moments also satisfy Var⁡(ℓ)=−2μ\operatorname{Var}(\ell)=-2\mu to second order, which is the relation that a Gaussian lag with a mean-one ratio satisfies exactly, as § 17 shows. Over a response the chain rule of the KL gives

Eq[∑tℓt]=−KL⁡(pθold(y)∥pθ(y))\mathbb{E}_{q}\left[\sum_t \ell_t\right] = -\operatorname{KL}\left(p_{\theta_{\mathrm{old}}}(y)\mathbin{\|}p_{\theta}(y)\right)

for the sequence distributions, so the stale sequence offset decreases as the sequence KL from the sampler’s weights to the trainer increases.

Residual Bias of the Corrections

This section derives each term of Equation (4) from a change of measure and then the first-order forms of Equation (5). Throughout, δv=log⁡pv−log⁡qv\delta_v=\log p_v-\log q_v at a prefix, so that qv=pve−δvq_v=p_v e^{-\delta_v}, and the sampled-token error is δt\delta_t.

The prefix hth_t consists of the tokens y<ty_{<t}, and its probability under a policy is the product of the next-token probabilities. The density of the trainer’s prefix distribution with respect to the sampler’s is therefore

μtp(ht)μtq(ht)=[∏j<tp(yj∣hj)q(yj∣hj)]=exp⁡(∑j<tδj)=eSt,(16)\frac{\mu_t^p(h_t)}{\mu_t^q(h_t)}=\left[\prod_{j<t}\frac{p(y_j\mid h_j)}{q(y_j\mid h_j)}\right]=\exp\left(\sum_{j<t}\delta_j\right)=e^{S_t}, \tag*{(16)}

and the prefix term of Equation (4) becomes an expectation under the sampler,

(Eμtq−Eμtp)Cov⁡q(atq,st)=Eμtq[(1−eSt)Cov⁡q(atq,st)].(17)\left(\mathbb{E}_{\mu_t^q}-\mathbb{E}_{\mu_t^p}\right)\operatorname{Cov}_{q}(a_t^q,s_t)=\mathbb{E}_{\mu_t^q}\left[(1-e^{S_t})\operatorname{Cov}_{q}(a_t^q,s_t)\right]. \tag*{(17)}

The continuation term changes the measure after the token. The expected advantage atπ(v)a_t^\pi(v) averages the return over continuations from π\pi, and the same change of measure on the tokens after tt gives

atp(v)=Eq[A∏j>teδj∣ht,yt=v],atq(v)−atp(v)=Eq[A(1−∏j>teδj)∣ht,yt=v].(18)a_t^p(v)=\mathbb{E}_{q}\left[A\prod_{j>t}e^{\delta_j}\mid h_t,y_t=v\right],\qquad a_t^q(v)-a_t^p(v)=\mathbb{E}_{q}\left[A\left(1-\prod_{j>t}e^{\delta_j}\right)\mid h_t,y_t=v\right]. \tag*{(18)}

The continuation term is the covariance of this difference with the score at the prefix. The token term compares two covariances of the same function a=atpa=a_t^p under qq and under pp. With aˉq=Eq[a]\bar a^q=\mathbb{E}_{q}[a], aˉp=Ep[a]\bar a^p=\mathbb{E}_{p}[a] and sˉ=Eq[s]\bar s=\mathbb{E}_{q}[s], it follows in four steps,

Cov⁡q(a,s)−Cov⁡p(a,s)=∑vqvavsv−aˉqsˉ−∑vpvavsv=∑vpv(e−δv−1)avsv−aˉqsˉ=∑vpv(e−δv−1)((av−aˉp)sv+aˉpsv)−aˉqsˉ=Ep[(e−δ−1)(a−aˉp)s]−(aˉq−aˉp)sˉ,(19)\begin{aligned} \operatorname{Cov}_{q}(a,s)-\operatorname{Cov}_{p}(a,s) &=\sum_v q_v a_v s_v-\bar a^q\bar s-\sum_v p_v a_v s_v\\ &=\sum_v p_v(e^{-\delta_v}-1)a_v s_v-\bar a^q\bar s\\ &=\sum_v p_v(e^{-\delta_v}-1)\left((a_v-\bar a^p)s_v+\bar a^p s_v\right)-\bar a^q\bar s\\ &=\mathbb{E}_{p}\left[(e^{-\delta}-1)(a-\bar a^p)s\right]-(\bar a^q-\bar a^p)\bar s, \tag*{(19)} \end{aligned}

where the first step uses Cov⁡p(a,s)=Ep[as]\operatorname{Cov}_{p}(a,s)=\mathbb{E}_{p}[as] from Equation (7), the second step substitutes qv=pve−δvq_v=p_ve^{-\delta_v}, and the third step adds and subtracts aˉp∑vpv(e−δv−1)sv=aˉpsˉ\bar a^p\sum_v p_v(e^{-\delta_v}-1)s_v=\bar a^p\bar s. The token term vanishes when the token does not change the expected advantage, av=aˉpa_v=\bar a^p for each vv, or when the error is zero. The tail term is Eμtq[Eq[atq](sˉt−s^t)]\mathbb{E}_{\mu_t^q}\left[\mathbb{E}_{q}[a_t^q]\left(\bar s_t-\hat s_t\right)\right] with the tail error of Section D. Constant baselines in the advantage cancel from the centered update under qq and from the on-policy update under pp, so they do not enter the four terms.

The prefix, continuation and token terms are each of first order in the error δ\delta. Expanding eSt=1+St+O(St2)e^{S_t}=1+S_t+O(S_t^2), e−δ−1=−δ+O(δ2)e^{-\delta}-1=-\delta+O(\delta^2) and ∏j>teδj=1+∑j>tδj+O(δ2)\prod_{j>t}e^{\delta_j}=1+\sum_{j>t}\delta_j+O(\delta^2), and noting that aˉq−aˉp\bar a^q-\bar a^p and sˉ\bar s are each of first order so that their product is of second order, turns the prefix term, the continuation term and the token term, in this order, into

−Eμtq[StCov⁡q(atq,st)],−EμtpCov⁡q(Eq[A∑j>tδj∣ht,yt],st),−EμtpEp[(atp−aˉtp)δs].(20)-\mathbb{E}_{\mu_t^q}\left[S_t\operatorname{Cov}_q(a_t^q,s_t)\right], -\mathbb{E}_{\mu_t^p}\operatorname{Cov}_q\left(\mathbb{E}_q\left[A\sum_{j>t}\delta_j\mid h_t,y_t\right],s_t\right), -\mathbb{E}_{\mu_t^p}\mathbb{E}_p\left[(a_t^p-\bar{a}_t^p)\delta s\right]. \tag*{(20)}

On a sampled token the advantage AtA_t is a one-sample estimate of aa, and the centered score st−sˉts_t-\bar{s}_t equals sts_t up to a first-order term. The product of StS_t with sˉt\bar{s}_t is therefore of second order, and the prefix term samples as −AtStst-A_tS_ts_t. The token term samples as −(At−Aˉt)δtst-(A_t-\bar{A}_t)\delta_ts_t with Aˉt=Ep[a]\bar{A}_t=\mathbb{E}_p[a] at hth_t, since replacing the expectation under pp by the sampled token from qq changes it at second order. Under staleness δt=ℓt\delta_t=\ell_t, and the sum of the two sampled forms gives the first line of Equation (5). The prediction of § 5 leaves out the continuation term, which needs the errors after each token and an estimate of their covariance with the return.

Importance sampling weights each sampled token by wtw_t and leaves the prefix distribution of the sampler, so its bias splits as Equation (4) does, with Cov⁡q(atq,st)\operatorname{Cov}_q(a_t^q,s_t) replaced by Eq[watqst]\mathbb{E}_q[w a_t^q s_t] and without a tail term, since it does not use a head estimate. By Equation (9) the token term of importance sampling is exactly

Eμtp[Eq[watpst]−Ep[atpst]]=−Eμtp[∑vqvmax⁡(eδv−2,0)atp(v)sv],(21)\mathbb{E}_{\mu_t^p}\left[\mathbb{E}_q[w a_t^p s_t]-\mathbb{E}_p[a_t^p s_t]\right] =-\mathbb{E}_{\mu_t^p}\left[\sum_v q_v\max\left(e^{\delta_v}-2,0\right)a_t^p(v)s_v\right], \tag*{(21)}

which vanishes on prefixes whose ratios stay below 2. The prefix term of importance sampling agrees with that of score centering at first order, since w=1+O(δ)w=1+O(\delta). The sum of the prefix and token terms of importance sampling samples as −At(St+max⁡(eℓt−2,0)st)-A_t(S_t+\max(e^{\ell_t}-2,0)s_t) under staleness, with the truncation weight kept exact, which gives the second line of Equation (5).

Under staleness the lag and the prefix offset are linear in Δ\Delta to first order, ℓt≈st⊤Δ\ell_t\approx s_t^\top\Delta and St=∑t′<tℓt′≈∑t′<tst′⊤ΔS_t=\sum_{t'<t}\ell_{t'}\approx\sum_{t'<t}s_{t'}^\top\Delta. Substituting both into the sampled forms, with the truncation weight of importance sampling at zero inside the validity range, gives

(At−Aˉt)ℓtst+AtStst≈st((At−Aˉt)st+At∑t′<tst′)⊤Δ,(A_t-\bar{A}_t)\ell_t s_t+A_tS_ts_t\approx s_t\left((A_t-\bar{A}_t)s_t+A_t\sum_{t'<t}s_{t'}\right)^\top\Delta,
AtStst≈Atst∑t′<tst′⊤Δ,(22)A_tS_ts_t\approx A_ts_t\sum_{t'<t}s_{t'}^\top\Delta, \tag*{(22)}

and taking the expectation and the sum over tt gives McM_c and MwM_w of Equation (5). The two maps share the prefix part ∑tE[Atst∑t′<tst′⊤]\sum_t\mathbb{E}[A_ts_t\sum_{t'<t}s_{t'}^\top], and McM_c adds the token part

Mc−Mw=∑tE[(At−Aˉt)stst⊤],(23)M_c-M_w=\sum_t\mathbb{E}\left[(A_t-\bar{A}_t)s_ts_t^\top\right], \tag*{(23)}

a symmetric matrix whose quadratic form u⊤(Mc−Mw)u=∑tE[(At−Aˉt)(st⊤u)2]u^\top(M_c-M_w)u=\sum_t\mathbb{E}[(A_t-\bar{A}_t)(s_t^\top u)^2] is negative along directions that the scores of tokens with an advantage below their prefix mean dominate.

Exact-Weight Recomputation of the Residual Bias

The prediction of bb for the residual-bias link in § 5 uses the per-token weights of Equation (5). The exact recomputation replaces them by At(1−eSt)A_t(1-e^{S_t}) for the prefix term, At(1−eℓt)A_t(1-e^{\ell_t}) for the score centering token term and −Atmax⁡(eℓt−2,0)-A_t\max(e^{\ell_t}-2,0) for the importance sampling truncation, on the same checkpoints, batches and backward passes. In both the linearized and the exact token weight of score centering, the sampled advantage AtA_t takes the place of At−AˉtA_t-\bar{A}_t, since Aˉt\bar{A}_t requires continuations from each prefix.

CorrectionWeightsCosine at step 20Cosine at step 40Norm ratio at step 20Norm ratio at step 40
Stale sampler
Score centeringlinearized0.550.161363399
Score centeringexact0.280.094.16.1
Importance samplinglinearized0.410.442393
Importance samplingexact0.150.157.77.9
Quantized and stale
Score centeringlinearized0.300.091292734
Score centeringexact0.220.152.84.3
Importance samplinglinearized0.160.341443
Importance samplingexact0.130.141.93.2

Table 10. Predicted against measured residual bias with linearized and exact weights. The cosine to the measured bias and the norm ratio ∥bpred∥/∥b∥\lVert b_{\mathrm{pred}}\rVert/\lVert b\rVert are means over three runs. The exact weights reduce the norm ratio from up to 3400 to between 1.9 and 7.9, and the cosine stays above the gradient noise of at most 0.07.

Unrolling the Loop

This section solves Equation (3) within one synchronization period. The sampler resynchronizes at step zero, so Δ0=0\Delta_0 = 0, and the derivation treats MM as constant over the period and writes the on-policy gradient as gk=gˉ+ξkg_k = \bar{g} + \xi_k with a mean gˉ\bar{g} and zero-mean noise ξk\xi_k.

Applying Equation (3) kk times from Δ0=0\Delta_0 = 0 gives

Δk=η∑j=0k−1(I−ηM)k−1−jgj,E[Δk]=η∑j=0k−1(I−ηM)jgˉ.(24)\Delta_k = \eta\sum_{j=0}^{k-1}(I-\eta M)^{k-1-j}g_j,\qquad\mathbb{E}[\Delta_k] = \eta\sum_{j=0}^{k-1}(I-\eta M)^j\bar{g}. \tag*{(24)}

For a left eigenvector uu of MM with eigenvalue λ\lambda, so that uT(I−ηM)j=(1−ηλ)juTu^{\mathsf{T}}(I-\eta M)^j = (1-\eta\lambda)^j u^{\mathsf{T}}, the geometric sum has the closed form

uTE[Δk]=η1−(1−ηλ)kηλuTgˉ=1−(1−ηλ)kλuTgˉ⟶1−e−ληkλuTgˉ,(25)u^{\mathsf{T}}\mathbb{E}[\Delta_k] = \eta\frac{1-(1-\eta\lambda)^k}{\eta\lambda}u^{\mathsf{T}}\bar{g} = \frac{1-(1-\eta\lambda)^k}{\lambda}u^{\mathsf{T}}\bar{g} \longrightarrow\frac{1-e^{-\lambda\eta k}}{\lambda}u^{\mathsf{T}}\bar{g}, \tag*{(25)}

where the limit takes η→0\eta\to0 at a fixed product ηk\eta k, so that (1−ηλ)k=exp⁡(klog⁡(1−ηλ))→e−ληk(1-\eta\lambda)^k = \exp\left(k\log(1-\eta\lambda)\right) \to e^{-\lambda\eta k}. In this limit the update depends on the learning rate and the step count only through ηk\eta k. For λ>0\lambda> 0 the component saturates at uTgˉ/λu^{\mathsf{T}}\bar{g}/\lambda, and for λ<0\lambda< 0 it grows as (e∣λ∣ηk−1)/∣λ∣(e^{|\lambda|\eta k}-1)/|\lambda|, faster than the on-policy component ηk uTgˉ\eta k\,u^{\mathsf{T}}\bar{g}.

Expanding (I−ηM)j=I−jηM+O(j2η2∥M∥2)(I-\eta M)^j = I-j\eta M+O(j^2\eta^2\lVert M\rVert^2) inside Equation (24) and summing over jj gives

E[Δk]=ηkgˉ−η2k(k−1)2Mgˉ+O((ηk)3∥M∥2∥gˉ∥)=ηkgˉ−12(ηk)2Mgˉ+12η(ηk)Mgˉ+O((ηk)3).(26)\mathbb{E}[\Delta_k] = \eta k\bar{g}-\eta^2\frac{k(k-1)}{2}M\bar{g}+O((\eta k)^3\lVert M\rVert^2\lVert\bar{g}\rVert) = \eta k\bar{g}-\frac{1}{2}(\eta k)^2M\bar{g}+\frac{1}{2}\eta(\eta k)M\bar{g}+O((\eta k)^3). \tag*{(26)}

The third term vanishes as η→0\eta\to0 at fixed ηk\eta k, which recovers the second-order form of § 5. For two vectors x≠0x\ne0 and yy with ∥y∥≪∥x∥\lVert y\rVert\ll\lVert x\rVert, the norm expands as ∥x+y∥=∥x∥+xTy/∥x∥+O(∥y∥2/∥x∥)\lVert x+y\rVert=\lVert x\rVert+x^{\mathsf{T}}y/\lVert x\rVert+O(\lVert y\rVert^2/\lVert x\rVert). With x=ηkgˉx=\eta k\bar{g} and y=−12(ηk)2Mgˉy=-\frac{1}{2}(\eta k)^2M\bar{g}, the norm of the mean update is

∥E[Δk]∥=ηk∥gˉ∥−12(ηk)2gˉTMgˉ∥gˉ∥+O((ηk)3).(27)\lVert\mathbb{E}[\Delta_k]\rVert= \eta k\lVert\bar{g}\rVert-\frac{1}{2}(\eta k)^2\frac{\bar{g}^{\mathsf{T}}M\bar{g}}{\lVert\bar{g}\rVert}+O((\eta k)^3). \tag*{(27)}

Score centering and importance sampling share gˉ\bar{g} and differ in MM, so the excess update norm of score centering over importance sampling is

E=12(ηk)2gˉT(Mw−Mc)gˉ∥gˉ∥+O((ηk)3)=−12(ηk)21∥gˉ∥∑tE[(At−Aˉt)(stTgˉ)2]+O((ηk)3),(28)E=\frac{1}{2}(\eta k)^2\frac{\bar{g}^{\mathsf{T}}(M_{\mathrm{w}}-M_{\mathrm{c}})\bar{g}}{\lVert\bar{g}\rVert}+O((\eta k)^3)=-\frac{1}{2}(\eta k)^2\frac{1}{\lVert\bar{g}\rVert}\sum_t\mathbb{E}\left[(A_t-\bar{A}_t)(s_t^{\mathsf{T}}\bar{g})^2\right]+O((\eta k)^3), \tag*{(28)}

where the second step uses Equation (23). The quadratic coefficient is positive when the tokens with an advantage below their prefix mean carry more of the squared projection of the score on gˉ\bar{g}, which panel b of Figure 3 measures as the larger lag of these tokens under score centering. Biases b0b^0 that do not depend on Δ\Delta instead add ηkb0\eta_k b^0 to E[Δk]\mathbb{E}[\Delta_k] and change the norm by ηk(∥gˉ+b0∥−∥gˉ∥)\eta_k(\lVert\bar{g}+b^0\rVert-\lVert\bar{g}\rVert), a term linear in ηk\eta_k. The fit E=aηk+c(ηk)2E=a\eta_k+c(\eta_k)^2 of § 5 therefore separates the biases that are fixed in Δ\Delta, in the linear coefficient aa, from the loop, in the quadratic coefficient cc.

The bias bkb_k moves the trainer by ηbk\eta b_k in step kk, and by the first-order lag ℓt≈stTΔ\ell_t\approx s_t^{\mathsf{T}}\Delta it changes the lag of token tt by ηstTbk\eta s_t^{\mathsf{T}}b_k. The token part −Et′[(At′−Aˉt′)ℓt′st′]-\mathbb{E}_{t'}[(A_{t'}-\bar{A}_{t'})\ell_{t'}s_{t'}] of the bias of score centering contributes the change

−ηEt′[(stTst′)(At′−Aˉt′)ℓt′],(29)-\eta\mathbb{E}_{t'}\left[(s_{t}^{\mathsf{T}}s_{t'})(A_{t'}-\bar{A}_{t'})\ell_{t'}\right], \tag*{(29)}

where the average runs over the NN tokens of the batch. The term t′=tt'=t contributes −ηN∥st∥2(At−Aˉt)ℓt-\frac{\eta}{N}\lVert s_t\rVert^2(A_t-\bar{A}_t)\ell_t, which has the sign of ℓt\ell_t when At<AˉtA_t<\bar{A}_t. The lag of a token whose advantage lies below its prefix mean therefore grows in magnitude by the factor 1+ηN∥st∥2∣At−Aˉt∣1+\frac{\eta}{N}\lVert s_t\rVert^2\lvert A_t-\bar{A}_t\rvert per step from its own contribution, and the tokens with aligned scores add to this growth through the terms t′≠tt'\ne t.

Effective Sample Size and Truncation under a Gaussian Lag

With et=0e_t=0 the lag ratio has mean one under the sampler at each prefix,

Epθold[ρ]=∑vpθold(v)pθ(v)pθold(v)=∑vpθ(v)=1,(30)\mathbb{E}_{p_{\theta_{\mathrm{old}}}}[\rho]=\sum_v p_{\theta_{\mathrm{old}}}(v)\frac{p_\theta(v)}{p_{\theta_{\mathrm{old}}}(v)}=\sum_v p_\theta(v)=1, \tag*{(30)}

and its second moment is one plus the chi-squared divergence,

Epθold[ρ2]=∑vpθ(v)2pθold(v)=∑v(pθ(v)−pθold(v))2pθold(v)+2∑vpθ(v)−∑vpθold(v)=1+χ2(pθ∥pθold).(31)\begin{aligned} \mathbb{E}_{p_{\theta_{\mathrm{old}}}}[\rho^2] &=\sum_v\frac{p_\theta(v)^2}{p_{\theta_{\mathrm{old}}}(v)} =\sum_v\frac{(p_\theta(v)-p_{\theta_{\mathrm{old}}}(v))^2}{p_{\theta_{\mathrm{old}}}(v)} +2\sum_v p_\theta(v)-\sum_v p_{\theta_{\mathrm{old}}}(v)\\ &=1+\chi^2(p_\theta\mathbin{\|}p_{\theta_{\mathrm{old}}}). \tag*{(31)} \end{aligned}

For weights ρ1,…,ρN\rho_1,\ldots,\rho_N the Kish effective sample size as a fraction of the batch is (∑iρi)2/(N∑iρi2)(\sum_i\rho_i)^2/(N\sum_i\rho_i^2), which tends to E[ρ]2/E[ρ2]=1/(1+χ2)\mathbb{E}[\rho]^2/\mathbb{E}[\rho^2]=1/(1+\chi^2) for large NN. To second order χ2(pθ∥pθold)=Epθold[(ρ−1)2]=Epθold[ℓ2]+O(∥Δθold∥3)=ΔθoldTFθoldΔθold+O(∥Δθold∥3)\chi^2(p_\theta\mathbin{\|}p_{\theta_{\mathrm{old}}})=\mathbb{E}_{p_{\theta_{\mathrm{old}}}}[(\rho-1)^2]=\mathbb{E}_{p_{\theta_{\mathrm{old}}}}[\ell^2]+O(\lVert\Delta_{\theta_{\mathrm{old}}}\rVert^3)=\Delta_{\theta_{\mathrm{old}}}^{\mathsf{T}}F_{\theta_{\mathrm{old}}}\Delta_{\theta_{\mathrm{old}}}+O(\lVert\Delta_{\theta_{\mathrm{old}}}\rVert^3), so the threshold of one half on the effective sample size bounds the version gap in the Fisher metric of the sampler’s weights.

For a Gaussian lag ℓ∼N(μ,σ2)\ell\sim\mathcal{N}(\mu,\sigma^2) the moments of the ratio follow from the moment generating function E[erℓ]=erμ+r2σ2/2\mathbb{E}[e^{r\ell}]=e^{r\mu+r^2\sigma^2/2}. The constraint E[ρ]=1\mathbb{E}[\rho]=1 at r=1r=1 fixes μ=−σ2/2\mu=-\sigma^2/2, and at r=2r=2

E[ρ2]=e2μ+2σ2=e2μ−4μ=e−2μ,1E[ρ2]=e2μ.(32)\mathbb{E}[\rho^2]=e^{2\mu+2\sigma^2}=e^{2\mu-4\mu}=e^{-2\mu},\qquad\frac{1}{\mathbb{E}[\rho^2]}=e^{2\mu}. \tag*{(32)}

The Gaussian effective sample size therefore falls below one half at μ=−12log⁡2≈−0.35\mu=-\frac{1}{2}\log2\approx-0.35 nats per token. The share of tokens with a ratio below one half is

Pr⁡(ρ<12)=Pr⁡(ℓ<−log⁡2)=Φ(−log⁡2−μ−2μ),(33)\Pr\left(\rho<\frac{1}{2}\right)=\Pr(\ell<-\log2)=\Phi\left(\frac{-\log2-\mu}{\sqrt{-2\mu}}\right), \tag*{(33)}

with Φ\Phi the standard normal distribution function, and panel a of Figure 4 compares this value with the measured share.

Without the Gaussian assumption, the cumulant generating function K(r)=log⁡E[erℓ]=∑n≥1νnrn/n!K(r)=\log\mathbb{E}[e^{r\ell}]=\sum_{n\geq1}\nu_n r^n/n! with cumulants ν1=μ\nu_1=\mu, ν2=σ2\nu_2=\sigma^2, ν3\nu_3 and ν4\nu_4 satisfies K(1)=0K(1)=0 by the mean-one constraint. Subtracting 4K(1)4K(1) from K(2)K(2) removes the variance,

log⁡E[ρ2]=K(2)−4K(1)=(2−4)ν1+(2−2)ν2+(43−23)ν3+(23−16)ν4+⋯=−2μ+23ν3+12ν4+⋯ ,(34)\log\mathbb{E}[\rho^2]=K(2)-4K(1)=(2-4)\nu_1+(2-2)\nu_2+\left(\frac{4}{3}-\frac{2}{3}\right)\nu_3+\left(\frac{2}{3}-\frac{1}{6}\right)\nu_4+\cdots=-2\mu+\frac{2}{3}\nu_3+\frac{1}{2}\nu_4+\cdots, \tag*{(34)}

so the effective sample size is e2μ−23ν3−12ν4−⋯e^{2\mu-\frac{2}{3}\nu_{3}-\frac{1}{2}\nu_{4}-\cdots}. Positive third or fourth cumulants of the lag lower the effective sample size below the Gaussian value e2μe^{2\mu} at the same mean lag, so a lag that concentrates on few tokens with large ratios crosses one half at a smaller ∣μ∣|\mu|. On Qwen3-1.7B the crossing at a mean lag of −0.15-0.15 nats, against the Gaussian −0.35-0.35, gives 23ν3+12ν4+⋯≈log⁡2−0.30≈0.39\frac{2}{3}\nu_{3}+\frac{1}{2}\nu_{4}+\cdots\approx\log2-0.30\approx0.39 at step 11.

The truncation of importance sampling at 2 keeps the excess max⁡(ρ−2,0)\max(\rho-2,0) out of the weight. For the Gaussian lag with μ=−σ2/2\mu=-\sigma^{2}/2, the lognormal call formula gives the expected excess

E[max⁡(ρ−2,0)]=Φ(σ2/2−log⁡2σ)−2Φ(−σ2/2−log⁡2σ),σ2=−2μ,(35)\mathbb{E}\left[\max(\rho-2,0)\right]=\Phi\left(\frac{\sigma^{2}/2-\log2}{\sigma}\right)-2\Phi\left(\frac{-\sigma^{2}/2-\log2}{\sigma}\right),\qquad\sigma^{2}=-2\mu, \tag*{(35)}

which is the mean of the truncation weight in Equation (5) and which increases with ∣μ∣|\mu|. The clip of DLC drops a token with positive advantage when ρ>1+ε\rho>1+\varepsilon and a token with negative advantage when ρ<1−ε\rho<1-\varepsilon or ρ>c\rho>c. Under the Gaussian lag the two shares are

Pr⁡(ρ>1+ε)=Φ(μ−log⁡(1+ε)σ),Pr⁡(ρ<1−ε)+Pr⁡(ρ>c)=Φ(log⁡(1−ε)−μσ)+Φ(μ−log⁡cσ).(36)\begin{aligned} \Pr(\rho>1+\varepsilon)&=\Phi\left(\frac{\mu-\log(1+\varepsilon)}{\sigma}\right),\\ \Pr(\rho<1-\varepsilon)+\Pr(\rho>c)&=\Phi\left(\frac{\log(1-\varepsilon)-\mu}{\sigma}\right)+\Phi\left(\frac{\mu-\log c}{\sigma}\right). \tag*{(36)} \end{aligned}

with σ=−2μ\sigma=\sqrt{-2\mu}. With μ=−σ2/2\mu=-\sigma^{2}/2 the first summand of the second share has the argument σ/2+log⁡(1−ε)/σ\sigma/2+\log(1-\varepsilon)/\sigma, which increases with σ\sigma, and the second summand has the argument −σ/2−log⁡c/σ-\sigma/2-\log c/\sigma, which increases up to σ=2log⁡c≈1.48\sigma=\sqrt{2\log c}\approx1.48. The share of dropped tokens with negative advantage therefore grows until the mean lag reaches about −1.1-1.1 nats at c=3c=3. The argument of the first share is −σ/2−log⁡(1+ε)/σ-\sigma/2-\log(1+\varepsilon)/\sigma, which increases up to σ=2log⁡(1+ε)≈0.60\sigma=\sqrt{2\log(1+\varepsilon)}\approx0.60, a mean lag of about −0.18-0.18 nats at ε=0.2\varepsilon=0.2.

Reference Policy of PPO

PPO weights each token by the ratio rt=pθ(yt∣ht)/πref(yt∣ht)r_t=p_\theta(y_t\mid h_t)/\pi_{\mathrm{ref}}(y_t\mid h_t) to its reference, and its logarithm relates to the split of Equation (2) as

log⁡rt=log⁡pθ−log⁡πref=δt−(log⁡πref−log⁡q).(37)\log r_t=\log p_\theta-\log\pi_{\mathrm{ref}}=\delta_t-\left(\log\pi_{\mathrm{ref}}-\log q\right). \tag*{(37)}

With the reference at the sampler’s weights, πref=pθold\pi_{\mathrm{ref}}=p_{\theta_{\mathrm{old}}} and log⁡πref−log⁡q=et\log\pi_{\mathrm{ref}}-\log q=e_t, so log⁡rt=ℓt\log r_t=\ell_t and the clip acts on the policy lag alone. With the reference at the trainer before the batch, πref=pθbatch\pi_{\mathrm{ref}}=p_{\theta_{\mathrm{batch}}} and

log⁡rt=ℓt−(log⁡pθbatch−log⁡pθold),(38)\log r_t=\ell_t-\left(\log p_{\theta_{\mathrm{batch}}}-\log p_{\theta_{\mathrm{old}}}\right), \tag*{(38)}

which is the lag accumulated during the current batch alone. At the first of the KK updates per batch θ=θbatch\theta=\theta_{\mathrm{batch}}, so rt=1r_t=1, the clip is inactive and the per-token gradient is AtstA_t s_t, the policy gradient. The later updates move rtr_t only by the change within the batch, so the clip bounds this change and leaves both the policy lag and the numerical discrepancy outside the ratio.

Properties of DLC

This section derives the behavior of the DLC update of Equation (6) at a single prefix, with qv=pθold(v)e−evq_v = p_{\theta_{\mathrm{old}}}(v)e^{-e_v} and ρv=pθ(v)/pθold(v)\rho_v = p_\theta(v)/p_{\theta_{\mathrm{old}}}(v), so that qvρv=pθ(v)e−evq_v\rho_v = p_\theta(v)e^{-e_v}.

At a prefix with a constant advantage AA, the expectation of the DLC update under the sampler is

Eq[A(mρs−C)]=A(∑vqvmvρvsv−∑v∈H(qvmvρv−κpθ(v))sv)=A∑v∉H(qvρv−κpθ(v))sv,(39)\mathbb{E}_{q}\left[A(m\rho s-C)\right] = A\left(\sum_v q_v m_v\rho_v s_v-\sum_{v\in H}(q_v m_v\rho_v-\kappa p_\theta(v))s_v\right) = A\sum_{v\notin H}(q_v\rho_v-\kappa p_\theta(v))s_v, \tag*{(39)}

where the second step cancels the head and uses κ∑v∈Hpθ(v)sv=−κ∑v∉Hpθ(v)sv\kappa\sum_{v\in H}p_\theta(v)s_v=-\kappa\sum_{v\notin H}p_\theta(v)s_v with the clip inactive on the tail. The remainder equals A∑v∉Hpθ(v)(e−ev−κ)svA\sum_{v\notin H}p_\theta(v)(e^{-e_v}-\kappa)s_v, which vanishes when the sampler’s tail is κ\kappa times the tail of pθoldp_{\theta_{\mathrm{old}}}. Up to this tail estimate DLC removes the drift of the discrepancy and of the lag, since the subtracted term equals the sampler’s mean of the clipped score.

With mv=1m_v=1 on the tokens of the prefix, the centering term is C=∑vqvρvsvC=\sum_v q_v\rho_v s_v up to the tail estimate, and the update at the prefix is

Eq[a(ρs−C)]=∑vqvρvavsv−aˉq∑vqvρvsv=∑vpθ(v)e−ev(av−aˉq)sv.(40)\mathbb{E}_{q}\left[a(\rho s-C)\right] = \sum_v q_v\rho_v a_v s_v-\bar{a}^{q}\sum_v q_v\rho_v s_v = \sum_v p_\theta(v)e^{-e_v}(a_v-\bar{a}^{q})s_v. \tag*{(40)}

Subtracting the on-policy update ∑vpθ(v)(av−aˉp)sv\sum_v p_\theta(v)(a_v-\bar{a}^{p})s_v gives the token term of DLC,

∑vpθ(v)(e−ev−1)(av−aˉp)sv−(aˉq−aˉp)∑vpθ(v)e−evsv,(41)\sum_v p_\theta(v)(e^{-e_v}-1)(a_v-\bar{a}^{p})s_v-(\bar{a}^{q}-\bar{a}^{p})\sum_v p_\theta(v)e^{-e_v}s_v, \tag*{(41)}

which has the form of Equation (19) with the numerical discrepancy ee in place of the sampled-token error δ\delta in the first term. The first term depends on ee alone, which stays fixed between synchronizations by Section E. The lag enters the second term through aˉq−aˉp=∑vpθ(v)(e−ℓv−ev−1)av\bar{a}^{q}-\bar{a}^{p}=\sum_v p_\theta(v)(e^{-{\ell_v}-e_v}-1)a_v, and there it multiplies ∑vpθ(v)e−evsv=∑vpθ(v)(e−ev−1)sv\sum_v p_\theta(v)e^{-e_v}s_v=\sum_v p_\theta(v)(e^{-e_v}-1)s_v, which vanishes with the numerical discrepancy. The lag therefore enters the token term of DLC at second order through its product with ee, and under a stale sampler with e=0e=0 the token term vanishes exactly. To first order the token term of DLC is −Ep[(a−aˉp)es]-\mathbb{E}_{p}[(a-\bar{a}^{p})es], which keeps a fixed size and does not enter the loop of Equation (3).

For a fixed sign of the advantage, the tokens with mv=0m_v=0 change the update at the prefix by

−∑vqv(1−mv)ρv(av−aˉq)sv,(42)-\sum_v q_v(1-m_v)\rho_v(a_v-\bar{a}^{q})s_v, \tag*{(42)}

since both the weighted score and the centering term lose these tokens. The dropped tokens therefore return their lag-weighted share of the token term, as the truncated tokens of importance sampling do in Equation (9). Their share grows with the spread of the lag by § 17, so the clip has a validity range of the same kind as the truncation of importance sampling, and DLC resynchronizes the sampler where this range ends.

With θ=θold\theta=\theta_{\mathrm{old}} the lag ratio is one on each token, so mv=1m_v=1 and Ct=∑v∈H(qv−κpθ(v))sv=s^tC_t=\sum_{v\in H}(q_v-\kappa p_\theta(v))s_v=\hat{s}_t, the head estimate of score centering. With q=pθoldq=p_{\theta_{\mathrm{old}}} the tail ratio is κ=(1−∑Hpθold)/(1−∑Hpθold)=1\kappa=(1-\sum_Hp_{\theta_{\mathrm{old}}})/(1-\sum_Hp_{\theta_{\mathrm{old}}})=1 and qvρv=pθ(v)q_v\rho_v=p_\theta(v), so Ct=∑v∉Hpθ(v)(mv−1)svC_t=\sum_{v\notin H}p_\theta(v)(m_v-1)s_v, which vanishes with the tail clip inactive and leaves PPO with the sampler’s weights as reference. The resynchronization sets θold=θ\theta_{\mathrm{old}}=\theta, so ρt=1\rho_t=1, and ℓt\ell_t and the lag part of StS_t vanish together, and the version gap Δθold\Delta\theta_{\mathrm{old}} restarts from zero in Equation (24). The numerical discrepancy is unchanged by the copy, so DLC keeps centering it after each resynchronization.

Loss of DLC

The loss adds the centering term CtC_t of Equation (6) to the PPO loss LPPOL_{\mathrm{PPO}} with reference θold\theta_{\mathrm{old}} in verl, with sg for the stop-gradient operator,

LDLC=LPPO+∑tAt∑v∈Hsg⁡[qvmvρv−κpθ(v)]log⁡pθ(v∣ht).(43)L_{\mathrm{DLC}} = L_{\mathrm{PPO}} + \sum_t A_t \sum_{v \in H} \operatorname{sg}\left[q_v m_v \rho_v - \kappa p_\theta(v)\right] \log p_\theta(v \mid h_t). \tag*{(43)}

The gradient of LPPOL_{\mathrm{PPO}} is −∑tmtρtAtst-\sum_t m_t \rho_t A_t s_t, and the gradient of the added term is ∑tAtCt\sum_t A_t C_t, so −∇LDLC=g^DLC-\nabla L_{\mathrm{DLC}} = \hat{g}_{\mathrm{DLC}}. The indicator mvm_v follows the sign of AtA_t as mtm_t does, so the loss computes the head term for both signs and keeps the one that matches the sign of the token’s advantage. Both terms are averaged over the tokens of the batch as the PPO loss is. The head log-probabilities of pθoldp_{\theta_{\mathrm{old}}} come from the forward pass at θold\theta_{\mathrm{old}} that also gives ℓt\ell_t, and ρv\rho_v is clamped to the interval from e−20e^{-20} to e20e^{20}, as verl clamps the PPO ratio.

References

  1. [1]Zhihong Shao, Peiyi Wang, Qihao Zhu, Runxin Xu, Junxiao Song, Xiao Bi, Haowei Zhang, Mingchuan Zhang, Y. K. Li, Y. Wu, and Daya Guo. DeepSeekMath: Pushing the limits of mathematical reasoning in open language models. arXiv preprint arXiv:2402.03300, 2024.arXiv
  2. [3]Yufa Zhou, Yichen Wang, Jiakun Fan, Ziqi Shu, Zhichao Liu, Anru R. Zhang, Neiwen Ling, and Zijun Wei. Athanor: An agent-native system for autonomous post-training research. arXiv preprint arXiv:2610.21055, 2026a.arxiv.org/abs/2610.21055
  3. [4]Woosuk Kwon, Zhuohan Li, Siyuan Zhuang, Ying Sheng, Lianmin Zheng, Cody Hao Yu, Joseph E. Gonzalez, Hao Zhang, and Ion Stoica. Efficient memory management for large language model serving with PagedAttention. In Proceedings of the 29th Symposium on Operating Systems Principles, 2023.arxiv.org/abs/2309.06180
  4. [5]Zheng, L., Yin, L., Xie, Z., Sun, C., Huang, J., Yu, C. H., Cao, S., Kozyrakis, C., Stoica, I., Gonzalez, J. E., & al., . et . (2024). Sglang: Efficient execution of structured language model programs. Advances in Neural Information Processing Systems, 37, 62557–62583.
  5. [6]Yu Li, Binxu Li, and Tian Lan. Momentkv: Closing the directional gap in kv cache eviction for long-context inference. arXiv preprint arXiv:2606.01563, 2026b.arxiv.org/abs/2606.01563
  6. [7]Yao, F., Liu, L., Zhang, D., Dong, C., Shang, J., & Gao, J. (2025). Your efficient RL framework secretly brings you off-policy RL training. Blog Post.
  7. [8]Liu, J., Li, Y., & al., . et . (n.d.). When speed kills stability: Demystifying RL collapse from the training-inference mismatch. Blog Post.
  8. [9]Fu, W., & al., . et . (2025). AReaL: A large-scale asynchronous reinforcement learning system for language reasoning. In arXiv preprint.arXiv
  9. [10]Piché, A., & al., . et . (2025). PipelineRL: Faster on-policy reinforcement learning for long sequence generation. In arXiv preprint.arXiv
  10. [11]Martin Marek and Max Ryabinin. Score centering stabilizes off-policy reinforcement learning. arXiv preprint arXiv:2609.20807, 2026.arxiv.org/abs/2609.20807
  11. [12]John Schulman, Filip Wolski, Prafulla Dhariwal, Alec Radford, and Oleg Klimov. Proximal policy optimization algorithms. arXiv preprint arXiv:1707.06347, 2017.arxiv.org/abs/1707.06347
  12. [13]Jingwei Song, Haofeng Xu, Jie Xiao, Chengke Bao, Jingwei Shi, Pengbin Feng, Yuhang Han, Weixun Wang, Eric Yang, and Tianyu Shi. Scaling laws for collapse in asynchronous GRPO. arXiv preprint arXiv:2607.01083, 2026.arxiv.org/abs/2607.01083
  13. [14]Luke J. Huang, Zhuo-Yang Zhang, Qing-Hao Hu, Shangtong Yang, and Song Han. Stable asynchrony: Variance-controlled off-policy rl for llms. ArXiv, abs/2602.17616, 2026.arxiv.org/abs/2602.17616
  14. [15]Zhong Guan, Yongjian Guo, Haoran Sun, Wen Huang, Shuai Di, Likang Wu, Xiong Jun Wu, and Hongke Zhao. Missing old logits in asynchronous agentic RL: Semantic mismatch and repair methods for off-policy correction. arXiv preprint arXiv:2605.12070, 2026.arxiv.org/abs/2605.12070
  15. [16]Hao Xu, Junwei Su, Yu Tian, Lan-Song Diao, Zhe Qian, and Chuan Wu. Gac: Stabilizing asynchronous rl training for llms via gradient alignment control. ArXiv, abs/2603.01501, 2026.arxiv.org/abs/2603.01501
  16. [17]Da Chang, Peng Xue, Yu Li, Yongxiang Liu, Pengxiang Xu, and Shixun Zhang. Calibrating and rotating: A unified framework for weight conditioning in peft. In Proceedings of the AAAI Conference on Artificial Intelligence, volume 40, pages 30174–30182, 2026a.arxiv.org/abs/2511.00051
  17. [18]Horace He and Thinking Machines Lab. Defeating nondeterminism in LLM inference, 2025. Blog post.DOI
  18. [19]Qi, P., & al., . et . (2025). Defeating the training-inference mismatch via FP16. In arXiv preprint.arXiv
  19. [20]Jacob Hilton, Karl Cobbe, and John Schulman. Batch size-invariance for policy optimization. In Advances in Neural Information Processing Systems, 2022.arxiv.org/abs/2110.00641
  20. [21]Hai-Zhong Zheng, Jia-Wei Zhao, and Beidi Chen. Prosperity before collapse: How far can off-policy rl reach with stale data on llms? ArXiv, abs/2510.01161, 2025a.arXiv
  21. [22]Chujie Zheng et al. Stabilizing reinforcement learning with LLMs: Formulation and practices. arXiv preprint arXiv:2512.01374, 2025b.arXiv
  22. [23]Zi-Yang Zhang, Xinheng Ding, Jia-Yi Yuan, Rixin Liu, Huizi Mao, Jia-Rong Xing, and Zi-Rui Liu. Deterministic inference across tensor parallel sizes that eliminates training-inference mismatch. ArXiv, abs/2511.17826, 2025.arXiv
  23. [24]MiniMax. (2025). MiniMax-M1: Scaling test-time compute efficiently with lightning attention. In arXiv preprint. 2506.13585
  24. [25]Wenhan Ma et al. Stabilizing MoE reinforcement learning by aligning training and inference routers. arXiv preprint arXiv:2510.11370, 2025.arXiv
  25. [26]Tianle Zhong, Neiwen Ling, Yifan Pi, Zijun Wei, Tianshu Yu, Geoffrey Fox, Peng Wu, and Xiao Yu. Diagnosing training inference mismatch in LLM reinforcement learning via a zero-mismatch reference. arXiv preprint arXiv:2605.14220, 2026.arXiv
  26. [27]Tianrun Yu, Kaixiang Zhao, Shangzhe Li, Yuxiao Yang, Porter Jenkins, Weitong Zhang, and Taylor W. Killian. Rethinking training-inference mismatch in LLM reinforcement learning: Where it arises and how to correct it. arXiv preprint arXiv:2609.32444, 2026.arXiv
  27. [28]Jiajun Zhou, Wei Shao, Lingchao Zheng, Yuwei Fan, and Ngai Wong. Ais: Adaptive importance sampling for quantized rl. ArXiv, abs/2605.13907, 2026b.arXiv
  28. [29]Hao Gu, Hao Wang, Jia-Cheng Liu, Lu-Jun Li, Qi-Yuan Zhu, Bei-Song Liu, Bin Xu, Lei Wang, Xin-Tong Yang, Si-Da Lin, Si-Rui Han, and Yi-Ke Guo. Qarl: Rollout-aligned quantization-aware rl for fast and stable training under training-inference mismatch. ArXiv, abs/2604.07853, 2026.arXiv
  29. [30]Fan Chen, Ziheng Jiang, Zi-Yun Wei, Zheng Zhong, Du Li, Chi Zhang, Hai-Bin Lin, and Shivaram Venkataraman. Towards full pipeline fp8 reinforcement learning for llms. 2026. URL https://api.semanticscholar.org/CorpusID:292219012.api.semanticscholar.org/CorpusID:292219012
  30. [31]Wei Huang, Yi-Rou Ge, Shuai Yang, Yicheng Xiao, Hui-Zi Mao, Yu-Jun Lin, Han-Rong Ye, Si-Fei Liu, K. Cheung, Hongxu Yin, Yao Lu, Xiao-Juan Qi, Song Han, and Yu-Kang Chen. Qerl: Beyond efficiency - quantization-enhanced reinforcement learning for llms. ArXiv, abs/2510.11696, 2025.arXiv
  31. [32]Zhengyang Zhuge, Hao Yu, Xin Wang, Zheng Li, Yi-Zhong Cao, Dayiheng Liu, and Jian-Wei Zhang. Quads: Stabilizing nvfp4 reinforcement learning for moe via quantization-error alignment across dual sides. ArXiv, abs/2607.15810, 2026.arXiv
  32. [33]Edward L. Ionides. Truncated importance sampling. Journal of Computational and Graphical Statistics, 17 (2):295–311, 2008.DOI
  33. [34]Rémi Munos, Tom Stepleton, Anna Harutyunyan, and Marc G. Bellemare. Safe and efficient off-policy reinforcement learning. In Advances in Neural Information Processing Systems, 2016.arxiv.org/abs/1606.02647
  34. [35]Espeholt, L., Soyer, H., Munos, R., Simonyan, K., Mnih, V., Ward, T., Doron, Y., Firouiu, V., Harley, T., Dunning, I., Legg, S., & Kavukcuoglu, K. (2018). IMPALA: Scalable distributed deep-RL with importance weighted actor-learner architectures. International Conference on Machine Learning.
  35. [36]Ziyu Wang, Victor Bapst, Nicolas Heess, Volodymyr Mnih, Remi Munos, Koray Kavukcuoglu, and Nando de Freitas. Sample efficient actor-critic with experience replay. In International Conference on Learning Representations, 2017.arxiv.org/abs/1611.01224
  36. [37]Michael Noukhovitch, Shengyi Huang, Sophie Xhonneux, Arian Hosseini, Rishabh Agarwal, and Aaron Courville. Asynchronous rlhf: Faster and more efficient off-policy rl for language models. In International Conference on Learning Representations, volume 2025, pages 4003–4029, 2025.arxiv.org/abs/2410.18252
  37. [38]Zheng, C., & al., . et . (n.d.). Group sequence policy optimization. In arXiv preprint. Retrieved 2507.18071
  38. [39]Zicheng Hu, Zhijian Zhou, Xuan Zhang, Yuchen Liu, Cheng Chen, Yuan Li, Qi Gu, Yan Feng, Hongyan Hao, and Chao Qu. COPC: Coupled off-policy correction for asynchronous LLM reinforcement learning. arXiv preprint arXiv:2610.09597, 2026.arXiv
  39. [40]Da Chang, Qiankun Shi, Lvgang Zhang, Yu Li, Ruijie Zhang, Yao Lu, Yongxiang Liu, and Ganzhao Yuan. Muoneq: Balancing before orthogonalization with lightweight equilibration. arXiv preprint arXiv:2603.28254, 2026b.arXiv
  40. [41]Jun-Yao Yang, Yu-Cheng Shi, Zong-Xia Li, Zhong-Zhi Li, Ru-Han Wang, Xiang-Xin Zhou, Kishan Panaganti, Hai-Tao Mi, and Leowei Liang. Stale but stable: Staleness-adaptive trust regions for stabilizing asynchronous reinforcement learning. ArXiv, abs/2607.18722, 2026.arXiv
  41. [42]Qi-Jia He, Rui-Nan Jin, Jun Luo, Shao-Feng Zou, and Ying-Bin Liang. Asynchronous llm post-training: Group-mass capping and convergence analysis. 2026.arxiv.org/abs/2610.01896
  42. [43]Arash Ahmadian, Chris Cremer, Matthias Gallé, Marzieh Fadaee, Julia Kreutzer, Olivier Pietquin, Ahmet Üstün, and Sara Hooker. Back to basics: Revisiting reinforce-style optimization for learning from human feedback in llms. In Proceedings of the 62nd Annual Meeting of the Association for Computational Linguistics (Volume 1: Long Papers), pages 12248–12267, 2024.arxiv.org/abs/2402.14740
  43. [46]Guangming Sheng, Chi Zhang, Zilingfeng Ye, Xibin Wu, Wang Zhang, Ru Zhang, Yanghua Peng, Haibin Lin, and Chuan Wu. HybridFlow: A flexible and efficient RLHF framework. arXiv preprint arXiv:2409.19256, 2024.DOI
  44. [47]Micikevicius, P., Stosic, D., Burgess, N., Cornea, M., Dubey, P., Grisenthwaite, R., Ha, S., Heinecke, A., Judd, P., Kamalu, J., & al., . et . (2022). Fp8 formats for deep learning. In arXiv preprint. 2209.05433
  45. [48]Team, Q. (2025). Qwen3 technical report. In arXiv preprint. 2505.09388
  46. [49]Da Chang, Yongxiang Liu, Huihui Zhou, and Ganzhao Yuan. On the convergence of muon and beyond. arXiv preprint arXiv:2509.15816, 2025.arXiv
  47. [50]Vehtari, A., Simpson, D., Gelman, A., Yao, Y., & Gabry, J. (2024). Pareto smoothed importance sampling. Journal of Machine Learning Research, 25(72), 1–58.
  48. [51]Zichen Liu, Changyu Chen, Wenjun Li, Penghui Qi, Tianyu Pang, Chao Du, Wee Sun Lee, and Min Lin. Understanding r1-zero-like training: A critical perspective. arXiv preprint arXiv:2503.20783, 2025b.arXiv

AI tools statement

No AI-use declaration is available for this version in Valency.

The available record does not establish whether AI systems or models contributed to this work.

How AI tools are recorded

Paper details

Cite this paper

Publication

Published
Version
Latest

Data & code

Code, data, proofs and workflows the authors linked for testing, review and reproduction. These links are part of this work’s metadata and are released under the same license as the rest of that metadata. Valency doesn’t host the files; each keeps the license set where it’s hosted.

Pick where to look, or just type