Manuscript Offprint
arXiv:2610.02039CARM: Cancellation-Aware Response Masking for LLM Reinforcement Learning
Open access. PaperVantage converted this article to text, so layout and figures may differ from the original. This text is shared under the same licence.
ABSTRACT
Recent years have witnessed the rapid adoption of reinforcement learning (RL) in large language model (LLM) post-training, with substantial gains in mathematical reasoning and code generation. In practical systems, however, policy updates and differences between rollout and training engines can make sampled responses off-policy. Sequence-level masking addresses this mismatch by deciding whether an entire response should contribute to optimization. A common masking rule uses the length-normalized geometric mean of sampled token probability ratios. Its signed log-ratios can cancel across positions, concealing substantial bidirectional policy drift. We propose Cancellation-Aware Response Masking (CARM), a sequence-level mask that takes the absolute value of each token log-ratio before averaging, preventing opposing probability changes from canceling. We prove that accepted responses satisfy a joint bound on the fraction of sampled-token ratios outside a prescribed band and their mean log-distance beyond its boundaries. Experiments on mathematical reasoning and code generation show that CARM improves mean@16 averaged over AIME 2024/2025/2026 and BeyondAIME by up to 3.13 percentage points over geometric-mean masking, and increases average pass@1 across four code benchmarks by 2.88 points over the strongest evaluated baseline. These findings support CARM as a theoretically grounded and effective method for response-level off-policy control in LLM reinforcement learning.
1 INTRODUCTION
Reinforcement learning (RL) is widely used to improve the reasoning ability of large language models (LLMs), building on advances in preference-based alignment and execution-feedback learning (Ouyang et al., 2022; Le et al., 2022). In an ideal on-policy setting, responses are generated by the same policy that is being optimized. In practical systems, however, several effects introduce policy mismatch. Mini-batch optimization makes stored responses stale as the policy changes, while actor–learner latency can delay their use. High-throughput rollout engines may also differ from the training backend in batching, numerical precision, and kernel implementations (Yao et al., 2025; Sheng et al., 2025). Consequently, the policy being updated can assign substantially different probabilities to sampled tokens than the rollout policy that generated them.
Proximal Policy Optimization (PPO) and Group Relative Policy Optimization (GRPO) regulate policy updates through clipping in their token-level surrogate losses (Schulman et al., 2017; Shao et al., 2024; Guo et al., 2025). Clipping changes how individual tokens contribute to the loss, but does not keep every current-to-rollout probability ratio within a prescribed interval. It also does not decide whether an entire response should participate in the update. Sequence-level masking complements clipping by making this decision from a score that summarizes mismatch across the response. Trust Region Masking (TRM), for example, motivates such filtering through an analysis of how policy mismatch affects optimization over long autoregressive sequences (Li et al., 2026).
A simple response-level criterion is geometric-mean masking: it takes the geometric mean of the token probability ratios and retains responses when this aggregate is close to one. We refer to this baseline as GeoMean. In log space, this aggregation corresponds to averaging signed token log-ratios, as used in DeepSeek-V3.2's off-policy sequence mask (Liu et al., 2025a). The problem is that positive and negative log-ratios can cancel. For example, token ratios of 10 and 0.1 have a geometric mean of one, although each sampled-token probability has changed tenfold. More generally, a
Full-response bidirectional drift

Prefix-averaged log-ratio deviations

Real response tokens 6784-6886
Highlighted window: ,
| it | 's | a | math | problem | context | ( | likely | Chinese | Ga | ok | ao | or | similar | |||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| competition | style | ), | "m | /n | format | " | with | integers | usually | accepts | ||||||||
| negative | numer | ators | . | |||||||||||||||
| Also | , | usually | $ | m | , | n | $ | are | copr | ime | and | $ | n | > | θ | $. | ||
| Let | 's | check | if | $ | f | (x) | $ | could | be | complex | ? | No | , | log | base | 2 | ||
| usually | implies | real | domain | . | ||||||||||||||
| Domain | $ | 0 | \ | le | x | < | 7 | $. | $ | 9 | -x | $ | is | positive | . | |||
| So | $ | f | (x) | $ | is | real | . | |||||||||||
Figure 1: A real unfiltered rollout that GeoMean accepts and CARM rejects. This 8,619-token response has scores and . Top: positive and negative log-ratio mass and prefix deviations. Bottom: a 103-token window; red tokens have , green tokens have , and color intensity encodes magnitude.
response can appear well aligned under this score because its probability changes balance out, rather than because those changes are small.
We propose Cancellation-Aware Response Masking (CARM), a sequence-level mask that takes the absolute value of each token log-ratio before averaging. This prevents opposing probability changes from canceling while treating reciprocal changes symmetrically. Figure 1 illustrates the distinction on a real 8,619-token response: substantial positive and negative log-ratio contributions largely cancel under GeoMean, whereas CARM retains their magnitudes. CARM changes which responses contribute to optimization while retaining the token-level PPO/GRPO surrogate.
Beyond preventing cancellation, CARM gives the response-level threshold a direct token-level interpretation. We prove that every accepted response satisfies a joint bound on the fraction of sampled-token ratios outside a prescribed, possibly asymmetric band and their mean log-distance beyond its boundaries. Experiments on mathematical reasoning and code generation show improvements over token- and sequence-level baselines. Threshold analyses further show that similar filtering rates can yield different accuracies, while filtering more responses is not consistently better.
Our contributions are:
-
We formalize cancellation in signed-log sequence masking: the aggregate score can indicate perfect apparent alignment even when every sampled token ratio violates a prescribed band.
-
We propose CARM, a sequence-level mask that prevents cancellation by taking absolute values before averaging token log-ratios. We derive a joint bound on the frequency and severity of ratio-band violations in accepted responses, including asymmetric bands, giving the filtering threshold a token-level interpretation.
-
Experiments on mathematical reasoning and code generation show improvements over sequence- and token-level baselines. Paired-response diagnostics and threshold analyses
characterize the selection behavior: higher accuracy is observed at comparable average filtering rates, and accuracy is not monotone in the masked fraction.
Off-policy and token-level trust-region control. This selection problem arises even in nominally online training: actor–learner delay, repeated updates, and rollout–training engine differences separate the policy that generates responses from the policy being optimized (Espeholt et al., 2018; Yao et al., 2025; Sheng et al., 2025). Importance weighting and token-level filtering control individual update contributions (Espeholt et al., 2018; Shen et al., 2025). Adaptive clipping balances advantage contributions and mitigates entropy loss (Xi et al., 2026), while divergence-based controls constrain update size (Qi et al., 2026; Yao et al., 2026). These mechanisms regulate the update within a response. CARM instead decides whether to retain the complete response, separating response selection from the surrogate applied to retained tokens.
Sequence-level correction and masking. Response-level selection must summarize mismatch across an entire sampled path. Length-normalized geometric aggregation removes the direct length dependence of multiplying token ratios (Liu et al., 2025b); it also underlies sequence-level clipping in Group Sequence Policy Optimization (GSPO) (Zheng et al., 2025a). DeepSeek-V3.2 explicitly uses off-policy sequence masking based on the mean signed log-ratio, equivalently the logarithm of a length-normalized geometric-mean ratio, to stabilize GRPO training (Liu et al., 2025a). Its rule applies a one-sided threshold to negative-advantage responses. Our GeoMean baseline uses the same signed-log aggregation with reciprocal-band acceptance (Eq. 5); we examine advantage conditioning separately in Section 5.2. TRM takes a worst-position view, rejecting a response when its maximum token-level divergence violates a long-horizon trust region (Li et al., 2026). CARM targets a different limitation: geometric aggregation averages signed log-ratios, so opposing shifts can cancel. Averaging their absolute values measures bidirectional drift rather than net displacement. The resulting mask changes which responses contribute to the update while retaining the token-level policy surrogate.
3 METHOD
3.1 PROBLEM SETUP
Let be a prompt and let be the -th sampled response. We use response and sequence interchangeably for these generated tokens. We consider nonempty responses () with finite token log-probabilities, so . The token-level ratio of the current policy to the rollout policy is
For a sequence-level advantage , the conventional asymmetric PPO/GRPO token surrogate is
For a binary response mask , averaging the retained token losses gives
The policy-loss contribution is defined as zero if no response is retained. CARM specifies the detached mask independently of loss normalization; Appendix B states the convention used in the experiments.
3.2 GEOMEAN MASKING AND RATIO CANCELLATION
Let denote the geometric-mean token ratio. We define its log-space deviation and reciprocal-symmetric score as
The response is retained when
For , this requires the geometric-mean ratio to lie in the reciprocal interval . Equivalently, and . We use GeoMean as a descriptive shorthand for this two-sided rule. It shares signed-log aggregation with DeepSeek-V3.2, whose mask instead uses a one-sided threshold on negative-advantage responses (Liu et al., 2025a).
Proposition 1 (Cancellation under signed aggregation). For any and any , there exists an even-length response for which every token ratio lies outside , while .
Proof. Let the ratios alternate between and . Every token is outside , but the log-ratios alternate between and . Their sum is zero, so and .
Proposition 1 does not claim that the exact trajectory likelihood ratio is incorrect. Indeed, . It shows that thresholding a signed aggregate does not bound the magnitudes of the sampled-token log-ratios when used as a response-level filter. Figure 1 shows this cancellation in an actual unfiltered rollout.
3.3 CANCELLATION-AWARE RESPONSE MASKING
CARM removes direction before aggregation:
Equivalently, each token contributes the reciprocal-invariant mismatch in ratio space, since . The CARM mask is
During optimization, the response mask and token-level surrogate use the same current-policy forward pass and the stored rollout log-probabilities, before the optimizer update. The binary gate is treated as a constant during backpropagation; a rejected response contributes no policy-loss gradient in that update. Algorithm 1 and Appendix B give the computation schedule and numerical conventions.
The two scores measure different properties: GeoMean measures the magnitude of the average signed log-ratio, whereas CARM measures the average log-ratio magnitude. Mean-absolute aggregation combines contributions linearly, preventing cancellation without selecting only the most extreme token or squaring each deviation. Figure 2 contrasts this rule with GeoMean.

Figure 2: CARM detects bidirectional token shifts that geometric-mean masking can hide. GeoMean averages signed log-ratios before taking an absolute value; CARM averages their magnitudes. The response-level gate complements the token-level PPO/GRPO surrogate.
A real disagreement case from an unfiltered rollout. We replay both masks on an unfiltered batch of 1,024 responses generated by Qwen3.5-4B. With and , 160 responses are accepted by both rules, 668 are rejected by both, 195 are accepted only by GeoMean, and one is accepted only by CARM. Figure 1 visualizes a representative GeoMean-only response whose opposing log-ratio masses cancel; Appendix C provides all 8,619 tokens. Its mean absolute log-ratio is 9.79 times the absolute signed mean, while the largest single-token contribution accounts for only 0.43% of the absolute log-ratio mass. The discrepancy is therefore not driven by one extreme token. These unequal thresholds illustrate different filtering decisions; the shared-threshold relation is examined separately below.
Proposition 2 (Acceptance-set inclusion). For every response , . Thus, for any shared threshold ,
Proof. The triangle inequality gives
Exponentiation preserves the inequality, and the accepted-set inclusion follows immediately.
Figure 3 replays both statistics on the same 1,024 responses from an unfiltered rollout batch, before any sequence-level gate can alter the training trajectory. Every response obeys , with no numerical violations; the mean difference is 0.0319. At every shared threshold, CARM rejects at least as many responses as GeoMean, in agreement with Proposition 2.
3.4 THRESHOLD INTERPRETATION
Consider a token-ratio band with . Define the lower- and upper-side violation sets and their fractions as
Let and define the log-costs of reaching the boundaries by and . For , define

Figure 3: Paired deviations (left) and rejection rates at shared thresholds (right) on 1,024 unfiltered responses. Every response satisfies . Green shading denotes rejection by both rules; orange shading denotes rejection only by CARM.
and set when . We call the mean violation severity: it is the average log-distance by which an out-of-band token passes its nearest boundary.
Proposition 3 (Bounds on ratio-band violations). If with , then
Consequently, with ,
Thus each response accepted by CARM has a shared budget for the fraction of violating token ratios and their mean severity. At a fixed threshold, more severe violations imply a smaller admissible fraction; the bound does not require a reciprocal-symmetric band. This is a deterministic bound on the sampled-token ratios, not on the full conditional-policy KL divergence.
Proof. The acceptance condition is . For a lower violation, ; for an upper violation, . Sum these identities over violating tokens, drop the non-negative in-band contribution, and divide by to obtain Equation 12. Replacing both boundary costs by gives . Division by the positive denominator and give the fraction bound. Appendix A provides the full derivation.
Corollary 1 (Reciprocal-symmetric band). For with , define , , and let be the mean of over (zero when ). If , then
In particular, .
Proof. Set and in Proposition 3; then and .
The experimental PPO/GRPO clip parameters and correspond to the numerical band [0.8, 1.28]. For this band, the lower and upper boundary costs are and . Consequently, Equation 13 gives at and at for any accepted sequence. The PPO clipping interval serves only as a reference band for interpreting violations; CARM does not impose it as a hard per-token constraint.
4 EXPERIMENTS
4.1 EXPERIMENTAL SETUP
Experiments use verl (Sheng et al., 2025) and GRPO. We train Qwen3.5-4B and Qwen3.5-9B (Qwen Team, 2026) on DAPO Math (Yu et al., 2025) and evaluate AIME 2024/2025/2026 (Mathematical Association of America, 2026) and BeyondAIME (Chen et al., 2025) with 16 responses per problem. For code generation, Qwen3.5-9B is trained on the TACO training split (Li et al., 2023) with executable rewards. Evaluation uses the held-out TACO test split, LiveCodeBench-v6 (Jain et al., 2025), and the EvalPlus suites HumanEval+ and MBPP+ (Liu et al., 2023). Metrics are obtained using three random seeds for both tasks. Math-Verify checks mathematical answers (Kydlíček, 2025); SandboxFusion executes and judges generated code (Cheng et al., 2025). Baselines are Null, IcePop, TRM, and GeoMean. Null retains the same GRPO procedure, including token-level clipping and advantage normalization, but applies no additional off-policy response mask. Appendix D and Table 3 give the datasets, prompts, and configuration.
4.2 MATHEMATICAL REASONING
Table 1 compares mathematical reasoning across AIME 2024/2025/2026 and BeyondAIME. CARM achieves the highest four-dataset average for both Qwen3.5-4B and Qwen3.5-9B. Its three-year AIME average also exceeds those of Null, IcePop, TRM, and GeoMean: relative to GeoMean, it rises from to on Qwen3.5-4B and from to on Qwen3.5-9B. The latter improvement holds separately on all three AIME years. For Qwen3.5-4B, CARM improves AIME 2024, ties on AIME 2025, and is slightly lower on AIME 2026, while improving the aggregate.
Table 1: Mathematical-reasoning mean@16 across methods (%, higher is better). Average is the mean of AIME 2024, AIME 2025, AIME 2026, and BeyondAIME. Bold and underline denote the best and second-best values within each model block.
| Model | Method | AIME 2024 | AIME 2025 | AIME 2026 | BeyondAIME | Average |
|---|---|---|---|---|---|---|
| Qwen3.5-4B | Null | 49.38 | 48.33 | 54.79 | 22.25 | 43.69 |
| IcePop | 47.08 | 40.83 | 40.42 | 19.31 | 36.91 | |
| TRM | 66.67 | 55.21 | 65.00 | 32.31 | 54.80 | |
| GeoMean | 72.50 | 64.38 | 70.62 | 38.88 | 61.59 | |
| CARM (ours) | 77.08 | 64.38 | 69.79 | 42.56 | 63.45 | |
| Qwen3.5-9B | Null | 76.67 | 66.88 | 67.71 | 45.25 | 64.13 |
| IcePop | 70.42 | 59.58 | 66.67 | 34.94 | 57.90 | |
| TRM | 78.33 | 67.08 | 76.46 | 45.81 | 66.92 | |
| GeoMean | 80.42 | 66.67 | 75.00 | 47.06 | 67.29 | |
| CARM (ours) | 82.08 | 71.04 | 79.38 | 49.19 | 70.42 |
On BeyondAIME, CARM raises mean@16 from to on Qwen3.5-4B and from to on Qwen3.5-9B relative to GeoMean. The gains therefore extend beyond the annual AIME benchmarks. Across all four datasets, the Average increases from to on Qwen3.5-4B and from to on Qwen3.5-9B. For the larger model, the aggregate lead accompanies an improvement on every benchmark; for the smaller model, it reflects an overall gain with a mixed year-by-year AIME pattern.
Relative to TRM, CARM improves the three-year AIME average by 8.13 points on Qwen3.5-4B and 3.54 points on Qwen3.5-9B despite TRM's higher rejection rates (Section 5.1). Relative to IcePop, CARM improves the four-dataset Average by 26.54 points on Qwen3.5-4B and 12.52 points on Qwen3.5-9B.
4.3 CODE GENERATION
Table 2 reports pass@1 for Qwen3.5-9B trained on the TACO training split. Testing on TACO measures performance on held-out problems from the same dataset, while LiveCodeBench-v6, HumanEval+, and MBPP+ evaluate the resulting policy on three additional benchmarks.
Table 2: Evaluation pass@1 across code benchmarks (% , higher is better). TACO denotes the held-out test split, separate from the training split. Average is the mean of the four datasets. Bold and underline denote the best and second-best values.
| Method | TACO | LiveCodeBench-v6 | HumanEval+ | MBPP+ | Average |
|---|---|---|---|---|---|
| Null | 34.50 | 38.46 | 85.57 | 75.22 | 58.44 |
| IcePop | 45.87 | 43.36 | 92.68 | 79.81 | 65.43 |
| TRM | 36.60 | 44.97 | 87.80 | 76.72 | 61.52 |
| GeoMean | 46.03 | 44.50 | 92.28 | 78.31 | 65.28 |
| CARM (ours) | 46.70 | 51.20 | 94.11 | 81.22 | 68.31 |
CARM improves average pass@1 by 3.03 points over GeoMean and 2.88 points over IcePop, the strongest baseline on average. The gains are not uniform: relative to GeoMean, the increase is modest on TACO, from to , and largest on LiveCodeBench-v6, from to . On HumanEval+ and MBPP+, CARM reaches and , also exceeding IcePop, the strongest baseline on these suites. Thus, the improvement is not confined to held-out TACO problems.
5 ANALYSIS
We examine whether the gains are explained by filtering more responses, whether advantage sign should override the gate, and whether improvements persist across different sampling criteria.
5.1 UPDATE REDUNDANCY AND EFFECTIVE FILTERING
We use update redundancy to describe improved validation accuracy despite omitting response-level updates, without implying that rejected responses lack useful information.
GeoMean and CARM mask an average of 55.65% and 54.52% of sequences during Qwen3.5-4B training, yet improve three-year AIME mean@16 over Null by 18.33 and 19.58 points. For Qwen3.5-9B, the corresponding fractions are 52.75% and 52.32%, with gains of 3.61 and 7.08 points. Filtering persists throughout training (Appendix Figure 9). Filtering already-generated responses complements selective roll-out use and data-efficient reasoning (Yu et al., 2025; Sun et al., 2025; Lu et al., 2026b; Wang et al., 2025; Zheng et al., 2025b).
Figure 4 compares AIME accuracy with mean sequence-masked fraction. On Qwen3.5-9B, CARM outperforms GeoMean by 3.47 points while their masked fractions differ by only 0.43 points. Accuracy is not monotone in the masked fraction, and TRM rejects more responses without outperforming CARM.

Figure 4: Sequence filtering versus AIME accuracy. Each point is a masking configuration. AIME mean@16 averages the 2024/2025/2026 benchmarks.
Paired-score differences (Figure 3) show that rejection rates alone do not characterize retained trajectories. Tightening CARM's frequency–severity budget (Proposition 3) limits sampled-token mismatch but removes update contributions, consistent with the observed non-monotonicity.
5.2 ADVANTAGE-CONDITIONAL MASKING ABLATION
DeepSeek-V3.2 masks only negative-advantage responses (Liu et al., 2025a). We test this conditioning on Qwen3.5-9B with CARM's score and threshold fixed within each task. Standard masking reaches 75.63% AIME mean@16 (2024/2025/2026) versus 60.28% for negative-only masking; LiveCodeBench-v6 scores are 50.58% versus 42.22% (Figure 5).
Even a correctly rewarded response can be stale if the current policy assigns substantially different probabilities to its tokens. PPO clips positive-advantage terms above the upper ratio bound, but other token updates can remain active (Schulman et al., 2017); it does not enforce a response-level trust region (Li et al., 2026). These results suggest that response-level mismatch checks can remain useful even for positive-advantage responses.
5.3 SAMPLING CONSISTENCY
We assess sampling consistency using bootstrapped best-of-k and worst-of-k: the former requires at least one correct response among k, while the latter requires all k to be correct. Worst-of-k measures sampling repeatability, not distribution-shift or adversarial robustness. Appendix G defines the estimators and reports results for .
For Qwen3.5-9B, Figure 6 averages results over AIME 2024/2025/2026. CARM improves mean@16, best@16, and worst@16 over GeoMean by 3.47, 2.74, and 2.78 points, respectively; the corresponding gains over TRM are 3.54, 0.30, and 4.61 points. CARM also achieves the highest best-of-k and worst-of-k values throughout the displayed range.
Advantage conditioning

Best-of-k

Worst-of-k

Figure 5: Standard (solid) versus negative-only (dashed) CARM masking.
Figure 6: Bootstrapped best-of-k (left) and worst-of-k (right) accuracy on AIME.
6 CONCLUSION
We proposed CARM, a response-level off-policy mask that averages absolute token log-ratios to prevent opposing probability changes from canceling. Our analysis shows that signed aggregation can accept responses even when every sampled-token ratio lies outside a reciprocal-symmetric band. In contrast, CARMbounds the frequency and severity of ratio-band violations through a joint budget for each accepted response, giving the threshold a token-level interpretation. Experiments show gains in mathematical reasoning and code generation over the evaluated baselines, together with improved sampling consistency. These findings support CARM as a principled response-selection criterion that complements reward-directed PPO/GRPO optimization.
REFERENCES
Jacob Austin, Augustus Odena, Maxwell Nye, Maarten Bosma, Henryk Michalewski, David Dohan, Ellen Jiang, Carrie Cai, Michael Terry, Quoc Le, and Charles Sutton. Program synthesis with large language models, 2021. URL https://arxiv.org/abs/2108.07732.
Jiaze Chen, Tiantian Fan, Xin Liu, Lingjun Liu, Zhiqi Lin, Mingxuan Wang, et al. Seed1.5-Thinking: Advancing superb reasoning models with reinforcement learning, 2025. URL https://arxiv.org/abs/2504.13914.
Wenhu Chen, Xueguang Ma, Xinyi Wang, and William W. Cohen. Program of thoughts prompting: Disentangling computation from reasoning for numerical reasoning tasks. Transactions on Machine Learning Research, 2023. URL https://openreview.net/forum?id=YfZ4ZPt8zd.
Yao Cheng, Jianfeng Chen, Jie Chen, Li Chen, Liyu Chen, Wentao Chen, Zhengyu Chen, et al. FullStack Bench: Evaluating LLMs as full stack coders, 2025. URL https://arxiv.org/abs/2412.00535.
Shihan Dou, Yan Liu, Haoxiang Jia, Enyu Zhou, Limao Xiong, Junjie Shan, Caishuang Huang, Xiao Wang, Xiaoran Fan, Zhiheng Xi, Yuhao Zhou, Tao Ji, Rui Zheng, Qi Zhang, Tao Gui, and Xuanjing Huang. StepCoder: Improving code generation with reinforcement learning from compiler feedback. In Proceedings of the 62nd Annual Meeting of the Association for Computational Linguistics (Volume 1: Long Papers), pp. 4571–4585. Association for Computational Linguistics, 2024. doi: 10.18653/v1/2024.acl-long.251. URL https://aclanthology.org/2024.acl-long.251/.
Lasse Espeholt, Hubert Soyer, Remi Munos, Karen Simonyan, Vlad Mnih, Tom Ward, Yotam Doron, Vlad Firoiu, Tim Harley, Iain Dunning, Shane Legg, and Koray Kavukcuoglu. IMPALA: Scalable distributed deep-RL with importance weighted actor-learner architectures. In Proceedings of the 35th International Conference on Machine Learning, 2018. URL https://proceedings.mlr.press/v80/espeholt18a.html.
Luyu Gao, Aman Madaan, Shuyan Zhou, Uri Alon, Pengfei Liu, Yiming Yang, Jamie Callan, and Graham Neubig. PAL: Program-aided language models. In Proceedings of the 40th International Conference on Machine Learning, volume 202 of Proceedings of Machine Learning Research, pp. 10764–10799. PMLR, 2023. URL https://proceedings.mlr.press/v202/gao23f.html.
Daya Guo, Dejian Yang, Haowei Zhang, et al. DeepSeek-R1 incentivizes reasoning in LLMs through reinforcement learning. Nature, 645(8081):633–638, 2025. doi: 10.1038/s41586-025-09422-z. URL https://doi.org/10.1038/s41586-025-09422-z.
Jian Hu, Jason Klein Liu, Haotian Xu, and Wei Shen. REINFORCE++: Stabilizing critic-free policy optimization with global advantage normalization, 2025. URL https://arxiv.org/abs/2501.03262.
Naman Jain, King Han, Alex Gu, Wen-Ding Li, Fanjia Yan, Tianjun Zhang, Sida Wang, Armando Solar-Lezama, Koushik Sen, and Ion Stoica. LiveCodeBench: Holistic and contamination free evaluation of large language models for code. In The Thirteenth International Conference on Learning Representations, 2025.
Hynek Kydliček. Math-Verify: Math verification library. Software, 2025. URL https://github.com/huggingface/Math-Verify.
Hung Le, Yue Wang, Akhilesh Deepak Gotmare, Silvio Savarese, and Steven Chu Hong Hoi. CodeRL: Mastering code generation through pretrained models and deep reinforcement learning. In Advances in Neural Information Processing Systems, volume 35, pp. 21314–21328, 2022. doi: 10.52202/068431-1549.
Rongao Li, Jie Fu, Bo-Wen Zhang, Tao Huang, Zhihong Sun, Chen Lyu, Guang Liu, Zhi Jin, and Ge Li. TACO: Topics in algorithmic code generation dataset, 2023. URL https://arxiv.org/abs/2312.14852.
Yingru Li, Jiacai Liu, Jiawei Xu, Yuxuan Tong, Ziniu Li, and Baoxiang Wang. Trust region masking for long-horizon LLM reinforcement learning. In Proceedings of the 43rd International Conference on Machine Learning, 2026. URL https://openreview.net/forum?id=dPaBOu0Xwk.
Aixin Liu, Aoxue Mei, Bangcai Lin, et al. DeepSeek-V3.2: Pushing the frontier of open large language models, 2025a. URL https://arxiv.org/abs/2512.02556.
Jiacai Liu, Yingru Li, Yuqian Fu, Jiawei Wang, Qian Liu, and Zhuo Jiang. When speed kills stability: Demystifying RL collapse from the training–inference mismatch, September 2025b. URL https://richardli.xyz/rl-collapse.
Jiawei Liu, Chunqiu Steven Xia, Yuyao Wang, and Lingming Zhang. Is your code generated by chatGPT really correct? rigorous evaluation of large language models for code generation. In Advances in Neural Information Processing Systems, 2023. URL https://openreview.net/forum?id=1qvx610Cu7.
Songshuo Lu, Hua Wang, Zhi Chen, and Yaohua Tang. URPO: A unified reward & policy optimization framework for large language models. Proceedings of the AAAI Conference on Artificial Intelligence, 40(38):32329–32337, 2026a. doi: 10.1609/aaai.v40i38.40507. URL https://ojs.aaai.org/index.php/AAAI/article/view/40507.
Xiaodong Lu, Xiaohan Wang, Jiajun Chai, Guojun Yin, Wei Lin, Zhijun Chen, Yu Luo, Fuzhen Zhuang, Yikun Ban, and Deqing Wang. Contextual rollout bandits for reinforcement learning with verifiable rewards, 2026b. URL https://arxiv.org/abs/2602.08499.
Mathematical Association of America. MAA invitational competitions: American invitational mathematics examination, 2026. URL https://maa.org/maa-invitational-competitions/. Accessed September 2026.
Long Ouyang, Jeff Wu, Xu Jiang, Diogo Almeida, Carroll L. Wainwright, Pamela Mishkin, et al. Training language models to follow instructions with human feedback. In Advances in Neural Information Processing Systems, volume 35, pp. 27730–27744, 2022. doi: 10.52202/068431-2011.
Penghui Qi, Xiangxin Zhou, Zichen Liu, Tianyu Pang, Chao Du, Min Lin, and Wee Sun Lee. Re-thinking the trust region in LLM reinforcement learning. In Proceedings of the 43rd International Conference on Machine Learning, 2026. URL https://openreview.net/forum?id=f4g8zblbwp.
Qwen Team. Qwen3.5: Towards native multimodal agents, February 2026. URL https://qwen.ai/blog?id=qwen3.5.
John Schulman, Sergey Levine, Pieter Abbeel, Michael Jordan, and Philipp Moritz. Trust region policy optimization. In Proceedings of the 32nd International Conference on Machine Learning, 2015. URL https://proceedings.mlr.press/v37/schulman15.html.
John Schulman, Filip Wolski, Prafulla Dhariwal, Alec Radford, and Oleg Klimov. Proximal policy optimization algorithms, 2017. URL https://arxiv.org/abs/1707.06347.
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, 2024. URL https://arxiv.org/abs/2402.03300.
Anqi Shen, Baihui Li, Bin Hu, et al. Every step evolves: Scaling reinforcement learning for trillion-scale thinking model, 2025. URL https://arxiv.org/abs/2510.18855.
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. In Proceedings of the Twentieth European Conference on Computer Systems, pp. 1279–1297, 2025. doi:10.1145/3689031.3696075. URL https://doi.org/10.1145/3689031.3696075.
Yan Sun, Jia Guo, Stanley Kok, Zihao Wang, Zujie Wen, and Zhiqiang Zhang. Efficient reinforcement learning for large language models with intrinsic exploration, 2025. URL https://arxiv.org/abs/2511.00794.
Yiping Wang, Qing Yang, Zhiyuan Zeng, Liliang Ren, Liyuan Liu, Baolin Peng, Hao Cheng, Xuehai He, Kuan Wang, Jianfeng Gao, Weizhu Chen, Shuohang Wang, Simon Shaolei Du, and Yelong Shen. Reinforcement learning for reasoning in large language models with one training example. In Advances in Neural Information Processing Systems, volume 38, pp. 122721–122764, 2025. doi: 10.52202/085713-4093.
Jason Wei, Xuezhi Wang, Dale Schuurmans, Maarten Bosma, Brian Ichter, Fei Xia, Ed Chi, Quoc V. Le, and Denny Zhou. Chain-of-thought prompting elicits reasoning in large language models. In Advances in Neural Information Processing Systems, volume 35, pp. 24824–24837, 2022. doi:10.52202/068431-1800.
Zhiheng Xi, Xin Guo, Yang Nan, et al. BAPO: Stabilizing off-policy reinforcement learning for LLMs via balanced policy optimization with adaptive clipping. In The Fourteenth International Conference on Learning Representations, 2026. URL https://openreview.net/pdf?id=jIeJJqG7dz.
Zhengpeng Xie, Qiang Zhang, Fan Yang, Marco Hutter, and Renjing Xu. Simple policy optimization. In Proceedings of the 42nd International Conference on Machine Learning, volume 267 of Proceedings of Machine Learning Research, pp. 68813–68824. PMLR, 2025. URL https://proceedings.mlr.press/v267/xie25m.html.
An Yang, Anfeng Li, Baosong Yang, Beichen Zhang, Binyuan Hui, Bo Zheng, et al. Qwen3 technical report, 2025. URL https://arxiv.org/abs/2505.09388.
Feng Yao, Liyuan Liu, Dinghuai Zhang, Chengyu Dong, Jingbo Shang, and Jianfeng Gao. Your efficient RL framework secretly brings you off-policy RL training, August 2025. URL https://fengyao.notion.site/off-policy-rl.
Jiarui Yao, Xiangxin Zhou, Penghui Qi, Wee Sun Lee, Liefeng Bo, and Tianyu Pang. Rethinking the divergence regularization in LLM RL, 2026. URL https://arxiv.org/abs/2606.09821.
Qiying Yu, Zheng Zhang, Ruofei Zhu, Yufeng Yuan, Xiaochen Zuo, Yu Yue, Weinan Dai, Tiantian Fan, et al. DAPO: An open-source LLM reinforcement learning system at scale. In Advances in Neural Information Processing Systems, volume 38, pp. 113222–113244, 2025. doi: 10.52202/085713-3775.
Aohan Zeng, Xin Lv, Zhenyu Hou, Zhengxiao Du, Qinkai Zheng, Bin Chen, et al. GLM-5: from vibe coding to agentic engineering, 2026. URL https://arxiv.org/abs/2602.15763.
Chujie Zheng, Shixuan Liu, Mingze Li, Xiong-Hui Chen, Bowen Yu, Chang Gao, Kai Dang, Yuqiong Liu, Rui Men, An Yang, Jingren Zhou, and Junyang Lin. Group sequence policy optimization, 2025a. URL https://arxiv.org/abs/2507.18071.
Haizhong Zheng, Yang Zhou, Brian Bartoldson, Bhavya Kailkhura, Fan Lai, Jiawei Zhao, and Beidi Chen. Act only when it pays: Efficient reinforcement learning for LLM reasoning via selective rollouts. In Advances in Neural Information Processing Systems, volume 38, pp. 124321–124346, 2025b. doi: 10.52202/085713-4143.
A DETAILED PROOFS
A.1 PROOF OF PROPOSITION 1
Step 1: construct an even-length response. Fix arbitrary constants and . Choose an arbitrary positive integer and let the response length be . For every pair , define
Thus the response contains exactly m ratios equal to B and exactly m ratios equal to 1/B. These ratios can arise from valid conditional policies: at each odd position, assign the sampled token probabilities under the rollout policy and under the current policy, and swap them at each even position. Assign the remaining probability to a second token. Both policies are normalized, all probabilities are positive, and their sampled-token ratios are exactly those in Equation 15.
Step 2: verify that every ratio violates the band. For each odd position, , so it lies strictly above the upper endpoint of . For each even position, and all quantities are positive. Taking reciprocals reverses the inequalities and gives
Hence , so it lies strictly below the lower endpoint. Therefore every one of the T token ratios is outside .
Step 3: evaluate the GeoMean statistic. The logarithm of a reciprocal satisfies . Grouping the signed log-ratios into the m adjacent pairs in Equation 15 yields
Substitution into Equation 4 gives
and therefore
This proves the proposition: every token can violate the prescribed reciprocal band even though GeoMean reports its minimum possible score.
Step 4: evaluate the CARM statistic for comparison. Because , , and hence . Consequently,
so . Thus any GeoMean threshold at least one accepts this construction, whereas CARM rejects it whenever .
A.2 PROOF OF PROPOSITION 2
Step 1: move to log-ratio coordinates. For a fixed response of positive length , set . For , both scores are identical. For , the triangle inequality applied repeatedly to the finite sum gives
Step 2: normalize by response length. Since T > 0, division by T preserves the direction of the inequality:
Using and Equations 4 and 6, the left-hand side is exactly and the right-hand side is exactly . Therefore
Step 3: return to ratio space. The exponential function is strictly increasing on . Applying it to both sides gives
This proves the pointwise score inequality.
Step 4: prove accepted-set inclusion. Take an arbitrary response . By membership in this set, . Combining this fact with the pointwise result from Step 3 gives
Thus . Since the argument holds for every element of the CARM accepted set, Equation 8 follows.
Equality condition. For real scalars, equality in the triangle inequality holds exactly when all nonzero have the same sign. Accordingly, when all nonzero token log-ratios are nonnegative or all are nonpositive. If at least one and at least one , the inequality is strict.
A.3 PROOF OF PROPOSITION 3
Step 1: convert acceptance into an additive budget. By definition,
The acceptance assumption and monotonicity of imply
Multiplying by the positive length T gives the total absolute-log budget
Step 2: partition positions and define the boundary costs. Let . Because , the sets , , and are disjoint and cover all token positions. Define
The assumptions imply and .
Step 3: decompose a lower-side violation exactly. Take . Then , so . Inserting and subtracting gives
Since , the final term is positive. It approaches zero at the lower boundary and grows with the token's log-distance below that boundary.
Step 4: decompose an upper-side violation exactly. Take . Then , so . Inserting and subtracting gives
Because , this final term is likewise a positive log-distance past the upper boundary.
Step 5: sum the exact decompositions. Partition the total absolute-log drift and substitute Equations 44 and 47 term by term:
Step 6: identify the conditional mean log-distance. If , Equation 11 implies
Divide by T and use :
If , both sums are empty; our zero convention makes the same identity valid.
Step 7: obtain the master budget. The in-band sum in Equation 50 is nonnegative. Drop it, apply Equation 40, divide by T, and use Equation 53:
This is Equation 12.
Step 8: bound the total violation fraction. Let . Keeping the severity contribution in the master budget gives
Because , division yields
Combining each inequality with proves Equation 13, including the case under the stated zero convention.
Step 9: recover the frequency-only budget. Every term defining is nonnegative. Dropping the distance term from the master budget therefore gives . Let . Then
Division by gives . Independently, because it is a fraction. Taking the smaller upper bound recovers the severity-independent consequence of Equation 13.
A.4 PROOF OF COROLLARY 1
Step 1: specialize the two endpoints. Set and . Because , the assumptions hold, and the two boundary costs are identical:
Step 2: combine the violation sets. The lower and upper violation sets are and . They are disjoint because , and their union is exactly . Hence
Step 3: identify the reciprocal-band log-distance. For ,
where the second equality uses . For ,
where . Thus the conditional mean in Equation 11 is precisely .
Step 4: simplify the master budget. Substitute , , and into Equation 12:
This is Equation 14. Finally, , so dropping gives . Since , division by yields .
B IMPLEMENTATION OF CARM
Algorithm 1 gives the response-level masking rule, treating the hard threshold decision as constant during backpropagation. The gate changes which response losses contribute to an update while retaining the token-level PPO/GRPO surrogate.
Algorithm 1 CARM response-level off-policy masking
Require: Finite current and rollout token log-probabilities and ; response-token mask with for each response; threshold
Ensure: Response-acceptance indicators
1: for each response do
2:
3:
4:
5:
6:
7: end for
8: Gate each per-response PPO/GRPO loss by and apply the training implementation's loss normalization.
Mask computation schedule. We store the sampled-token log-probabilities produced during rollout. During training, each optimizer mini-batch is divided into micro-batches; each micro-batch forward supplies the current log-probabilities used by both the response mask and the token surrogate. The optimizer updates the policy after gradient accumulation over the mini-batch. Threshold comparisons produce a binary gate with no gradient through the decision, as represented by stopgrad in Algorithm 1. Masking is local to loss evaluation rather than permanent removal from the rollout batch. Our experiments use one optimization epoch per rollout batch; with multiple epochs, the gate would be recomputed whenever a response is evaluated under the updated policy.
The PPO/GRPO loss implementation in verl also applies dual clipping to negative advantages. Writing for Equation 2, its surrogate is
The sequence mask multiplies this surrogate without changing its clipping rule or normalization.
Numerical convention. The theoretical scores use exact log-ratios. The implementation uses verl's numerical guard when computing the mask and token surrogate. If the guard is inactive, the implemented and theoretical scores coincide. Otherwise, the score inequalities and frequency–severity budget apply to the effective ratios . For a band strictly inside , including [0.8, 1.28], clipping does not change which tokens violate the band. Thus the frequency-only guarantee also holds for the original ratios, while the severity term measures the guarded log-distances.
C COMPLETE RESPONSE FOR THE DISAGREEMENT CASE
Figure 1 in the main paper visualizes the complete signed-drift trajectory and a tokenizer-aligned local window. For auditability, the five pages below show all 8,619 response tokens from the same rollout without elision. Each token is rendered in its tokenizer-aligned box: red denotes , green denotes , and color intensity encodes . The first-page header repeats the response-level scores and masking decisions. For this response, and : signed aggregation cancels 89.78% of the absolute log-ratio mass. The example demonstrates score cancellation and differing mask decisions.
Complete token-level view for the Figure 1 disagreement case | Part 1/5
Tokens 1-1,842 | 8,619 response tokens | GeoMean s=1.0025 <= 1.005 (accept) | CARM s=1.0248 > 1.02 (reject)
log r_t > 0 log r_t < 0
tokens 1-895
Here 's a thinking process to solve the problem : \n\n
- ** Under stand the Goal ** The user wants to find the value of $f
(-1 0 0) f
(x) m / n
m + n $. \n\n
- ** An alyze the Given Information ** \n
-
Domain : is defined on math bb (R) $ . \n
-
Functional Equation : \backslash cdot f (x - 4) = -1 $ for
all . \n
- Definition on an interval : for $
0 \ le q sl ant x < 7 $ . \n
-
Target : Calculate . \n
-
Output format : where the answer is $ . frac (m) | n | s (
pres umably $ m, n \backslash in \backslash math bb (Z) n > 0, \backslash gcd (m, n) =
1 m / n m + n $
). \n\n
- ** Explore the Functional Equation ** \n
Let the equation be f (x - 4) = -1 $ . \n
We want to find relations between values of at different points.
\n
Let 's replace with to see a pattern in the arguments
. \n
f (x + 4) - 4) = -1 \implies ies f (x + 7)
f (x) = -1 $ . \n
This looks promising because it links and . \n
Let 's check if this relation holds for all . Yes, it's derived
from the original identity for all . \n
So, frac (1) f (x) $ . \n\n
Let 's look at the next step to find a periodic ity . \n
Apply the relation again for : \n
frac (1) f (x + 7) = -1
f (x)) = f (x) $ . \n
So, for all . \n
The function is periodic with period . \n
- ** Calculate Target Argument ** \n
We need to find . \n
Since has period 14, we can shift the argument by
multiples of 14 to bring it into the known interval .
\n
We want to find an integer such that
falls within . \n
Let 's approximate : . \n
So could be 7, 8, or 8. \n
Let 's try . \n
. \n
Wait, the definition is for $ 0 \backslash le
q sl ant x < 7 $ . \n
is not in . \n
However, we know . \n
Let 's try to map to the range . \n
. \n
Let 's calculate . \n
. So $ 1 0 0 \backslash equiv 2 \backslash p
mod (1 4) $ . \n
tokens 896-1,842
Thus . \n
This means . \n
Also . \n
But we need the value in terms of the definition $ f (x) = \backslash log -2
(9 - x) [0, 7) $ . \n
So we need to evaluate by relating it to a value .
0 \ in [0, 7) $ . \n
Let 's check the relation again . \n
If we have a value in , say .
then . Note that would be in $ [1
7, 1 4) $ . \n
We have . \n
We found . \n
So . \n
We also know . \n
Wait, I'm saying . \n
But . \n
Can we express using the shift relation backwards? \n
? No, that goes back to negative
\n
Let 's look at the relation f (x) = -1 $ . \n
This implies . \n
We want to use the definition for $ 0
\ le q sl ant x < 7 $ . \n
The value 1 2 is outside this range . \n
However, we know the functional equation holds for all real . \n
So we can use f (x) = -1 1 2
5 1 2 - 7 = 5 $). \n
Let 's check : . \n
So, f (5) = -1 \backslash impl ies f (1 2) = -1 / f (5
) $ . \n
Since , then $ f (-1 0 0) = -1 / f (
- $ . \n
Now we need to calculate . \n
Since , we can use the formula directly .
\n
. \n
Therefore, frac (1) f (2) $ .
\n
- ** Double Check the Logic ** \n
-
Functional Equation : f (x - 4) = -1 $ . \n
-
Let . Then f (y) = -1 $ . \n
-
Im plies . \n
-
Period icity : \n
$ f (y + 1 4) = f (y + 7 + 7) = -1 / f (y + 7) = -1 / (c 1 / f
(y)) = f (y) $ . \n
Period is 1 4 . \n
- Target : . \n
. No \n
. \n
. So $ -1 0 0 = -7 \backslash times 1 4 -
2 $ . \n
Thus . \n
So . \n
Complete token-level view for the Figure 1 disagreement case | Part 2/5
Tokens 1,843-3,632 | Continuation of the same unabridged tokenizer-aligned response.
tokens 1,843-2,778
| Now we have | $ | $ | -2 | [0] | .7 | $? | No | |||
|---|---|---|---|---|---|---|---|---|---|---|
| We need to use the relation | $f(x+7) | $ | (x) | = | -1 | to map | $ | |||
| to the interval | $[0] | .7 | $ | |||||||
| Let | .7 | = | -9 | $. | Then | $f(-9) | .7 | = | f | |
| (-16) | $? | No | ||||||||
| We want$ x (new) | [0] | .7 | $ | such that | $x (new) | $ | is | |||
| related to$ -2 | by | shift of | .7 | |||||||
| $-2+ | .7 | = | 5 | $ | ||||||
| So consider | $f(5) | $ | We have the relation | $f(5) | $f(5) | -7 | ||||
| = -1 | ies | f(5) | = | -1 | $ | |||||
| So | $f(-2) | = | -1 | $ | ||||||
| Check validity | $ | 5 | [0] | .7 | $ | Formula | $f(x) | = | \ | |
| 2(9-x) | $ | applies | ||||||||
| Calculate | $f(5) | = | -2(9-5) | = | -2(4) | = | ||||
| 2 | $ | |||||||||
| So | = | -1/2 | $ | |||||||
| Since | $ | $ | periodic | with | period | 14 | $ | f(-100) | = | f |
| (-2) | = | -1/2 | $ | |||||||
| Wait, is | $f(-100) | = | f(-2) | $ | consistent | with | earlier | mod | ||
| calc? | ||||||||||
| -100 | = | -8 | times | 14+ | 12 | $ | So | $f(-100) | = | f |
| 12) | $ | |||||||||
| 12- | .7 | = | 5 | $ | ||||||
| $f(12) | $f(5) | = | -1 | ies | f(12) | = | -1/2 | $ | ||
| -100 | 12 | mod | (14) | $ | ||||||
| -100+ | 12 | = | 12 | $ | Correct | |||||
| 100 | = | -7 | times | 14- | 2 | $ | So | $-100 | -2 | |
| mod(14) | $ | |||||||||
| 12 | -2 | mod | (14) | $ | Correct | |||||
| Also, is | there | any | constraint | violation | ? | |||||
| The definition | is | given | for | $0 | x< | 7 | $ | |||
| We used | $f(5) | $ | which | is | in | that | range | |||
| We used | $f(x+7) | $ | (x) | = | -1 | $ | This holds for all | real | ||
| So | $f(5) | $ | (-2) | = | -1 | $ | ||||
| $f(-2) | = | -1/2 | $ | |||||||
| $f(-100) | = | f(-2) | = | -1/2 | $ | |||||
| Result is | $-1/2 | $ | ||||||||
| Format | $ | So | $m=-1 | n= | 2 | $ | ||||
| Usually in these problems | are | integers | $ | If | ||||||
| reduced, | $gcd(m,n) | = | 1 | $ | ||||||
| $ | $m+n=1 | $ | ||||||||
| Or maybe they expect | to be | positive | ? | m/n | format | |||||
| Usually implies | rational | number | Negative | numerator | is | allowed | ||||
| Let's check if there's ambiguity in the sign | $ | $ | f(x) | = | ||||||
| 2(9-x) | $ | |||||||||
| Domain | $0 | le | x< | 7 | $ | For | $ | log | ||
| 4=2 | $ | Positive | ||||||||
| $f(-100) | = | -1/2 | $ | |||||||
| $ | $m+n=1 | $ | ||||||||
| Let's re-read carefully | format | Often implies lowest | ||||||||
| terms | ||||||||||
| What if the fraction is simplified | differently | ? | No | $ | ||||||
| is simplest form | ||||||||||
| Are required to be coprime? | give the value of m+n |
tokens 2,779-3,632
| If I used ,-1/2sum is 1. |
|---|
| Standard mathematical convention implies copr ime integers with . |
| .$\n |
| Replacewith..$\n |
| . |
| (x) = f(x)$. Correct .\n |
| . |
| $-100 = -8\ times 14 + 12\ equiv 12\ p mod (14) |
| 1\n |
| .$\n |
| Usingfor .$\n |
| ies f(5)f(-2) = -1 |
| impl ies f(-2) = -1/f(5)\n |
| Using .$\n |
| .$\n |
| .$\n |
| Is it possible somewhere ?\n |
| is never 0 unless ies x = 8 |
| (0, 7)\n |
| If , the relation would imply |
| .$contradiction .\n |
| So .$\n |
| Is the domain of log valid ?ies x < 9$. |
| Interval satisfies this .\n |
| .$\n |
| Let ies x = -96\n |
| Then ies f(-93)f(-1 |
| 00) = -1\n |
| Need .$\n |
| . |
| .$\n |
| .$\n |
| .$\n |
| ies f(9) = -1/f(2)\n |
| .$f(2) = \log 2(9 - 2) = \log |
| 2(7)\n |
| This looks messy .needs to be calculated .\n |
| .$\n |
| We established .$\n |
| Thensince.$\n |
| is easily calculated .\n |
| .$\n |
Complete token-level view for the Figure 1 disagreement case | Part 3/5
Tokens 3,633-5,377 | Continuation of the same unabridged tokenizer-aligned response.
tokens 3,633-4,521
. \n
. \n
Let's double check . \n
Original : . \n
Shift to . \n
.
\
This doesn't match . \n
Wait, derivation was : \n
Let . Then . \n
.
\
This derivation is correct. \n
Wait, earlier I wrote Replace with . \n
Original equation : for any , . \n
Let's substitute specific . \n
If we want to link and , we need the arguments
of in the equation to match and . \n
In , the difference between arguments is
-
-
- (x - 4) = 7. \n
-
So yes, with equals . \n
Let . . . \n
Then . so . \n
Yes, derivation stands. \n
Now, check the mapping from to . \n
. \n
. Wait. \n
. \n
. \n
So we map by adding multiples of 14. \n
. \n
We want an input to the function definition (9
-t) t \in [0, 7) $. \n
We have . \n
. because . \n
Is ? Yes. \n
So . \n
. \n
. \n
Seems solid. \n\n
Is there any ambiguity about n $ being integers ? \n
Usually questions like find m + n where m / n is the value imply
integer numerator and denominator in lowest terms. \n
. \n
. \n
Sometimes they want positive . Yes, usually . \n
Sometimes they define as positive integers and add a sign to
the value ? No, format usually allows negative . \n
If the answer was , then , . \n
If the problem implied in \mathbb{m} math bb (2) ^ +m$ is
the numerator of the simplified fraction (including sign). It might be
specified. But standard interpretation is in \mathbb{m} math bb (2).
n \ ne 0, \ gcd 1 m | , | n | = 1 n > 0 $. \n
So . \n
tokens 4,522-5,377
Sum = 1. \n\n
Wait, could the log be ? The symbol is . \n
Could the base be something else? . \n
. \n
Calculation is correct. \n\n
Let me check if I missed any subtle constraints. \n
defined on . \n
for any real number $$. \n
Is the periodic ity unique? \n
. Could it have a smaller period? \n
. \n
Since is not identical or - 1 $ (value is 2
period cannot be 7 (unless
= 1 / f (x) \ impl ies f (x) ^ 2 = 1 $, impossible for real numbers.
\
So period is exactly 1 4 (or a multiple if $ f has other
properties not given, but 1 4 is sufficient to solve. \n
Actually, means is anti
-period ic with period 7. \n
So . \n
times 1 4 - 2$. \n
So . \n
. \n
Calculation: . \n
Result . \n\n
Let's quickly check mapping again. \n
is given for le . \n
We need . \n
. \n
. equiv
2 \ p mod (14). \n
. \n
So . \n
. \n
. \n
. \n
. \n
. \n
. \n
. \n
Everything is consistent. \n\n
What if 1 evaluate directly from the relation
(x - 4) = 1 $? \n
$. \n
? .
(8)$. \n
. . \n
So . T aut
ology. Doesn't help find value of . \n
We need the value in . \n
. \n
. \n
. . \n
Complete token-level view for the Figure 1 disagreement case | Part 4/5
Tokens 5,378-6,954 | Continuation of the same unabridged tokenizer-aligned response.
tokens 5,378-6,188
. \n
Matches . \n\n
Are there any constraints on ? \n
Usually are copr ime integers. \n
. \n
. \n
. \n
. \n\n
Wait, is it possible are positive? \n
The value is negative. So must be negative if we write .
\n
If the question implies , it would say * absolute
value * or similar . \n
Standard interpretation for format with negative number is just
. \n\n
One more check . \n
. \n
. \n
. \n
We don't need this . \n
We just need . \n
(using $ x - 4 = 1 0 0 \backslash impl
ies x = -9 6 \ impl ies f (-9 3) f (-1 0 0) = -1 -9 3 \equiv equiv
3 \ p mod (1 4) f (3) $.\n
Wait . \n
. \n
$ - 9 3 = - 7 \backslash times 1 3 - 2 = - 9 1 - 2 \equiv equiv - 2 \backslash
equiv | 1 2 \ p mod (1 4) $.\n
. \n
. \n
CONTR ADI CTION 1 \n
Let's re -e evaluate this path . \n
. \n
We found . \n
So should be 2. \n
Let's check again . \n
. \n
).
\n
So $ 9 3 = 6 \backslash times 1 4 + 9 \backslash impl ies 9 3 \equiv equiv 9 \backslash
p mod (1 4) $.\n
So . \n
So . \n
. \n
So . \n
Then $ f ( - 9 3 ) f ( - 1 0 0 ) = 2 \backslash times f ( - 1 0 0 ) = - 1 \backslash
impl ies f (-1 0 0) = -1 / 2$. \n
Okay, my previous calculation of was wrong
in the * Wait * check . \n
. \n
. So .
\n
My previous check said based on wrong
arithmetic ). \n
tokens 6,189-6,954
. Not divisible by 1 4. \n
Okay, the consistency check works. \n
. \n
. \n
Okay, the result is robust. \n
Let's write down the steps clearly. \n
- Der ive periodic ity from $ f (x + 3) f (x - 4)
= 1 $.\n
Substitute for to get . \n
Then . \n
- Reduce modulo 1 4. \n
$ - 1 0 0 = - 8 \backslash times 1 4 + 1 2 \equiv equiv 1 2 \backslash p mod (1 4)
$ . \n
So . \n
- Use the relation to connect $ f (
1 2 ) [ 0, 7 ]$. \n
Let . Then . \n
. \n
. \n
- Calculate using the definition
2 (9 - x) $.\n
. \n
- Calculate result. \n
. \n
- Identify . \n
. \n
- Compute . \n
. \n
Is there any reason to doubt the format * m / n ? \n
Sometimes fractions are required to be positive. But the value is
clearly negative. \n
Unless the question implies frac (m) n $?
\n
So is the value for frac (m) n) 的格式 请给出 m + n
的值. \n
This literally means * the value of f (- 1 0 0) is in the format m / n
. \n
So if the value is 0.5, it is -1/2. \n
So . \n
If the question meant absolute value, it would say so. \n
Given it's a math problem context ( likely Chinese Ga ok ao or similar
competition style. m / n format with integers usually accepts negative
numerators. \n
Also, usually are copr ime and . \n
Let's check if could be complex? No, log base 2 usually
implies real domain. \n
Domain . is positive. \n
So is real. \n
Everything holds in . \n
Final check of the question ph rising. \n
-
f (x + 3) * f (x - 4) = -1. \n
-
0 <= x < 7. \n
-
f (-1 0 0) . \n
-
m / n format. \n
Complete token-level view for the Figure 1 disagreement case | Part 5/5
Tokens 6,955-8,619 | Continuation of the same unabridged tokenizer-aligned response.
tokens 6,955-7,787
m + n : \n\n
Calculation check : \n
times 1 4 + 2 $ \n
. \n
. \n
. \n
. \n
. \n
. \n
. \n
. \n
. \n
. \n
What if can be negative? . .
\
Standard convention for fractions denominator positive. \n
will stick with . \n
Structure of the response : \n
-
Derive periodic ity. \n
-
Reduce argument. \n
-
Use recurrence relation. \n
-
Evaluate using formulas. \n
-
State m, n, and sum. \n
Wait, is there any possibility that .
implies something else? \n
. \n
. \n
If . then . . \n
Then . \n
Then . consistent. \n
. \n
. \n
. . \n
. \n
. \n
. \n
Cons istent. \n
Is there any ambiguity with . \n
. Yes. \n
Is there any boundary issue? No. \n
Is it possible to use . relation directly on .
$ ? \n
$ f (x - 4) = f (-1 0 0) \backslash impl ies x - 4 = -1 0 0 \backslash impl ies
x = -9 6$. \n
. \n
- = -1$. \n
. \n
. \n
.
\
This is a faster route to verify without explicitly stating period 1 4
first just linking via mod 1 4 or just successive 7 -sh ifs. \n
Wait, I used mod 1 4 to get . \n
. No. \n
tokens 7,788-8,619
times (7) = -9 8 -9 3 = -9 8 + 5 $. Correct.
\
So . \n
This confirms the result without explicitly calculating $ -1 0 0 \backslash p
mod (1 4) s directly, but calculating . \n
. \n
. \n
. \n
.
\
Both methods align perfectly. \n
Final check on . \n
. \n
The question asks for . \n
Is it possible they want ? No just . \n
Is it possible $ f (1 0 0) s is an integer? No. \n
Okay. ready to write. \n
</think> \n
由已知条件 . \n
令 替换为 . 则有:\n
. \n
即 \n
. \n
由此可得 \n
. \n
再次应用此关系,将 替换为 . \n
. \n
说明函数 是周期函数,且周期 . \n
我们需要 的值。\n
利用周期性,我们可以将自变量 转化为一个在已知定义域 s
相应的值。\n
计算 关于 的同余关系:\n
. \n
即 . \n
所以 \n
. \n
接下来利用 . \n
将 转化到区间
s. \n
因为 . 且 ,所以:\n
. \n
又因为当 时,.
$ s. \n
所以 \n
. \n
代入上式,得 \n
. \n
因此 \n
. \n
题目要求将结果表示为 的解式,并求 的值。\n
这里 . . (通常约定分母 为正整数). \n
则 . \n
\boxed {1} < m end.
D EXPERIMENTAL SETTINGS
D.1 DATA
Math training data. The mathematical-reasoning experiments use the competition-style problems in the DAPO Math training corpus (Yu et al., 2025). Math-Verify (Kydliček, 2025) extracts the boxed final answer and checks its equivalence to the reference. Null, IcePop, TRM, GeoMean, and CARM use the same prompt order, rollout group size, rewards, optimizer settings, and token-level PPO/GRPO clipping; only the off-policy correction differs.
Math evaluation data. AIME 2024, AIME 2025, and AIME 2026 each contain 30 contest problems and are reported separately (Mathematical Association of America, 2026). BeyondAIME contributes 100 additional problems designed to extend evaluation beyond the three annual AIME sets
(Chen et al., 2025). We sample 16 responses per problem and compute acc/mean@16 from exact final-answer correctness. The Average in Table 1 gives AIME 2024, AIME 2025, AIME 2026, and BeyondAIME equal weight. Evaluation is performed before training and periodically during optimization.
Code training data. The general-code experiments use problems from the TACO training split (Li et al., 2023), with natural-language task descriptions, input/output specifications, and executable tests. During RL, the reward checks up to the first ten available tests for each training problem. This fixed cap keeps execution cost and sandbox load comparable across methods; held-out benchmark tests are not used by the training reward. All five methods receive the same prompts, decoding budget, executable reward, and optimizer configuration.
Code evaluation data. We evaluate each frozen TACO-trained checkpoint on four complementary suites. TACO evaluation uses 1,000 problems from its held-out test split and up to the first ten tests per problem. LiveCodeBench-v6 contains 1,054 temporally collected coding problems and is judged with its complete released tests. HumanEval+ and MBPP+ contain 164 and 378 problems, respectively, and use the stronger EvalPlus test suites rather than only the original base tests. MBPP+ extends the MBPP benchmark (Austin et al., 2021). Every generated program is rejudged with SandboxFusion (Cheng et al., 2025), with functional correctness reported as pass@1.
D.2 PROMPT TEMPLATES
Figures 7 and 8 reproduce the task-specific chat messages used throughout training and evaluation. Dataset problem statements replace the placeholders without changing the surrounding instructions.
System: A conversation between User and Assistant. The user asks a question, and the Assistant solves it. User: Please solve the problem step by step, and put your final answer within \boxed{}. <problem>
Figure 7: Prompt template for mathematical-reasoning experiments. The placeholder <problem> is replaced by the problem text.
System: You are an expert competitive programming assistant.
Solve the user's programming problem in Python 3. You may reason about the solution, algorithm, and edge cases. At the end, provide the final answer as exactly one fenced Python code block.
The final code must be complete and executable. It should read from standard input and write to standard output, unless the problem provides starter code requiring a specific function or class interface.
User: Solve the following programming problem.
Problem:
<problem>
<starter code, when provided>
Return your final solution in this format:
python
your complete Python solution
...
Figure 8: Prompt template for code-generation experiments. The placeholder <problem> is replaced by the problem text; the starter-code field is included only when provided by the dataset.
D.3 TRAINING AND EVALUATION CONFIGURATION
Table 3 consolidates the shared settings, method-specific controls, and threshold grids used to produce the reported comparisons.
Table 3: Complete experimental configuration for mathematical reasoning and code generation.
| Field | Value |
|---|---|
| Base models | Qwen3.5-4B and Qwen3.5-9B (math); Qwen3.5-9B (code) |
| Framework / algorithm | verl; GRPO-style optimization |
| Training data | DAPO Math (math); TACO training split with executable rewards (code) |
| Evaluation data | AIME 2024/2025/2026 and BeyondAIME; TACO test split, LiveCodeBench-v6, HumanEval+, and MBPP+ |
| Evaluation sampling | 16 responses/problem (math); one response/problem per evaluation (code) |
| Prompt batch / rollout group | 128 prompts / 8 responses per prompt |
| PPO mini-batch size | 8 |
| Training budget | Up to 120 training iterations |
| Maximum response length | 16,384 tokens |
| Learning rate | |
| PPO clipping band | |
| Compared methods | Null; IcePop; TRM; GeoMean; CARM (ours) |
| Baseline settings | IcePop token-ratio interval [0.5, 5.0]; TRM cutoff 0.05 |
| GeoMean thresholds | Qwen3.5-4B: Qwen3.5-9B: |
| CARM (ours) thresholds | Qwen3.5-4B: Qwen3.5-9B: |
Evaluation protocol. Both tasks are evaluated with three random seeds. Mathematical-reasoning evaluation uses 16 responses per problem and reports mean@16; code-generation evaluation uses one response per problem and reports pass@1. Code decoding uses temperature 0.7, top-p = 0.9, top-k = 50, and a maximum response length of 16,384 tokens. Generated programs are judged with the same batched SandboxFusion evaluator across methods.
For each method, math results use the training iterate with the highest three-year AIME mean@16; code results use the iterate with the highest LiveCodeBench-v6 validation pass@1. Best- and worst-of-k use the same math iterate without separate optimization of either metric. Qwen3.5-4B BeyondAIME results for Null, GeoMean, and CARM use separate runs matched in configuration and training iteration.
TRM implementation. We follow the sampled-token max-filtering option described in Section 4.3 and Appendix E of Li et al. (2026). It rejects a response when . This is the paper's proposed approximation when full logits are unavailable, not a full-vocabulary KL implementation. All TRM results in this paper refer to this sampled-token variant.
E THRESHOLD RESULTS
Table 4 reports the GeoMean and CARM threshold sweeps, with AIME mean@16 averaged equally across the three years.
Table 4: Threshold sweep (% , higher is better). Each row reports the three-year AIME mean@16 for that threshold. Bold and underline denote the best and second-best values within each model block.
| Qwen3.5-4B | Qwen3.5-9B | ||||
|---|---|---|---|---|---|
| Method | τ | Avg. | Method | τ | Avg. |
| Null | - | 50.83 | Null | - | 70.42 |
| GeoMean | 1.0025 | 69.03 | GeoMean | 1.0025 | 71.67 |
| GeoMean | 1.005 | 69.17 | GeoMean | 1.005 | 74.03 |
| GeoMean | 1.01 | 66.74 | GeoMean | 1.01 | 69.65 |
| GeoMean | 1.02 | 52.57 | GeoMean | 1.02 | 71.67 |
| GeoMean | 1.03 | 52.43 | GeoMean | 1.03 | 69.86 |
| CARM (ours) | 1.02 | 70.42 | CARM (ours) | 1.02 | 72.99 |
| CARM (ours) | 1.025 | 69.24 | CARM (ours) | 1.025 | 77.50 |
| CARM (ours) | 1.03 | 67.99 | CARM (ours) | 1.03 | 73.82 |
| CARM (ours) | 1.04 | 66.81 | CARM (ours) | 1.04 | 74.17 |
F ADDITIONAL TRAINING DIAGNOSTICS
Figure 9 gives the time-resolved utilization view used in Section 5.1. It distinguishes sustained filtering from a mean dominated by a small number of unusually strict updates, and contrasts Qwen3.5-9B on mathematical reasoning and code generation.


Figure 9: Sequence-masked fraction during training for the selected GeoMean, TRM, and CARM (ours) configurations. The left and right panels show Qwen3.5-9B mathematical-reasoning and code-generation training, respectively. Faint curves are raw measurements and opaque curves apply an exponential moving average with weight 0.8.
Figure 10 complements validation accuracy with generation- and optimization-level measurements. It compares the same five methods on Qwen3.5-9B mathematical-reasoning training. Faint solid curves show raw measurements, while opaque solid curves show exponential moving averages with weight 0.8. Gradient norm uses a logarithmic axis.
Null IcePop TRM GeoMean CARM (ours)
Response length (tokens)

Policy entropy

Gradient norm
Figure 10: Training diagnostics for Qwen3.5-9B mathematical reasoning. Panels show response length, policy entropy, and gradient norm across the five methods. Faint curves show raw measurements; opaque curves show exponential moving averages with weight 0.8. Gradient norm is displayed on a logarithmic scale.
Figure 11 presents the matched diagnostics for code-generation training. The same metrics and smoothing convention make the domain-level differences directly comparable with Figure 10.
Null IcePop TRM GeoMean CARM (ours)
Response length (tokens)

Policy entropy

Gradient norm
Figure 11: Code-generation training diagnostics: response length, policy entropy, and gradient norm for Qwen3.5-9B trained on TACO. Faint and opaque curves show raw and smoothed measurements, respectively, using the same smoothing and axis conventions as the mathematical-reasoning diagnostics.
G BEST- AND WORST-OF-k SAMPLING METRICS
Figure 6 evaluates inference-time sample scaling at the same Qwen3.5-9B checkpoints reported in Table 5. For each problem, let denote the correctness of the 16 independently sampled responses and let . The per-problem empirical accuracy is , and mean@16 averages this quantity over problems and then equally over AIME 2024, 2025, and 2026.
Best-of-k asks whether at least one of k sampled responses is correct. It captures the opportunity provided by additional inference-time sampling when an oracle verifier can select a correct candidate. Worst-of-k asks whether all k sampled responses are correct. It is therefore a strict measure of repeatability: a model scores highly only when its stochastic samples solve the same problem consistently. Worst-of-k should not be read as robustness to distribution shift or adversarial perturbations. At k = 1, both statistics reduce exactly to mean@16, which anchors the two curves at the same observed single-sample accuracy.
For , we resample responses with replacement from the 16 available responses for each problem and apply the maximum (best-of-) or minimum (worst-of-) correctness operator. The plotted values average 1,000 bootstrap replicates, using the same models as Table 1.
For a problem with correct responses among 16, the expected best-of- value is
Equation 73 is the probability that at least one of independent draws from the empirical response distribution is correct. It is a with-replacement best-of- statistic, not the standard without-replacement pass@ estimator. The corresponding expected worst-of- value is
Equation 74 is the probability that all draws are correct. It is non-increasing in , and strictly decreasing for a problem when . As with best-of-, this is a with-replacement statistic rather than the literal maximum or minimum over a fixed subset of the original 16 responses. Together, the two curves characterize solution coverage and repeatability. Worst-of- emphasizes problems with high per-problem correctness probability; an aggregate increase does not imply improvement on every problem.
Table 5: Exact Qwen3.5-9B values underlying Figure 6. All entries are equal-weighted three-year AIME averages in percent.
| Metric | Method | |||||
|---|---|---|---|---|---|---|
| Best-of- | Null | |||||
| TRM | ||||||
| GeoMean | ||||||
| CARM (ours) | ||||||
| Worst-of- | Null | |||||
| TRM | ||||||
| GeoMean | ||||||
| CARM (ours) |