arXiv:2610.40945cs.LGOct 2026

Manuscript Offprint

arXiv:2610.40945

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

Yu Li, Yufa Zhou, Tian Lan

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

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

1 Introduction

Reinforcement learning for language models (Shao et al., 2024; Li et al., 2026a; Zhou et al., 2026a) typically runs two systems on the same weights. Inference engines such as vLLM (Kwon et al., 2023; Zheng et al., 2024; Li et al., 2026b) 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 (Yao et al., 2025; Liu et al., 2025a), and low-precision samplers widen the gap. Asynchronous systems such as ARealL (Fu et al., 2025) and PipelineRL (Piché et al., 2025) 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 (Yao et al., 2025; Marek and Ryabinin, 2026; Schulman et al., 2017): (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

*Equal contribution. Correspondence: yul@gwu.edu, yufa.zhou@duke.edu, tlan@gwu.edu.

(a) Origin, evolution and correction of the mismatch

Figure

(b) Deviation, Qwen3-1.7B

Figure

(c) Effective sample size, Qwen3-1.7B

Figure

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).

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 (Marek and Ryabinin, 2026). Under staleness alone the collapse of asynchronous GRPO scales with the product of staleness and learning rate (Song et al., 2026), and importance-weighted asynchronous training loses its effective sample size before it diverges (Huang et al., 2026). 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.

Following the factorization of the importance ratio at the sampler's weights (Guan et al., 2026), 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.

② 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 (Song et al., 2026; Xu et al., 2026) 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.

③ The discrepancy-lag correction (DLC) centers the numerical discrepancy, clips the lag ratio against the sampler's weights (Chang et al., 2026a) 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.