Off-Policy Policy Optimization with Proximal KL

Proximal KL overview: algorithm, shared fixed point under Proximal KL, stability tests, off-policy results, and ablations.
A visual overview of the algorithm, theory and experiments.
算法、理论与实验的动画概览。

Reading note. This blog is an introduction to our paper. Please read the paper for rigorous theoretical proofs and the full discussion of experimental results.

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 of our paper 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$,两题成功率都能趋于一,因此这套参数化能够表示同时解出两题的策略。

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

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

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

\[(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 objective 之间的差距来自哪道题。

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 用下面的离散更新近似 gradient flow:

\[\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 objective 的梯度是

\[\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?

Why token-wise correction works

In asynchronous training, a response may be generated while the learner is already updating. Its generating policy, the behavior policy $\pi_{\mathrm{behav}}$, can therefore differ from the current learner. Can we learn from these old responses without changing the policy that maximizes our proximal objective? This section explains why full Future-KL makes that possible with token-wise correction, then connects the shared target to learning progress.

Keep the two policy comparisons separate: behavior tells us where the data came from; reference $\pi_k$ defines the KL penalty. We hold that reference fixed while studying one round. Staleness counts recorded policy versions between behavior and learner, but their probability mismatch depends on how much those updates changed the model. Reusing a batch for several updates can also create mismatch, even if its initial staleness is zero.

在 asynchronous 训练中,生成回答的同时,learner 也在更新。因此,实际生成回答的 behavior policy $\pi_{\mathrm{behav}}$ 可能已经落后于当前 learner。使用这些旧回答,能否仍然学到使 proximal objective 最大的策略? 这一节从直觉上解释,full Future-KL 为什么能让 token-wise correction 保留这个目标,以及更新如何进一步带来学习进展。

先区分两种策略比较:behavior 说明数据从哪里来,reference $\pi_k$ 决定 KL penalty。分析一轮更新时,我们保持 reference 固定。Staleness 记录 behavior 与 learner 相差多少个策略版本,但概率分布的 mismatch 还取决于这些更新实际改变了多少。即使一批回答开始使用时 staleness 为零,对它进行多次更新也会产生 mismatch。

Correcting old responses

Importance sampling compensates for a change in sampling probabilities. Exact sequence correction weights a complete response by the product of all token ratios:

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

Under the usual coverage condition, this product recovers the on-policy gradient in expectation. But multiplying many ratios can create high variance, as studied in work on the curse of horizon. Token-wise correction is a common practical choice, including in AReaL: each token’s update uses only its own $w_i$. It generally changes the expected update because the prefix and later tokens still come from behavior.

For Proximal KL, the token update combines that weight with the reward-minus-cost coefficient from the previous section:

\[\class{pkl-math-focus}{w_i}\,\psi_i \left(R-\class{pkl-math-focus}{C_i}-b(h_i)\right), \qquad C_i=\beta\sum_{j=i}^{T}\ell_j.\]

Here $\psi_i=\nabla_\theta\log\pi_\theta(a_i\mid h_i)$ is the token’s score, and $b(h_i)$ is a history-only baseline held fixed during differentiation. For the theory, $C_i$ includes the current token and every later token, without truncation or cost clipping. Our question is whether this expected update still vanishes only at the proximal target. Such a zero-expected-update policy is the stationary policy, or fixed point.

The sequence correction in this theoretical comparison is the exact product $W$. The later ablation separately tests geometric-mean and IS-free controls.

Importance sampling 通过加权补偿采样概率的变化。精确的 sequence correction 使用整条回答上所有 token 概率比的乘积:

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

在通常的 coverage 条件下,这个乘积能在期望上恢复 on-policy gradient。但多个概率比连乘可能带来很高的方差,curse of horizon 的研究讨论了这个问题。因此,实践中常采用 token-wise correction,AReaL 也是如此:每个 token 的更新只使用自己的 $w_i$。由于 prefix 和后续 token 仍来自 behavior,这一般会改变期望更新。

对于 Proximal KL,将这个权重与上一节的 reward-minus-cost 系数结合,得到 token 更新:

\[\class{pkl-math-focus}{w_i}\,\psi_i \left(R-\class{pkl-math-focus}{C_i}-b(h_i)\right), \qquad C_i=\beta\sum_{j=i}^{T}\ell_j.\]

这里 $\psi_i=\nabla_\theta\log\pi_\theta(a_i\mid h_i)$ 是 token 的 score,$b(h_i)$ 是求导时固定的 history-only baseline。理论中的 $C_i$ 包含当前及全部后续 token,不截短 horizon,也不做 cost clipping。现在的问题是:这份更新的期望是否仍然只在 proximal target 处为零?期望更新为零的策略称为 stationary policy,也就是 fixed point。

这里比较的 sequence correction 是精确乘积 $W$。后面的消融另行测试 geometric-mean 与 IS-free controls。

Pathwise cancellation

The difficulty is the continuation: after correcting the current token, the rest of the answer still comes from the old policy. Ordinarily, changing how an answer continues can change how we evaluate that token. Full Future-KL has a special property at the proximal target: different continuations may earn different rewards, but their KL costs change by exactly the same amount. Their reward-minus-cost is identical.

A short value-based view explains why. Let $V_k(h)$ be the optimal KL-regularized expected return from history $h$, and $Q_k(h,a)$ the value after choosing token $a$. Appending a token deterministically gives the next history $ha$, so $Q_k(h,a)=V_k(ha)$; for example, $(x,a_1)$ followed by $a_2$ becomes $(x,a_1,a_2)$. At a completed response, $V_k=R$.

At the proximal target $\pi_k^*$, a token’s KL cost is exactly the difference between the values after and before it:

\[\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) =\class{pkl-math-focus}{V_k(h_{i+1})-V_k(h_i)}.\]

Now add these costs along a response. Each intermediate value appears once with a plus sign and once with a minus sign. They cancel, leaving the terminal reward minus the starting value. Equivalently,

\[R(\tau)-\beta\sum_{j=i}^{T} \log\frac{\pi_k^*(a_j\mid h_j)}{\pi_k(a_j\mid h_j)} =\class{pkl-math-focus}{V_k(h_i)}.\]

This is pathwise cancellation: the identity holds separately for every supported continuation, including one sampled from an older behavior policy. The animation shows the matching terms cancelling.

难点在 continuation:校正当前 token 后,回答的剩余部分仍由旧策略生成。通常,后面怎么续写会影响我们对当前 token 的评价。但 full Future-KL 在 proximal target 处有一个特殊性质:不同 continuation 的 reward 可以不同,KL cost 却恰好变化同样的量。因此,reward-minus-cost 完全相同。

用 value 来看,这个机制很直接。$V_k(h)$ 表示从 history $h$ 出发,最优的 KL-regularized expected return;$Q_k(h,a)$ 表示选择 token $a$ 后的价值。追加 token 会确定地到达新 history $ha$,所以 $Q_k(h,a)=V_k(ha)$。例如,$(x,a_1)$ 后接 $a_2$,得到 $(x,a_1,a_2)$。回答结束时,$V_k=R$。

在 proximal target $\pi_k^*$ 处,每个 token 的 KL cost 恰好等于选择它前后的 value 差:

\[\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) =\class{pkl-math-focus}{V_k(h_{i+1})-V_k(h_i)}.\]

沿回答累加这些 cost,每个中间 value 都以正号、负号各出现一次,相互抵消,最后只留下终点 reward 减去起点 value。换一个写法:

\[R(\tau)-\beta\sum_{j=i}^{T} \log\frac{\pi_k^*(a_j\mid h_j)}{\pi_k(a_j\mid h_j)} =\class{pkl-math-focus}{V_k(h_i)}.\]

这就是 pathwise cancellation:对每条有支持的 continuation,等式都单独成立,包括旧 behavior policy 采样出的回答。动画展示了其中相同项的抵消过程。

At the proximal target, reward minus full Future-KL is the same on every continuation of a given history.

If we subtract only the costs after the current token, the remaining value is $Q_k(h_i,a_i)$. Including the current cost leaves $V_k(h_i)$. This distinction explains why the complete current-inclusive sum matters. Appendix E.2 of our paper derives these identities from the proximal objective.

在 proximal target 处,从同一个 history 出发,每条 continuation 的 reward 减去完整 Future-KL 都相同。

如果只减去当前 token 之后的 cost,留下的是 $Q_k(h_i,a_i)$;再计入当前 cost,才得到 $V_k(h_i)$。这也说明了为什么需要包含当前 token 的完整求和。论文的附录 E.2 从 proximal objective 出发推导这些恒等式。

A shared stationary policy

What does cancellation do for learning? At the target, every sampled continuation multiplies the current token’s score by the same coefficient, $V_k(h_i)-b(h_i)$. Current-token IS converts the action average from behavior to the target policy. The score under that policy has mean zero, so the expected update is zero. The coefficient itself need not be zero; averaging the weighted score is the crucial step.

To show that only the target has zero expected update, the proof works backward. At the final token, there is no continuation to account for, and the KL-regularized action choice has a unique optimum. Once later decisions equal their targets, cancellation gives each earlier action its exact Q-value. The earlier decision then has its own unique KL-regularized optimum. Repeating this backward induction identifies the whole stationary policy.

Token-wise and exact sequence correction share the same unique stationary policy: the proximal optimizer.

This policy maximizes expected reward minus response-level KL to the fixed reference. The theorem uses positive KL strength, full unmodified Future-KL and a detached history-only baseline; Appendix E.2 of our paper gives the support and expressiveness assumptions and the complete proof.

This backward use of Q-values is closely related to soft Q-learning and path consistency. Earlier work by Schulman, Chen and Abbeel, PCL and Trust-PCL studies the relationship between regularized policy updates and soft values. Here Q-values explain the proof; our algorithm learns the policy directly from sampled returns and does not fit a Q-network.

这份抵消如何作用于更新?在 target 处,无论采到哪条 continuation,当前 token 的 score 都乘以同一个系数 $V_k(h_i)-b(h_i)$。当前 token 的 IS 将动作平均从 behavior 转换到 target policy;该策略下 score 的均值为零,因此期望更新为零。系数本身可以非零,关键在于加权 score 的平均为零。

要进一步说明只有这个 target 的期望更新为零,证明从后向前进行。最后一个 token 没有 continuation,其 KL-regularized 动作选择具有唯一最优解。当后续决策都等于各自的 target 时,cancellation 为更早的每个动作给出精确 Q-value,该位置也就有唯一的 KL-regularized 最优解。如此进行 backward induction,就确定了完整的 stationary policy。

Token-wise 与精确 sequence correction 共享唯一的 stationary policy:proximal optimizer。

这个策略使 expected reward 减去相对固定 reference 的 response-level KL 最大。定理使用正的 KL 强度、完整且未改动的 Future-KL,以及 detached history-only baseline;support、expressiveness 假设与完整证明见论文的附录 E.2。

这种从后向前使用 Q-value 的思路,与 soft Q-learning 和 path consistency 密切相关。Schulman、Chen 与 Abbeel、PCL 和 Trust-PCL 研究了 regularized policy update 与 soft value 的联系。这里 Q-value 用于解释证明;算法直接从采样 return 学习策略,不拟合 Q-network。

From the target to learning progress

Knowing where an update stops does not yet tell us whether it gets there. Two update rules can have the same stationary policy but follow different paths. For Proximal KL, the convergence argument uses the same backward structure: errors in an action’s sampled Q-return come from later-token policies. The final decisions have no such error; as later policies approach their targets, their contribution to earlier decisions becomes accurate.

For independently adjustable token logits, we prove convergence of the continuous-time, exact-population update while the reference stays fixed. Behavior may change over time, with each history’s visit probability kept uniformly above zero. Appendix E.3 of our paper provides the precise statement and proof.

Reaching one round’s target is only one part of training. Refreshing the reference starts another round of improvement. With binary rewards and exact proximal solves, every round increases the odds of a correct response whenever the starting success probability lies strictly between zero and one. The on-policy example in the first section illustrates how these gains accumulate.

For sampled updates, Appendix F of our paper analyzes a projected linear-logit variant with controlled behavior mismatch and gives a polynomial sample-budget reward guarantee. One interpretation is that a single response from the trained policy can approach the success rate of an initial-policy oracle best-of-$N$, which selects a correct answer whenever one appears among its $N$ samples. The theorem’s update rule, representation conditions and budget are specified there. Together, these results connect a preserved target, progress toward it, and reward improvement across rounds.

知道更新在哪里停止,还不能说明它能否到达那里。两种更新可以拥有同一个 stationary policy,却沿不同路径前进。Proximal KL 的收敛分析仍然利用从后向前的结构:当前动作的采样 Q-return 误差来自后续 token 的策略。最后一个 token 的决策没有这类误差;随着后续策略接近 target,它们对更早决策提供的评价也逐渐准确。

对于 token logits 可独立调整的模型,我们证明了固定 reference 下,连续时间、精确 population update 的收敛性。Behavior 可以随时间变化,但每个 history 的访问概率需要始终保持统一的正下界。具体定理和证明见论文的附录 E.3。

到达一轮的 target 只是训练的一部分。刷新 reference 后,新一轮可以继续改善。对于二元 reward 和精确 proximal 求解,只要起始成功概率严格介于零与一之间,每轮都会提高正确回答的 odds。第一节的 on-policy 例子展示了这些收益如何逐轮累积。

对于采样更新,论文的附录 F 分析了 behavior mismatch 受控的 projected linear-logit variant,并给出多项式采样预算下的奖励保证。一个直观解释是:训练后策略的一次回答,可以接近初始策略 oracle best-of-$N$ 的成功率;这个 oracle 会在 $N$ 个样本中存在正确答案时将其选出。定理对应的更新规则、表示条件和预算都在论文的附录 F 中说明。这些结果将保留 target、向 target 前进和跨轮奖励改善联系起来。

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-relative normalization change each token’s update coefficient.

要用 Future-KL 训练模型,需要明确怎样从采样回答计算更新:记录哪些概率、累计哪些 cost、何时刷新 reference?我们先给出具体算法,再说明 horizon、cost bound 和 group-relative 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 importance correction. They may come from the same policy, but their roles remain separate.

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

For position $i$ in response $m$, constructing the update coefficient starts with its KL cost. The practical version allows a finite Future-KL 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 代价。实际版本允许有限 Future-KL 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 总数。Stop-gradient($\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 with PPO clipping width $\epsilon$ 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 使用宽度为 $\epsilon$ 的 PPO clipping,再乘固定的 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 直接限制 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 importance 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-KL horizon 的长度。

Main results

Does the update sustain learning when rollout policies fall behind, and do its gains extend to new problems? We examine training stability first, then compare fixed checkpoints across eight held-out benchmarks. A checkpoint is a saved model-weight snapshot.

Experiment overview
  • Periodic refresh: Slime on DAPO-Math-17K, with 1.7B, 4B, 8B, and 32B models at learning rate $10^{-6}$. The smaller models use base checkpoints; 32B uses a post-trained checkpoint.
  • Controlled staleness: AReaL with Qwen3-1.7B-Base and Qwen3-4B-Base on 9,453 filtered math prompts. The 1.7B comparisons use learning rates $5\times10^{-6}$ and $10^{-5}$; 4B uses $5\times10^{-6}$.

当 rollout policy 落后于 learner 时,这份更新能否持续改善模型?收益能否延续到新题目?我们先观察训练稳定性,再比较固定 checkpoint 在八个 held-out benchmark 上的表现。Checkpoint 是保存下来的模型权重快照。

实验概况
  • Periodic refresh: 使用 Slime 与 DAPO-Math-17K,模型规模为 1.7B、4B、8B、32B,学习率为 $10^{-6}$。较小模型使用 base checkpoint,32B 使用 post-trained checkpoint。
  • Controlled staleness: 使用 AReaL、Qwen3-1.7B-Base 与 Qwen3-4B-Base,在 9,453 道过滤后的数学 prompt 上训练。1.7B 比较学习率 $5\times10^{-6}$ 与 $10^{-5}$,4B 使用 $5\times10^{-6}$。

Stability tests

Can the methods keep learning as the actor and learner drift apart? In the periodic-refresh experiment, each fresh response batch is used once, while actor weights remain fixed between synchronizations. The learner keeps changing, so newly generated responses become progressively more off-policy.

The figure compares PG, CISPO, GRPO, and Proximal KL across four model sizes. Training accuracy is the fraction of responses accepted by the verifier. Online curves are EMA-smoothed; aggregation across seeds is reported separately.

当 actor 与 learner 逐渐分开时,各方法还能继续改善吗?Periodic-refresh 实验中,每批新回答只使用一次,actor 权重则在两次同步之间保持不变。Learner 持续更新,因此新生成的回答也会逐渐偏离当前策略。

下面比较 PG、CISPO、GRPO 与 Proximal KL 在四个模型规模上的轨迹。Training accuracy 是回答通过 verifier 的比例。在线曲线采用 EMA 平滑;跨 seed 的统计另行报告。

Periodic actor refresh across four model sizes. Follow whether early gains survive as training continues.
四个模型规模的 periodic-refresh 实验。重点观察早期收益能否延续到训练后段。

The second half of training separates early improvement from sustained learning. 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.

GRPO also sustains training, but Proximal KL reaches higher accuracy with fewer updates in this experiment. At 8B, its smoothed training accuracy first reaches roughly 50% after about 200 updates, compared with about 640 for GRPO. Its mean raw training accuracy is also higher over the final 100 updates shared by the methods at 1.7B, 4B, and 8B.

All four methods use importance weighting. These trajectories therefore motivate examining how they control policy movement: weight bounds, PPO clipping, and additive Future-KL produce different learning behavior.

后半段训练区分了短期改善与持续学习。1.7B 的 CISPO 先取得明显进展,随后准确率大幅下降;8B 和 32B 中,PG 与 CISPO 也出现较大的 training accuracy 下降。Proximal KL 在四个规模上都保住了收益。

GRPO 也能维持训练,但 Proximal KL 在这组实验中用更少更新达到更高准确率。8B 的平滑 training accuracy 首次达到约 50%,Proximal KL 需要约 200 次更新,GRPO 则约 640 次。在 1.7B、4B、8B 上,两种方法共同覆盖的最后 100 次更新中,Proximal KL 的平均原始 training accuracy 也更高。

四种方法都使用 importance weighting。因此,这些轨迹引导我们继续考察它们控制策略移动的方式:限制 weight、PPO clipping 与加性的 Future-KL,对应了不同的学习表现。

We next compare methods at controlled rollout staleness. Here generation overlaps optimization, and each response batch is reused, so both rollout delay and learner changes during reuse contribute to the mismatch. Within each method comparison, model, data, learning rate, sampling, and evaluation are matched.

The evaluation metrics answer different questions. Mean@16 measures response accuracy; pass@16 measures problem coverage. A problem solved once in 16 attempts counts as a success for pass@16 but contributes only $1/16$ to mean@16. Coverage can improve without an equally large improvement in single-response reliability.

The figure pairs AIME24 pass@16 with entropy. Lower entropy means the next-token distribution concentrates on fewer choices. Correct and incorrect answers can both be generated confidently, so entropy needs to be read alongside accuracy.

接着,我们在 controlled rollout staleness 下比较方法。这里生成与优化重叠,同一批回答还会被重复使用,因此 rollout delay 与复用期间 learner 的变化都会产生 mismatch。同一组方法比较匹配模型、数据、学习率、采样与评测方式。

两个指标回答不同的问题:mean@16 衡量回答准确率,pass@16 衡量题目覆盖率。 一道题在 16 次尝试中只答对一次,pass@16 就记为成功,但 mean@16 只有 $1/16$。覆盖率提高,并不意味着单次回答的可靠性有同等幅度的提高。

图中将 AIME24 pass@16 与 entropy 放在一起。Entropy 较低,表示 next-token 分布集中在较少的选择上。正确与错误回答都可能被高置信度地生成,因此需要结合准确率解读 entropy。

Accuracy and entropy provide complementary views of stability across model scales, learning rates, and rollout staleness.
结合 AIME24 pass@16 与 entropy,观察不同模型规模、学习率和 rollout staleness 下的稳定性。

PG can be competitive for the smaller model at the lower learning rate, but that behavior does not reliably extend to larger models or more aggressive updates. At 4B and high staleness, PG shows a pronounced AIME24 decline and entropy fluctuations. GRPO and Proximal KL sustain more stable trajectories, motivating a closer checkpoint comparison between them. The clipping-width ablation later examines how GRPO’s clipping interval affects this stability.

小模型、较低学习率下,PG 可以很有竞争力,但这种表现没有可靠地延续到更大模型或更激进的更新。4B、较高 staleness 下,PG 出现明显的 AIME24 下跌与 entropy 波动。GRPO 和 Proximal KL 的轨迹更稳定,因此下面进一步比较这两种方法的 checkpoint。Clipping-width 消融还会考察 GRPO 的 clipping interval 如何影响稳定性。

Held-out evaluation

Do the gains improve both reliability and coverage? The next figure compares AIME24 mean@16 and pass@16 in four matched settings. Proximal KL has higher late-training values on both metrics in all four, so the improvement is visible at both the response and problem levels.

这些收益是否同时改善回答可靠性与题目覆盖率?下面在四组匹配设置中比较 AIME24 mean@16 与 pass@16。Proximal KL 后段的两个指标都更高,说明收益同时出现在回答与题目两个层面。

Mean@16 tracks response accuracy; pass@16 tracks problem coverage. The curves are EMA-smoothed.
Mean@16 展示回答准确率,pass@16 展示题目覆盖率。曲线采用 EMA 平滑。

We then evaluate fixed checkpoints across eight benchmarks. MATH500, OlympiadBench, MinervaMath, and Gaokao2023MathEn use greedy pass@1: one response per problem, choosing the highest-probability token at each step. AIME24/25 and AMC23/24 use mean@16 from sampled responses.

The table’s Average is micro accuracy: for trained models, it pools correct responses across all eight benchmarks, with 4,149 evaluated responses per seed. Each response contributes once, so benchmarks with more evaluated responses have greater weight. Average is neither an equal-weight mean of benchmark scores nor pass@16.

The trained 1.7B rows report means and sample standard deviations across three training seeds; the standard deviation describes run-to-run spread. Average reports only the seed mean. The trained 4B rows report individual checkpoints. Base rows summarize initialization evaluations, without training-seed statistics; their Average uses the same benchmark response-count weights. Checkpoints are selected independently of online evaluation peaks, and table scores are unsmoothed. Bolding is a descriptive within-pair comparison, not a test of statistical significance.

随后,我们在八个 benchmark 上评测固定 checkpoint。MATH500、OlympiadBench、MinervaMath、Gaokao2023MathEn 使用 greedy pass@1:每题回答一次,每一步选择概率最高的 token。AIME24/25 与 AMC23/24 使用采样回答的 mean@16。

表中的 Average 是 micro accuracy:对于训练后的模型,汇总八个 benchmark 的正确回答数,每个 seed 共评测 4,149 个回答。每条回答计数一次,因此回答数量更多的 benchmark 占比更大。Average 不等于各 benchmark 分数的等权平均,也不是 pass@16。

训练后的 1.7B 行报告三个训练 seed 的均值与样本标准差,标准差描述不同运行之间的波动;Average 只报告 seed 均值。训练后的 4B 行报告各个 checkpoint 的结果。Base 行汇总初始化模型的评测,不包含训练 seed 统计,其 Average 使用相同的 benchmark 回答数量权重。Checkpoint 的选择独立于在线评测峰值,表中分数不做平滑。加粗遵循方法对内的展示规则,不代表统计显著性。

Fixed-checkpoint evaluation across eight benchmarks. Compare matched methods and inspect task-specific trade-offs alongside Average.
八个 benchmark 的固定 checkpoint 评测。比较匹配方法,并结合 Average 查看各任务上的得失。

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 both fresh rollouts reused for multiple updates and stale rollout data. AIME25 mean@16 favors GRPO in several comparisons, so the aggregate gain coexists with task-specific trade-offs.

Fresh sampling and response reuse give different comparisons. With one update per fresh batch, Average is comparable: 34.50 for GRPO and 34.09 for Proximal KL. With reused fresh rollouts, Proximal KL reaches 33.13 versus 31.99. After the first update, reuse creates learner–data mismatch. The on-policy control also disables PPO clipping, so the two protocols differ in both reuse and update rule.

The higher-staleness configurations retain the advantage. For 4B, moving from the lower- to higher-staleness configuration changes Average by +0.22 percentage points for Proximal KL and −1.04 for GRPO, using unrounded scores. Proximal KL has the more favorable signed change on six of eight benchmarks. These are comparisons of complete training configurations; Proximal KL’s Future-KL settings also differ, so the change cannot be attributed to staleness alone.

The ablations below separate individual update choices to understand these results more closely.

七对匹配的 off-policy 比较中,Proximal KL 的 Average 都高于 GRPO,最大绝对增益为 2.58 个百分点。比较既包括新鲜 rollout 被多次复用,也包括旧 rollout 数据。多组比较的 AIME25 mean@16 仍偏向 GRPO,因此总体收益与具体任务上的得失同时存在。

新鲜采样与回答复用,需要分开比较。 每批新回答只更新一次时,Average 接近:GRPO 为 34.50,Proximal KL 为 34.09。复用新鲜 rollout 时,Proximal KL 达到 33.13,GRPO 为 31.99。第一次更新后,复用就会产生 learner–data mismatch。On-policy 控制还关闭了 PPO clipping,因此两套协议同时改变了数据复用方式与更新规则。

较高 staleness 的配置仍保留优势。 对 4B,从较低到较高 staleness 的配置,Proximal KL 的 Average 变化为 +0.22 个百分点,GRPO 为 −1.04,均使用未舍入分数计算。八个 benchmark 中,Proximal KL 有六个的变化更有利。这里比较的是完整训练配置,Proximal KL 的 Future-KL 设置也不同,因此不能把变化单独归因于 staleness。

下面通过消融单独考察各项更新选择,进一步理解这些结果。

Mechanism ablations

Which parts of the update matter? The following comparisons examine importance correction, PPO clipping, baseline sensitivity, Future-KL cost bounds, and Future-KL horizon. Each changes a specific ingredient and asks how learning responds. A separate fixed-policy diagnostic measures correction variance without changing the policy during measurement.

更新中的哪些部分影响了结果?下面依次考察 importance correction、PPO clipping、baseline sensitivity、Future-KL cost bounds 与 Future-KL horizon。每组比较改变一个具体部件,观察学习过程如何响应;另用 fixed-policy diagnostic 在测量期间保持策略不变,单独考察 correction variance。

Importance correction

Does Future-KL still work well if importance correction is changed? All three variants retain each token’s own Future-KL coefficient. Token-wise IS weights that coefficient by the current action’s probability ratio. Sequence-level IS uses a detached geometric mean of the whole response’s ratios, while IS-free uses weight one.

The sequence-level control is not exact full-response correction: taking the geometric mean changes the weight from the full product analyzed earlier. This figure tests those practical weighting choices directly.

改变 importance correction 后,Future-KL 还能保持效果吗?三种更新都保留每个 token 自己的 Future-KL coefficient。Token-wise IS 使用当前动作的概率比;sequence-level IS 使用整条回答概率比的 geometric mean,并对该 weight 做 detach;IS-free 将 weight 设为一。

这里的 sequence-level control 不等于精确的 full-response correction:geometric mean 改变了前面理论分析中的完整乘积。图中直接比较这些实际加权选择。

Token-specific Future-KL credit is retained in every variant; only the importance weight changes.
各组都保留 token-wise Future-KL credit,只改变 importance weight。

Token-wise correction sustains stronger training pass@16 and achieves higher MATH500 greedy pass@1 and AIME24 mean@16 than both controls. Keeping future credit alone does not preserve the observed performance. The result supports retaining current-token correction alongside Future-KL.

Token-wise correction 维持更好的 training pass@16,并在 MATH500 greedy pass@1 与 AIME24 mean@16 上优于两种 control。只保留 future credit,没有保住原有表现。这支持在 Future-KL 之外保留当前 token 的 importance correction。

GRPO clipping width

How sensitive is GRPO to a wider PPO clipping interval? The next figure compares a narrower and a wider interval, tracking training mean@16, training pass@16, and raw gradient norm before gradient-norm clipping.

放宽 PPO clipping interval,会怎样影响 GRPO?下面比较较窄与较宽区间,观察 training mean@16、training pass@16,以及 gradient-norm clipping 前的原始 gradient norm。

Both runs complete 1,000 updates. Accuracy is EMA-smoothed; gradient norms are raw and shown on a logarithmic axis.
两组都完成 1,000 次更新。准确率曲线采用 EMA 平滑;gradient norm 保留原始值,使用对数坐标。

The wider interval produces larger gradient excursions together with a temporary decline in training mean@16 and pass@16. The narrower interval maintains a steadier rise with smaller excursions. Both runs complete the observation window; the wider run’s decline is not a training crash. This comparison shows that the clipping choice can materially affect GRPO’s observed stability.

较宽区间伴随更大的 gradient excursion,training mean@16 与 pass@16 也出现暂时下降。较窄区间的上升更平稳,gradient excursion 更小。两组都完成了观察区间,较宽区间的表现下降不等于训练崩溃。这说明 clipping 的选择会明显影响 GRPO 的实际稳定性。

Baseline perturbation

How sensitive are the methods to a common shift in their advantages? We shift normalized advantages upward in groups whose rewards are not all equal, leaving verifier rewards and within-group advantage differences unchanged. The shift can change advantage signs, which determine which contributions PPO clipping removes. Proximal KL still subtracts its Future-KL cost after the shift.

如果给 advantage 加上一个共同偏移,各方法有多敏感?我们对奖励不全相同的组,将 normalized advantage 整体上移,保持 verifier reward 和同组 advantage 之间的差不变。这个偏移可能改变 advantage 的符号,从而改变 PPO clipping 移除哪些贡献。Proximal KL 仍在偏移之后减去 Future-KL cost。

Compare each method with its own unperturbed run. Shading shows the within-method score difference, not an uncertainty interval.
每种方法与自己的未扰动版本比较。阴影展示方法内部的分数差,不表示不确定性区间。

Across the displayed MATH500 and AIME24 metrics, Proximal KL is less sensitive to the intervention. This supports a practical advantage of additive future feedback when the estimated advantage shifts.

The experiment measures a group-dependent perturbation. Whether a shift is applied depends on sampled group rewards, so it is not the fixed history-only baseline shift whose expected contribution vanishes in the proof. The evidence here is the observed difference between perturbed and unperturbed training trajectories.

在展示的 MATH500 与 AIME24 指标上,Proximal KL 对这项干预更不敏感。这支持加性的 future feedback 在 advantage 估计发生偏移时具有实践优势。

实验测量的是 group-dependent perturbation。是否施加偏移取决于采样组的奖励,并不满足证明中固定 history-only baseline shift 的条件。这里的证据是扰动与未扰动训练轨迹之间实际观察到的差异。

Future-KL cost bounds

Do very large sampled KL costs help learning? We vary the bound $\epsilon_F$ on each cost while retaining the full Future-KL sum. The unbounded variant still includes KL regularization. Alongside AIME24 mean@16 and pass@16, the figure shows gradient norm before gradient-norm clipping, so differently sized excursions remain visible.

很大的 sampled KL cost 是否有助于学习?我们保留完整 Future-KL sum,只改变单个 cost 的上限 $\epsilon_F$。无上限版本仍包含 KL regularization。图中除 AIME24 mean@16、pass@16 外,还展示 gradient-norm clipping 前的 gradient norm,以保留不同强度波动之间的区别。

Only the per-token cost bound changes. Gradient norms are measured before gradient-norm clipping.
只改变每个 token 的 cost bound。Gradient norm 在 gradient-norm clipping 前测量。

A relatively tight cost bound achieves good accuracy with smaller gradient excursions than a very large bound or no bound. A moderately larger bound also retains good performance, so the useful range is not confined to one precise threshold. Within the tested range, allowing ever larger costs does not consistently improve accuracy.

Cost clipping changes the values used to construct the update; gradient-norm clipping acts on the resulting gradient. The plotted pre-clipping norms help distinguish these two stages.

较小的 cost bound 取得良好准确率,gradient excursion 也比很大的 bound 或无上限版本更小。适度增大的 bound 仍保留良好表现,因此有效范围并不只包含某一个精确 threshold。在测试范围内,允许 cost 继续增大,并没有持续改善准确率。

Cost clipping 改变构造更新所用的数值,gradient-norm clipping 则作用于算出的梯度。图中保留 clipping 前的 gradient norm,帮助区分这两个阶段。

Future-KL horizon

Can a shorter Future-KL horizon improve learning? We compare the full tail, intermediate windows, and current-token-only credit. Some comparisons keep the KL coefficient fixed; another matches the coefficient–horizon product to test whether a stronger local penalty compensates for removing future terms.

The figure separates two questions: how horizon affects held-out accuracy during training, and how it changes correction variance when the policies and sampled responses are held fixed.

缩短 Future-KL horizon 能否改善学习?我们比较 full tail、intermediate window 与只保留当前 token 的 credit。一部分比较固定 KL coefficient,另一组匹配 coefficient 与 horizon 的乘积,检验更强的局部惩罚能否补偿被移除的 future term。

图中分开考察两个问题:horizon 怎样影响训练期间的 held-out accuracy,以及在策略和采样回答固定时,它怎样改变 correction variance。

Learning curves compare future credit's reach and strength. The fixed-policy diagnostic reuses the same responses at every horizon and measures scalar correction variance.
训练曲线比较 future credit 的范围与强度。Fixed-policy diagnostic 在每个 horizon 上复用相同回答,测量 scalar correction variance。

Both intermediate-window configurations outperform full tail on late AIME24 mean@16 and pass@16 over their common observation interval, including a comparison that keeps the KL coefficient unchanged. The current-token-only variant learns more slowly even when its coefficient–horizon product matches an intermediate window. Later-token credit therefore provides useful information beyond simply increasing the local penalty.

The variance measurement is separate. It freezes a pair of policies and a shared bank of responses, then measures the first token’s scalar Future-KL correction at each horizon. Variance is computed among responses to the same prompt and then averaged across prompts. The plot shows the raw measured variance without rescaling or smoothing.

For these fixed policies and responses, variance increases with horizon. Shorter sums fluctuate less on this data. This measures scalar correction variance, not full-gradient variance: a gradient also contains the importance-weighted score, reward advantage, and their joint fluctuations. The diagnostic does not establish that variance reduction caused the accuracy gains.

The comparisons thus answer complementary questions. Finite horizons change the expected update by removing future contributions, the diagnostic measures their fluctuation on fixed data, and the training curves show the resulting performance in the tested settings.

两个 intermediate-window 配置在共同观察区间后段的 AIME24 mean@16 与 pass@16 上都优于 full tail,其中也包括 KL coefficient 不变的比较。只保留当前 token 的版本,即使 coefficient 与 horizon 的乘积和 intermediate window 相同,学习仍然更慢。因此,后续 token 的 credit 提供了单纯增强局部惩罚无法补足的信息。

方差测量单独进行。 固定一对策略与同一批回答,在各个 horizon 下计算第一个 token 的 scalar Future-KL correction。先在同一 prompt 的回答之间计算方差,再跨 prompt 平均;图中展示原始测量值,不缩放,也不平滑。

对这两份固定策略与这批回答,方差随 horizon 增大而上升,更短的求和在这些数据上波动更小。这测量的是 scalar correction variance,并非完整梯度的方差:梯度还包含 importance-weighted score、reward advantage 及它们的共同波动。这项诊断也没有证明方差降低导致了准确率收益。

几组比较回答了互补的问题:有限 horizon 移除 future contribution,改变期望更新;diagnostic 测量固定数据上的波动;训练曲线则展示这些选择在所测设置中的实际表现。