🔥 多教师在线蒸馏(MOPD)如今已成为将领域专家整合到单一模型中的标准方式,但学生模型仍需独自攀登每一位教师的山峰,导致某些领域被抛在身后。
如果专家的权重不仅能指导学生的逻辑输出(logits),还能直接引导其参数更新呢?
P²-MOPD 将每个学生模块表示为其自身可学习权重与冻结专家任务向量(专家模型减去基础模型)的加权总和,并在相同的 MOPD 损失函数下联合训练这些权重和混合系数 α。专家成为参数先验:每个模块一个可学习标量沿整个专家方向移动学生模型,而学生权重则保持自由,能够超越任何单一的合并结果。这两条通道(学生权重和系数)共享一次反向传播过程,α 被折叠进权重中,训练后的模型是一个标准的检查点文件,推理时无需任何改动。
关键结果(Qwen3-1.7B / 4B;医学、法律、金融、指令遵循):
步数减半:P²-MOPD 在仅用一半训练步数时,就超越了 MOPD 的最终平均恢复水平,且实际墙钟时间不超过后者的 0.55 倍。
更高的最终恢复率:1.7B 模型为 94.7% vs 80.9%,4B 模型为 94.9% vs 83.1%。
均衡的恢复能力:最弱领域的恢复率从 32% / 47% 提升至 88% / 89%,跨领域标准差从 28 / 22 降至约 5。
可学习且可复现的混合比例:在 3 个训练随机种子下,每位教师的平均系数差异在 0.01 以内,且该混合比例始终给予落后教师最高的权重。
为何有效:
MOPD 的差距在于可达性(reachability),而非跨领域冲突。仅依靠学生权重的步骤几乎无法沿其未能恢复领域的任务向量方向移动,而 P²-MOPD 通过每个模块的一个标量,沿该方向移动了 13–15 倍的距离;用随机方向替代任务向量则毫无增益,因此关键在于专家方向本身。系数还将跨领域干扰转化为对少数可解释标量的竞争,梯度倾向于支持落后领域。单一通道均不足够:仅使用系数(一种可学习合并)表现远低于预期,仅使用权重(MOPD)会遗留某个领域,而两者的结合(P²-MOPD)既提供了最佳平均恢复率,也提供了最佳的最弱领域恢复率。
一句话总结:专家权重(而不仅仅是专家预测)可以监督蒸馏过程。作为可学习的先验保留在整个训练过程中,它们引导学生的移动方向。
💻 代码:https://github.com/SinuoWang/P2-MOPD
欢迎提供反馈和讨论!
🔥 Multi-teacher on-policy distillation (MOPD) is now a standard way to consolidate domain experts into one model, yet the student still has to climb to every teacher on its own, and some domains are left behind.
What if the experts' weights could guide the student, not only their logits?
P²-MOPD writes every student module as its own learnable weights plus a weighted sum of the frozen expert task vectors (expert minus base model), and trains the weights and the mixing coefficients α jointly under the same MOPD loss. The experts become parameter priors : one learnable scalar per module moves the student along a whole expert direction, while the student weights remain free to go beyond any merge. The two channels, student weights and coefficients, share one backward pass, α is folded into the weights, and the trained model is a standard checkpoint with no change at inference.
Key results (Qwen3-1.7B / 4B; medicine, law, finance, instruction following):
Half the steps: P²-MOPD surpasses the final average recovery of MOPD after half the training steps, at ≤0.55× of its wall-clock.
Higher final recovery: 94.7% vs 80.9% (1.7B) and 94.9% vs 83.1% (4B).
Balanced recovery: worst-domain recovery rises from 32% / 47% to 88% / 89%, and the across-domain std falls from 28 / 22 to about 5.
A learned, reproducible mixture: across 3 training seeds the mean coefficient of every teacher agrees to within 0.01, and the mixture consistently weights the lagging teacher the most.
Why it works:
MOPD's gap is one of reachability , not of cross-domain conflict. Student weight-only steps barely move along the task vector of the domain they fail to recover, while P²-MOPD moves 13–15× farther along it through a single scalar per module; random directions in place of the task vectors give no gain, so what matters is the expert direction itself. The coefficients also turn cross-domain interference into a contest over a few interpretable scalars, which the gradient settles in favour of the lagging domain. Neither channel suffices alone: coefficients only (a learned merge) stay far below, weights only (MOPD) leave a domain behind, and the combination (P²-MOPD) gives both the best average and the best worst-domain recovery.
In one line: expert weights, not only expert predictions, can supervise distillation. Kept as learnable priors throughout training, they guide where the student moves.
💻 Code: https://github.com/SinuoWang/P2-MOPD
We welcome feedback and discussion!
首次收录 · 2026-11-10 · 10.95 分