TL;DR
Off-policy reinforcement learning for LLMs faces a fundamental bias-variance dilemma: token-level importance sampling is stable but mathematically biased, while sequence-level sampling is unbiased but suffers from exploding variance. This paper introduces Cumulative Token Policy Optimization (CTPO), which uses the cumulative product of token ratios up to the current position to achieve perfectly unbiased gradient estimation with minimal variance. Paired with a novel $\sqrt{t}$ position-adaptive clipping strategy, CTPO delivers state-of-the-art performance on challenging mathematical reasoning benchmarks.
What Problem Does This Paper Address?
When post-training Large Language Models (LLMs) using Reinforcement Learning (RL)—as seen in models like OpenAI o1 or DeepSeek-R1—algorithms often reuse trajectories sampled from an older "behavior" policy ($\pi_b$) to update the current "target" policy ($\pi_\theta$). To correct for this distribution mismatch, researchers rely on Importance Sampling (IS).
However, existing methods suffer from a harsh bias-variance tradeoff:
- Token-level IS (used in PPO and GRPO) only evaluates the current token's ratio, completely ignoring how the prefix state distribution has shifted. This keeps variance low but introduces systematic mathematical bias.
- Full-sequence IS fixes the bias by multiplying token ratios across the entire trajectory, but the variance explodes exponentially with sequence length, making training highly unstable.
- Length-normalized IS (used in GSPO) attempts to stabilize sequence-level ratios via a geometric mean, but this breaks the exact mathematical correction and re-introduces bias.
As LLMs generate longer reasoning chains, this dilemma becomes increasingly severe.
Methods
The authors introduce CTPO (Cumulative Token Policy Optimization) to resolve this dilemma using two key innovations:
1. Cumulative Token Importance Ratio
Instead of looking at just one token or the entire sequence, CTPO computes the importance ratio using only the prefix up to the current token position $t$: $$\rho_t^{\text{cum}} = \prod_{t'=1}^t r_{t'}$$ The authors mathematically prove that this cumulative ratio provides a perfectly unbiased prefix correction for token-level policy gradients. Crucially, it achieves strictly lower variance than full-sequence IS because it discards the irrelevant suffix tokens.
2. Position-Adaptive Clipping
Standard RL algorithms use a fixed clipping window (e.g., $[1-\epsilon, 1+\epsilon]$) to prevent destabilizingly large policy updates. However, because the cumulative log-ratio acts like a random walk, its variance grows linearly with the token position $t$ ($\text{Var} \propto t$).
A fixed clipping window creates a severe imbalance: early tokens are almost never clipped, while later tokens are heavily over-clipped, suppressing useful gradient updates. CTPO solves this by dynamically scaling the log-space clipping thresholds proportionally to $\sqrt{t}$, matching the natural standard deviation growth of the cumulative log-ratio.
Datasets
- Training: The models were trained on DeepScaleR, a curated dataset containing approximately 40,000 competition-level mathematics problems.
- Evaluation: Models were evaluated using
avg@32(averaging the pass rate across 32 sampled responses per problem) on four highly demanding math benchmarks: - AIME 2025
- AIME 2026
- HMMT 2025 (Harvard-MIT Mathematics Tournament)
- BRUMO 2025
- Setting: All evaluations used the Tool-Integrated Reasoning (TIR) environment, where the model iteratively generates and executes Python code across up to 5 turns, with a maximum response length of 8,000 tokens.
Key Insights and Ideas
- Suffixes are Pure Noise: Suffix tokens (tokens generated after the current position $t$) have an expected value of 1 under the behavior policy. Including them in a token's importance weight adds massive variance without doing anything to reduce bias. Discarding them is a free lunch for variance reduction.
- The $\sqrt{t}$ Misalignment: Fixed clipping windows fundamentally misunderstand long-context generation. As shown empirically during training, the standard deviation of the log cumulative ratio follows a clean $\sqrt{t}$ curve.
- Balancing the Clip Rate: Without adaptive clipping, the clip rate skyrockets to 20% for late tokens while remaining near 0% for early tokens. CTPO's adaptive strategy flattens this out, maintaining a healthy, uniform 5–10% clip rate across all token positions.
Key Results
CTPO consistently outperformed both GRPO (token-level) and GSPO (length-normalized sequence-level) across different model scales:
- Qwen3-4B Scale: CTPO achieved an average accuracy of 51.4%, outperforming GSPO (47.7%) and GRPO (43.2%). This represents a 7.8% relative improvement over the strongest baseline.
- Qwen3-14B Scale: CTPO reached an average accuracy of 58.8%, beating GSPO (55.5%) and GRPO (54.6%).
Ablation Study
To verify the necessity of the adaptive clipping mechanism, the authors ran an ablation replacing it with a fixed clipping range. Performance dropped from 58.8% down to 55.7% (a 3.1% absolute decrease), proving that managing the position-dependent variance growth is critical to making cumulative importance sampling viable in practice.
Limitations and Future Work
While CTPO demonstrates exceptional capabilities in tool-integrated mathematical reasoning, the authors note a few areas for expansion:
- Broader Agentic Settings: The current evaluation is focused heavily on math and code execution. Future work will explore extending CTPO to more generalized agent frameworks that feature longer-horizon interactions and richer, non-verifiable environment feedback.
Summary updated