Manuscript Offprint

arXiv:2610.34044

A Sign Law for Entropy Drift under Sampler Mismatch in RLVR

Zhiyuan Wang, Jacob Steeves, Chang Liu

Abstract

Entropy in reinforcement learning with verifiable rewards (RLVR) moves up or down depending on choices that should be neutral, such as whether over-length responses are masked or counted as failures. We trace this to sampler mismatch, where rollouts are drawn with top-k/top-p truncation or at a temperature the learner does not apply, and prove that a constant advantage shift then changes the entropy of a softmax policy, at first order and in expectation, with a sign fixed by the sampler: positive shifts sharpen the policy under any sampler whose likelihood ratio to the policy increases with token probability, including top-k, top-p, min-p, and temperatures below one, and flatten it under flatter samplers. In group-based RLVR with token-level losses, the baseline-controlled part of this drift is set by the token-weighted net advantage, which masking and failing over-length responses can push to opposite signs; the remainder, a covariance between advantages and the sampler's sharpness gap, can feed back over long horizons. On a 2B model, the entropy slope is linear in shifts of the net advantage under truncated sampling and indistinguishable from flat under exact sampling, and token-level importance ratios leave 98% of the drift. In 100-step runs, a net-zero baseline only delays an entropy explosion that exact sampling does not show, a fixed positive shift delays it further, and a baseline weighted by the sharpness gap keeps entropy stable without changing the learner. On a 9B reasoning model over ten steps, the uncorrected rule loses held-out accuracy, whereas zeroing the net advantage or renormalizing the learner gains 8.2 and 8.8 points over it, with no held-out effect under exact sampling.

1. Introduction

Policy entropy is the most closely watched health signal in reinforcement learning with verifiable rewards (RLVR), and it fails in both directions. When it collapses, the policy stops exploring and accuracy plateaus (Cui et al., 2025; Yu et al., 2025); when it explodes, responses degrade and training can diverge (The Microsoft AI Team, 2026; Hugging Face TRL contributors, 2026). Yet the direction of entropy often hinges on choices that seem unrelated to it. Figure 1 shows an example: in otherwise identical runs, masking over-length responses drives entropy down while counting them as failures drives it up, and with exact sampling the two runs are indistinguishable.

Most accounts of entropy dynamics assume on-policy rollouts, where entropy follows the covariance between advantages and log-probabilities (Cui et al., 2025) and responds to clipping (Park et al., 2025), and where baseline invariance makes a constant advantage shift harmless (Williams, 1992). Masking or failing over-length responses mainly changes the balance between positive and negative advantages, so on-policy theory offers no reason for the two to push entropy in opposite directions.

In practice, rollouts are often not drawn from the policy that the learner differentiates: engines sample with top-k, top-p, or min-p truncation, or at a temperature the learner does not apply (Section 5). Under such sampler mismatch, a constant advantage shift adds a drift toward or away from the sampler (Le Roux, 2016; Le Roux et al., 2025; Marek & Ryabinin, 2026), which recent systems remove by replaying the sampling mask (DeepSeek-AI, 2025; The Microsoft AI Team, 2026; Xiaomi LLM-Core Team, 2026; Cognition, 2026a) or centering the score (Marek & Ryabinin, 2026). For a fixed full-support behavior policy, a higher baseline makes the limit policy deterministic (Arnal et al., 2025); for truncation, a torchtitan pull request argues in words that the drift sharpens or flattens the policy and does not average out over a group (PyTorch torchtitan contributors, 2026), and SCOPE-RL reports a reversal across temperatures (Wang et al., 2025). What is missing is a sign statement for general samplers derived from the policy; the batch quantity that controls the drift in group-based RLVR, where advantages within a group already sum to zero; and an account of what each correction removes.

Correspondence to: Zhiyuan Wang zhiyuanalwang@gmail.com, Jacob Steeves jake@bittensor.com, Chang Liu liuchang.contact@gmail.com.

Preprint. October 27, 2026.

Figure

Figure 1. Change in entropy of a 2B model on a fixed probe set under three advantage rules (mean over 3 seeds; bands show the range). Under truncated sampling (top-k 20, top-p 0.95), masking over-length responses (N > 0) lowers entropy and counting them as failures (N < 0) raises it, with the net-zero baseline (N = 0) in between. With exact sampling, or with truncated sampling and a learner that renormalizes over the sampled support, the three rules nearly coincide.

We show that the drift moves entropy with a sign fixed by the sampler, and that a single batch statistic sets its baseline-controlled part. Our sign law (Theorem 1) states that under any sampler sharper than the policy, including top-k, top-p, min-p, and temperatures below one, a positive advantage shift lowers entropy at first order and a negative shift raises it; flatter samplers, such as temperatures above one, reverse both. The shift that a token-level loss applies is the token-weighted net advantage NgN_g of each group, which equals Cov(r,L)/Lˉ\text{Cov}(r, L)/\bar{L} under a group-mean baseline and gains a nonnegative term under masking (Table 3). Because long responses fail more often, failing them makes N negative and pushes entropy up, whereas masking makes N positive in our runs and pushes it down. A second term, from failed responses visiting less confident prefixes, does not depend on the baseline; on real batches it is the smaller one, but the gap it depends on grows as the policy moves away from a sharper sampler, so over long horizons it feeds back on itself. Setting N = 0, as the length-weighted baseline of OPO (Hao et al., 2025) does, removes the net-advantage term; weighting the baseline by each response's gap cancels the two terms against each other; renormalizing the learner over the sampled support removes the whole drift and coincides with score centering; token-level importance ratios only rescale it.

On a 2B model, the entropy slope is linear in shifts of N under truncated sampling; the difference between masking and failing grows with the measured sharpness of the sampler across six samplers and reverses sign at temperature 1.2; and it shrinks to 2–4% when the learner is renormalized or applies the sampling temperature, but stays at 98% under exact importance ratios. Sequence-mean aggregation, which zeroes N for failing but not for masking, brings failing to the level of the net-zero baseline and leaves masking unchanged, as predicted. In 100-step runs the net-zero baseline only delays an entropy explosion that exact sampling does not show, and the gap-weighted baseline keeps entropy stable (Figures 3 and 4); the theory predicts signs and comparisons within a rule, not absolute sizes. On a 9B reasoning model under truncated sampling, zeroing N raises held-out accuracy by 8.2 points over ten steps (95% interval 4.2–12.1 over training seeds) and renormalizing the learner by 8.8, while under exact sampling the rules do not differ. Our contributions are:

• A sign law for every sampler sharper or flatter than the policy (Sections 3.1 and 3.2).

• A split of the mismatch drift into a net-advantage term and a gap covariance, and what each correction removes (Sections 3.3 and 3.4).

• Controlled evidence on Qwen-family models at 2B and 9B, including 100-step runs and controls, a replication on OLMo-3-7B, and a survey of practice (Sections 4 and 5).

References (50)