Off-Policy Policy Optimization with Proximal KL

Reward-based training for mathematical reasoning generates answers, checks them, and updates the model using correctness feedback. But how far should the model change in each round? Proximal KL balances reward against KL divergence, a measure of how probability distributions differ, relative to the round’s starting model. That starting model is the reference; “proximal” refers to penalizing movement away from it within the round. A small example will show why this can help even when the answers come from the current model, as in on-policy learning.

More importantly, generation and training often run in parallel in practice, so some answers come from older model versions: off-policy data. This raises our central question: can updates using old data preserve the optimizer, meaning the policy that maximizes this round’s KL-regularized objective? We establish conditions under which token-wise importance correction, reweighting each sampled token by its current-model probability divided by its generating-model probability, does so. A token is one unit of generated text. The key is assigning it the KL cost of the whole response that it can influence, including what is generated afterward.

用奖励训练语言模型解题,一个直观的做法是:让模型作答、检查答案,再提高正确回答出现的概率。但每轮更新该让模型改变多少?Proximal KL 用 KL divergence 衡量回答概率分布相对本轮起点的变化,并将它作为代价与奖励权衡。本轮起点的模型称为 reference;proximal 指在这一轮内惩罚偏离它的变化。即使回答都来自当前模型(on-policy),这种正则化也可能改善学习过程,第一节的两题例子会说明原因。

更重要的是,实际训练常让生成与更新并行,因此也会用到较旧模型的回答,即 off-policy 数据。由此产生了本文的核心问题:使用旧数据时,能否保留本轮 KL 目标的 optimizer,也就是使目标最大的策略?我们将说明,在明确条件下,按新旧模型的 token 概率比做 importance correction 可以做到这一点。Token 是生成文本的一个单位;关键是把整段回答的 KL 代价分配给每个 token,包括它对后续生成的影响。

Why KL can help

Why add KL when a correctness reward already identifies which responses are desirable? The choice of objective also determines the path that optimization follows. We first show a case where using the current policy as a KL reference lets optimization improve both prompts, while direct PG sacrifices one. This motivates the proximal objective. Extending it to a full response then tells us which token should receive each KL cost.

正确性奖励已经告诉模型哪些回答更好,为什么还要加入 KL?因为目标的选择也会改变优化走过的路径。我们先看一个例子:把当前策略作为 KL reference 后,优化能够同时改善两道题;直接使用 PG 却会牺牲其中一道。这个例子引出 proximal objective。将同一个目标用于完整 response 后,再推导每份 KL cost 应该分配给哪个 token。

An on-policy example

Proximal KL can, in some cases, achieve a better result than ordinary policy gradient (PG), even with on-policy data. The following idealized example makes this possibility concrete by comparing the limiting reward of two optimization procedures.

A model answers different questions using the same set of weights. This is what we mean by shared parameters: an update that helps one question can also change how the model answers another. A two-question example isolates this effect.

Consider two equally likely prompts with a binary action and reward $R=a$. Use a small logistic model that maps the same parameter vector to a success probability for each prompt. It can solve both prompts, but initially succeeds with probabilities $(p_1,p_2)=(1/2,p_{\mathrm{init}})$, where $0<p_{\mathrm{init}}\le1/64$. One prompt is therefore much easier at initialization. All expectations in this example are exact and on-policy: neither stale data nor sampling noise causes the failure.

To make the model concrete, set $p_m=\sigma(u_m^\top\theta)$, where $\sigma$ is the logistic function that maps a real-valued score to a probability. This score is the logit: for a binary choice with probability $p$, it equals the log-odds $\log[p/(1-p)]$. The feature vectors describe how the same weights affect the two prompts:

\[u_1=\frac15(1,1)^\top,\qquad u_2=\frac15(1,-4)^\top,\qquad \theta_0=(-\Delta,\Delta)^\top.\]

Here Δ is the positive log-odds gap between the two initial success probabilities. Both prompts become solvable along $\theta=(c,0)^\top$ as $c\to\infty$, so this parameterization can represent joint success.

For these shared features, ordinary PG, represented by continuous-time Euclidean gradient flow on the average reward $J=(p_1+p_2)/2$, improves the easier prompt while suppressing the harder one. Gradient flow describes taking infinitesimally small steps along the exact reward gradient. Its limit is $(p_1,p_2)=(1,0)$, and $J$ never exceeds $1/2$. As correct answers to the harder prompt become rarer, that prompt contributes even less to the reward gradient. The model can solve both prompts, but this optimization path increasingly favors only one.

The key mechanism is the conflict between the two prompt gradients: $u_1^\top u_2<0$, so progress on the easier prompt can suppress the harder one. Appendix D.1 proves that this feedback persists and gives the limit above.

This failure occurs along the reward-gradient optimization path. Can a reference-dependent penalty produce a path that improves both prompts? A proximal round maximizes reward while penalizing KL deviation from the previous round’s policy, then uses the resulting policy as the next reference. Here we assume each round is solved exactly; the next subsection writes out its objective. Repeated exact KL-proximal solves in the same model class and from the same initialization give

\[(p_{K,1},p_{K,2}) =\left(\sigma(K/\beta),\sigma(-\Delta+K/\beta)\right) \longrightarrow\class{pkl-math-focus}{(1,1)}, \qquad \Delta=\log\frac{1-p_{\mathrm{init}}}{p_{\mathrm{init}}}.\]

Here $K$ counts completed proximal rounds and $\beta>0$ is the fixed KL penalty strength. Each round increases both success log-odds by $1/\beta$, then refreshes the reference. Both prompts eventually have success probability approaching one, so the average reward approaches 1, compared with the PG limit of 1/2. Proximal KL changes the optimization path: progress relative to the reference incurs a cost, reducing the easier prompt’s dominance within a round while allowing further progress after the reference refreshes.

We must also check that the original model can realize both improvements simultaneously. The parameter increment $(5,0)^\top/\beta$ realizes the exact proximal logit increase $1/\beta$ for both prompts. The proximal target is therefore representable in this same shared model at every round.

KL can improve on-policy optimization. In this example, PG approaches average reward 1/2, while Proximal KL approaches 1.

The construction and full proof appear in Appendix D.1, “Illustration of proximal feedback with shared parameters,” of our paper.

How do these updates affect success? Press Play to follow 1000 iterations from the same starting point, or drag the step slider. Compare mean reward, then switch to the harder or easier prompt’s success probability to see which question accounts for the gap between PG and repeated exact proximal solves.

至少在某些情况下,即使用的都是 on-policy 数据,Proximal KL 也可能获得比普通 policy gradient(PG) 更好的结果。下面用一个理想化例子比较两种优化过程的奖励极限,说明这种可能性。

模型回答不同题目时,用的是同一套权重。这就是这里所说的“共享参数”:为了答好一道题而调整权重,也可能改变另一道题的回答。下面用两道题的例子单独考察这个影响。

考虑两个等概率出现的 prompt,每个只需选择一个二元动作,奖励为 $R=a$。我们用一个小型 logistic 模型,将同一个参数向量映射为每道题的成功概率。它能够解出两题,但初始成功率为 $(p_1,p_2)=(1/2,p_{\mathrm{init}})$,其中 $0<p_{\mathrm{init}}\le1/64$。第一题在初始化时明显更容易。这个例子使用精确的 on-policy 期望,在这个条件下分析两道题的更新如何相互影响。

具体构造为 $p_m=\sigma(u_m^\top\theta)$,其中 $\sigma$ 是把实数分数映射为概率的 logistic 函数。这个分数称为 logit;对于概率为 $p$ 的二元选择,它等于 log-odds,即 $\log[p/(1-p)]$。特征向量描述同一套权重如何影响两道题:

\[u_1=\frac15(1,1)^\top,\qquad u_2=\frac15(1,-4)^\top,\qquad \theta_0=(-\Delta,\Delta)^\top.\]

这里 Δ 是两题初始成功概率之间的正 log-odds 差距。沿着 $\theta=(c,0)^\top$ 令 $c\to\infty$,两题成功率都能趋于一,因此这套参数化能够表示同时解出两题的策略。

对于这组共享特征,用连续时间欧氏梯度流表示的普通 PG 直接优化平均奖励 $J=(p_1+p_2)/2$,却会在改善较容易题目的同时压低较难题目的成功率。这里的梯度流,可以理解为一直沿精确奖励梯度做无穷小的更新。最终 $(p_1,p_2)\to(1,0)$,而且 $J$ 始终不超过 $1/2$。较难题目的正确回答越少,它对奖励梯度的贡献就越弱。模型本来有能力解出两题,但这条优化路径越来越偏向其中一题。

关键机制是两道题的梯度发生冲突:$u_1^\top u_2<0$,因此较容易题目的进步可能压低较难题目的成功率。附录 D.1 证明了这种反馈会持续,并给出上述极限。

这个两题例子中,失败发生在直接沿奖励梯度优化的路径上。加入相对 reference 的惩罚,能否让优化走上同时改善两题的路径?Proximal 更新在最大化奖励的同时,惩罚相对上一轮策略的 KL 变化,再把求出的策略作为下一轮 reference。这里假设每轮都精确求解,下一小节会写出完整目标。在同一个模型类、同一个初始化下,反复精确求解 KL-proximal 目标得到

\[(p_{K,1},p_{K,2}) =\left(\sigma(K/\beta),\sigma(-\Delta+K/\beta)\right) \longrightarrow\class{pkl-math-focus}{(1,1)}, \qquad \Delta=\log\frac{1-p_{\mathrm{init}}}{p_{\mathrm{init}}}.\]

这里 $K$ 是已完成的 proximal 轮数,$\beta>0$ 是固定的 KL 惩罚强度。每轮把两题的成功 log-odds 都增加 $1/\beta$,然后刷新 reference。两题最终都能以接近一的概率答对,因此平均奖励趋于 1,而 PG 的极限为 1/2。Proximal KL 改变了优化路径:相对 reference 的进步会产生代价,降低较容易题目在本轮更新中的主导程度;刷新 reference 后,两题又可以继续改善。

还需要确认,原来的模型能否同时实现两题的改善。参数增量 $(5,0)^\top/\beta$ 能同时实现两题精确 proximal 更新所需的 logit 增量 $1/\beta$。每一轮的 proximal target 都能在同一个共享模型中表达。

KL 也可能改善 on-policy 优化。 这个例子中,PG 的平均奖励趋于 1/2,Proximal KL 则趋于 1。

完整构造与证明见论文附录 D.1,“Illustration of proximal feedback with shared parameters”。

这些更新会怎样改变答题成功率?点击播放,观察从同一起点出发的 1000 次迭代,也可以拖动步数滑块。先比较平均奖励,再切换到较难或较容易题目的成功率,观察 PG 与反复精确求解 proximal 目标之间的差距来自哪道题。

This is a deterministic simulation of the two-prompt model. One PG step uses the exact reward gradient with step size $\eta=1$; one proximal round uses the analytic maximizer and refreshes the reference. These operations have different computational costs, so the counter compares optimization paths, not training speed.

Simulation update rules

PG numerically approximates the gradient flow with

\[\theta_{t+1}=\theta_t+\frac{\eta}{2}\sum_{m=1}^2 u_m p_m(1-p_m).\]

An exact proximal round increases both logits by $1/\beta$, realized here by

\[\theta_{k+1}=\theta_k+(5/\beta,0)^\top.\]

The plot reports unregularized mean reward $J=(p_1+p_2)/2$ or either prompt’s success probability after each iteration. The proximal objective changes whenever its reference is refreshed.

We next define the proximal objective and explain how its feedback changes the update.

这是两题模型的确定性模拟。PG 每步使用精确奖励梯度,步长为 $\eta=1$;proximal 每轮使用解析最优解,然后刷新 reference。两种操作的计算成本不同,因此步数用于展示优化路径,不用于比较训练速度。

模拟使用的更新公式

PG 用下面的离散更新近似梯度流:

\[\theta_{t+1}=\theta_t+\frac{\eta}{2}\sum_{m=1}^2 u_m p_m(1-p_m).\]

精确 proximal 更新将两题的 logit 都增加 $1/\beta$,对应参数更新

\[\theta_{k+1}=\theta_k+(5/\beta,0)^\top.\]

图中展示每次迭代后不含正则项的平均奖励 $J=(p_1+p_2)/2$,或其中一道题的成功率。Proximal objective 随 reference 刷新而改变。

接下来,我们定义 proximal objective,解释它的反馈如何改变更新。

Proximal objective

The two-prompt example in the preceding subsection repeatedly solves a reference-dependent objective. To specify what one such round optimizes, we distinguish the learner $\pi_\theta$, which changes within the round, from the reference $\pi_k$, which remains fixed. The reference is the policy from which this round begins. It defines the distribution against which we measure the cost of changing the model’s answers, even when every training response comes from the current learner.

We seek policy improvement while controlling how far the policy moves. This motivation also underlies Schulman et al.’s TRPO, which constrains KL, and PPO, which studies clipped and KL-penalized surrogate objectives. A surrogate is an auxiliary objective constructed to produce a policy update. Clipping replaces a value outside a chosen interval by its nearest bound within that objective. Here we put a learner-to-reference KL penalty on the complete response distribution.

The prompt $x$ comes from the training distribution $\mathcal D$, the response $\tau$ is a complete token sequence, and $R$ scores that response. Our objective is

\[J_k(\theta) =\mathbb E_{x\sim\mathcal D,\,\tau\sim\pi_\theta}[R(x,\tau)] \class{pkl-math-focus}{-\beta\,\mathbb E_{x\sim\mathcal D} D_{\mathrm{KL}}\!\left(\pi_\theta(\cdot\mid x)\,\Vert\,\pi_k(\cdot\mid x)\right)}.\]

The reward term favors correct answers; the reverse KL penalty controls movement away from the reference. Holding that reference fixed within a round makes the target well-defined. Refreshing it between rounds allows cumulative improvement far beyond the initial model.

Which response distribution would maximize this objective? Solving over unrestricted response distributions identifies the policy that an exact proximal round aims to reach:

\[\pi_k^*(\tau\mid x) =\frac{\pi_k(\tau\mid x)\exp(R(x,\tau)/\beta)}{Z_k(x)}, \qquad Z_k(x)=\mathbb E_{\tau\sim\pi_k(\cdot\mid x)}[e^{R(x,\tau)/\beta}].\]

For binary rewards, multiply each correct response’s reference probability by $e^{1/\beta}$, then renormalize so the probabilities sum to one. Larger $\beta$ gives a more conservative round; smaller $\beta$ amplifies correct answers more strongly. This exponentially reweighted distribution, called a Gibbs distribution, is the proximal target used below.

This solution identifies the optimization target for a round. To see how KL changes the update, return to the two-prompt example. Write the learner’s success logit as $z_m=\log[p_m/(1-p_m)]$ and the reference logit as $z_{k,m}$. The proximal objective’s gradient is

\[\nabla J_k(\theta)=\frac12\sum_{m=1}^{2} u_m p_m(1-p_m)\left[1\class{pkl-math-focus}{-\beta(z_m-z_{k,m})}\right].\]

The vectors $u_m$ describe how a parameter change affects each prompt. When their inner product is negative, improving one can hurt the other. As a prompt’s success logit increases above its reference value, the bracket reduces its reward-driven contribution; that contribution reaches zero at a logit gain of $1/\beta$. After the reference is refreshed, another round can improve both prompts further. The KL term therefore supplies an improvement target that moves with each reference refresh.

Each response in the example contains a single action. A language model generates many dependent tokens, so applying the same response-level objective raises a credit-assignment question: which costs should influence each token’s update? Using only the current token’s KL omits future-cost contributions and generally gives a biased estimate of this objective’s gradient. We now trace where those contributions come from.

上一小节的两题例子反复求解一个依赖 reference 的目标。为了明确每一轮究竟优化什么,我们先区分持续变化的 learner $\pi_\theta$ 与本轮保持固定的 reference $\pi_k$。reference 是这一轮开始时的策略,用来衡量模型的回答分布改变了多少。即使训练回答都由当前 learner 生成,我们仍然可以相对这份固定 reference 计算变化的代价。

我们希望提高策略的期望奖励,同时控制策略改变的幅度。Schulman 等人的 TRPO 通过 KL constraint 控制更新,PPO 则研究了 clipping 和 KL penalty 的 surrogate objective。Surrogate 是为了产生 policy update 而构造的辅助目标;clipping 将超出指定区间的数值替换为最近的边界值。这里,我们对完整 response 分布加入从 learner 到 reference 的 KL penalty。

Prompt $x$ 来自训练分布 $\mathcal D$,response $\tau$ 表示一整段 token 序列,$R$ 为整段回答评分。我们的目标为

\[J_k(\theta) =\mathbb E_{x\sim\mathcal D,\,\tau\sim\pi_\theta}[R(x,\tau)] \class{pkl-math-focus}{-\beta\,\mathbb E_{x\sim\mathcal D} D_{\mathrm{KL}}\!\left(\pi_\theta(\cdot\mid x)\,\Vert\,\pi_k(\cdot\mid x)\right)}.\]

第一项鼓励正确回答,第二项约束这一轮离 reference 多远。这里用的是从 learner 到 reference 的 reverse KL penalty。reference 在一轮内保持固定,下一轮可以刷新,所以模型能通过多轮改善逐渐远离初始模型。

什么样的回答分布能使这个目标最大?允许在所有回答分布中优化,就能确定一轮精确 proximal 更新希望到达的策略:

\[\pi_k^*(\tau\mid x) =\frac{\pi_k(\tau\mid x)\exp(R(x,\tau)/\beta)}{Z_k(x)}, \qquad Z_k(x)=\mathbb E_{\tau\sim\pi_k(\cdot\mid x)}[e^{R(x,\tau)/\beta}].\]

对于 0/1 奖励,可以把它理解为:先将 reference 中每条正确回答的概率乘上 $e^{1/\beta}$,再归一化,使所有回答的概率之和为一。$\beta$ 大,这一轮改得更保守;$\beta$ 小,正确回答获得的相对放大更强。这种按奖励指数重加权的分布称为 Gibbs distribution,就是接下来反复提到的 proximal target。

这个解确定了一轮更新的目标位置。要看 KL 如何改变更新,可以回到两题的例子:记 learner 的成功 logit 为 $z_m=\log[p_m/(1-p_m)]$,reference 的 logit 为 $z_{k,m}$。Proximal 目标的梯度是

\[\nabla J_k(\theta)=\frac12\sum_{m=1}^{2} u_m p_m(1-p_m)\left[1\class{pkl-math-focus}{-\beta(z_m-z_{k,m})}\right].\]

$u_m$ 表示参数变化对各个 prompt 的影响;两个向量的内积为负时,改善一题可能伤害另一题。当一道题的成功 logit 高于 reference 并继续增加时,方括号会降低这道题由奖励驱动的贡献;当 logit 增加 $1/\beta$ 时,该贡献降为零。刷新 reference 后,下一轮又可以继续改善两题。因此,KL 提供的改善目标随每轮 reference 刷新而移动。

例子中的每个回答只有一个动作,语言模型的回答却包含许多相互依赖的 token。将同一个 response-level objective 用于完整回答,就需要明确:哪些代价应当影响每个 token 的更新?只使用当前 token 的 KL 会遗漏 future cost 的贡献,使该目标的梯度估计一般产生 bias。下面具体解释这些贡献从哪里来。

Future-KL credit assignment

Why should an early token account for KL costs that occur later? Increasing its probability also makes the continuations beginning with it more likely. A continuation is the remaining sequence generated after the current choice. For example, choosing a different first step in a solution changes which later reasoning steps the model generates. Those continuations can differ in how far they move from the reference. The objective charges for the whole response, so the update for that early choice must account for its effect on later costs as well as its immediate cost.

Credit assignment means deciding which rewards and costs should influence each token’s update. Schulman et al.’s stochastic computation graphs, diagrams of dependencies among random choices and computed quantities, formalize this downstream-cost principle. Here it gives Future-KL: the sum of sampled KL log-ratio costs from the current token through the end. The computation reuses the completed response; during generation, each token is conditioned on the existing prefix, the prompt and tokens already generated.

The formula animation follows token 2 in a three-token response: remove the past term’s zero expected contribution, then retain the current and future costs.

为什么较早的 token 要考虑后面才发生的 KL 代价?提高它的生成概率,也会让以它开头的后续回答更容易出现。当前位置之后生成的剩余 token 序列称为 continuation。例如,解题时选择不同的第一步,会改变后面生成的推理路径,而不同路径偏离 reference 的程度也可能不同。我们的目标计算整段回答的 KL,因此更新这个早期选择时,需要同时考虑它对后续代价的影响,而不能只看当前位置。

Credit assignment 指的是:哪些奖励与代价应当影响每个 token 的更新。Schulman 等人的 stochastic computation graphs 用图描述随机选择与计算量之间的依赖,将这种 downstream-cost 原则形式化。这里得到的 Future-KL,就是从当前 token 到回答结束的 sampled KL log-ratio cost 之和。计算时复用已经生成完的回答;生成期间,每个 token 仍以已有 prefix 为条件,也就是 prompt 与已经生成的 token。

公式动画以三 token 回答中的 token 2 为例:去掉过去项为零的期望贡献,留下当前位置和未来的 KL cost。

To express this dependence in the gradient, we need a token’s cost and its sensitivity to the model parameters. Write $h_i=(x,a_{<i})$ for the prompt and all tokens before the current position. The log-ratio compares the learner’s and reference’s probabilities for the sampled token; the score vector describes how its log-probability changes with the model parameters:

\[\ell_i=\log\frac{\pi_\theta(a_i\mid h_i)}{\pi_k(a_i\mid h_i)}, \qquad \psi_i=\nabla_\theta\log\pi_\theta(a_i\mid h_i).\]

A sampled log-ratio can be positive or negative; at a fixed prefix $h_i$, its expectation over the learner’s next-token distribution gives a conditional KL divergence. Adding the token log-ratios gives the log-ratio for the complete response. Here responses come from the current learner, with a fixed reference and verifier reward, supplied by an answer-correctness checker. The paper gives the regularity assumptions for the derivation. Applying the score-function gradient identity to KL optimization gives

\[\nabla J_k =\mathbb E\left[ \left(R-\beta\sum_{j=1}^{T}\ell_j\right) \sum_{i=1}^{T}\psi_i\right].\]

This expression initially pairs every token’s score with the cost of the entire response. The optional recap below explains the differentiation step. Our next task is to determine which score–cost pairs contribute to the expected update.

Recap: differentiating the response-level KL objective

Autoregressive factorization expresses a response probability as the product of its conditional token probabilities. Taking its logarithm and differentiating turns this product into a sum of token scores:

\[\pi_\theta(\tau\mid x)=\prod_{i=1}^{T}\pi_\theta(a_i\mid h_i), \qquad \nabla_\theta\log\pi_\theta(\tau\mid x)=\sum_{i=1}^{T}\psi_i.\]

Write $J_k=\mathbb E_{\pi_\theta}[R-\beta\sum_j\ell_j]$. Differentiating the sampling probabilities gives the reward-minus-cost times the response score shown in the main text. Differentiating the learner inside the log-ratios adds $-\beta\mathbb E\sum_j\psi_j$. This second contribution has zero expectation by the zero-mean score identity established in the main discussion of past costs.

The remaining gradient therefore comes from how changing the learner changes the probability of sampling each response.

Past costs contribute zero in expectation. Condition on a prefix $h_i$ and imagine sampling its next token repeatedly. The prefix fixes everything that has already happened. Increasing some next-token probabilities must decrease others, since the probabilities still sum to one. This normalization gives a zero-mean score:

\[\mathbb E[\psi_i\mid h_i] =\sum_a\pi_\theta(a\mid h_i)\nabla_\theta\log\pi_\theta(a\mid h_i) =\nabla_\theta\sum_a\pi_\theta(a\mid h_i)=0.\]

For a past position $j<i$, the prefix contains both $h_j$ and $a_j$, so $\ell_j$ has the same value for every possible next token. Multiplying every score by this same value preserves their cancellation:

\[\mathbb E[\ell_j\psi_i\mid h_i] =\ell_j\class{pkl-math-focus}{\mathbb E[\psi_i\mid h_i]}=0, \qquad j<i.\]

This equality concerns an average over possible current actions. On an individual response, both the past cost and the score can be nonzero. The cost can also depend on the learner parameters; the direct derivative of that dependence was already included in the differentiation step. Removing the past cost from the score’s coefficient preserves the expected gradient.

Current and future costs depend on the action being updated. The current cost $\ell_i$ uses the probability of the token actually chosen. At a future position $j>i$, that choice is part of the prefix and can change the entire continuation distribution. Different next tokens can therefore lead to different expected later costs. Denote the expected cost after choosing token $a$ by $m_j(a)=\mathbb E[\ell_j\mid h_i,a_i=a]$. First average over continuations after each choice, then average over the choices themselves:

\[\mathbb E[\ell_j\psi_i\mid h_i] =\sum_a\pi_\theta(a\mid h_i)m_j(a) \nabla_\theta\log\pi_\theta(a\mid h_i).\]

The scores still have zero mean, but they are now weighted by potentially different costs. For example, a first reasoning step can lead mostly to continuations that stay close to the reference, while another leads to larger KL costs. Changing the probabilities of those first steps changes the expected later cost. The weighted sum is generally nonzero, so it belongs in the objective’s gradient. A future term can vanish in a special case, such as equal conditional costs for all choices; there is no general cancellation that lets us omit it.

A binary example of score–cost cancellation

A binary choice makes the difference explicit. Suppose the current action is $a_i\in\lbrace 0,1\rbrace$ with probability $p=\sigma(\alpha)$ of choosing 1, where $\alpha$ is its logit. The score with respect to that logit is $a_i-p$. Write $c_0$ and $c_1$ for the expected future costs after the two choices. Then this score-times-cost term is

\[\begin{aligned} \mathbb E[\ell_j(a_i-p)\mid h_i] &=(1-p)c_0(-p)+pc_1(1-p)\\ &=p(1-p)\class{pkl-math-focus}{(c_1-c_0)}. \end{aligned}\]

If both choices receive the same cost, their contributions cancel. Holding $c_0$ and $c_1$ fixed isolates the effect of changing the current choice: if choosing 1 has a higher expected future cost, raising its logit increases the expected cost. The KL penalty enters the objective with a negative sign, so this particular score–cost contribution pushes the logit downward. Shared parameters can also change the continuation costs themselves; those effects enter through the other terms of the full gradient. This calculation isolates why a zero-mean score alone does not eliminate action-dependent costs.

These two cases identify the costs for each score: remove positions before the current token and retain its complete suffix, as in the formula animation above. We may also subtract a history-only baseline, a comparison value $b(h_i)$ shared by all possible actions at the same prefix. Like a past cost, it multiplies every action’s score by the same value, so $b(h_i)\mathbb E[\psi_i\mid h_i]=0$. Holding this baseline fixed during differentiation gives the exact identity

\[\nabla_\theta J_k(\theta) =\mathbb E_{\pi_\theta}\sum_{i=1}^{T} \psi_i\left[R-b(h_i)\class{pkl-math-focus}{-\beta\sum_{j=i}^{T}\ell_j}\right].\]

The bracket is the full Future-KL advantage: reward relative to the baseline, minus the sampled KL costs attributable to the current choice. The first token receives the entire response’s cost; the last receives only its own. Keeping only $\ell_i$ drops the current action’s effect on the later distribution. The omitted terms generally have nonzero expected contributions, so the resulting gradient estimator is biased even with on-policy data. Increasing the batch size does not remove this omission bias.

This subsection establishes the gradient when responses are sampled from the current learner. The next section considers responses sampled from older policies: how does that change in sampling distribution affect the proximal target?

要把这种依赖写进梯度,需要同时描述 token 的代价,以及它对模型参数的敏感程度。令 $h_i=(x,a_{<i})$ 表示 prompt 与当前位置之前的全部 token。log-ratio 比较 learner 与 reference 给这个已采样 token 的概率;score 向量描述它的 log-probability 如何随模型参数变化:

\[\ell_i=\log\frac{\pi_\theta(a_i\mid h_i)}{\pi_k(a_i\mid h_i)}, \qquad \psi_i=\nabla_\theta\log\pi_\theta(a_i\mid h_i).\]

单个 sampled log-ratio 可以为正,也可以为负;固定 prefix $h_i$,对 learner 的 next-token 分布取期望后,才得到 conditional KL divergence。把 token log-ratio 相加,就得到完整回答的 log-ratio。这里的回答由当前 learner 采样,reference 与 verifier reward 固定;verifier 是检查答案正确性的程序。求导所需的一般正则性条件见论文。将 score-function gradient identity 用于 KL optimization,得到

\[\nabla J_k =\mathbb E\left[ \left(R-\beta\sum_{j=1}^{T}\ell_j\right) \sum_{i=1}^{T}\psi_i\right].\]

这个式子先把每个 token 的 score 与整条回答的代价配对。下面的折叠框简要回顾求导步骤;接下来正文要解决的是:哪些“score 乘代价”的配对真正影响期望更新?

简要回顾:对 response-level KL objective 求导

Autoregressive factorization 将整段回答的概率写成各位置条件概率的乘积。取对数再求导,就把这个乘积变成 token score 的和:

\[\pi_\theta(\tau\mid x)=\prod_{i=1}^{T}\pi_\theta(a_i\mid h_i), \qquad \nabla_\theta\log\pi_\theta(\tau\mid x)=\sum_{i=1}^{T}\psi_i.\]

把目标写成 $J_k=\mathbb E_{\pi_\theta}[R-\beta\sum_j\ell_j]$。对采样概率求导,得到正文中“奖励减代价”乘上整条回答 score 的项。对 log-ratio 里面的 learner 求导,还会产生 $-\beta\mathbb E\sum_j\psi_j$。正文讨论过去代价时会证明 score 的条件均值为零,因此第二项的期望也为零。

因此,剩余的梯度来自 learner 改变后,各条回答被采样到的概率如何变化。

过去代价的贡献在期望中为零。 给定 prefix $h_i$,设想反复采样它的下一个 token。已经发生的事情由 prefix 固定;下一个 token 的某些概率增加时,其他概率必须减少,因为总和仍然为一。这使 score 的条件均值为零:

\[\mathbb E[\psi_i\mid h_i] =\sum_a\pi_\theta(a\mid h_i)\nabla_\theta\log\pi_\theta(a\mid h_i) =\nabla_\theta\sum_a\pi_\theta(a\mid h_i)=0.\]

对于过去的位置 $j<i$,prefix 包含 $h_j$ 和 $a_j$,所以无论下一个 token 选什么,$\ell_j$ 都是同一个值。给所有 score 乘上这个相同的值,仍然保持抵消:

\[\mathbb E[\ell_j\psi_i\mid h_i] =\ell_j\class{pkl-math-focus}{\mathbb E[\psi_i\mid h_i]}=0, \qquad j<i.\]

这个等式描述的是对所有可能的当前动作求平均。在单条回答中,过去代价和 score 都可以不为零。代价也仍然可以依赖 learner 参数;这种依赖的直接导数已在求导步骤中计入。从 score 的系数中去掉过去代价,保持的是期望梯度不变。

当前和未来代价依赖正在更新的动作。 当前代价 $\ell_i$ 使用的就是实际选中 token 的概率。对于未来位置 $j>i$,这个选择已经进入 prefix,可能改变后续生成的整个分布。因此,不同的当前 token 可能对应不同的未来代价期望。记选择 token $a$ 后的未来代价期望为 $m_j(a)=\mathbb E[\ell_j\mid h_i,a_i=a]$。先对每种选择之后的 continuation 求平均,再对当前选择求平均:

\[\mathbb E[\ell_j\psi_i\mid h_i] =\sum_a\pi_\theta(a\mid h_i)m_j(a) \nabla_\theta\log\pi_\theta(a\mid h_i).\]

Score 的均值仍然为零,但现在不同 score 可能乘上不同的代价。例如,某个解题第一步主要通向接近 reference 的后续回答,另一个第一步却通向 KL 代价更高的回答。改变这两种第一步的概率,就会改变未来代价的期望。因此,加权后的和一般不为零,必须计入目标的梯度。在所有选择的条件代价都相同等特殊情况下,某个未来项也可以抵消;但不存在普遍成立的抵消关系,允许我们直接删去未来项。

二元例子:score 乘代价时如何抵消

用一个二选一的例子就能看清区别。设当前动作 $a_i\in\lbrace 0,1\rbrace$,选择 1 的概率为 $p=\sigma(\alpha)$,其中 $\alpha$ 是这个二元分布的 logit。对该 logit 求导得到的 score 是 $a_i-p$。用 $c_0$、$c_1$ 分别表示两种选择之后的未来代价期望,那么这一项为

\[\begin{aligned} \mathbb E[\ell_j(a_i-p)\mid h_i] &=(1-p)c_0(-p)+pc_1(1-p)\\ &=p(1-p)\class{pkl-math-focus}{(c_1-c_0)}. \end{aligned}\]

如果两种选择对应相同的代价,两项就会抵消。固定 $c_0$ 和 $c_1$,可以单独考察改变当前选择概率的影响:若选择 1 的未来代价期望更高,提高它的 logit 就会增加期望代价。KL 代价以负号进入目标,所以这一个“score 乘代价”的贡献会压低该 logit。共享参数还可能改变 continuation 本身的代价,这些影响通过完整梯度中的其他项计入。这里单独说明的是:score 的均值为零,本身不足以消去依赖动作的代价。

两种情况确定了每个 score 应接收的代价:删去当前位置之前的项,保留从当前 token 到回答结束的完整后缀,正如上面的公式动画所示。我们还可以减去 history-only baseline:它是同一 prefix 下所有可能动作共享的比较值 $b(h_i)$。与过去代价一样,它给所有动作的 score 乘上同一个值,所以 $b(h_i)\mathbb E[\psi_i\mid h_i]=0$。在求导时固定这个 baseline,就得到精确恒等式

\[\nabla_\theta J_k(\theta) =\mathbb E_{\pi_\theta}\sum_{i=1}^{T} \psi_i\left[R-b(h_i)\class{pkl-math-focus}{-\beta\sum_{j=i}^{T}\ell_j}\right].\]

括号中就是 full Future-KL advantage:奖励相对 baseline 的差值,再减去当前选择需要承担的 sampled KL cost。第一个 token 接收整条回答的代价,最后一个 token 只接收自己的代价。如果把所有 $j>i$ 的项都删掉,仅留下 $\ell_i$,就会遗漏当前动作影响后续分布的贡献。这些项的期望一般不为零,因此即使用 on-policy 数据,得到的梯度估计也一般有偏。增加 batch size 无法消除这种遗漏造成的 bias。

本小节得到的是回答由当前 learner 采样时的梯度。下一节将考虑旧策略生成的回答:采样分布改变后,会怎样影响 proximal target?

Stationary target

Using old responses creates a familiar trade-off. Full-response importance correction can recover the on-policy gradient, but its product of token probability ratios can have very high variance on long responses, a problem established in prior work on the curse of horizon. Token-wise ratios are consequently a common practical choice, including in the asynchronous PPO update used by AReaL. They avoid that full product, but leave the gradient generally biased. We view this gap as a potential source of performance loss: a biased update can alter where learning stops. This motivates a precise question for Proximal KL: can full Future-KL preserve the proximal optimizer as the unique stationary policy when we correct only the current token? We first define that update, then answer the question through pathwise cancellation and backward induction.

The derivation in the preceding section assumes responses sampled from the current learner. In asynchronous training, actors, the workers running response generation, operate while the learner updates and receive new weights periodically. By the time a response is used, the learner may already have changed. We call the policy that generated it the behavior policy $\pi_{\mathrm{behav}}$. Its difference from the learner makes the update off-policy.

Staleness measures the gap between the learner’s current recorded policy version and the version used to generate a response. A gap of four means weights four recorded versions behind the learner. Elapsed time and changes in response probabilities are separate measurements. In our controlled-staleness experiments, one version can contain several optimizer minibatch updates, each using a smaller portion of a collected batch. A configured cap need not equal the realized gap, so we inspect the recorded gaps.

Behavior and proximal reference serve different purposes: behavior records where data came from, while reference defines the cost in the objective. Actor synchronization and reference refresh are therefore separate decisions. Even staleness zero at the start of a batch does not make repeated updates on that batch on-policy, because the learner changes after the first update. Strict on-policy sampling uses current-policy responses for one update; its proximal reference can still remain fixed across several such batches.

Here a fixed point means a policy with zero expected update; we also call it a stationary policy. Individual sampled minibatches can still produce changes. This section identifies that policy and proves its uniqueness through Q-functions and pathwise cancellation. The following section studies whether updates approach it.

使用旧策略的回答,会遇到一个已有大量研究的权衡。完整 response 的 importance correction 可以恢复 on-policy gradient,但需要将所有 token 的概率比相乘,长回答上的方差可能很大,关于 curse of horizon 的工作已经揭示了这个问题。因此,实践中常采用 token-wise correction,AReaL 的 asynchronous PPO 更新也使用这种逐 token 的概率比。它避开了完整乘积,得到的梯度却一般有 bias。我们认为,这个理论缺口可能影响性能:有偏更新可能改变训练最终停留的位置。这为 Proximal KL 提出了一个明确的问题:只校正当前 token 时,full Future-KL 能否让 proximal optimizer 仍然成为唯一的 stationary policy?下面先定义这份更新,再通过 pathwise cancellation 与 backward induction 回答这个问题。

上一节的推导假设回答由当前 learner 采样。在 asynchronous 训练中,负责生成回答的工作进程称为 actor;它生成回答的同时,learner 更新模型,actor 再定期接收新权重。当一条回答被用于训练时,learner 可能已经变化。我们把实际生成这条回答的策略称为 behavior policy $\pi_{\mathrm{behav}}$。它与 learner 不同,更新就变成了 off-policy。

Staleness 表示 learner 当前记录版本与生成回答时所用版本之间的差距。相差四个版本,指使用的权重比当前 learner 早四个记录版本。经过的时间和回答概率的变化幅度需要分别测量。在我们的 controlled-staleness 实验中,一个版本可以包含多次 optimizer minibatch 更新,每次只使用已收集 batch 中的一小部分。配置上限也不一定等于实际版本差,因此我们会检查日志中的实际值。

Behavior 与 proximal reference 的作用不同:behavior 记录数据从哪里来,reference 决定目标中相对哪个分布计算代价。因此,actor 同步与 reference 刷新是两个独立的选择。即使一批数据开始处理时 staleness 为零,第一次更新后,继续使用这些回答更新也会产生 off-policy mismatch。严格的 on-policy 采样则要求每批回答来自当前策略,并只用于一次更新;它的 proximal reference 仍然可以跨多个这样的 batch 保持固定。

这里 fixed point 指期望更新为零的策略,也称 stationary policy;实际采样的单个 minibatch 仍可能产生变化。本节确定这个策略,并通过 Q-function 与 pathwise cancellation 证明其唯一性。下一节再分析更新能否接近它。

Token-wise importance correction

When behavior generates the data, some responses occur more often, and others less often, than they would under the learner. Importance sampling (IS) compensates by weighting a sampled outcome by its learner probability divided by its behavior probability. For a complete response, exact correction would use

\[W(\tau)=\frac{\pi_\theta(\tau\mid x)}{\pi_{\mathrm{behav}}(\tau\mid x)} =\class{pkl-math-focus}{\prod_{i=1}^{T}w_i}, \qquad w_i=\frac{\pi_\theta(a_i\mid h_i)}{\pi_{\mathrm{behav}}(a_i\mid h_i)}.\]

With the same prompt distribution and behavior support covering the learner’s responses, weighting the on-policy score estimator by this product restores its exact expectation. Support means the responses assigned positive probability; coverage here requires every learner-possible response to remain possible under behavior. Its weight variance can grow with response length, depending on the mismatch between the two policies. Consider independent binary tokens, with behavior probability $1/2$ and learner probability $1/2+\delta$ at every position, where $0<\lvert\delta\rvert<1/2$. Then

\[\operatorname{Var}_{\pi_{\mathrm{behav}}}[W] =(1+4\delta^2)^{\class{pkl-math-focus}{T}}-1.\]

A small discrepancy at each position can accumulate into rapidly growing importance-weight variance. The later finite-sample theorem controls this accumulation through uniform token-ratio bounds together with a small aggregate mismatch budget. Under those joint conditions, full-response weights also have bounded variance.

We instead weight each token’s update by its current-token ratio $w_i$, retaining the full, unmodified Future-KL sum. Prefixes and continuations still come from behavior, so the resulting expected update is generally biased relative to $\nabla J_k$. We call the mapping from learner parameters to this mean update vector an update field. Exact correction no longer identifies its stationary policies for us; we must determine them from this field itself.

The theoretical comparison concerns the full probability-ratio product and the current-token ratio. An ablation changes one ingredient to test its effect; its controls are the comparison configurations. In the importance-correction ablation, the sequence-level control uses the product’s geometric mean, its $T$-th root for a response of length $T$, and the IS-free control sets the weight to one. Those controls therefore use different weights from both estimators considered here.

To state the update precisely, separate the current token’s KL cost from the costs incurred after choosing it. The sampled future-only return and the complete update coefficient are

\[\widehat Q_i^{\pi_\theta} =R\class{pkl-math-focus}{-\beta\sum_{j=i+1}^{T}\ell_j}, \qquad \widehat A_i^{\mathrm{KL}} =\widehat Q_i^{\pi_\theta}\class{pkl-math-focus}{-\beta\ell_i}-b(h_i).\]

The hat marks a quantity computed from one sampled response. The superscript identifies the learner used in the KL costs; the response can still come from behavior. The sum in $\widehat Q_i^{\pi_\theta}$ starts after the current action, while $\widehat A_i^{\mathrm{KL}}$ includes the current cost as well. Separating these costs will let us determine whether behavior-generated continuations can change the stationary policy. Averaging the importance-weighted score times this coefficient defines the population update field:

\[M_{\mathrm{behav}}(\theta) =\mathbb E_{\pi_{\mathrm{behav}}} \sum_i \class{pkl-math-focus}{w_i}\psi_i \widehat A_i^{\mathrm{KL}}.\]

The essential choices are a fixed reference, positive KL strength, full unmodified Future-KL, and a detached history-only baseline. Detached means held fixed when differentiating the update. General assumptions about support, model expressiveness and sampling are specified in Appendix E.2. Here model expressiveness concerns which policies the parameterization can represent and adjust; the population update means the exact expectation of the sampled update.

Responses may come from different older versions within a batch; each retains its actual sampling probabilities. We must show both that the proximal target has zero expected update and that every zero-update policy equals that target. The next subsection proves the first statement by pathwise cancellation and the second by backward induction.

换成 behavior policy 生成数据后,一些回答出现得比 learner 下更频繁,另一些则更少。Importance sampling(IS)用 learner 概率除以 behavior 概率来给样本加权,补偿这种采样频率差异。对完整 response,精确的校正需要

\[W(\tau)=\frac{\pi_\theta(\tau\mid x)}{\pi_{\mathrm{behav}}(\tau\mid x)} =\class{pkl-math-focus}{\prod_{i=1}^{T}w_i}, \qquad w_i=\frac{\pi_\theta(a_i\mid h_i)}{\pi_{\mathrm{behav}}(a_i\mid h_i)}.\]

在 prompt 分布相同、behavior 的 support 覆盖 learner 可能生成的回答时,用这个乘积加权 on-policy score estimator,可以恢复其精确期望。Support 指被赋予正概率的回答集合;这里的 coverage 要求 learner 可能生成的回答在 behavior 下也有正概率。它的权重方差可能随 response 长度增长,具体取决于两个策略之间的 mismatch。考虑独立的二元 token:behavior 每个 token 的概率为 $1/2$,learner 为 $1/2+\delta$,其中 $0<\lvert\delta\rvert<1/2$,那么

\[\operatorname{Var}_{\pi_{\mathrm{behav}}}[W] =(1+4\delta^2)^{\class{pkl-math-focus}{T}}-1.\]

每个位置只差一点,乘很多次也可能让 importance weight 的方差随长度急剧增长。后面的有限样本定理同时要求统一的 token-ratio 上下界与较小的 aggregate mismatch bound,以控制这种累积。在这些共同条件下,完整 response 权重的方差也有界。

我们改用当前 token 的 $w_i$ 加权该位置的更新,并保留完整、未改动的 Future-KL sum。Prefix 和 continuation 仍来自 behavior,因此得到的期望更新相对 $\nabla J_k$ 一般有偏。把每组 learner 参数对应到它的平均更新向量,这个映射称为 update field。此时,精确校正的性质已无法直接确定它的 stationary policy,需要从这份 update field 本身进行分析。

理论比较的是完整概率比乘积与当前 token 的概率比。Ablation 通过改变一个组成部分来检验其作用,control 指用于对照的配置。Importance correction 消融中的 sequence-level control 使用完整乘积的 geometric mean,也就是对长度为 $T$ 的回答取乘积的 $T$ 次方根;IS-free control 则把权重设为一。这两种控制使用的权重,与这里分析的两种估计量都不同。

为了准确写出更新,先把当前 token 的 KL cost 与选择它之后的代价分开。单条回答上的 future-only return 和完整更新系数分别是

\[\widehat Q_i^{\pi_\theta} =R\class{pkl-math-focus}{-\beta\sum_{j=i+1}^{T}\ell_j}, \qquad \widehat A_i^{\mathrm{KL}} =\widehat Q_i^{\pi_\theta}\class{pkl-math-focus}{-\beta\ell_i}-b(h_i).\]

帽子表示这个量由一条采样回答算出;上标表示 KL cost 中使用的 learner,回答本身仍可以来自 behavior。$\widehat Q_i^{\pi_\theta}$ 只累计当前动作之后的代价,$\widehat A_i^{\mathrm{KL}}$ 再补上当前 token 的 cost。分开这两部分,是为了判断 behavior 生成的 continuation 是否会改变 stationary policy。对 importance-weighted score 与这个系数的乘积取平均,就得到 population update field:

\[M_{\mathrm{behav}}(\theta) =\mathbb E_{\pi_{\mathrm{behav}}} \sum_i \class{pkl-math-focus}{w_i}\psi_i \widehat A_i^{\mathrm{KL}}.\]

这里的关键选择是:固定 reference、正的 KL 强度、完整且未改动的 Future-KL,以及 detached history-only baseline。Detached 表示求导时将这个量固定。Support、模型表达能力与采样的一般假设见附录 E.2;表达能力关注参数化能表示并调整哪些策略。Population update 表示对采样更新取精确期望。

一个 batch 可以包含不同旧版本生成的回答,每条回答都保留实际使用的采样概率。我们需要分别证明:proximal target 处的期望更新为零,以及任何零更新策略都等于这个 target。下一小节用 pathwise cancellation 证明前者,再用 backward induction 证明后者。

Pathwise cancellation

First, we show that the proximal optimizer is stationary for the token-wise update. Write $\pi_{\theta^\ast}=\pi_k^\ast$. Optimality gives $\nabla J_k(\theta^\ast)=0$, but our off-policy update follows $M_{\mathrm{behav}}$, which generally differs from that gradient. We must therefore prove $M_{\mathrm{behav}}(\theta^\ast)=0$ directly. The next subsection will show that no other policy has zero expected update.

The gap comes from the sampling distribution. Current-token correction changes the action expectation at a given history to the learner’s distribution, while later tokens still come from behavior. Even when the learner equals $\pi_k^\ast$, these old-policy continuations can assign different expected rewards to the current actions than continuations sampled from $\pi_k^\ast$. Their contribution to the update therefore needs to be checked explicitly. Full Future-KL provides the needed identity: at the target, reward minus all KL costs from the current token onward and the history-only baseline depends only on the current history. Current-token correction then makes the conditional mean of the score zero, so this coefficient produces zero expected update. The derivation below shows why that cancellation holds on every supported continuation.

先证明 proximal optimizer 是 token-wise 更新的 stationary policy。记 $\pi_{\theta^\ast}=\pi_k^\ast$。最优性给出 $\nabla J_k(\theta^\ast)=0$,但 off-policy 更新遵循的 $M_{\mathrm{behav}}$ 一般不同于这个梯度。因此,我们需要直接证明 $M_{\mathrm{behav}}(\theta^\ast)=0$。下一小节再证明其他策略的期望更新都不为零。

这个缺口来自采样分布。当前 token 的 correction 将给定 history 下的动作期望转换到 learner 分布,后续 token 却仍由 behavior 生成。即使 learner 已等于 $\pi_k^\ast$,旧策略的 continuation 对各当前动作给出的期望奖励,仍可能不同于从 $\pi_k^\ast$ 采样 continuation 时的评价。因此,必须检查这些 continuation 对更新的贡献。Full Future-KL 给出了所需的恒等式:在 target 处,reward 减去从当前位置开始的全部 KL cost 和 history-only baseline 后,只依赖当前 history。再由当前 token 的 correction 使 score 的条件均值为零,这个系数就产生零期望更新。下面的推导会说明,这种抵消为什么对每条有支持的 continuation 都成立。

To carry out this proof, a Q-function makes the role of each action explicit: it assigns a value to choosing token $a$ after history $h$. Here we need the soft Q-function of the proximal target, determined by the fixed reference, reward, and KL strength. “Soft” indicates that the value accounts for KL regularization. Write $h$ for the prompt and tokens already generated, and $ha$ for the new history after appending the next token $a$, not a product. For example, $h=(x,a_1)$ and $a=a_2$ give $ha=(x,a_1,a_2)=h_3$. Define

\[Z_k(h)=\mathbb E_{\pi_k(\cdot\mid h)}e^{R/\beta}, \qquad V_k(h)=\beta\log Z_k(h), \qquad Q_k(h,a)=V_k(ha).\]

The expectation in $Z_k(h)$ runs over complete continuations under the reference. Its logarithm, scaled by $\beta$, gives the soft history value $V_k(h)$. In this token-append model, choosing $a$ deterministically reaches $ha=h_{i+1}$ from $h=h_i$, so $Q_k(h,a)=V_k(ha)$. The expression $V_k(ha)$ still evaluates a state or history; $Q_k(h,a)$ names the value of choosing $a$ at $h$. At a completed response, $V_k=R$. These analytical quantities characterize the target; the training algorithm computes sampled returns directly and does not fit a Q-network, a network trained to predict action values.

The cancellation comes from a specific algebraic structure: at the proximal target, each token’s KL cost equals the difference between two adjacent soft values. Summing these differences causes the intermediate values to cancel. The final value equals the reward, so subtracting all costs strictly after the current action leaves the value immediately after that action, its Q-value. Subtracting the current token’s cost as well leaves the value before the action, $V_k(h_i)$. The animation expands this calculation for a three-token response before we derive the general identity below.

Follow the matching terms as they cancel: first the reward, then the intermediate value. No expectation is needed for this algebra; it holds along each supported path at the target.

为了展开这份证明,先用 Q-function 写清每个动作的作用:它衡量在 history $h$ 之后选择 token $a$ 的价值。这里需要的是 proximal target 的 soft Q-function,由固定的 reference、reward 与 KL 强度共同确定;soft 表示价值中已经计入 KL regularization。$h$ 是 prompt 与已生成 token 组成的 history,$a$ 是接下来选择的 token,$ha$ 表示将 $a$ 追加到 $h$ 后的新 history,不表示乘法。例如,$h=(x,a_1)$、$a=a_2$ 时,$ha=(x,a_1,a_2)=h_3$。定义

\[Z_k(h)=\mathbb E_{\pi_k(\cdot\mid h)}e^{R/\beta}, \qquad V_k(h)=\beta\log Z_k(h), \qquad Q_k(h,a)=V_k(ha).\]

其中 $Z_k(h)$ 对 reference 下所有可能的完整 continuation 求期望。取对数再乘 $\beta$,得到 history 的 soft value $V_k(h)$。在这个逐 token 追加的模型中,从 $h=h_i$ 选择 $a$ 后,会确定地到达 $ha=h_{i+1}$,所以 $Q_k(h,a)=V_k(ha)$。$V_k(ha)$ 仍然是在新 state 或 history 上计算 value;$Q_k(h,a)$ 则把同一个值记为在 $h$ 选择 $a$ 的 action value。回答生成完毕时,$V_k=R$。这些解析量用于刻画 target;训练算法直接计算采样 return,不需要拟合用于预测 action value 的 Q-network。

抵消来自一个具体的代数结构:在 proximal target 处,每个 token 的 KL cost 等于相邻两个 soft value 的差。将这些差累加,中间的 value 就会相互消去。终点 value 等于 reward,因此从 reward 中减去当前动作之后的全部 cost,留下的是这个动作之后的 value,也就是 Q-value;再减去当前 token 的 cost,才得到动作之前的 $V_k(h_i)$。动画先用一条三 token 回答展开这个过程,随后正文再推导一般形式。

观察相同的项如何消去:先是 reward,再是中间的 value。这个代数过程不需要取期望;在 target 处,它对每条有支持的路径分别成立。

To evaluate the KL cost at the target, first obtain its token probabilities by conditioning the response-level Gibbs distribution on a fixed prefix:

\[\pi_k^*(a\mid h)=\pi_k(a\mid h)\frac{Z_k(ha)}{Z_k(h)}.\]

The recursion $Z_k(h)=\sum_a\pi_k(a\mid h)Z_k(ha)$ normalizes the action probabilities. Taking logarithms gives the soft Q-consistency relation:

\[\beta\log\frac{\pi_k^*(a_i\mid h_i)}{\pi_k(a_i\mid h_i)} =Q_k(h_i,a_i)-V_k(h_i).\]

The current action’s KL cost is therefore its soft Q-value minus the history’s soft value. Now follow the tokens after that action. Each $Q_k(h_j,a_j)$ is the next history’s $V_k(h_{j+1})$, so intermediate values cancel and the terminal value equals $R$:

\[\beta\sum_{j=i+1}^{T} \log\frac{\pi_k^*(a_j\mid h_j)}{\pi_k(a_j\mid h_j)} =R-Q_k(h_i,a_i).\]

Substituting into the sampled return defined in the preceding subsection gives

\[\widehat Q_i^{\pi_k^*}=\class{pkl-math-focus}{Q_k(h_i,a_i)}.\]

Subtracting the current-token cost $Q_k(h_i,a_i)-V_k(h_i)$ and the history-only baseline completes the update coefficient. We can now state the resulting identity with its conditions and quantities together:

Fix reference $\pi_k$, KL strength $\beta>0$, and learner $\pi_k^\ast$. At history $h_i$, consider any continuation with positive reference probability. Let $\tau$ be the completed response and $R(\tau)$ its terminal reward. Using the complete, unclipped cost sum gives

\[\begin{aligned} \widehat A_i^{\mathrm{KL}}(\pi_k^\ast,\tau) &=R(\tau)-\beta\sum_{j=i}^{T} \log\frac{\pi_k^\ast(a_j\mid h_j)}{\pi_k(a_j\mid h_j)}-b(h_i)\\ &=\class{pkl-math-focus}{V_k(h_i)-b(h_i)}. \end{aligned}\]

Here $a_j$ is the token at position $j$, $h_j$ is its preceding history, and $T$ is the response’s final position. The sum includes the current token and every later token. $V_k(h_i)$ is the optimal KL-regularized expected return from history $h_i$ with reference $\pi_k$; $b(h_i)$ is a baseline fixed by that history.

Different continuations can have different rewards and KL costs, but their difference in this coefficient is always the same $V_k(h_i)-b(h_i)$. The equality holds for each supported response individually, including one generated by an older behavior policy. Changing which continuation is sampled cannot change this coefficient, whose common value can be nonzero. This is pathwise cancellation:

At the proximal target, reward minus full Future-KL equals the same history value on every continuation.

This cancellation gives stationarity after averaging over the current action. Condition on the current history: the token importance weight converts the action expectation from behavior to the target policy, whose score has mean zero. The coefficient is the same for every action, so its product with that mean score is zero. This proves that the proximal target has zero expected update.

为了计算 target 处的 KL cost,先在固定 prefix 下,从 response-level Gibbs 分布求出它的 token 概率:

\[\pi_k^*(a\mid h)=\pi_k(a\mid h)\frac{Z_k(ha)}{Z_k(h)}.\]

递推式 $Z_k(h)=\sum_a\pi_k(a\mid h)Z_k(ha)$ 保证动作概率归一化。取对数后,得到 soft Q-consistency 关系:

\[\beta\log\frac{\pi_k^*(a_i\mid h_i)}{\pi_k(a_i\mid h_i)} =Q_k(h_i,a_i)-V_k(h_i).\]

当前动作的 KL cost 因此等于它的 soft Q-value 减去当前 history 的 soft value。接着看这个动作之后的 token。每个 $Q_k(h_j,a_j)$ 都等于下一个 history 的 $V_k(h_{j+1})$,所以中间项两两抵消,终点的 value 等于 $R$:

\[\beta\sum_{j=i+1}^{T} \log\frac{\pi_k^*(a_j\mid h_j)}{\pi_k(a_j\mid h_j)} =R-Q_k(h_i,a_i).\]

代回上一小节定义的采样 return,得到

\[\widehat Q_i^{\pi_k^*}=\class{pkl-math-focus}{Q_k(h_i,a_i)}.\]

再减去当前 token 的 cost $Q_k(h_i,a_i)-V_k(h_i)$ 和 history-only baseline,就得到完整的更新系数。现在把这个恒等式及其条件、各项含义放在一起:

固定 reference $\pi_k$、KL 强度 $\beta>0$,令 learner 等于 $\pi_k^\ast$。在 history $h_i$,任取一条在 reference 下概率非零的 continuation,记完整回答为 $\tau$,最终奖励为 $R(\tau)$。使用完整且不截断的 cost sum 时,

\[\begin{aligned} \widehat A_i^{\mathrm{KL}}(\pi_k^\ast,\tau) &=R(\tau)-\beta\sum_{j=i}^{T} \log\frac{\pi_k^\ast(a_j\mid h_j)}{\pi_k(a_j\mid h_j)}-b(h_i)\\ &=\class{pkl-math-focus}{V_k(h_i)-b(h_i)}. \end{aligned}\]

这里 $a_j$ 是位置 $j$ 的 token,$h_j$ 是它之前的 history,$T$ 是回答的最后一个位置。求和包含当前 token 及全部后续 token。$V_k(h_i)$ 表示从 history $h_i$ 开始、以 $\pi_k$ 为 reference 时最优的 KL-regularized expected return;$b(h_i)$ 是只由这个 history 决定的 baseline。

不同 continuation 的 reward 和 KL cost 可以各不相同,但在这个系数中相减后,总是得到同一个 $V_k(h_i)-b(h_i)$。等式对每条有支持的回答分别成立,包括旧 behavior policy 生成的回答。改变采到的 continuation,不会改变这个系数;这个共同值本身可以非零。这就是 pathwise cancellation:

在 proximal target 处,任意 continuation 的 reward 减去完整 Future-KL,都等于同一个 history value。

对当前动作取期望,这份抵消就给出了 stationarity。固定当前 history:token importance weight 把动作期望从 behavior 校正到 target policy,该策略下的 score 均值为零。更新系数对所有动作相同,因此它乘以 score 的均值后也为零。这就证明了 proximal target 的期望更新为零。

Uniqueness by backward induction

Why is this the only stationary policy? The proof reduces the multi-step decision problem to one KL-regularized bandit at each history. Its payoff is the value assigned to choosing an action: here, the expected terminal reward minus the KL costs of later actions. Once later-token policies equal the proximal target, pathwise cancellation makes this payoff equal the current action’s exact Q-value. The bandit’s unique solution then fixes the current policy. Working backward from the final token fixes the whole policy.

First collect the continuation’s contribution into an action value, including when the learner is away from the target. For a single behavior policy, average the sampled future-only return after fixing the history and current action:

\[\widetilde Q_{\mathrm{behav}}(h,a) =\mathbb E_{\pi_{\mathrm{behav}}} \left[\widehat Q_i^{\pi_\theta}\mid h_i=h,a_i=a\right].\]

The remaining tokens follow behavior, while the KL costs inside $\widehat Q_i^{\pi_\theta}$ use the learner and reference. Consequently, this conditional Q-value can depend on behavior and differ from the target’s $Q_k$.

For multiple behavior versions chosen before response generation, current-token correction gives a mixture of these Q-values weighted by the version probabilities conditional on the prefix. Each response must retain its actual sampling probabilities; Appendix E.2 derives the mixture.

At each history, this is a KL-regularized bandit update. For this local calculation, fix behavior and the learner’s policies at all later histories. Each conditional Q-value is then a fixed payoff for choosing its action. Use independently adjustable action logits, scores converted to probabilities by exponentiating and normalizing. Write $p(a)=\pi_\theta(a\mid h)$ and optimize

\[\max_{p\in\Delta(\mathcal A(h))} \left\{ \sum_a p(a)\class{pkl-math-focus}{\widetilde Q_{\mathrm{behav}}(h,a)} -\beta\sum_a p(a)\log\frac{p(a)}{\pi_k(a\mid h)} \right\}.\]

Here $p$ ranges over distributions on the available actions. The objective trades expected payoff against KL from the reference. Its local-logit gradient gives the conditional token-wise update after importance correction; positive history occupancy, the probability of visiting that history, only rescales it. The baseline and the constant $-\beta$ from differentiating KL vanish by the zero-mean score identity. With $\beta>0$, the objective is strictly concave in $p$, so it has only one maximizing action distribution. Under full support, meaning positive probability for every allowed action, zero local update identifies that normalized optimum:

\[\pi_\theta(a\mid h) =\frac{\pi_k(a\mid h) \exp\!\left(\widetilde Q_{\mathrm{behav}}(h,a)/\beta\right)} {\sum_{a'}\pi_k(a'\mid h) \exp\!\left(\widetilde Q_{\mathrm{behav}}(h,a')/\beta\right)}.\]

Across the tree, the bandit’s payoff $\widetilde Q_{\mathrm{behav}}$ depends on the learner’s later-token policies, so we determine those payoffs from the end backward. At the final token, the future-only sum is empty, so $\widehat Q_T^{\pi_\theta}=R$ and $\widetilde Q_{\mathrm{behav}}=Q_k$. The payoff is simply the terminal reward, and the normalized policy above is exactly $\pi_k^\ast$.

Suppose every later conditional policy already equals the target. Their KL costs telescope on every sampled suffix, so $\widehat Q_i^{\pi_\theta}=Q_k(h_i,a_i)$ and hence $\widetilde Q_{\mathrm{behav}}=Q_k$ at the current history, regardless of which covered behavior version generated the suffix. This identity uses only the later policies: it fixes the bandit’s payoff while leaving the current policy free to vary. The unique bandit optimum therefore forces the current policy to equal $\pi_k^\ast$. Repeating this argument backward establishes uniqueness across the entire tree.

Appendix E.2 gives the expressiveness conditions that extend this history-by-history argument to shared parameters.

Both directions are now established. Pathwise cancellation gives zero expected update at the proximal optimizer; the local bandit condition and backward induction exclude every other stationary policy. In the setting of Appendix E.2,

\[M_{\mathrm{behav}}(\theta)=0 \quad\Longleftrightarrow\quad \class{pkl-math-focus}{\pi_\theta=\pi_k^\ast}.\]

Full-response correction recovers the exact on-policy proximal gradient. Taking behavior equal to the learner in the same argument also gives this gradient the unique stationary policy $\pi_k^\ast$. We can therefore conclude the comparison posed earlier:

Token-wise and full-response correction share one unique stationary policy: the proximal optimizer.

The proof uses the full, unmodified future sum and a detached history-only baseline. Altering the cost sum can prevent it from telescoping to a history-only quantity, so the target may cease to be stationary. The practical update subsections explain the effects of horizon truncation, cost clipping, and group-relative normalization separately.

Appendix E.2 of our paper, “Token-Wise Importance Weighting and Its Stationary Target,” gives the full assumptions, pathwise identity, and uniqueness proof.

为什么这是唯一的 stationary policy?证明的主线,是把多步决策化成每个 history 上的一个 KL-regularized bandit。它的 payoff 指选择某个动作所对应的价值;这里具体是终点奖励减去后续动作 KL cost 后的期望。当后续位置的策略等于 proximal target 时,pathwise cancellation 使这份 payoff 等于当前动作精确的 Q-value。Bandit 的唯一解于是确定当前位置的策略;从最后一个 token 往前重复,就能确定完整策略。

先把 continuation 的贡献归入一个 action value,其中也包括 learner 尚未到达 target 的情况。对于单个 behavior policy,固定 history 与当前动作,对采样 future-only return 求平均:

\[\widetilde Q_{\mathrm{behav}}(h,a) =\mathbb E_{\pi_{\mathrm{behav}}} \left[\widehat Q_i^{\pi_\theta}\mid h_i=h,a_i=a\right].\]

后续 token 来自 behavior,而 $\widehat Q_i^{\pi_\theta}$ 中的 KL cost 使用 learner 与 reference。因此,这个 conditional Q-value 可以随 behavior 改变,也一般不同于 target 的 $Q_k$。

如果每条回答开始生成前从多个 behavior 版本中选定一个,当前 token 的校正会将这些 Q-value 按给定 prefix 时各版本的概率混合。每条回答都需要保留实际使用的采样概率;混合形式的推导见附录 E.2。

固定每个 history 后,这就是 KL-regularized bandit 更新。 在这个局部计算中,固定 behavior,以及 learner 在所有后续 history 的策略,每个 conditional Q-value 就成为选择相应动作的固定 payoff。使用可独立调整的动作 logits,也就是经过指数运算再归一化为动作概率的分数。令 $p(a)=\pi_\theta(a\mid h)$,优化

\[\max_{p\in\Delta(\mathcal A(h))} \left\{ \sum_a p(a)\class{pkl-math-focus}{\widetilde Q_{\mathrm{behav}}(h,a)} -\beta\sum_a p(a)\log\frac{p(a)}{\pi_k(a\mid h)} \right\}.\]

这里 $p$ 遍历当前可选动作上的概率分布,目标权衡期望 payoff 与相对 reference 的 KL。对局部 logits 求导,就得到 importance correction 后的条件 token-wise 更新;正的 history 到达概率只会缩放它。Baseline 和 KL 求导产生的常数 $-\beta$ 都由 score 均值为零而消失。当 $\beta>0$ 时,目标关于 $p$ 严格凹,因此只有一个使目标最大的动作分布。在 full support 下,即每个允许动作都有正概率,局部零更新便确定了这个归一化最优解:

\[\pi_\theta(a\mid h) =\frac{\pi_k(a\mid h) \exp\!\left(\widetilde Q_{\mathrm{behav}}(h,a)/\beta\right)} {\sum_{a'}\pi_k(a'\mid h) \exp\!\left(\widetilde Q_{\mathrm{behav}}(h,a')/\beta\right)}.\]

在整棵树上,bandit 的 payoff $\widetilde Q_{\mathrm{behav}}$ 还依赖 learner 在更晚位置的策略,所以我们从终点向前确定这些 payoff。最后一个 token 没有后续代价,因此 $\widehat Q_T^{\pi_\theta}=R$,且 $\widetilde Q_{\mathrm{behav}}=Q_k$。此时 payoff 就是终点奖励,上面的归一化策略恰好为 $\pi_k^\ast$。

假设所有更晚位置的条件策略都已经等于 target。它们的 KL cost 在每条采样后缀上逐项抵消,因此 $\widehat Q_i^{\pi_\theta}=Q_k(h_i,a_i)$,当前 history 上也就有 $\widetilde Q_{\mathrm{behav}}=Q_k$,不受具体哪个有 coverage 的 behavior 版本生成后缀的影响。这个恒等式只用到了后续位置的策略:它固定了 bandit 的 payoff,当前策略仍可自由变化。局部 bandit 的唯一最优解于是强制当前策略也等于 $\pi_k^\ast$。如此从末端逐层向前归纳,就确定了整棵树上的唯一 stationary policy。

附录 E.2 给出了将这份逐 history 论证用于共享参数所需的表达能力条件。

至此,两个方向都已得到证明:pathwise cancellation 给出 proximal optimizer 处的零期望更新,局部 bandit 条件与 backward induction 排除了其他 stationary policy。在附录 E.2 的理论设置下,

\[M_{\mathrm{behav}}(\theta)=0 \quad\Longleftrightarrow\quad \class{pkl-math-focus}{\pi_\theta=\pi_k^\ast}.\]

完整 response 校正恢复精确的 on-policy proximal gradient。在同一论证中令 behavior 等于 learner,也可得到这个梯度的唯一 stationary policy 为 $\pi_k^\ast$。因此,现在可以回答前面提出的比较问题:

逐 token 与完整 sequence 校正共享唯一的 stationary policy:本轮的 proximal optimizer。

这个证明使用完整、未改动的 future sum,以及求导时固定的 history-only baseline。改变 cost sum 后,它可能无法再抵消为只依赖 history 的量,原来的 target 也就可能失去 stationarity。实际更新的几个小节将分别解释有限 $H$、cost clipping 与 group-relative normalization 的影响。

完整假设、pathwise identity 与唯一性证明见论文附录 E.2,“Token-Wise Importance Weighting and Its Stationary Target”。

Connection to Q-learning

Why does a proof about policy updates keep returning to Q-functions? Both the preceding argument and Q-learning describe a current action through the value of what follows it. Our Q-learning discussion explains how a Bellman backup propagates that value backward. Here the same structure appears with KL regularization: substituting $Z_k(ha)=\exp(Q_k(h,a)/\beta)$ into the recursion for $Z_k(h)$ gives

\[V_k(h)=\beta\log\sum_a\class{pkl-math-focus}{\pi_k(a\mid h)} \exp\!\left(\frac{Q_k(h,a)}{\beta}\right).\]

Together with $Q_k(h,a)=V_k(ha)$ and terminal value $R$, this is a reference-weighted soft Bellman recursion. Its log-sum-exp exponentiates the scaled action values $Q_k/\beta$, sums them with reference weights, then takes the logarithm. The resulting reference-weighted Boltzmann probabilities are the normalized exponential weights derived above. This is the structure behind soft Q-learning, specialized to our fixed-reference objective. At the target, the policy’s log-ratio encodes the soft advantage, action value minus history value: $\beta\log(\pi_k^\ast/\pi_k)=Q_k-V_k$.

The learned quantity and update are different. Soft Q-learning fits action values using targets built from later value estimates. Our update learns $\pi_\theta$ directly from sampled reward-minus-Future-KL, weighted by current-token IS; $Q_k$ is used in the proof, with no fitted Q-network. Schulman, Chen and Abbeel make the broader connection precise: under their parameterization and sampling conditions, a soft Q-learning loss gradient decomposes into a regularized policy-gradient term and a value-fitting term. This explains the shared soft-advantage structure without identifying the two training rules.

Path consistency is the closest connection. It requires policy probabilities and values to agree with the rewards and regularization costs accumulated along a path. PCL and Trust-PCL use soft consistency identities across on-policy and off-policy paths to train by reducing consistency errors. We use this mechanism to show that a sampled future return becomes the exact target Q-value, then establish the stationary policy of the importance-weighted score update. The path-by-path equality uses deterministic prefix transitions and fixed terminal rewards on our generation tree. With stochastic environment transitions, a Bellman relation generally averages over the next state.

The soft Q identities establish where our update vanishes. We next study whether the actual policy updates approach that target.

为什么一个分析 policy update 的证明,会反复用到 Q-function?上面的论证与 Q-learning 都通过后续选择的价值来评价当前动作。本站的 Q-learning 讨论解释了 Bellman backup 如何将这份价值向前传递。这里加入 KL regularization 后,也会出现相同的结构:将 $Z_k(ha)=\exp(Q_k(h,a)/\beta)$ 代入 $Z_k(h)$ 的递推式,得到

\[V_k(h)=\beta\log\sum_a\class{pkl-math-focus}{\pi_k(a\mid h)} \exp\!\left(\frac{Q_k(h,a)}{\beta}\right).\]

结合 $Q_k(h,a)=V_k(ha)$ 和终点的 $V_k=R$,这就是 reference-weighted soft Bellman recursion。其中 log-sum-exp 先对缩放后的动作价值 $Q_k/\beta$ 取指数,再按 reference 概率加权求和,最后取对数。得到的 reference-weighted Boltzmann 概率,就是前面归一化后的指数权重。这与 soft Q-learning使用的结构一致,这里的具体目标由固定 reference 定义。到达 target 时,policy 的 log-ratio 就表示 soft advantage,也就是 action value 与 history value 的差:$\beta\log(\pi_k^\ast/\pi_k)=Q_k-V_k$。

两者学习的量和执行的更新不同。 Soft Q-learning 用后续的 value estimate 构造 target,拟合 action value。我们的更新直接用当前 token IS 加权的 sampled reward-minus-Future-KL 学习 $\pi_\theta$;$Q_k$ 用于证明,训练不拟合 Q-network。Schulman、Chen 与 Abbeel 给出了更精确的联系:在其参数化与采样条件下,soft Q-learning 的 loss gradient 可以分解为 regularized policy-gradient 项和 value-fitting 项。这解释了两者共有的 soft-advantage 结构,同时保留了训练规则的区别。

Path consistency 是最直接的联系。 它要求 policy 概率与 value 满足由同一条路径上累计的 reward 和 regularization cost 确定的关系。PCL 与 Trust-PCL利用 on-policy 和 off-policy 路径上的 soft consistency 恒等式,通过减小 consistency error 进行训练。我们利用这份结构,说明采样 future return 在何时成为精确的 target Q-value,再确定 importance-weighted score update 的 stationary policy。这里逐条路径成立的等式依赖生成树中确定的 prefix transition 与固定的 terminal reward。对于具有随机环境转移的过程,Bellman 关系一般需要对下一个状态求期望。

Soft Q 恒等式确定了我们的更新在何处为零。接下来分析实际的 policy update 能否接近这个 target。

Convergence

For an update to learn, it must approach the target from other policies. A unique stationary policy alone does not establish this. We first use a simple example to show the gap, then analyze convergence with a fixed reference, improvement across reference refreshes, and the reward attainable with finitely many sampled responses.

要让更新真正实现学习,还需要证明它能从其他策略出发接近 target。仅有唯一的 stationary policy,无法说明这一点。我们先用一个简单例子说明这个缺口,再分析固定 reference 下的收敛、刷新 reference 后的改善,以及有限次采样能够达到的奖励。

Stationary points and update dynamics

A simple counterexample shows why the target alone does not determine optimization speed. We can either ascend a reward objective or minimize its squared gradient: both can reach a zero-gradient solution, but their update rules differ. For the one-dimensional objective $J(\theta)=-\theta^4/4$, the two continuous-time updates are

\[\begin{aligned} \nabla J(\theta)&=-\theta^3, &\dot\theta&=-\theta^3,\\ \mathcal E(\theta)&=\tfrac12\lvert\nabla J(\theta)\rvert^2=\tfrac12\theta^6, &\dot\theta&=-3\theta^5. \end{aligned}\]

Here $\dot\theta$ denotes the rate of parameter change in continuous time. Both dynamics have the same unique stationary point, $\theta=0$. From a nonzero initialization, their distance to zero decays at rates $t^{-1/2}$ and $t^{-1/4}$, respectively. Squaring the gradient preserves the desired solution here but slows the approach near it. For our token-wise update, we therefore analyze the update field away from the target. The Q-functions introduced in the previous section let us express its remaining error through the learner’s later-token policies.

一个简单的反例能说明,只有 target 还不能确定优化速度。我们可以沿奖励梯度上升,也可以最小化梯度的平方:两者都可能到达零梯度的解,但更新规则不同。对一维目标 $J(\theta)=-\theta^4/4$,两个连续时间更新分别为

\[\begin{aligned} \nabla J(\theta)&=-\theta^3, &\dot\theta&=-\theta^3,\\ \mathcal E(\theta)&=\tfrac12\lvert\nabla J(\theta)\rvert^2=\tfrac12\theta^6, &\dot\theta&=-3\theta^5. \end{aligned}\]

这里 $\dot\theta$ 表示连续时间下参数变化的速率。两个更新都有同一个唯一 stationary point:$\theta=0$。从非零初值出发,到零点的距离分别按 $t^{-1/2}$ 和 $t^{-1/4}$ 的速度衰减。在这个例子里,squared-gradient objective 保留了想要的解,却使接近它的过程变慢。因此,对于我们的 token-wise 更新,需要分析尚未到达 target 时的 update field。上一节引入的 Q-function 可以将此时的误差写成 learner 后续 token 策略的误差。

Convergence to the target

Keep the reference fixed and follow the policy before it reaches the target. At the target, pathwise cancellation gives an exact Q-value on every supported continuation. Away from it, subtracting that same target identity from the learner’s sampled future-only return isolates the error:

\[\widehat Q_i^{\pi_\theta}-Q_k(h_i,a_i) =\class{pkl-math-focus}{-\beta\sum_{j=i+1}^{T} \log\frac{\pi_\theta(a_j\mid h_j)}{\pi_k^*(a_j\mid h_j)}}.\]

Only later-token policy errors appear on the right. At the final token, this error is already zero because the future-only sum is empty. As later policies approach their targets, the perturbation of the current action’s Q-return vanishes. This gives a backward route through the generation tree: establish progress for the final decisions, then control how their remaining errors affect earlier decisions.

The convergence analysis follows exact expected updates in continuous time, with independently adjustable token logits and continued exploration of each history. It uses full Future-KL and a history-only baseline. Appendix E.3 specifies the technical conditions, including those permitting behavior to change over time.

The continuous-time token-wise population update converges to the proximal target.

Appendix E.3 of our paper, “Population Convergence and Outer Improvement,” gives the complete dynamics argument. The finite-sample result below separately specifies a sampled update rule and bounds its final reward.

保持 reference 不变,考察尚未到达 target 的策略。在 target 处,pathwise cancellation 让每条有支持的 continuation 都给出精确的 Q-value。尚未到达时,用 learner 的采样 future-only return 减去同一个 target 恒等式,就能单独写出误差:

\[\widehat Q_i^{\pi_\theta}-Q_k(h_i,a_i) =\class{pkl-math-focus}{-\beta\sum_{j=i+1}^{T} \log\frac{\pi_\theta(a_j\mid h_j)}{\pi_k^*(a_j\mid h_j)}}.\]

右边只含后续 token 的策略误差。在最后一个 token 处,future-only sum 为空,这个误差已经为零。随着后续策略接近各自的 target,当前动作 Q-return 中的扰动也趋于零。这给出了沿生成树从后向前分析的路径:先证明最后几个决策能够改善,再控制它们尚存的误差如何影响更早的决策。

收敛分析考察连续时间下的精确期望更新,各 history 的 token logits 可独立调整,且每个 history 持续获得探索。更新使用 full Future-KL 与 history-only baseline。附录 E.3 给出完整技术条件,包括 behavior 随时间变化的情形。

连续时间的 token-wise population update 收敛到 proximal target。

论文附录 E.3,“Population Convergence and Outer Improvement”,给出完整的动态分析。下面的有限样本结果会单独规定采样更新规则,并约束最终奖励。

Improvement across reference refreshes

Why would reaching each round’s target improve reward across rounds? Start with the exact Gibbs solution for a fixed prompt whose reference success probability is $p$. Under binary rewards, its updated success probability is

\[p^+=\frac{pe^{1/\beta}}{1-p+pe^{1/\beta}}.\]

For $0<p<1$, we have $p^+>p$. In log-odds,

\[\log\frac{p^+}{1-p^+} =\log\frac{p}{1-p}+\class{pkl-math-focus}{\frac1\beta}.\]

Each exact proximal round increases the success log-odds by the same amount. Refreshing the reference lets these gains accumulate across rounds.

为什么每轮到达对应 target,能够带来跨轮的奖励改善?先看一个固定 prompt 的精确 Gibbs 解,设 reference 的成功概率为 $p$。二元奖励下,更新后的成功概率是

\[p^+=\frac{pe^{1/\beta}}{1-p+pe^{1/\beta}}.\]

只要 $0<p<1$,就有 $p^+>p$。写成 log-odds 更直观:

\[\log\frac{p^+}{1-p^+} =\log\frac{p}{1-p}+\class{pkl-math-focus}{\frac1\beta}.\]

每轮精确的 proximal 更新都让成功概率的 log-odds 增加相同的量。刷新 reference 后,这些收益便能跨轮累积。

Finite-sample reward guarantee

The exact recurrence leaves a practical question: what reward can finitely many sampled updates achieve? For binary rewards, our finite-sample theorem answers this for the projected linear-logit update analyzed in Appendix F. Linear logits are weighted sums of fixed features; projection keeps the parameters inside a prescribed region after each update.

The update uses current-token IS, full Future-KL and a group-centered reward-minus-KL residual: compute reward minus KL cost for each response, then subtract the group’s mean of that quantity. Appendix F gives its model assumptions, fresh-group sampling protocol and reference-selection rule.

The reward guarantee also requires a precise measure of how far behavior differs from the learner. At each history, take the learner-weighted second moment of the token log-ratio, its expected square. Sum these conditional moments along a response path, and require a uniform upper bound across supported paths and all training updates:

\[\sum_{i=1}^{T} \mathbb E_{a\sim\pi_\theta(\cdot\mid h_i)} \left[\left(\log\frac{\pi_\theta(a\mid h_i)} {\pi_{\mathrm{behav}}(a\mid h_i)}\right)^2\right] \le V_{\log}.\]

This sums learner-weighted log-ratio second moments along a path. The bound must hold for every supported path throughout training, including policy randomness.

One sufficient case uses $1/2\le w_i\le2$ and $V_{\log}\le1/8$, alongside the technical conditions and training budget in Appendix F.3. The log-ratio budget is zero on policy because learner and behavior coincide.

With these conditions in place, write the policy’s prompt-averaged success probability as $J(\pi)=\mathbb E_x\Pr_\pi(R=1\mid x)$. We compare the trained policy with a comparator $\pi_\star$ whose per-prompt correct-response probability is at most $C_\star$ times the initial policy’s. The theorem gives

\[\mathbb E[J(\pi_K)]\ge \class{pkl-math-focus}{J(\pi_\star)-\varepsilon}.\]

The theorem supplies a polynomial scored-response budget, specified in Appendix F.3. The guarantee concerns final single-response success, averaged over training randomness and reference selection.

Oracle best-of-$N$ gives this comparator condition a concrete interpretation: sample $N$ initial-policy responses and select a correct one whenever available. If initial single-response success is $p_0(x)$,

\[1-(1-p_0(x))^N\le Np_0(x).\]

Thus $C_\star=N$ covers that comparator. Under the theorem’s conditions, a single trained-policy response can approach the reward of initial-policy oracle best-of-$N$. The oracle comparator uses answer correctness to select its output. The training budget counts the scored responses used to learn the final policy.

Appendix F specifies the analyzed update and sampling assumptions; Appendix F.3, “Complete finite-sample reward guarantee,” states and proves the reward bound in our paper.

Experimental staleness counts policy versions. The same version gap can produce small probability changes during slow learning or large ones during a sharp update. Establishing the theorem’s mismatch condition therefore requires control of the token log-ratios themselves; a logged lag value alone cannot establish it.

Initial correct-solution coverage matters: probability reweighting cannot create support for a correct response whose initial probability is zero. The comparator factor and representation assumptions express this limitation explicitly.

精确递推还留下一个实际问题:有限次采样更新能达到什么奖励?对于二元 reward,有限样本定理分析了附录 F 中的 projected linear-logit update。Linear logits 是固定特征的加权和;projection 则在每次更新后将参数保持在规定区域内。

更新使用当前 token 的 IS、full Future-KL 与组内中心化的 reward-minus-KL residual:先计算每条回答的 reward 减去 KL cost,再减去这个量的组内均值。模型假设、fresh-group 采样协议与 reference 选择规则见附录 F。

奖励保证还需要精确定义 behavior 与 learner 相差多远。在每个 history 上,对 token log-ratio 求 learner 加权的条件二阶矩,也就是它的平方的期望。沿一条回答路径累加这些条件矩,并要求在所有有支持的路径、所有训练更新上都有统一上界:

\[\sum_{i=1}^{T} \mathbb E_{a\sim\pi_\theta(\cdot\mid h_i)} \left[\left(\log\frac{\pi_\theta(a\mid h_i)} {\pi_{\mathrm{behav}}(a\mid h_i)}\right)^2\right] \le V_{\log}.\]

这里沿一条路径累加 learner 加权的 log-ratio 二阶矩。上界需要对每条有支持的路径、整个训练期间统一成立,包括策略随采样发生的随机变化。

一种充分的 mismatch 限制是 $1/2\le w_i\le2$ 且 $V_{\log}\le1/8$;其余技术条件与训练预算见附录 F.3。On-policy 时 learner 与 behavior 相同,log-ratio budget 为零。

具备这些条件后,记策略在 prompt 分布上的平均成功概率为 $J(\pi)=\mathbb E_x\Pr_\pi(R=1\mid x)$。将训练后的策略与一个比较策略 $\pi_\star$ 对照,要求后者在每个 prompt 上答对的概率至多是初始策略的 $C_\star$ 倍。定理给出

\[\mathbb E[J(\pi_K)]\ge \class{pkl-math-focus}{J(\pi_\star)-\varepsilon}.\]

定理给出多项式量级的已评分 response 预算,具体形式见附录 F.3。保证衡量最终策略一次回答的成功率,并对训练采样与 reference 选择的随机性取期望。

Oracle best-of-$N$ 为这个比较条件提供了具体解释:从初始策略采 $N$ 个 response,只要其中有正确答案就选出来。若初始单次成功率为 $p_0(x)$,则

\[1-(1-p_0(x))^N\le Np_0(x).\]

所以取 $C_\star=N$ 可以覆盖这个 oracle 比较项。在定理条件下,训练后的一次回答可以接近初始策略 oracle best-of-$N$ 的奖励。Oracle 比较项利用答案是否正确来选择输出;训练预算则统计学习最终策略所用的已评分 response 数量。

分析所用的更新与采样假设见论文附录 F;完整奖励界及其证明见附录 F.3,“Complete finite-sample reward guarantee”。

实验 staleness 按策略版本差计数。同样的版本差,在缓慢学习时可能只对应很小的概率变化,在剧烈更新时却可能对应很大的变化。因此,要确认理论的 mismatch 条件,需要控制 token log-ratio 本身,仅凭日志中的 lag 数值无法确认这一点。

这个延伸也提醒我们,初始正确解覆盖非常重要。如果初始策略对某些正确回答完全没有支持,简单概率重加权不能凭空创造它们。理论通过 $C_\star$ 与表示条件明确表达了这项限制。

Practical updates

To train with Future-KL, we need an update computable from sampled responses: which probabilities to record, which costs to sum, and when to refresh the reference. We specify this algorithm first, then show how horizon, cost bounds, and group normalization change each token’s update coefficient.

要用 Future-KL 训练模型,需要明确怎样从采样回答计算更新:记录哪些概率、累计哪些 cost、何时刷新 reference?我们先给出具体算法,再说明 horizon、cost bound 和 group normalization 如何改变各 token 的更新系数。

Proximal KL algorithm

Each Proximal KL update records the sampling probabilities, computes reward advantage and Future-KL, then updates the learner. The animation follows the algorithm one line at a time, with the full procedure kept in view. Training uses sampled rewards and token probabilities; it does not fit the Q-function used in the proof.

每次 Proximal KL 更新先记录 sampling probability,再计算 reward advantage 和 Future-KL,最后更新 learner。动画逐行解释算法,完整流程始终可见。训练使用采样奖励与 token 概率,无需拟合证明中使用的 Q-function。

The reference defines the KL cost; recorded behavior probabilities define the sampling correction. They may come from the same policy, but their roles remain separate.

Reference 定义 KL cost,记录的 behavior 概率定义 sampling correction。两者可以来自同一份策略,但作用不同。

For position $i$ in response $m$, constructing the update coefficient starts with its KL cost. The practical version allows a finite credit horizon, the number of positions whose costs enter this token’s coefficient, and per-token cost clipping, giving

\[C_{m,i}^{(H)} =\beta\sum_{j=i}^{\class{pkl-math-focus}{\min(T_m,i+H-1)}} \operatorname{clip}\!\left( \log\frac{\pi_\theta(a_{m,j}\mid h_{m,j})}{\pi_k(a_{m,j}\mid h_{m,j})}, \class{pkl-math-focus}{-\epsilon_F,\epsilon_F}\right).\]

The window includes the current token and at most $H-1$ later tokens. Full tail extends to the response endpoint; $\epsilon_F=\infty$ removes per-cost clipping. Costs accumulate as an unnormalized sum over the window.

The coefficient also needs a reward signal. Comparing a response’s reward with those of other responses to the same prompt supplies the response-level advantage $\widehat A_m$, a positive or negative coefficient shared by that response’s tokens. Each position subtracts its own $C_{m,i}^{(H)}$ and applies the current-token importance weight. To turn this coefficient into a parameter update, one implementation minimizes the detached score loss

\[\mathcal L^{(H)}(\theta) =-\frac{1}{N_{\mathrm{tok}}}\sum_{m,i} \operatorname{sg}\!\left[ w_{m,i}\bigl(\widehat A_m\class{pkl-math-focus}{-C_{m,i}^{(H)}}\bigr)\right] \log\pi_\theta(a_{m,i}\mid h_{m,i}).\]

Here $N_{\mathrm{tok}}$ counts non-padding action tokens in the minibatch. Stop-gradient, $\operatorname{sg}$, treats the coefficient as fixed during differentiation; the next update recomputes it. The loss gradient has a minus sign, so gradient descent adds the token score multiplied by its detached, importance-corrected coefficient, averaged over these tokens. When response lengths vary, the sampled token-count denominator can also change the expected field relative to the response-averaged population update analyzed earlier.

对 response $m$ 的位置 $i$,构造更新系数时先计算它应承担的 KL 代价。实际版本允许有限 credit horizon,也就是为当前 token 累计多少个位置的 cost,并允许逐 token 的 cost clipping,得到

\[C_{m,i}^{(H)} =\beta\sum_{j=i}^{\class{pkl-math-focus}{\min(T_m,i+H-1)}} \operatorname{clip}\!\left( \log\frac{\pi_\theta(a_{m,j}\mid h_{m,j})}{\pi_k(a_{m,j}\mid h_{m,j})}, \class{pkl-math-focus}{-\epsilon_F,\epsilon_F}\right).\]

其中 $H$ 包含当前 token 及最多 $H-1$ 个后续 token;full tail 表示一直算到 response 终点;$\epsilon_F=\infty$ 则不截断每个 cost。窗口内的 cost 直接累加,保留未归一化的总和。

更新系数还需要奖励信号。把一个回答的奖励与同题其他回答的奖励比较,就得到 response-level advantage $\widehat A_m$,它是这条回答各 token 共享的正或负系数。每个位置减去自己的 $C_{m,i}^{(H)}$,再乘当前 token 的 importance weight。为了把这个系数转成参数更新,实现时可以最小化下面的 detached score loss:

\[\mathcal L^{(H)}(\theta) =-\frac{1}{N_{\mathrm{tok}}}\sum_{m,i} \operatorname{sg}\!\left[ w_{m,i}\bigl(\widehat A_m\class{pkl-math-focus}{-C_{m,i}^{(H)}}\bigr)\right] \log\pi_\theta(a_{m,i}\mid h_{m,i}).\]

$N_{\mathrm{tok}}$ 是当前 minibatch 的非 padding 动作 token 总数。$\operatorname{sg}$ 表示求导时把系数当作常数;下一次 learner 更新再重新计算系数。Loss gradient 带有负号,因此梯度下降会沿正的“token score 乘 detached、importance-corrected 系数”方向更新,再对这些 token 取平均。Response 长度不同时,这个随采样变化的 token-count 分母也可能改变期望 update field,与前文按 response 取平均的 population update 有所区别。

Horizon and cost bounds

A smaller $H$ removes terms from the full Future-KL coefficient and generally changes its expected score update. Even with on-policy sampling, truncation introduces bias relative to the complete gradient whenever the omitted terms’ combined expected score contribution is nonzero. Under token-wise IS, this truncation acts on a full-tail field that already has sampling bias.

Future costs are random and can be correlated with one another, so removing terms can change sampling variance in either direction. A bias–variance trade-off must account for both effects: bias describes how far the expected update departs from the desired update, while variance describes fluctuations caused by sampling. Variance reduction and improved training performance are possibilities to measure in a particular setting.

The cost bound $\epsilon_F$ limits each log-ratio before it enters the earlier tokens’ future sums. Clipping changes the coefficient and can bias its expected score contribution. The resulting magnitude bound describes this altered coefficient; its sampling variance also depends on correlations among terms. For finite $H$ and $\epsilon_F$,

\[|C_{m,i}^{(H)}| \le\beta\epsilon_F\min(H,T_m-i+1).\]

The controls act on different aspects of the update. $H$ selects which positions participate; $\epsilon_F$ bounds each contribution; $\beta$ rescales the feedback. Even equal $\beta H$ can assign credit to very different tokens.

A finite horizon shortens the range of KL credit assigned to the current score. The model still sees the full prefix, and generation uses the same response limit. Our tail-decay variant keeps unit weights for the first $H$ costs and linearly downweights later costs to zero at the endpoint. This reweighting generally changes the expected update; the net change depends on the affected terms’ combined expected score contributions.

小一些的 $H$ 会从完整 Future-KL 系数中删去部分项,一般也会改变期望 score 更新。即使用 on-policy 数据,只要被省略项合计的期望 score 贡献非零,相对完整梯度就会产生 bias。在 token-wise IS 下,这份截断作用于本来就带有 sampling bias 的 full-tail update field。

Future costs 是可能彼此相关的随机量,删去部分项后,采样方差可能增大,也可能减小。讨论 bias–variance trade-off 时需要同时考虑这两方面:bias 描述期望更新偏离目标更新的程度,variance 描述不同采样造成的波动。是否降低方差、是否改善训练表现,都需要在具体设置中测量。

$\epsilon_F$ 限制每个 log-ratio 的大小,再将它计入较早 token 的 future sum。Clipping 会改变系数,并可能使其期望 score 贡献产生偏差。下面的幅度界描述的是这个改动后的系数;采样方差还取决于各项之间的相关性。对于有限的 $H$ 和 $\epsilon_F$,

\[|C_{m,i}^{(H)}| \le\beta\epsilon_F\min(H,T_m-i+1).\]

这些参数作用于更新的不同方面。$H$ 决定哪些位置参与;$\epsilon_F$ 决定每个位置最多贡献多少;$\beta$ 则整体缩放反馈。两套配置即使 $\beta H$ 相同,也可能把 credit 分配给完全不同的 token。

有限 horizon 缩短分配给当前 score 的 KL credit 范围。模型仍然读取完整 prefix,response 仍按同样的生成上限继续。我们的 tail-decay 变体保留前 $H$ 个 cost 的单位权重,对更远的 cost 线性降权到终点为零。这种重加权一般会改变期望更新,净变化取决于受影响项合计的期望 score 贡献。

Different Algorithms

Start from PG with token-wise importance correction. One branch adds PPO clipping to obtain the GRPO comparator; the other subtracts Future-KL to obtain Proximal KL. The animation keeps the shared loss terms in place and highlights each branch’s change. Select a branch to follow its algorithm.

从带 token-wise importance correction 的 PG 出发,可以沿两条分支修改更新:加入 PPO clipping,得到这里的 GRPO 比较项;减去 Future-KL,得到 Proximal KL。动画固定 loss 的公共项,只突出各分支改变的部分。选择一个分支,可以继续查看它的算法。

The experiments compare this additive cost with PPO clipping, which acts on a different part of the update. Given the sign of an advantage, PPO clipping gates further changes in a proximal ratio $\rho_i=\pi_\theta/\pi_k$. Above the upper bound, a positive-advantage contribution can be switched off while a negative one remains. Proximal KL supplies additive feedback: positive future log-ratios reduce the coefficient, while negative costs can increase it. At the cost bound, the clipped contribution remains part of the token’s score coefficient.

The update differences can be made explicit with surrogate losses, differentiable expressions constructed to produce the desired update direction. All methods use the same verifier reward; their surrogates produce different update fields. We write ascent surrogates below, with common token normalization omitted; implementation minimizes their negatives. PG uses reward advantage and the current-to-behavior weight:

\[\mathcal L_{\mathrm{PG}} =\mathbb E_{\pi_{\mathrm{behav}}}\sum_i w_i\operatorname{sg}[\widehat A_m].\]

Differentiating $w_i$ produces $w_i\nabla\log\pi_\theta$. For the same detached coefficient, ascent in this ratio form gives the same update as descent in the negative score loss above: PG uses $\widehat A_m$, and Proximal KL uses $\widehat A_m-C_i^{(H)}$. An implementation chooses one differentiable path; differentiating both the weight and a score-loss factor would add an unintended term.

The GRPO comparator clips the proximal ratio and multiplies by fixed reference-to-behavior correction:

\[\mathcal L_{\mathrm{GRPO}} =\mathbb E_{\pi_{\mathrm{behav}}}\sum_i \frac{\pi_k}{\pi_{\mathrm{behav}}} \min\!\left( \rho_i\widehat A_m, \class{pkl-math-focus}{\operatorname{clip}(\rho_i,1-\epsilon,1+\epsilon)}\widehat A_m \right).\]

CISPO clips the detached learner-to-behavior weight while retaining the score contribution:

\[\mathcal L_{\mathrm{CISPO}} =\mathbb E_{\pi_{\mathrm{behav}}}\sum_i \operatorname{sg}\!\left[ \class{pkl-math-focus}{\operatorname{clip}(w_i,c_{\mathrm{lo}},c_{\mathrm{hi}})}\widehat A_m \right]\log\pi_\theta(a_i\mid h_i).\]

Proximal KL adds future credit to the token coefficient:

\[\mathcal L_{\mathrm{PKL}} =\mathbb E_{\pi_{\mathrm{behav}}}\sum_i w_i\operatorname{sg}[\widehat A_m\class{pkl-math-focus}{-C_i^{(H)}}].\]

Compared with PG, it changes regularization credit; compared with GRPO, it changes how movement is controlled; compared with CISPO, it explicitly includes future cost relative to a fixed reference. The experiments can therefore ask separately whether correction alone suffices, whether bounding weights suffices, and how clipping compares with additive future feedback.

The GRPO variant here omits the initial-reference KL penalty. A permanent penalty toward initialization and a local reference refreshed between rounds define different objectives; Proximal KL uses the latter.

实验还将这份加性 cost 与 PPO clipping 比较,后者作用于更新中的另一个部件。GRPO 比较项使用去掉初始参考模型 KL 惩罚的 PPO-style surrogate。对 $\rho_i=\pi_\theta/\pi_k$,在给定 advantage 符号后,PPO 会限制继续朝某些方向增大 ratio 的收益。超过上界时,正 advantage 的更新可能关闭,负 advantage 的更新仍然保留。

Proximal KL 的 cost 则是加性反馈:正的 future log-ratio 从系数里扣除,负的 cost 可以增加系数。某个 cost 达到 $\epsilon_F$ 的边界后,截断后的值继续构成这个 token 的 score 系数。

我们可以通过 surrogate loss 明确比较各方法的更新。它是为产生所需更新方向而构造的可微表达式。各方法使用相同的 verifier reward,但 surrogate 给出不同的 update field。这里统一写成 ascent surrogate,实际最小化其负值,并略去共同的 token 归一化。PG 仅使用奖励 advantage 与当前到 behavior 的权重:

\[\mathcal L_{\mathrm{PG}} =\mathbb E_{\pi_{\mathrm{behav}}}\sum_i w_i\operatorname{sg}[\widehat A_m].\]

在这个写法中,微分 $w_i$ 得到 $w_i\nabla\log\pi_\theta$。使用相同 detached 系数时,对这个 ratio 形式做梯度上升,与对前面的负 score loss 做梯度下降,得到相同更新:PG 的系数为 $\widehat A_m$,Proximal KL 的系数为 $\widehat A_m-C_i^{(H)}$。实现时选择一条可微路径;若在 score loss 中同时对 weight 求导,就会引入额外项。

GRPO 比较项把 proximal ratio 放进 PPO clip,再乘固定的 reference-to-behavior 校正:

\[\mathcal L_{\mathrm{GRPO}} =\mathbb E_{\pi_{\mathrm{behav}}}\sum_i \frac{\pi_k}{\pi_{\mathrm{behav}}} \min\!\left( \rho_i\widehat A_m, \class{pkl-math-focus}{\operatorname{clip}(\rho_i,1-\epsilon,1+\epsilon)}\widehat A_m \right).\]

CISPO 直接限制 detached 的 learner-to-behavior 权重,保留 score 的贡献:

\[\mathcal L_{\mathrm{CISPO}} =\mathbb E_{\pi_{\mathrm{behav}}}\sum_i \operatorname{sg}\!\left[ \class{pkl-math-focus}{\operatorname{clip}(w_i,c_{\mathrm{lo}},c_{\mathrm{hi}})}\widehat A_m \right]\log\pi_\theta(a_i\mid h_i).\]

Proximal KL 则在 token coefficient 中加入 future credit:

\[\mathcal L_{\mathrm{PKL}} =\mathbb E_{\pi_{\mathrm{behav}}}\sum_i w_i\operatorname{sg}[\widehat A_m\class{pkl-math-focus}{-C_i^{(H)}}].\]

它与 PG 的差异在于 regularization credit,与 GRPO 的差异在于怎样控制策略移动,与 CISPO 的差异在于是否显式包含固定 reference 定义的 future cost。实验里的比较因此可以分别回答:只有校正是否足够,只有限制权重是否足够,PPO clipping 与加性 future feedback 又有什么不同。

固定初始 reference 与每轮刷新局部 reference 定义了不同的优化目标:前者持续约束模型相对初始化的变化,后者使用本轮起点作为锚点。这里的 GRPO 变体省去了初始 reference KL,Proximal KL 则保留每轮的局部 KL 反馈。

Reference refresh

The surrogate formulas describe an update with a fixed reference. To specify a training run, we must also decide when to refresh that reference. We use $L$ for optimizer updates within a round and $K$ for the total number of rounds. Within a round, $\pi_k$ is fixed, behavior synchronizes on its own schedule, and the learner keeps updating. The zero-lag Proximal KL comparisons refresh reference every 50 updates. In ordinary off-policy minibatch comparisons, reference probabilities are recomputed at the start of a global batch and retained across its minibatches. Both fit the framework; each experiment must still be read with its own configuration.

Alongside reference timing, the score loss requires a concrete rule for its group-relative advantage. With a verifier that supplies only final correctness, multiple responses to the same prompt provide a comparison: subtracting the group mean gives higher coefficients to responses that outperform their group. The periodic-refresh experiment uses this centered reward; controlled-staleness experiments also divide it by the group standard deviation.

The group mean and standard deviation are computed from sampled responses, including the response being updated. They depend on sampled actions and rewards, while the baseline in the fixed-point proof is fixed by the current history. Dividing the reward coefficient by the group standard deviation also changes its scale relative to the separately computed KL cost, giving groups with different reward spreads different reward-to-KL balances. The finite-sample theorem analyzes a specified group-centered reward-minus-KL residual; the practical update centers and normalizes rewards before subtracting the separately computed KL cost.

The update gives each ablation a concrete question: where should sampling correction act, how does baseline error enter, how large should each cost be, and how far into the future should it reach?

“不同算法”小节的 surrogate 公式描述 reference 固定时的一次更新。要确定一条完整的训练流程,还需要规定何时刷新 reference。我们用 $L$ 表示一轮内的优化更新数,$K$ 表示总轮数。本轮 $\pi_k$ 固定,behavior 按自己的节奏同步,learner 连续优化。lag=0 对比中的 Proximal KL 使用每 50 次更新刷新 reference;一般 off-policy minibatch 比较里,reference 在全局 batch 开始时重算,然后在它的 minibatch 内保持不变。两种安排都可以写入这个框架,但具体实验要使用各自配置。

除了 reference 的刷新时间,还需要确定 score loss 中 group-relative advantage 的具体算法。在 verifier 只给最终对错的任务里,同题多个回答提供了相互比较的依据:减去组均值后,优于组内平均表现的回答得到更高系数。周期刷新实验使用这种中心化奖励,controlled-staleness 实验还将它除以组内标准差。

Group mean 与 standard deviation 由采样回答计算,其中也包括正在更新的这条回答。它们依赖实际采到的动作与奖励,而 fixed-point 证明里的 baseline 只由当前 history 确定。奖励系数除以组内 standard deviation,还会改变它相对单独计算的 KL cost 的尺度,让奖励分散程度不同的组具有不同的 reward-to-KL 比例。有限样本定理分析的是对 reward-minus-KL residual 做组内中心化的 estimator;实际更新先对奖励进行中心化与归一化,再减去单独计算的 KL cost。

这条算法路径为“Mechanism ablations”一节的每项消融确定了要研究的部件:sampling weight、advantage 的 baseline、每个 future cost 的上限,或 future horizon 的长度。

Main results

Does the resulting update sustain useful learning when rollout policies, the policies generating responses, fall behind, and do its gains extend to new problems? We test both questions on language-model mathematical reasoning. Stability tests track learning through actor refreshes and controlled staleness; independent checkpoint evaluations compare accuracy across eight held-out benchmarks. A checkpoint is a saved model-weight snapshot. This order connects the behavior during training to the performance of the resulting models.

Our working default is $H=\mathrm{full}$, $\beta=0.30$, and $\epsilon_F=0.05$. The periodic-refresh experiments use this same choice at all four model sizes. A shorter horizon offers a simple refinement: for 4B, meaning four billion model parameters, we suggest trying $H=32$ with the same coefficient and cost bound. This finite-window suggestion is a starting point for subsequent runs. The reported 4B checkpoint results use the configurations documented in the settings note below.

Reported configurations and hyperparameter selection

We selected the final Proximal KL configurations through a few simple manual adjustments under a limited tuning budget. We inspected early learning curves and adjusted hyperparameters when improvement was insufficient, then retained the resulting configurations for stable training. The mechanism ablations separately examine particular update choices. Appendix C.2 of the paper describes this selection process.

Periodic refresh uses Slime on DAPO-Math-17K, learning rate $10^{-6}$, and batches of 32 prompts with eight responses each. Each fresh batch receives one optimizer update. Rollout weights refresh every 64 updates; Proximal KL’s reference refreshes every 16 and GRPO’s every 32. The 1.7B, 4B, and 8B models use base checkpoints, taken after pretraining. The 32B model uses a post-trained checkpoint, further trained after pretraining, because the corresponding pretrained checkpoint was unavailable. Prompt and response limits are 1,024 and 16,384 tokens; temperature is 1.0. Temperature controls the sharpness of token sampling probabilities; 1.0 leaves logits at their original scale. Appendix B.2 gives the full settings.

Controlled-staleness training uses AReaL, Qwen3-1.7B-Base and Qwen3-4B-Base, and 9,453 filtered math prompts. Each global batch has 128 prompts with 16 responses each, an 8,192-token response limit, and temperature 1.0. Off-policy batches receive four optimizer minibatch updates. At nonzero staleness, the reference is recomputed before each global batch and held fixed for its minibatches. Adam uses a constant learning rate and no weight decay, with gradient-norm clipping at 1: it rescales the whole gradient when the vector’s length exceeds 1. All compared 4B methods use dynamic sampling: prompt groups with identical rewards are replaced to fill the batch.

The reported nonzero-staleness Proximal KL runs all use $\epsilon_F=0.05$:

  • 1.7B, learning rate $5\times10^{-6}$, staleness 4 and 16: full tail, $\beta=0.30$.
  • 1.7B, learning rate $10^{-5}$, staleness 4: full tail, $\beta=0.30$.
  • 1.7B, learning rate $10^{-5}$, staleness 16: $H=64$, $\beta=0.60$.
  • 4B, learning rate $5\times10^{-6}$, staleness 4: the first 32 tokens have unit weight, followed by a linearly decayed tail; $\beta=0.25$.
  • 4B, learning rate $5\times10^{-6}$, staleness 16: $H=8$, $\beta=0.25$.

The separate zero-staleness comparisons use either one or four optimizer minibatches. Their Proximal KL runs use full tail, $\beta=0.03$, unbounded future costs, and a reference refreshed every 50 updates. The one-minibatch controls omit PPO clipping. These run settings are recorded in Appendix C.2.

Rollout 策略,也就是生成回答所用的策略,落后时,这份更新能否持续改善模型?获得的收益能否迁移到新题目?我们用语言模型的数学推理训练检验这两个问题:先通过 actor 刷新与 controlled staleness 下的曲线观察稳定性,再用独立 checkpoint evaluation 比较八个 held-out benchmark 的准确率。Checkpoint 是保存下来的模型权重快照。这样就把训练过程与最终模型表现联系起来。

我们采用的 working default 是 $H=\mathrm{full}$、$\beta=0.30$、$\epsilon_F=0.05$,周期刷新实验的四个模型规模都使用这一组合。缩短 horizon 是进一步调整的一种简单方式:对于 4B,也就是 40 亿参数的模型,我们建议在相同 coefficient 与 cost bound 下尝试 $H=32$。这个 finite-window 建议用于后续实验的起点;本文已报告的 4B checkpoint 分数对应下面设置说明中的配置。

报告结果所用的配置与 hyperparameter selection

我们在有限 tuning budget 下,通过少量简单的手动调整确定 Proximal KL 的最终配置。先观察 early learning curves,改善不足时调整 hyperparameter,经过几次调整后保留能稳定训练的配置。机制消融则单独检验具体更新选择的影响。论文附录 C.2 说明了这个选择过程。

周期刷新实验使用 Slime 与 DAPO-Math-17K,学习率为 $10^{-6}$,每批 32 个 prompt,每题生成八个 response。每批新回答只做一次 optimizer update。Rollout 权重每 64 次更新同步,Proximal KL 的 reference 每 16 次刷新,GRPO 每 32 次刷新。1.7B、4B、8B 使用预训练完成后的 base checkpoint;32B 使用预训练之后又经过进一步训练的 post-trained checkpoint,因为对应的 pretrained checkpoint 当时不可用。Prompt 与 response 的长度上限分别是 1,024 和 16,384 token,temperature 为 1.0。Temperature 控制 token 采样分布的集中程度,1.0 表示保持 logits 的原始尺度。完整配置见附录 B.2。

Controlled-staleness 训练使用 AReaL、Qwen3-1.7B-Base 与 Qwen3-4B-Base,数据是 9,453 道过滤后的数学 prompt。每个 global batch 包含 128 个 prompt,每题 16 个 response,response 上限为 8,192 token,temperature 为 1.0。Off-policy batch 做四次 optimizer minibatch update;非零 staleness 下,在每个 global batch 开始前重算 reference,并在该 batch 的 minibatch 内保持固定。Adam 使用恒定学习率、不使用 weight decay,gradient-norm clipping 上限为 1,即梯度向量的长度超过 1 时,整体缩小这个向量。所有参与比较的 4B 方法都使用 dynamic sampling:替换奖励完全相同的 prompt group,直到补满 batch。

已报告的非零 staleness Proximal KL 实验均使用 $\epsilon_F=0.05$:

  • 1.7B,学习率 $5\times10^{-6}$,staleness 4 和 16:full tail,$\beta=0.30$。
  • 1.7B,学习率 $10^{-5}$,staleness 4:full tail,$\beta=0.30$。
  • 1.7B,学习率 $10^{-5}$,staleness 16:$H=64$,$\beta=0.60$。
  • 4B,学习率 $5\times10^{-6}$,staleness 4:前 32 个 token 权重为 1,之后的 tail 线性衰减;$\beta=0.25$。
  • 4B,学习率 $5\times10^{-6}$,staleness 16:$H=8$,$\beta=0.25$。

单独的零 staleness 比较分别使用一个或四个 optimizer minibatch。其中 Proximal KL 使用 full tail、$\beta=0.03$、无上限的 future cost,reference 每 50 次更新刷新;单 minibatch 控制关闭 PPO clipping。这些实际配置记录在附录 C.2。

Stability tests

We first make the mismatch easy to see: each iteration collects a fresh response batch and uses it once for a single optimizer update, while rollout weights synchronize only every 64 updates. Between synchronizations, the learner keeps moving while the actor generates new responses from the same older policy. This tests whether the different updates sustain progress as those two policies separate.

This experiment uses Slime and compares PG, CISPO, GRPO, and Proximal KL at a learning rate of $10^{-6}$. Proximal KL uses the full-tail working default at 1.7B, 4B, 8B, and 32B. Rollouts use FP8, an 8-bit floating-point format, for weights and activations. Their attention key/value cache, stored computations reused during generation, uses the 16-bit BF16 format; optimization also uses BF16. Training accuracy is the fraction of responses accepted by the verifier. Group rewards are mean-centered without standard-deviation normalization, and the curves use EMA $\alpha=0.10$.

Online curves are EMA-smoothed; aggregation across seeds is reported separately.

第一组实验让生成策略按固定间隔更新。每次迭代采集一批新 response,只用它做一次 optimizer update,rollout 权重则每隔 64 次更新同步一次。在两次同步之间,learner 持续变化,新回答由同一份较旧的策略生成。这让我们观察到两份策略逐渐分开时,各种更新方法能否保持进展。

这一组使用 Slime,比较 PG、CISPO、GRPO 和 Proximal KL,学习率为 $10^{-6}$。Proximal KL 在 1.7B、4B、8B、32B 都使用相同的 full-tail working default。Rollout 的 weights 与 activations 使用 8 位浮点格式 FP8;attention key/value cache 保存生成时复用的计算结果,使用 16 位浮点格式 BF16,优化也使用 BF16。训练准确率是回答通过 verifier 的比例;组内奖励只减均值,不做标准差归一化,曲线采用 EMA $\alpha=0.10$。

在线曲线采用 EMA 平滑;跨 seed 的统计另行报告。

Periodic actor refresh across four model sizes. Each fresh batch receives one update; actor weights refresh every 64 updates. All Proximal KL curves use the full-tail working default. Training accuracy uses EMA 0.10.
四个模型规模的周期刷新实验。每批新回答只更新一次,actor 权重每 64 次更新同步;所有 Proximal KL 曲线使用相同 full-tail working default。Training accuracy 使用 EMA 0.10。

The second half of training reveals whether early gains persist. CISPO makes substantial initial progress at 1.7B before its accuracy falls sharply. At 8B and 32B, PG and CISPO also undergo large training-accuracy declines. Proximal KL retains its gains across all four scales with the same working default.

All four methods use importance weighting, and their observed stability depends on how they control policy movement. PG follows reward, CISPO bounds the weights, GRPO uses PPO clipping, and Proximal KL subtracts a future KL cost from the learning signal.

GRPO also sustains training, and Proximal KL reaches higher accuracy with fewer updates in this periodic-refresh experiment. At 8B, its smoothed training accuracy first reaches roughly 50% after about 200 updates, compared with about 640 for GRPO. Proximal KL also has higher mean raw training accuracy over the final 100 updates shared by the two methods at 1.7B, 4B, and 8B, showing that the gain persists beyond the initial rise.

后半段训练能看出早期收益是否得以保持。1.7B 的 CISPO 先取得明显进展,随后准确率大幅下降;8B 和 32B 中,PG 与 CISPO 也出现较大的 training-accuracy 下降。Proximal KL 在四个规模上使用相同 working default,都保住了训练收益。

这四种方法都使用 importance weighting,观察到的稳定性与它们控制策略移动的方式有关。PG 直接沿奖励方向前进,CISPO 限制权重,GRPO 使用 PPO clipping,Proximal KL 从奖励信号里减去未来的 KL 代价。

GRPO 也能维持训练,Proximal KL 在周期刷新实验中用更少更新达到更高准确率。比如 8B 的平滑训练准确率首次达到约 50%,Proximal KL 需要约 200 次更新,GRPO 则约 640 次。在 1.7B、4B、8B 上,两种方法共同覆盖的最后 100 次更新中,Proximal KL 的平均原始 training accuracy 也更高,说明收益延续到了最初上升阶段之后。

Periodic refresh lets the actor fall progressively behind between synchronizations. To compare methods at specified rollout ages, we also run controlled-staleness experiments. Within each method comparison, model scale, prompt source, learning rate, sampling, and evaluation protocol are matched. The controlled-staleness experiments use Qwen3-Base and 9,453 filtered math prompts. Adam uses a constant learning rate and no weight decay. Ordinary off-policy batches are reused across four optimizer minibatches; GRPO uses symmetric PPO clipping with width 0.2.

We train Qwen3-1.7B and 4B in AReaL at controlled rollout staleness 4 and 16, with generation overlapping optimization. The 1.7B comparisons use learning rates $5\times10^{-6}$ and $10^{-5}$; 4B uses $5\times10^{-6}$. We verify realized policy-version gaps in the logs. For the 1.7B GRPO comparison at staleness 4, the recorded mean is approximately 4.

The two protocols test different uses of old-policy data. Periodic refresh uses each fresh batch once while keeping actor weights fixed between synchronizations. Controlled-staleness training combines overlapping generation with four minibatch updates per batch, so both rollout delay and response reuse contribute to the mismatch. It standardizes rewards within each prompt group and refreshes the proximal reference before each global batch.

Before reading the held-out curves, it helps to distinguish the evaluation metrics. MATH500, OlympiadBench, MinervaMath, and Gaokao2023MathEn use greedy pass@1: one response per problem, selecting the highest-probability next token at each step. Each AIME24/25 and AMC23/24 problem receives 16 sampled responses, generated by drawing tokens from the configured sampling distribution.

Mean@16 asks how many generated responses are correct. Pass@16 asks whether a problem was solved at least once. Solving a problem once in 16 attempts already counts as success for pass@16, while its mean@16 is only $1/16$. A method can therefore improve coverage without improving single-response reliability to the same extent. It can also become more reliable on problems it already solves without covering many new ones.

The connection between these metrics comes from the chance of missing the problem on every attempt. In an idealized model with independent attempts, each succeeding with probability $p$, subtracting that all-failure probability from one gives

\[\mathbb E[\mathrm{pass@16}\mid p]=1-(1-p)^{16}.\]

The relationship is nonlinear: an increase in success probability adds little coverage for an already reliably solved problem, but can add much more for a rarely solved one. Problems have different success probabilities, so substituting aggregate mean@16 into this formula does not recover the actual pass@16. To obtain expected coverage under this model, the formula must be applied to each problem’s success probability before averaging across problems.

Accuracy tells us whether answers remain correct; we also want to know how the policy distribution changes as training proceeds. We therefore plot AIME24 pass@16 alongside entropy across six settings. Lower entropy means the next-token distribution concentrates on fewer choices; higher entropy means its probability mass is more dispersed. Both correct and incorrect answers can be generated confidently, so entropy alone cannot establish reasoning quality. Reading it together with held-out accuracy shows whether changes in the distribution accompany sustained gains or declining performance.

周期刷新让 actor 在两次同步之间逐渐落后。为了比较使用指定新旧程度的数据时各方法的表现,第二组实验直接控制 rollout staleness。同一组方法比较共享模型规模、训练题来源、学习率、采样与评测协议。controlled-staleness 主实验使用 Qwen3-Base,在 9,453 道过滤后的数学 prompt 上训练;Adam 的学习率保持常数,不使用 weight decay。普通 off-policy batch 被复用四个优化 minibatch,GRPO 的对称 PPO clip 宽度为 0.2。

我们在 AReaL 上训练 Qwen3-1.7B 和 4B,将 rollout staleness 控制在 4 或 16,生成过程与优化重叠。1.7B 比较学习率 $5\times10^{-6}$ 和 $10^{-5}$,4B 使用 $5\times10^{-6}$。实际策略版本差从日志中核验;1.7B、staleness 4 的 GRPO 比较中,记录的平均 staleness 约为 4。

两套协议检验了旧策略数据的不同使用方式。周期刷新时,每批新回答只用一次,actor 权重在两次同步间保持不变。Controlled-staleness 训练将异步生成与每批四次 minibatch update 结合,rollout delay 和 response reuse 都会产生 mismatch。后一套协议对每个 prompt group 的奖励做标准化,并在每个 global batch 开始前刷新 proximal reference。

读 held-out 曲线前,先区分评测指标。MATH500、OlympiadBench、MinervaMath、Gaokao2023MathEn 使用 greedy pass@1:每题回答一次,每一步选择概率最高的下一个 token。AIME24/25 与 AMC23/24 使用 sampled decoding,从配置的采样分布中抽取 token,对每道题生成 16 个 response。

mean@16 关心“生成的回答里有多少是对的”;pass@16 关心“题目有没有至少被答对一次”。如果一题 16 次里只对一次,它的 pass@16 已经记为成功,但 mean@16 仍然只有 $1/16$。因此,一个方法可能增加解题覆盖面,却没有同等增加单次回答的可靠性;也可能把已会做的题答得更稳,mean@16 上升更多。

要看清这两个指标的联系,可以先计算每次尝试都失败的概率。在每次独立尝试成功概率为 $p$ 的理想化模型中,用一减去全部失败的概率,就得到

\[\mathbb E[\mathrm{pass@16}\mid p]=1-(1-p)^{16}.\]

这个关系是非线性的:对已经很容易答对的题,再提高成功概率,增加的覆盖率很有限;对很少答对的题,同样的成功概率增量可能带来更大的覆盖率提升。不同题的 $p$ 不同,不能把总体 mean@16 直接代进公式,当作实际 pass@16 的精确值。在这个理想模型下,需要先把每道题的成功概率分别代入公式,再跨题取平均,才能得到期望覆盖率。

准确率告诉我们回答是否仍然正确;我们还想观察训练时策略分布如何变化。因此,本小节的图把 AIME24 pass@16 与 entropy 放在一起,覆盖六种设置。Entropy 较低,表示 next-token 概率集中在较少的选择上;较高则表示概率分布更分散。模型可以很确信地生成正确回答,也可以很确信地生成错误回答,因此只看 entropy 无法判断推理质量。结合 held-out accuracy,才能观察分布变化伴随的是持续收益还是表现下降。

Accuracy and entropy provide complementary views of stability. Six settings vary model scale, learning rate, and rollout staleness.
同时看 AIME24 pass@16 与 policy entropy,区分早期涨分和后续稳定性。六种设置覆盖 1.7B、4B、两种学习率及不同 rollout staleness。

For the smaller model at the lower learning rate, PG can be competitive. That result does not reliably carry over to larger models or more aggressive updates. At 4B and staleness 16, PG shows a pronounced AIME24 decline and entropy fluctuations; higher-learning-rate PG also fails to consistently retain its early gains. GRPO and Proximal KL sustain more stable trajectories, and Proximal KL reaches higher late AIME24 pass@16 in all four $5\times10^{-6}$ settings. We therefore focus the benchmark comparison on these two methods. The GRPO clipping-width ablation examines another source of instability: widening its clipping interval produces larger gradient excursions and a temporary accuracy decline.

小模型、较低学习率下,PG 可以表现得很有竞争力;把模型或学习率增大后,这种表现不再可靠地延续。4B、staleness 16 的 PG 出现明显的 AIME24 下跌与 entropy 波动,较高学习率的 PG 也没有一直保住早期收益。GRPO 和 Proximal KL 的轨迹更稳定,Proximal KL 在四个 $5\times10^{-6}$ 设置的后段 AIME24 pass@16 都更高。因此,后面的 benchmark 比较集中在这两个方法上。GRPO clipping-width 消融进一步考察了 clipping 区间的影响:放宽区间后,gradient excursion 更大,准确率也出现暂时下降。

Held-out evaluation

The training-stability comparison tests methods across increasingly difficult update settings. To examine accuracy more closely at $5\times10^{-6}$, we compare both mean@16 and pass@16 across the four settings, covering response accuracy and problem coverage.

接下来固定学习率为 $5\times10^{-6}$,分别观察 1.7B 与 4B 在 staleness 4、16 下的 AIME24 mean@16 和 pass@16,同时比较回答准确率与题目覆盖率。

AIME24 at learning rate 5e-6 across four matched settings. Mean@16 measures response accuracy; pass@16 measures problem coverage. Curves use EMA 0.20.
学习率 5e-6 下四组匹配设置的 AIME24 表现。Mean@16 衡量回答准确率,pass@16 衡量题目覆盖率,曲线使用 EMA 0.20。

Proximal KL has higher late-training AIME24 mean@16 and pass@16 in all four settings, improving both response accuracy and problem coverage. We next compare fixed checkpoints across a broader benchmark suite to assess how far these gains extend.

The stale-data results also motivate a control question: how do the methods compare when every update uses freshly sampled responses? The checkpoint comparison therefore includes an on-policy setting that deliberately changes how data are reused: each fresh batch receives one update, and the GRPO control disables PPO clipping. Proximal KL uses the full tail, $\beta=0.03$, no future-cost clipping, and a reference refreshed every 50 updates. This comparison jointly specifies sampling staleness, data reuse, and the update rule, so its result applies to that complete protocol.

“lag=0” describes the sampling version relative to the learner at the start of processing a batch. Four consecutive updates reuse the answers generated before the first update: their behavior probabilities stay fixed while the learner changes. The later minibatch updates therefore operate on data from an older policy. The table reports one-update on-policy training and zero-lag, multiple-minibatch off-policy training as separate settings.

We evaluate fixed checkpoints on eight benchmarks. MATH500, OlympiadBench, MinervaMath, and Gaokao2023MathEn use greedy pass@1 on 500, 674, 272, and 383 problems. AIME24, AIME25, AMC23, and AMC24 use mean@16 on 30, 30, 40, and 45 problems, respectively. The table’s Average is micro accuracy: it pools correct responses across these eight benchmarks, with 500, 674, 272, 383, 480, 480, 640, and 720 responses, totaling 4,149 per seed. Each response contributes once. Pass@16 describes problem coverage and is reported separately in the learning curves.

\[\mathrm{Average} =100\,\frac{\sum_{d\in\mathcal D}N_{\mathrm{correct},d}} {\class{pkl-math-focus}{\sum_{d\in\mathcal D}N_{\mathrm{responses},d}}}, \qquad \sum_{d\in\mathcal D}N_{\mathrm{responses},d}=4149.\]

Here $\mathcal D$ contains the eight benchmarks. Each benchmark’s weight equals its share of the evaluated responses, so a benchmark with more evaluated responses contributes more to Average. The aggregate answers how often a response is correct across this evaluation budget; the individual columns show performance on each task. For the three-seed 1.7B rows, this response-count-weighted accuracy is computed within each seed and then averaged. Base rows evaluate the corresponding base models.

Scores in the held-out evaluation table are percentages. The 1.7B rows report means and sample standard deviations over three seeds at 2,000 updates; standard deviation describes the spread across runs, and Average reports only the seed mean. The 4B checkpoints are evaluated at approximately 1,500 updates. Checkpoints are fixed independently of peaks in online evaluation. The table reports raw scores, while the learning curves use EMA $\alpha=0.20$ to trace training dynamics.

在这四组比较中,Proximal KL 后段的 mean@16 和 pass@16 都更高,收益同时出现在回答准确率和题目覆盖率上。下面用独立的 checkpoint 评测检验这些收益是否延续到更广的 benchmark 集合。

旧数据下的结果也引出一个对照问题:如果每次更新都使用刚采样的回答,两种方法的表现如何?因此,checkpoint 比较包含 on-policy 设置,有意采用另一种数据使用方式:每批新生成的回答只更新一次,GRPO 控制关闭 PPO clipping。Proximal KL 使用 full tail、$\beta=0.03$、不截断 future cost,reference 每 50 次更新刷新。这组比较同时规定采样 staleness、数据复用方式与更新规则,结论适用于这一完整协议。

“lag=0”描述采样版本与开始处理这批数据时的 learner 版本之间的关系。lag=0 的同一批回答若被连续更新四次,所用的都是首次更新之前生成的回答,其 behavior 概率保持不变,而 learner 持续变化。因此,后续 minibatch 更新已经在使用较旧策略生成的数据。我们在表中分别报告一次更新的 on-policy 与 lag=0、多 minibatch 的 off-policy。

独立评测覆盖八个 benchmark。MATH500、OlympiadBench、MinervaMath、Gaokao2023MathEn 分别在 500、674、272、383 道题上计算 greedy pass@1。AIME24、AIME25、AMC23、AMC24 分别在 30、30、40、45 道题上计算 mean@16。表中的 Average 是 micro accuracy:汇总这八套 benchmark 的正确回答数,再除以总回答数。每 seed 的回答数依次为 500、674、272、383、480、480、640、720,总计 4,149。每个回答只计数一次。pass@16 描述题目覆盖率,在训练曲线中单独展示。

\[\mathrm{Average} =100\,\frac{\sum_{d\in\mathcal D}N_{\mathrm{correct},d}} {\class{pkl-math-focus}{\sum_{d\in\mathcal D}N_{\mathrm{responses},d}}}, \qquad \sum_{d\in\mathcal D}N_{\mathrm{responses},d}=4149.\]

这里 $\mathcal D$ 包含八个 benchmark,每个 benchmark 的权重等于其回答数占总回答数的比例,因此评测回答更多的 benchmark 对 Average 的影响也更大。这个汇总量衡量整套评测中正确 response 的比例,各列保留具体任务上的表现。1.7B 的三 seed 行先在每个 seed 内计算这个准确率,再对三个结果取均值。Base 行是对应 base model 的评测结果。

Held-out evaluation 表是这一部分的主结果。 下面可以筛选模型、对照同一设置中的两个方法,指标均为百分比。1.7B 行报告训练 2,000 次更新后三个 seed 的均值与样本标准差,标准差描述不同运行之间的分数离散程度,Average 只显示 seed 均值;4B 评测约 1,500 次更新时的 checkpoint。Checkpoint 的选择独立于在线曲线的峰值。表中报告原始评测分数,训练曲线采用 EMA $\alpha=0.20$ 展示动态。

Independent held-out evaluation across eight benchmarks. Filter by model or compare methods within a matched setting; individual benchmark scores remain visible alongside Average, which does not display variance.
八个 benchmark 的独立 held-out evaluation。可筛选模型、比较匹配设置中的方法;Average 不额外展示方差,各 benchmark 的分数保留在对应列中。

Across all seven matched off-policy comparisons, Proximal KL has higher Average than GRPO, with a largest absolute gain of 2.58 percentage points. The comparisons cover two model scales, two learning rates, and both fresh rollouts reused for multiple updates and stale rollout data. The aggregate improvement is measured on fixed checkpoints across the eight-benchmark evaluation suite.

AIME25 mean@16 favors GRPO in several comparisons, showing that the aggregate gain coexists with task-specific trade-offs. Each table column bolds the higher mean within a matched pair; both entries are bold when their unrounded gap is below 0.50 percentage points. This rule also applies to Average.

Fresh sampling and data reuse give different comparisons. With one update per fresh batch, the methods have comparable Average: 34.50 for GRPO and 34.09 for Proximal KL. GRPO has the higher aggregate in this on-policy comparison, while Proximal KL improves OlympiadBench, MinervaMath, and AIME24 mean@16. With fresh rollouts reused across four minibatches, Proximal KL’s Average is higher, 33.13 versus 31.99. Reusing those responses develops learner–data mismatch after the first update.

Accuracy at higher staleness. For 4B, we report the staleness-16 score minus the staleness-4 score across the same eight benchmarks. Average changes by +0.22 percentage points for Proximal KL and −1.04 for GRPO, computed from unrounded scores. Proximal KL’s Average rises from 48.13 to 48.35, while GRPO’s falls from 47.17 to 46.13. AIME24 mean@16 changes by +2.71 and −0.42 points, respectively. Proximal KL has the more favorable signed change on six of the eight benchmarks.

These are comparisons of complete training configurations. At 4B, Proximal KL uses a 32-token unit-weight prefix with a linearly decayed tail at staleness 4, and $H=8$ at staleness 16; both use $\beta=0.25$ and $\epsilon_F=0.05$. The higher-staleness configuration retains the accuracy advantage over GRPO. The mechanism ablations below examine individual update choices.

These comparisons test the practical update as a whole. Next we separate its ingredients: current-token correction, nonlinear clipping, cost bounds, and the reach of future credit.

七对匹配的 off-policy 比较中,Proximal KL 的 Average 都高于 GRPO,最大绝对增益为 2.58 个百分点。这个结果跨越两种模型规模、两种学习率,也包括新鲜 rollout 被多次更新复用,以及直接使用旧 rollout 的情况。这个总体收益来自固定 checkpoint 在八个 benchmark 上的独立评测。

多组比较中的 AIME25 mean@16 仍然偏向 GRPO,说明总体收益与具体任务上的得失同时存在。表中每一列都在匹配的方法对内加粗较高均值;未舍入分数的差距小于 0.50 个百分点时,两项都加粗。Average 也采用这一规则。

新鲜采样与数据复用,需要分开比较。 每批新鲜回答只更新一次时,两种方法的 Average 接近:GRPO 为 34.50,Proximal KL 为 34.09。这组 on-policy 比较中,GRPO 的总体分数较高,Proximal KL 则改善了 OlympiadBench、MinervaMath 和 AIME24 mean@16。新鲜 rollout 被复用四个 minibatch 时,Proximal KL 的 Average 为 33.13,高于 GRPO 的 31.99。这种复用会在第一次更新后产生数据与 learner 的差异。

较大 staleness 下的准确率。 对 4B,我们在相同八个 benchmark 上,用 staleness 16 的分数减去 staleness 4 的分数。根据未舍入分数计算,Proximal KL 的 Average 变化为 +0.22 个百分点,GRPO 为 −1.04。Proximal KL 的 Average 从 48.13 到 48.35,GRPO 从 47.17 到 46.13;AIME24 mean@16 分别变化 +2.71 与 −0.42 个百分点。八个 benchmark 中,Proximal KL 有六个的变化更有利。

这里比较的是完整训练配置。4B 的 Proximal KL 在 staleness 4 下使用前 32 个 token 权重为 1、后续 tail 线性衰减的配置,在 staleness 16 下使用 $H=8$;两者都使用 $\beta=0.25$、$\epsilon_F=0.05$。较大 staleness 的配置保留了相对 GRPO 的准确率优势。下面的机制消融单独考察各个更新选择。

这些比较检验了整个实践更新。接下来,我们分别考察它的组成部分:当前 token 的校正、非线性 clipping、代价界限与 future credit 的范围。

Mechanism ablations

Starting from the full-tail working default, we examine which update choices sustain its gains and which simple adjustments can improve it. The ablations test current-token importance correction, GRPO clipping width and baseline sensitivity, the bound on individual future costs, and the correction horizon. Bounded costs work across a useful range of thresholds. Intermediate horizons can improve accuracy, and a separate fixed-policy diagnostic measures how shortening the sum reduces scalar correction variance.

从 full-tail working default 出发,我们检验哪些更新选择支撑了收益,以及哪些简单调整还能进一步改善它。Ablation 分别考察当前 token 的 importance correction、GRPO clipping width 与 baseline sensitivity、单个 future cost 的上限,以及 correction horizon。Cost bound 在一段有效范围内都能取得良好表现;intermediate horizon 可以改善准确率,单独的 fixed-policy 诊断则测量缩短求和如何降低 scalar correction variance。

Importance correction

The first ablation asks how sampling correction affects an update with the same Future-KL credit. To isolate that choice, this comparison fixes the model at 1.7B, the learning rate at $5\times10^{-6}$, staleness at 16, and the Future-KL configuration at full tail with $\beta=0.30$. All three updates retain the same form of token-specific future credit. Only the sampling weight changes.

Token-wise IS uses the current action’s weight $w_{m,i}$. Sequence-level IS uses the geometric mean of the probability ratio for the whole response. That weight is detached and multiplies each token’s own coefficient:

\[\bar W_m =\left( \frac{\pi_\theta(a_{m,1:T_m}\mid x)} {\pi_{\mathrm{behav},m}(a_{m,1:T_m}\mid x)} \right)^{\class{pkl-math-focus}{1/T_m}}.\]

The IS-free control sets the weight to 1. Both controls retain each token’s own $\widehat A_m-C_{m,i}^{(H)}$ and use their stated weight as the sole importance factor. The comparison changes how sampling correction enters the update while preserving each token’s future credit.

Exact response-level change of measure uses the full probability-ratio product: multiplying a response’s behavior probability by that ratio recovers its learner probability. Taking its $T_m$-th root generally breaks this equality, so averaging the reweighted responses can give a different expectation. The exponential-variance calculation in the off-policy theory section describes the full product. Here we directly measure training with the geometric-mean and IS-free weights.

第一个消融关心:保持 Future-KL credit 的形式不变时,sampling correction 会怎样影响更新?为单独考察这个选择,这一组固定 1.7B、学习率 $5\times10^{-6}$、staleness 16、full tail 和 $\beta=0.30$。三条曲线保留相同形式的 token-wise future credit,只改变 sampling weight。

Token-wise IS 使用当前动作的 $w_{m,i}$。Sequence-level IS 使用整条 response 概率比的几何平均,并将它 detach 后乘每个 token 自己的 coefficient:

\[\bar W_m =\left( \frac{\pi_\theta(a_{m,1:T_m}\mid x)} {\pi_{\mathrm{behav},m}(a_{m,1:T_m}\mid x)} \right)^{\class{pkl-math-focus}{1/T_m}}.\]

IS-free 将权重设为 1。两种控制都保留每个 token 自己的 $\widehat A_m-C_{m,i}^{(H)}$,并将各自定义的权重作为唯一的 importance factor。比较改变的是采样校正的方式,每个 token 的 future credit 保持原有形式。

精确的 response-level change of measure 使用完整概率比乘积:用某条回答的 behavior 概率乘这个比值,恰好得到它的 learner 概率。取 $T_m$ 次方根通常会破坏这个等式,因此对重新加权的回答取平均,可能得到不同的期望。Off-policy 理论一节中的指数方差计算描述完整乘积。这里直接测量使用 geometric-mean 与 IS-free 权重时的训练表现。

All three updates retain token-specific Future-KL credit. Only their sampling weights change.
三组都保留 token-wise Future-KL credit,只改变 sampling weight。

Token-wise correction sustains stronger training pass@16 and achieves higher MATH500 greedy pass@1 and AIME24 mean@16 than both controls. The controls lose substantial held-out accuracy while retaining future credit. These results support the practical role of current-action sampling correction alongside future feedback.

Token-wise 校正维持更好的训练 pass@16,并在 MATH500 greedy pass@1 与 AIME24 mean@16 上优于两种控制。两种控制保留了 future credit,held-out accuracy 仍明显下降。这些结果支持在 future feedback 之外保留当前动作的采样校正。

GRPO clipping width

GRPO’s clipping interval controls how far the policy ratio can move before its contribution is clipped. We compare $\epsilon_{\mathrm{clip}}=0.2$ and $0.4$, which give intervals $[0.8,1.2]$ and $[0.6,1.4]$. Both runs use Qwen3-1.7B, learning rate $10^{-5}$, controlled staleness 4, four optimizer minibatches, and the same reward normalization. The three panels track training mean@16, training pass@16, and raw gradient norm before optimizer clipping.

GRPO 的 clipping interval 决定 policy ratio 变化到何种程度时,其贡献会被 clip。我们比较 $\epsilon_{\mathrm{clip}}=0.2$ 与 $0.4$,对应区间 $[0.8,1.2]$ 和 $[0.6,1.4]$。两组都使用 Qwen3-1.7B、学习率 $10^{-5}$、controlled staleness 4、四个 optimizer minibatch,以及相同 reward normalization。三个面板分别展示 training mean@16、training pass@16,以及 optimizer clipping 前的原始 gradient norm。

GRPO clipping widths 0.2 and 0.4. Both runs completed 1,000 updates. Accuracy uses EMA 0.20; gradient norms are raw and plotted on a logarithmic axis.
GRPO clipping width 0.2 与 0.4。两组都完成了 1,000 次更新。准确率使用 EMA 0.20,gradient norm 保留原始值并采用对数坐标。

The wider interval produces larger gradient excursions together with a temporary decline in training mean@16 and pass@16. Width 0.2 maintains a steadier rise in training mean@16 with smaller gradient excursions. This comparison supports retaining 0.2 for the reported GRPO baseline. Appendix C.5 of the paper gives the clipping-width experiment.

较宽区间下,gradient excursion 更大,training mean@16 与 pass@16 也出现暂时下降。宽度 0.2 的 training mean@16 上升更平稳,gradient excursion 更小,因此报告结果中的 GRPO baseline 保留 0.2。这组 clipping-width 实验对应论文附录 C.5。

Baseline perturbation

Sampling correction determines how an answer is weighted. The update also depends on where its advantage sits relative to zero. Group-relative advantages are computed from the sampled rewards, and their signs determine which contributions PPO clipping removes. Shifting every advantage in a group upward can turn negative advantages positive, changing which token contributions the clipping gate switches off.

We add 1 to each normalized advantage in groups with nonconstant rewards:

\[\widehat A'_{g,m}=\widehat A_{g,m}\class{pkl-math-focus}{+I_g}, \qquad I_g=\mathbf 1\{\max_m R_{g,m}>\min_m R_{g,m}\}.\]

This leaves verifier rewards and within-group advantage differences unchanged, modeling a common baseline shift. Proximal KL computes future costs as usual and subtracts them after the shift. Comparing each method with its own unperturbed run isolates its observed sensitivity relative to its original performance.

Sampling correction 决定一个回答的权重;更新还取决于它的 advantage 位于零的哪一侧。Group-relative advantage 由组内采样奖励计算,其符号决定 PPO clipping 会移除哪些贡献。把整个组的 advantage 一起向上挪,原本负的回答可能变正,从而改变哪些 token 被 clip gate 关闭。

我们在奖励不全相同的组中,将每个 normalized advantage 加 1:

\[\widehat A'_{g,m}=\widehat A_{g,m}\class{pkl-math-focus}{+I_g}, \qquad I_g=\mathbf 1\{\max_m R_{g,m}>\min_m R_{g,m}\}.\]

这个共同 baseline 偏移保留 verifier reward 和同组 advantage 之间的差。Proximal KL 按原方法计算 future cost,在偏移之后再减去它。每种方法与自己的未扰动版本对照,测量相对原有表现的变化。

Solid and dashed lines show clean and perturbed advantages. Shading represents the within-method score difference.
每种方法与自己的未扰动版本比较。实线、虚线分别表示未扰动与扰动;阴影表示两条曲线的分数差。

Across the three displayed MATH500 and AIME24 metrics, Proximal KL is less sensitive to the intervention. This supports a practical advantage of additive future feedback over a gate that depends on the advantage sign. The shading shows the observed score difference between each method’s clean and perturbed runs.

To understand how the advantage sign can affect the update’s mean, consider a local calculation. Fix the proximal ratio above its upper bound, for example $\rho>1.2$. Suppose the true advantage is zero and its estimation error takes values $+\sigma$ and $-\sigma$ with equal probability. Without clipping, the coefficient has mean zero and variance $\sigma^2$.

PPO removes the positive contribution at this ratio and retains the negative one. The coefficient becomes equally likely to be $0$ or $-\sigma$:

\[\mathbb E[q_{\mathrm{clip}}]=\class{pkl-math-focus}{-\frac{\sigma}{2}}, \qquad \operatorname{Var}(q_{\mathrm{clip}})=\class{pkl-math-focus}{\frac{\sigma^2}{4}}.\]

Clipping shifts the conditional mean away from the true zero advantage, introducing bias in this coefficient even as its conditional variance decreases. The factor-of-four reduction applies to this local coefficient calculation, where the common importance-weighted score has been factored out. Variance of the full optimization update also depends on the score and its correlations with the coefficient.

We can also track an added baseline shift directly through the ideal unclipped update. With token-wise weighting, a history-only shift cancels in expectation. For a detached shift $b(h)$ that is fixed across current actions at a given history,

\[\mathbb E_{a\sim\pi_{\mathrm{behav}}} \left[\frac{\pi_\theta(a\mid h)}{\pi_{\mathrm{behav}}(a\mid h)} b(h)\nabla\log\pi_\theta(a\mid h)\right] =b(h)\nabla\sum_a\pi_\theta(a\mid h)=0.\]

An additive KL cost unchanged by the shift preserves this cancellation. The experimental $I_g$ depends on sampled group rewards: changing a generated answer can change whether its group has unequal rewards and therefore whether the shift is applied. The history-only identity holds a shift fixed across current actions; the experiment measures a group-dependent intervention. Its effect is the change between the clean and perturbed trajectories shown above.

在 MATH500 与 AIME24 的三个展示指标上,Proximal KL 对这项扰动更不敏感。这支持加性 future feedback 在处理 baseline error 时的实践作用。图中实线和虚线分别代表未扰动与扰动,阴影衡量每种方法在干预下的表现变化。

Advantage 的符号为什么会影响更新的均值?可以用一个局部计算看清楚。固定 proximal ratio 已超过上界,例如 $\rho>1.2$。设真实 advantage 为零,估计误差以同样概率取 $+\sigma$ 和 $-\sigma$。没有 clipping 时,系数的均值为零、方差为 $\sigma^2$。

PPO 此时关掉正 advantage 的贡献,保留负的贡献,因此系数变成等概率的 $0$ 与 $-\sigma$:

\[\mathbb E[q_{\mathrm{clip}}]=\class{pkl-math-focus}{-\frac{\sigma}{2}}, \qquad \operatorname{Var}(q_{\mathrm{clip}})=\class{pkl-math-focus}{\frac{\sigma^2}{4}}.\]

Clipping 使条件均值偏离真实的零 advantage,因此这个系数在条件方差减小的同时产生了 bias。这里的四分之一适用于这个局部系数例子,公共的 importance-weighted score 已被提出。完整优化更新的方差还取决于 score 及其与系数的相关性。

还可以单独追踪加入的 baseline 偏移在理想未 clip 更新中的作用。使用 token-wise weighting 时,history-only 偏移能在期望中抵消。对给定历史后在各个当前动作间保持固定的 detached 偏移 $b(h)$,

\[\mathbb E_{a\sim\pi_{\mathrm{behav}}} \left[\frac{\pi_\theta(a\mid h)}{\pi_{\mathrm{behav}}(a\mid h)} b(h)\nabla\log\pi_\theta(a\mid h)\right] =b(h)\nabla\sum_a\pi_\theta(a\mid h)=0.\]

保持不变的加性 KL cost 保留了这个抵消。实际干预里的 $I_g$ 依赖本组抽到的奖励:改变一个生成的回答,可能改变组内奖励是否相同,从而改变偏移是否被施加。History-only 恒等式固定不同当前动作所用的偏移;实验测量的是依赖采样组的干预,其效果由上面未扰动与扰动轨迹之间的差值给出。

Future-KL cost bounds

The working default bounds each future log-ratio cost at $\epsilon_F=0.05$ before adding it to the correction. A cost inside the interval is retained; a cost outside it is replaced by the nearest bound. We examine this choice using 1.7B at learning rate $5\times10^{-6}$ and staleness 4, fixing full tail and $\beta=0.30$ while varying only $\epsilon_F$. The panels show AIME24 mean@16, pass@16, and gradient norm before optimizer clipping. This norm measures the size of the computed loss gradient; optimizer clipping subsequently rescales the whole gradient if it exceeds its threshold. The future-cost bound acts earlier, on the terms used to compute that gradient.

Working default 在累加 correction 前,用 $\epsilon_F=0.05$ 限制每个 future log-ratio cost。区间内的 cost 原样保留,超出区间的 cost 替换为最近的边界值。我们在 1.7B、学习率 $5\times10^{-6}$、staleness 4 下检验这一选择:固定 full tail 与 $\beta=0.30$,只改变 $\epsilon_F$。面板展示 AIME24 mean@16、pass@16,以及 optimizer clipping 之前的 gradient norm。这个 norm 衡量所计算的 loss gradient 大小;随后,optimizer clipping 在其超过阈值时缩放整个梯度。Future-cost bound 更早作用于计算梯度所用的各项 cost。

Only the per-token cost bound changes. Gradient norms are measured before optimizer clipping; the unbounded configuration still retains Future-KL regularization.
固定 full tail 和 β = 0.30,只改变每个 token 的 cost 上限。gradient norm 在优化器 clipping 前测量;无上限版本仍保留 Future-KL 正则化。

The default $\epsilon_F=0.05$ achieves good AIME24 mean@16 and pass@16, with smaller pre-clipping gradient excursions than $2.0$ or no bound. The moderately larger bound $0.5$ also retains good accuracy, showing that useful regularization spans more than one precise threshold. The unbounded version retains Future-KL regularization and removes only the bound on each cost.

These results support bounding individual future costs before they accumulate in the correction. Within the tested range, increasing the bound further does not consistently improve accuracy.

Plotting norms before optimizer clipping is important here. Otherwise, spikes of very different magnitudes would sit against the same ceiling, obscuring whether $\epsilon_F$ changed the stochastic signal reaching the optimizer.

默认 $\epsilon_F=0.05$ 取得良好的 AIME24 mean@16 与 pass@16,pre-clipping gradient excursion 比 $2.0$ 和无上限版本更小。适度增大的 bound $0.5$ 也保留了良好准确率,说明有效的正则化覆盖了一段 threshold 范围。无上限版本保留 Future-KL regularization,仅移除单个 cost 的上限。

这些结果支持在 future cost 累积进 correction 之前限制其大小。在测试范围内,进一步放大 bound 没有持续改善准确率。

梯度图也要读准。它画的是 optimizer clipping 之前的范数,所以能够看到优化器随后可能压住的尖峰。若只画 clipping 后的范数,很多不同强度的异常会都贴在同一个阈值上,难以判断 $\epsilon_F$ 是否真的改变了输入给优化器的随机信号。

Future-KL horizon

Starting from the full-tail working default, we ask whether a shorter horizon can improve accuracy. At 1.7B, learning rate $5\times10^{-6}$, and staleness 4, we compare full tail, intermediate windows, and a one-token correction. The comparison includes fixed-$\beta$ settings and a pair with matched $\beta H$: the first tests horizon at the default coefficient, and the second tests whether increasing the local coefficient compensates for removing future terms. Truncation omits part of the ideal future credit and can also change correction fluctuations, so we examine accuracy and fixed-policy variance separately.

从 full-tail working default 出发,我们进一步检验缩短 horizon 能否改善准确率。在 1.7B、学习率 $5\times10^{-6}$、staleness 4 下,比较 full tail、intermediate window 和 one-token correction。其中包括固定 $\beta$ 的设置,以及一组匹配 $\beta H$ 的对照:前者在默认 coefficient 下改变 horizon,后者检验增大当前 token 的 coefficient 能否补偿被删去的 future term。截断会省略部分 ideal future credit,也会改变 correction 的波动,因此我们分别考察准确率与 fixed-policy variance。

Learning curves compare the reach and strength of future credit. The fixed-policy diagnostic uses the same responses at every horizon and measures scalar correction variance.
训练曲线比较 future credit 的范围与强度。固定策略的诊断在每个 horizon 上复用相同 response,测量 scalar correction variance。

Both $H=64$ configurations outperform full tail on late AIME24 mean@16 and pass@16 over their common observation interval, including a comparison keeping $\beta=0.30$ unchanged. This fixed-$\beta$ comparison provides evidence of a horizon benefit within the tested setting. Meanwhile, $(H,\beta)=(1,4.80)$ and $(64,0.075)$ both have $\beta H=4.8$, and the former improves mean@16 more slowly. Credit from later positions contributes useful information beyond the strength of the current-token penalty.

The intermediate window improves on the full-tail default in these training comparisons. The fixed-policy diagnostic below measures correction fluctuations independently: it holds policies and responses fixed while changing only horizon. These measurements establish the variance effect on that data; they do not identify it as the cause of the training-accuracy gain.

We measure the variance side separately. Training changes the policy as well as the observed responses. To isolate the effect of horizon on correction fluctuations, fix a separate retained pair of Qwen3-1.7B checkpoints and a shared bank of tokenized responses: 16 prompts with 16 responses per prompt. Fix $\beta=0.30$ and $\epsilon_F=0.05$. For each response, measure how its first-token scalar correction changes with $H$. The first subscript identifies the prompt and the second its sampled answer. We sum the clipped log-ratio costs from the first token up to the chosen horizon or the end of that answer, whichever comes first:

\[C_{pm}^{(H)} =\beta\sum_{j=1}^{\min(H,T_{pm})} \operatorname{clip}(\log\rho_{pm,j},-\epsilon_F,\epsilon_F).\]

Different prompts can have different mean corrections. To measure variation among answers to the same problem, first subtract each prompt’s mean correction from its individual response corrections. Sum the squared deviations and divide by the number of responses minus one to obtain that prompt’s sample variance. Finally, average these variances equally across prompts. In the formula, the uppercase counts refer to prompts and responses per prompt:

\[\overline C_p^{(H)}=\frac1M\sum_m C_{pm}^{(H)}, \qquad \widehat V(H)=\frac1P\sum_p\frac1{M-1}\sum_m \bigl(C_{pm}^{(H)}-\overline C_p^{(H)}\bigr)^2.\]

Only the extent of the sum changes. Policies remain fixed, every horizon uses the same responses, and variance is computed within each prompt before averaging across prompts. The interactive plot shows raw measured $\widehat V(H)$ without rescaling or smoothing. Over the tested horizons it increases with $H$, so truncating the tail reduces scalar correction fluctuations in this diagnostic.

The measured quantity is scalar correction variance: how much a single numerical correction changes between sampled responses. In a policy gradient, that correction multiplies an importance-weighted score vector whose magnitude and direction also vary across tokens and responses. Large corrections may coincide with large score vectors, or with vectors that cancel when summed. The full update also contains reward advantages and sums contributions across positions. Its parameter-gradient variability depends on these joint fluctuations.

Why call it a bias–variance trade-off? The derivation supplies the bias argument: finite $H$ omits a definite part of the full future sum. The fixed-policy diagnostic supplies variance evidence: shorter sums fluctuate less on the same data. Training curves show how the choice affects accuracy. These three pieces of evidence play different roles in the mechanism explanation.

To identify the bias source separately from cost clipping, consider the unbounded costs. The omitted tail is

\[C_i^{(\mathrm{full})}-C_i^{(H)} =\class{pkl-math-focus}{\beta\sum_{j=i+H}^{T}\ell_j}.\]

At position $i$, removing this cost changes the expected token-wise update by $\mathbb E_{\mathrm{behav}}[w_i\psi_i(C_i^{(\mathrm{full})}-C_i^{(H)})]$. A small value of this vector means a small change at that position; a large value means a substantial truncation effect. The relevant quantity includes the importance weight, the score vector, and the omitted tail together. The task and policies determine their joint contribution.

Variance of a sum includes both individual variances and pairwise covariances. Costs that rise and fall together across responses reinforce fluctuations; costs moving in opposite directions can offset them. The direction of the measured change therefore depends on these joint fluctuations. The increasing curve here describes the tested policies, responses, and horizons.

On fixed data, scaling $\beta$ multiplies every correction and its deviation from the mean by the same factor. Variance averages squared deviations, giving the $\beta^2$ scaling. Changing $\beta$ during training also changes the policy trajectory, so learning-curve differences cannot be extrapolated from this identity alone. The threshold $\epsilon_F$ changes costs nonlinearly: moving a bound changes the previously clipped terms while leaving costs inside the interval unchanged.

Matching $\beta H$ controls a rough maximum accumulation scale. With a fixed per-token bound, the sum’s absolute value is at most that bound times the number of included terms, multiplied by the penalty coefficient. Matching the coefficient–horizon product therefore matches this upper bound when enough tokens remain. Actual corrections also depend on which positions contribute and whether their signed costs reinforce or cancel. A large coefficient at $H=1$ uses the current token alone; a smaller coefficient at $H=64$ includes later positions. The two choices therefore retain distinct information even with equal upper bounds.

两个 $H=64$ 设置在共同观察区间后段的 AIME24 mean@16 与 pass@16 上都优于 full tail,其中包括 $\beta=0.30$ 不变的比较。这个固定 $\beta$ 的对照支持缩短 horizon 在所测设置中有收益。另一方面,$(H,\beta)=(1,4.80)$ 与 $(64,0.075)$ 都有 $\beta H=4.8$,前者的 mean@16 上升更慢。未来位置的 credit 提供了当前 token 惩罚强度之外的有用信息。

这组训练比较中,intermediate window 改善了 full-tail default 的准确率。下面的 fixed-policy 诊断独立测量 correction 波动:保持策略与 response 固定,只改变 horizon。它确定了这批数据上的 variance 变化,但没有将这一变化识别为训练准确率增益的原因。

方差这一半,我们单独测。 训练会同时改变策略与观察到的 response。为单独考察 horizon 对 correction 波动的影响,我们另外取一对保留下来的 Qwen3-1.7B checkpoint,固定这两份策略与同一批已 tokenized 的 response。数据包含 16 个 prompt,每题 16 个回答,固定 $\beta=0.30$ 与 $\epsilon_F=0.05$。对每条 response,只计算第一个 token 的 scalar correction 随 $H$ 怎么变化。公式第一个下标标记 prompt,第二个标记该题的采样回答;从第一个 token 开始累加截断后的 log-ratio cost,到指定 horizon 或回答末尾时停止:

\[C_{pm}^{(H)} =\beta\sum_{j=1}^{\min(H,T_{pm})} \operatorname{clip}(\log\rho_{pm,j},-\epsilon_F,\epsilon_F).\]

不同 prompt 的平均 correction 可能不同。为了测量同一道题不同回答之间的波动,先在同一个 prompt 的 16 个 response 中,用各自的 correction 减去该题的平均 correction。将这些偏离的平方求和,再除以回答数减一,得到这道题的样本方差;最后对各题的方差等权平均。公式中的大写计数分别表示 prompt 数与每题的回答数:

\[\overline C_p^{(H)}=\frac1M\sum_m C_{pm}^{(H)}, \qquad \widehat V(H)=\frac1P\sum_p\frac1{M-1}\sum_m \bigl(C_{pm}^{(H)}-\overline C_p^{(H)}\bigr)^2.\]

这样改变的只有累加到多远。策略保持固定,各个 horizon 复用同一批 response;方差先在每道题内部计算,再跨题平均。交互图直接展示测得的原始 $\widehat V(H)$,不缩放单位,也不做平滑。在测试的 horizon 上,它随 $H$ 增大而上升,因此截短 tail 降低了这项诊断中的 scalar correction 波动。

这项测量针对 scalar correction variance,也就是单个数值修正在不同采样回答之间的波动。在 policy gradient 中,这个 correction 还要乘 importance-weighted score 向量,而该向量的大小与方向也随 token 和回答变化。较大的 correction 可能恰好对应较大的 score,也可能对应求和时互相抵消的向量。完整更新还包含 reward advantage,并对各位置的贡献求和,其波动取决于这些量如何共同变化。

那么为什么仍然称为 bias–variance trade-off?bias 一侧来自推导:有限 $H$ 明确漏掉了完整 future sum 的一段;variance 一侧来自固定策略诊断:同样数据上,更短的累计修正波动更小;训练曲线则展示这种取舍对最终准确率的实际影响。三种证据的分工不同,合在一起才形成机制解释。

为了把截断的 bias 来源与 cost clipping 分开考察,先使用不截断的 cost。此时,有限 horizon 与 full tail 的差为

\[C_i^{(\mathrm{full})}-C_i^{(H)} =\class{pkl-math-focus}{\beta\sum_{j=i+H}^{T}\ell_j}.\]

在位置 $i$,删去这段 cost 后,期望 token-wise 更新的变化为 $\mathbb E_{\mathrm{behav}}[w_i\psi_i(C_i^{(\mathrm{full})}-C_i^{(H)})]$。这个向量很小,表示该位置的更新变化很小;它很大,则表示截断造成了明显变化。这里需要一起考察 importance weight、score 向量与被省略的 tail,实际任务和策略决定了三者的共同贡献。

随机 cost 之和的 variance 包含各项自身的 variance 与成对的 covariance。不同 cost 在回答之间经常一起升高或降低,会加强总波动;反向变化则可能相互抵消。因此,实测变化的方向取决于这些共同波动。这里上升的曲线描述的是所测试的策略、response 与 horizon。

$\beta$ 整体缩放修正,在固定数据下,每个 correction 及其偏离均值的量都按同一比例变化。方差对这些偏离取平方后平均,因此按 $\beta^2$ 缩放。但训练中改变 $\beta$ 还会改变策略路径,不能把训练曲线差异只按这个比例外推。$\epsilon_F$ 则非线性改变单个 cost:移动边界会改变原本被截断的项,仍在区间内的 cost 保持不变。

匹配 $\beta H$ 的实验控制了一个粗略最大累积尺度。单个 token 的 cost 上限固定时,求和的绝对值至多等于这个上限乘参与的项数,再乘惩罚系数。因此,在剩余 token 足够长时,匹配系数与 horizon 的乘积就匹配了这个上界。实际 correction 还取决于哪些位置参与,以及它们带符号的 cost 是相互加强还是抵消。$H=1$ 的大系数只使用当前 token,$H=64$ 的小系数包含后续位置。两者即使上界相同,保留的信息也有区别。