工作日早上 7 点读 AI,周日早上 8 点读周报订阅邮件

METAL LAB

Weak-to-Strong On-Policy Distillation

arXiv:2607.262462026-07-27

只靠比学生更弱的模型,也能把学生AI训练得更强

在线蒸馏(OPD)一直要求老师模型至少和学生一样强,可一旦模型已经逼近前沿,就找不到更强的老师了。这篇论文提出的W2S-OPD从两个都弱于学生的模型的差异中提取出一个能力方向,叠加到学生自己的基座模型上合成一个代理老师,结果在数学和代码基准上超过了传统OPD,有时学生甚至超过了它所学习的那个弱老师本身。作者是Fangxu Yu,代码计划开源。

METAL LAB 解读图

W2S-OPD结构:从弱模型对中提取能力方向并注入学生模型

证据状态已报告实测结果

  1. 对比对 (m+, m-)从两个都弱于学生的模型中取logit,例如RL前后、大小基座模型、正确/错误提示条件。
  2. 提取能力方向用m+的logit减去m-的logit,抵消两者共有的局限,只保留m+更优的那部分。
  3. 合成代理老师把这个方向按系数α加到学生自己的基座模型logit上,生成一个既接近学生又能力提升的代理老师。
  4. 在学生自身的采样上蒸馏学生生成自己的回答,训练过程最小化学生分布与代理老师分布之间的反向KL散度。
  5. 结果验证在数学、代码基准以及域外任务(GPQA-Diamond、IFBench)上与传统OPD进行对比测量。
这是 METAL LAB 制作的解读图,并非论文作者提供的原图。

他们做了什么

  1. 问题:现有在线蒸馏方法需要一个至少和学生同等强的老师模型,一旦模型已经处于前沿水平,就不存在更强的老师可供蒸馏。
  2. 方法:W2S-OPD取一个相对强的模型(m+)和一个较弱的模型(m-)的logit(逐词打分)差值,抵消两者共有的局限,只留下'能力方向',再把这个方向加到学生自己的基座模型上,合成一个代理老师。
  3. 这对比对可以用三种方式构建:RL训练前后的模型对比、大小不同的两个基座模型对比,或是同一模型分别给出正确提示和错误提示的对比。
  4. 只用Qwen3-4B级别及更小的模型作为原料,W2S-OPD在数学和代码基准平均表现上超过了传统OPD,而在使用RL训练后的4B专家模型时,学生在数学上甚至超过了这个专家老师本身。
  5. 即便只用两个未经额外训练的弱基座模型组合,学生也能超过自身基线和两个来源模型,并且在域外任务(GPQA-Diamond、IFBench)上通用能力得以保持甚至提升。
Figure 1: W2S-OPD improves Qwen3-8B using 4B models as teachers. Accuracy is averaged over 4 math reasoning and 3 code generation benchmarks. (a) With a post-RL Qwen3-4B expert, W2S-OPD beats OPD. (b) From 2 off-the-shelf base models (Qwen3-4B and 0.6B), both weaker than the student and used without training, W2S-OPD still lifts the student above itself and both sources.
Figure 1: W2S-OPD improves Qwen3-8B using 4B models as teachers. Accuracy is averaged over 4 math reasoning and 3 code generation benchmarks. (a) With a post-RL Qwen3-4B expert, W2S-OPD beats OPD. (b) From 2 off-the-shelf base models (Qwen3-4B and 0.6B), both weaker than the student and used without training, W2S-OPD still lifts the student above itself and both sources.
Table 1: The three instantiations of the contrast pair in W2S-OPD. All models are from Qwen3 series.
SettingPositive model m+Negative model m−Anchor zbase
Pre-RL / Post-RL4B-RL (post-RL expert)4B (pre-RL init)8B (base)
Smaller / Larger4B (base)0.6B (base)8B (base)
Correct / Wrong Hints4B w/ correct hint4B w/ wrong hint8B (base)
Figure 2: Overview of W2S-OPD. W2S-OPD synthesizes a proxy teacher and distills it into a student. A positive and a negative model form a contrast pair whose logit difference isolates a capability direction. The student πS, initialized from the same base model, generates on-policy rollouts and minimizes the per-token reverse KL toward this proxy teacher. The contrast pair can be instantiated as a post-RL expert against its pre-RL initialization, a larger base model against a smaller one, or a single model conditioned on correct against wrong hints.
Figure 2: Overview of W2S-OPD. W2S-OPD synthesizes a proxy teacher and distills it into a student. A positive and a negative model form a contrast pair whose logit difference isolates a capability direction. The student πS, initialized from the same base model, generates on-policy rollouts and minimizes the per-token reverse KL toward this proxy teacher. The contrast pair can be instantiated as a post-RL expert against its pre-RL initialization, a larger base model against a smaller one, or a single model conditioned on correct against wrong hints.
Table 2: Results for Pre-RL / Post-RL contrast setting. W2S-OPD beats OPD and even surpasses the 4B-expert on math. Improv. reports the absolute gain over OPD.
MethodMath ReasoningCode Generation
AIME24AIME25HMMT25 (Feb.)HMMT25 (Nov.)Avg.HumanEval+MBPP+LCBAvg.
Neg. Model (4B)21.619.910.08.214.979.963.620.954.8
Pos. Model (4B-RL)62.057.934.840.448.886.371.027.161.5
Student Base (8B)26.121.111.69.017.081.270.021.757.6
Single-Teacher Distillation
SFT60.254.430.737.645.782.571.824.859.7
OPD62.154.830.638.346.583.171.222.058.7
W2S-OPD68.960.135.143.151.884.872.426.860.9
Improv.+6.8+5.3+4.5+4.8+5.3+1.7+1.2+5.0+2.2
Multi-Teacher Distillation
SFT63.554.629.639.446.884.071.425.760.4
OPD64.354.929.637.446.583.469.525.659.5
W2S-OPD67.461.034.745.252.185.271.027.161.1
Improv.+3.1+6.1+5.1+7.8+5.6+1.8+1.5+1.5+1.6
Figure 3: Performance on the math and code benchmarks over training steps. W2S-OPD improves faster and outperforms OPD.
Figure 3: Performance on the math and code benchmarks over training steps. W2S-OPD improves faster and outperforms OPD.
Table 3: Results for contrastive hints setting. W2S-OPD improves the 8B student above its own base with only a single weaker and smaller model. Improv. reports the absolute gain of W2S-OPD over the student base model.
MethodMath ReasoningCode Generation
AIME24AIME25HMMT25 (Feb.)HMMT25 (Nov.)Avg.HumanEval+MBPP+LCBAvg.
Pos./Neg. Model (4B)21.619.910.08.214.979.963.620.954.8
Student Base (8B)26.121.111.69.017.081.270.021.757.6
W2S-OPD27.723.312.010.718.482.570.822.758.7
Improv.+1.6+2.2+0.4+1.7+1.4+1.3+0.8+1.0+1.1
Figure 4: Performance on the math and code benchmarks with different α. OPD is included for reference, denoted by the gray line. W2S-OPD outperforms OPD over a wide range of α.
Figure 4: Performance on the math and code benchmarks with different α. OPD is included for reference, denoted by the gray line. W2S-OPD outperforms OPD over a wide range of α.
Table 4: Results for Smaller and Larger contrast setting. W2S-OPD improves the 8B student above its own base even though both source models are weaker than it. Improv. reports the absolute gain of W2S-OPD over the student base model.
MethodMath ReasoningCode Generation
AIME24AIME25HMMT25 (Feb.)HMMT25 (Nov.)Avg.HumanEval+MBPP+LCBAvg.
Neg. Model (0.6B)1.62.30.12.71.725.626.34.618.8
Pos. Model (4B)21.619.910.08.214.979.963.620.954.8
Student Base (8B)26.121.111.69.017.081.270.021.757.6
W2S-OPD33.125.913.020.123.081.771.123.758.8
Improv.+7.0+4.8+1.4+11.1+6.0+0.5+1.1+2.0+1.2
Table 5: Results for OOD generalization on GPQA-Diamond and IFBench. Both distillation methods are trained only on the math task, W2S-OPD transfers out of domain and improves general ability, whereas OPD can degrade it below the base. Improv. indicates the absolute gain over OPD.
MethodGPQA-DiamondIFBench
Positive Model51.826.0
Student Base38.926.3
OPD54.425.9
W2S-OPD56.527.0
Improv.+2.1+1.1
Table 6: Distribution of the top-1% highest-Δ tokens over the eight Schoenfeld episodes. The first row gives the distribution of each episodes of all tokens.
ReadAnalyzePlanImplementExploreVerifyMonitorAnswer
All tokens10.333.28.640.70.52.40.53.8
Pre-RL / Post-RL9.640.515.724.01.24.31.82.9
Smaller / Larger6.544.412.627.70.84.20.92.9
Correct / Wrong Hints5.229.820.219.61.15.42.316.4
Table 7: Training hyperparameters of W2S-OPD. Paired entries denote math / code.
HyperparameterValue
AlgorithmOn-Policy Distillation
Student ModelQwen3-8B
Positive / NegativeQwen3-4B-RL / Qwen3-4B
Amplification Coeff. (α)1.0 / 0.75
Teacher Top-K32
Max Prompt Length2048
Max Response Length16384
Learning Rate2e-6
LR SchedulerConstant
Sampling Temp. / Top-p1.0 / 1.0
Batch Size64
Training Steps100
Table 9: On-policy rollout prompts used during OPD training.
DomainPrompt
Math{problem}\n Please reason step by step, and put your final answer within \boxed{}.
Code{problem}\n Write Python code to solve the problem. Present the code in \n‘‘‘python\n Your code\n‘‘‘\n at the end. You need to think first then write the Python code.
Table 10: Average wall-clock time per training step (s) in the pre-RL / post-RL setting; W2S-OPD adds only 20% over OPD.
MethodTraining time per step (s)
OPD868
W2S-OPD1043
Table 11: Average math reasoning accuracy of W2S-OPD with base-model contrast pairs of different capability gaps. The student is Qwen3-8B.
Contrast Pair4B−0.6B4B−1.7B
W2S-OPD23.021.7
Improv. over Student+6.0+4.7

研究结果

  • 在RL训练前后对比的设置下,W2S-OPD在数学上相对OPD单老师蒸馏提升11.4%,多老师蒸馏提升12.0%,并且在数学任务上学生甚至超过了那个4B领域专家模型本身。
  • 仅使用两个未经额外训练的现成基座模型(Qwen3-4B、0.6B),W2S-OPD依然把学生在数学上平均绝对提升6.0%,代码上平均绝对提升1.2%。
  • 仅用单个4B模型配合正确/错误提示对比,W2S-OPD把学生在数学上平均绝对提升1.4%,代码上平均绝对提升1.1%。
  • 在域外评测中,W2S-OPD把GPQA-Diamond分数从38.9提升到56.5,比OPD高出绝对2.1%;在IFBench上OPD的表现反而低于基线,而W2S-OPD仍比OPD高1.1%。
  • 对每个训练步骤的实际耗时测量显示,尽管需要多前向传播三个冻结模型,W2S-OPD相比OPD只多出约20%的开销。

可应用场景

  • 利用现有的多个不同规模的小模型,设计持续提升前沿规模学生模型的后训练流程。
  • 把针对特定领域用强化学习训练出的小型专家模型的能力,以更低成本迁移到更大模型上。
  • 只通过改变上下文(如正确提示与错误提示)从单一模型中提取学习信号的数据高效蒸馏实验。

局限与待验证事项

  • 所有实验均基于Qwen3系列模型(8B学生,4B/0.6B/1.7B对比对),尚未验证该方法在其他模型家族或规模上是否同样有效。
  • 放大系数α较为敏感:过小信号太弱,过大会扭曲代理老师的分布,需要调参。
  • 评测仅限于数学、代码及两个域外任务(GPQA-Diamond、IFBench),该方法在其他实际应用领域的效果尚未验证。
  • 作者自己指出,组合多个对比对(设置多个αk)时的可扩展性还需进一步探索。
  • 弱信号究竟能把强学生模型推多远、方法何时会饱和,目前尚未确定。

为什么重要

前沿模型常常因为找不到更强的老师而无法继续用传统蒸馏提升,这项方法展示了仅靠现有的、更小更便宜的模型之间的差异也能持续改进强模型的路径。这为缓解AI训练成本不断攀升的问题提供了一种思路。

本文术语

  • 在线蒸馏(On-Policy Distillation, OPD) · 让老师模型对学生自己生成的回答逐词打分,以此指导学生学习的训练方法
  • logit · 模型在把候选词转成概率之前,给每个候选词打的原始分数
  • 反向KL散度(reverse KL divergence) · 衡量学生的概率分布与老师分布差异程度的指标,训练过程会让它变小
  • GRPO · 一种强化学习技术,用于让模型在数学、代码等特定领域变得更专精
  • 放大系数 α · 控制把能力方向注入代理老师的强度大小的数值

论文原文摘要(英文)

On-policy distillation (OPD), which aligns a student with the teacher's token-level distribution on the student's own rollouts, is an effective paradigm for transferring capabilities across LLMs. Prevailing approaches assume a teacher at least as capable as the student: they either distill a larger model into a smaller one, which fails at the frontier where no larger teacher exists, or consolidate multiple domain experts trained from a shared base, which requires costly training at the student's

作者 · Fangxu Yu

在 arXiv 阅读

最新论文

全部论文 →

METAL LAB 最新报道

图片来源: Fangxu Yu et al., arXiv:2607.26246, arxiv-nonexclusive