K-文化的一切——从回归到 K-美妆,发送到您的邮箱订阅邮件

METAL MEDIA

SAF-OPD: Stable Advantage Fusion for On-Policy Distillation

arXiv:2607.292092026-07-30

把验证式强化学习和模仿老师模型的训练直接相加,AI会停止探索 - SAF把这个失控信号驯服后效果更好

训练语言模型时,把按最终答案对错打分的强化学习(RLVR)和让学生模型逐词模仿更强老师模型的训练(OPD)直接按固定比例相加,会让模型在训练早期迅速失去输出多样性(熵崩溃)。作者将原因归结为两种失配:信号幅度不匹配和信号强度随时间该如何变化不匹配,并提出四阶段流程SAF分别解决。在Qwen3系列模型的数学与代码生成任务上测试,SAF始终优于固定比例融合方案。

METAL MEDIA 解读图

SAF的四阶段处理流程

证据状态已报告实测结果

  1. 输入:两种分数整段回答共享一个经过验证的分数(GRPO)与逐词对照老师模型计算出的分数(OPD)同时输入
  2. 第1-2阶段:幅度控制只保留OPD分数中幅度最大的一部分词元、其余清零,再用tanh函数把保留下来的数值压缩到有限范围内,防止少数词元主导更新
  3. 第3-4阶段:时间控制训练早期依据学生与老师之间KL散度的下降程度逐步增强OPD强度,达到目标降幅后转为逐步减弱
  4. 融合与策略更新把调整后的OPD分数与不变的GRPO分数相加得到最终优势值,用它来更新模型策略
这是 METAL MEDIA 制作的解读图,并非论文作者提供的原图。

他们做了什么

  1. 动机:RLVR给整段回答打一个分数,OPD则逐词对照更强的老师模型打分但性能上限被老师水平锁死;二者看似互补,但若用固定系数简单相加,模型在训练早期就会失去输出多样性(熵崩溃)。
  2. 诊断:这源于两种失配 —— 幅度失配,即OPD的逐词分数偶尔会远超有界的RLVR分数,把RLVR信号淹没;时间失配,即持续的满强度模仿老师会一直把学生拉向老师,阻碍其探索超越老师的空间。
  3. 方法:SAF只对OPD信号做四阶段处理 —— 先只保留幅度最大的一部分词元、把其余清零,再用有界的tanh函数压缩保留下来的数值,然后在早期依据学生与老师之间KL散度的下降程度逐步增强OPD强度(热身),之后再逐步减弱(退火),处理后再与不变的RLVR分数相加;每个阶段都可独立开关。
  4. 实验:在Qwen3-1.7B、4B、8B三种规模模型上,针对七个数学推理与代码生成基准测试,SAF在全部六个模型-领域组合中都优于固定系数融合,综合得分提升0.51到2.70个百分点,且训练更稳定,未出现熵崩溃。
  5. 动态分析:固定系数融合最贴近老师模型(学生-老师KL散度最低),却最终准确率最低;SAF保持中等水平的熵和KL散度,最终准确率更高。
Figure 1: Fixed-coefficient fusion versus SAF. SAF pairs the OPD advantage’s magnitude and temporal mismatches with dedicated control mechanisms, avoiding entropy collapse, preserving exploration, and improving final performance.
Figure 1: Fixed-coefficient fusion versus SAF. SAF pairs the OPD advantage’s magnitude and temporal mismatches with dedicated control mechanisms, avoiding entropy collapse, preserving exploration, and improving final performance.
Table 1: Results on mathematical reasoning and code generation. All entries are accuracies (%). Within each model scale and column, the best result is bold and the second best is underlined.
Mathematical ReasoningCode Generation
MethodAIME-24AIME-25HMMT25-FebHMMT25-NovAvg.HumanEval+MBPP+LiveCodeBenchAvg.
Teacher: Qwen3-30B-A3B-Instruct-250773.6561.9843.8557.8159.3282.9378.3145.0068.75
Student: Qwen3-8B
Base26.5621.2511.359.7917.2480.4972.4923.7158.90
GRPO-only61.1549.0628.6537.5044.0981.1072.2228.8560.72
OPD-only59.5850.5227.6040.7344.6184.1571.9633.2963.13
GRPO+OPD (fixed)60.8351.2528.4443.3345.9678.6671.6934.8661.74
SAF (ours)64.7951.2530.0041.6746.9381.1071.6937.4363.41
Student: Qwen3-4B
Base23.0221.8811.679.1716.4479.2763.4924.5755.78
GRPO-only58.9650.6230.1037.6044.3280.4968.7832.1460.47
OPD-only57.8151.5629.3837.7144.1278.6669.3130.7159.56
GRPO+OPD (fixed)57.1951.9829.9038.4444.3879.8866.1433.8659.96
SAF (ours)60.2153.9631.1538.2345.8982.9370.6334.4362.66
Student: Qwen3-1.7B
Base12.8110.835.943.548.2860.9854.2315.1443.45
GRPO-only36.2531.3517.1916.8825.4265.2453.7017.5745.50
OPD-only35.1028.5415.8316.3523.9670.7358.7325.8651.77
GRPO+OPD (fixed)34.7929.6917.5016.5624.6470.1256.0826.4350.88
SAF (ours)36.6731.9818.0219.2726.4970.7357.1426.2951.39
Figure 2: Overview of SAF. SAF modifies only the OPD branch through four stages before it is added to the unchanged GRPO advantage for the policy-gradient update.
Figure 2: Overview of SAF. SAF modifies only the OPD branch through four stages before it is added to the unchanged GRPO advantage for the policy-gradient update.
Table 2: Representative SAF ablations on Qwen3-4B mathematical reasoning after 300 training steps.
ConfigurationAIME-24AIME-25HMMT25-FebHMMT25-NovAvg.
GRPO+OPD (fixed)57.1951.9829.9038.4444.38
+ top-k and tanh (fixed weight)58.7550.9430.1037.6044.35
+ warm-up (no annealing)58.9651.4629.6936.1544.07
+ annealing59.2752.6031.2537.8145.23
SAF (δ=0.2, selected)60.2153.9631.1538.2345.89
SAF (δ=0.3)58.7552.8129.3837.0844.51
Figure 3: Empirical distribution of the absolute token-level OPD advantages, |Ai,tOPD|, collected during the first 10 training steps of Qwen3-4B on mathematical reasoning tasks.
Figure 3: Empirical distribution of the absolute token-level OPD advantages, |Ai,tOPD|, collected during the first 10 training steps of Qwen3-4B on mathematical reasoning tasks.
Table 3: Training hyperparameters of the GRPO-based methods: GRPO-only, GRPO+OPD (fixed), and SAF.
HyperparameterMathematicsCode
Train batch size128128
Micro batch size128128
Responses per prompt (G)88
Maximum prompt length2,0482,048
Maximum response length16,3848,192
Rollout temperature1.01.0
Rollout top-p1.01.0
Actor learning rate1×10−61×10−6
Optimization steps300200
Actor KL-loss coefficient0.00.0
Figure 4: Training dynamics of Qwen3-4B on mathematical reasoning tasks over 300 optimization steps: (a) actor entropy, (b) student–teacher KL divergence, (c) mean critic score, (d) mean response length, (e) AIME-24 accuracy, and (f) AIME-25 accuracy. Curves compare GRPO, OPD, fixed-coefficient GRPO+OPD, and SAF under the same task setting.
Figure 4: Training dynamics of Qwen3-4B on mathematical reasoning tasks over 300 optimization steps: (a) actor entropy, (b) student–teacher KL divergence, (c) mean critic score, (d) mean response length, (e) AIME-24 accuracy, and (f) AIME-25 accuracy. Curves compare GRPO, OPD, fixed-coefficient GRPO+OPD, and SAF under the same task setting.
Table 4: Training hyperparameters of OPD-only for mathematical reasoning and code generation.
HyperparameterMathematicsCode
Batch size1,0241,024
Responses per prompt11
Maximum prompt length2,0482,048
Maximum response length16,3848,192
Rollout temperature1.01.0
Rollout top-p1.01.0
Learning rate1×10−61×10−6
Optimization steps10050
Figure 5: Supplementary parameter-space update geometry for the GRPO-only and OPD-only checkpoints of Qwen3-4B on mathematical reasoning: (a) mean stable rank of the update matrices, (b) output (left-singular) subspace overlap, and (c) input (right-singular) subspace overlap between the two methods.
Figure 5: Supplementary parameter-space update geometry for the GRPO-only and OPD-only checkpoints of Qwen3-4B on mathematical reasoning: (a) mean stable rank of the update matrices, (b) output (left-singular) subspace overlap, and (c) input (right-singular) subspace overlap between the two methods.
Table 5: Method-specific hyperparameters for the selected SAF configuration.
HyperparameterValue
Per-response retention ratio k20%
tanh compression coefficient c0.1
Maximum warm-up steps Swarmup100
Relative KL-drop threshold δ0.2
Initial OPD coefficient1.0
Annealing floor cmin0.0
Annealing durationRemaining training steps
Figure 6: Layer-wise L2 weight drift ‖Δ​Wℓ(t)‖2 over transformer layers (x-axis) and optimization steps (y-axis) for the four training regimes of Qwen3-4B on mathematical reasoning: (a) GRPO-only, (b) OPD-only, (c) fixed-coefficient GRPO+OPD, and (d) SAF.
Figure 6: Layer-wise L2 weight drift ‖Δ​Wℓ(t)‖2 over transformer layers (x-axis) and optimization steps (y-axis) for the four training regimes of Qwen3-4B on mathematical reasoning: (a) GRPO-only, (b) OPD-only, (c) fixed-coefficient GRPO+OPD, and (d) SAF.

研究结果

  • 在Qwen3-8B/4B/1.7B三种规模、七个数学与代码基准上,SAF在数学任务上比固定系数GRPO+OPD融合分别提升0.97%、1.51%、1.85%,在代码任务上分别提升1.67%、2.70%、0.51%,六个模型-领域组合平均达49.46%,分别比固定融合、纯GRPO、纯OPD高1.54%、2.71%、1.60%。
  • 在Qwen3-4B数学推理上进行的300步消融实验中,仅加幅度控制得44.35%(固定融合为44.38%),仅加热身得44.07%,加入退火后升至45.23%,完整SAF配置(阈值delta=0.2)达到45.89%。
  • 对训练最初10步的分析显示,OPD优势值的绝对值大多接近零但偶有极端值;在检查的180个最大幅度词元中,每一个都超过了其所在序列的GRPO优势值幅度,OPD极值达到20.3585,而同批次中最大的GRPO幅度仅为2.4749。
  • 在300步训练过程中,固定系数融合迅速将策略熵从约0.35降到0.30并使学生-老师KL散度降至四种方案中最低,但最终在AIME-24(约0.57)和AIME-25(约0.51)上的准确率也最低;SAF将熵维持在约0.35到0.38之间,最终准确率更高(分别约0.59和0.53)。
  • 逐层权重变化分析显示,固定系数融合在第300步时的绝对权重变化幅度最大(峰值约0.03,高于纯GRPO),而SAF的变化幅度(峰值约0.04)小于固定融合但仍高于纯GRPO,说明SAF抑制了但并未完全消除因未加控制的蒸馏信号带来的参数过度移动。
Figure 7: Layer-wise relative weight drift ‖Δ​Wℓ(t)‖2/(‖Wℓ0‖2+ϵ) over transformer layers (x-axis) and optimization steps (y-axis) for the same four training regimes and checkpoints as Figure 6: (a) GRPO-only, (b) OPD-only, (c) fixed-coefficient GRPO+OPD, and (d) SAF.
Figure 7: Layer-wise relative weight drift ‖Δ​Wℓ(t)‖2/(‖Wℓ0‖2+ϵ) over transformer layers (x-axis) and optimization steps (y-axis) for the same four training regimes and checkpoints as Figure 6: (a) GRPO-only, (b) OPD-only, (c) fixed-coefficient GRPO+OPD, and (d) SAF.

可应用场景

  • 为结合可验证奖励强化学习与逐词老师蒸馏信号的语言模型后训练流程提供融合方式的设计参考。
  • 将训练中熵值骤降或学生-老师KL散度过快收敛的现象作为诊断训练不稳定的观察指标。
  • 可以考虑将SAF作为无需额外模型或损失函数的轻量级模块,直接插入现有的GRPO+OPD训练流程。

局限与待验证事项

  • 实验仅限于Qwen3-1.7B/4B/8B学生模型搭配Qwen3-30B-A3B-Instruct-2507老师模型,以及七个数学与代码生成基准,尚未验证在其他模型家族或任务上的适用性。
  • SAF并非在所有基线上全面领先,例如在Qwen3-8B的MBPP+以及Qwen3-1.7B部分代码任务平均分上,纯GRPO或纯OPD表现更优。
  • 逐层权重变化及更新矩阵几何结构的分析,作者本人明确将其定性为补充性、探索性的观察,而非SAF设计所依据的机制。
  • KL阈值delta、保留比例k、tanh压缩系数c等超参数会影响性能(例如delta从0.2提高到0.3导致准确率下降1.38个百分点),这些取值在其他任务或模型上的敏感性尚未充分探讨。

为什么重要

随着越来越多训练流程尝试结合验证式奖励强化学习与老师模仿信号,这项研究准确指出了简单相加为何失败,并给出了可直接插入现有训练流程的轻量级修正方法。它为构建语言模型后训练流程的从业者提供了混合这两类信号时会遇到的具体陷阱及应对办法。

本文术语

  • RLVR(可验证奖励强化学习) · 用规则可验证的结果(比如答案对不对)给整段模型回答打一个分数的强化学习方法
  • OPD(在线策略蒸馏) · 让学生模型生成回答后,逐个词元对照更强的老师模型给出的概率打分的训练方法
  • 熵崩溃 · 模型不再尝试多样化的回答路径,而是收敛到重复、单一输出的训练失败现象
  • GRPO · 一种常用的RLVR算法,对同一问题采样多个回答,把它们的得分在组内相对归一化后作为优势值
  • KL散度 · 衡量两个概率分布(这里指学生模型和老师模型对下一个词的预测分布)差异程度的指标

论文原文摘要(英文)

Reinforcement learning with verifiable rewards (RLVR) broadcasts a single response-level reward to every token, while on-policy distillation (OPD) scores each token against a stronger teacher for a dense advantage but caps performance at teacher quality and discourages exploration beyond it. Their complementarity makes combining RLVR and OPD promising, but we find that fusing the two advantages with a fixed coefficient triggers entropy collapse from two miscalibrations: a magnitude mismatch, whe

作者 · Yifan Ding

在 arXiv 阅读

最新论文

全部论文 →

METAL MEDIA 最新报道

图片来源: Yifan Ding et al., arXiv:2607.29209, CC BY 4.0