arXivDaily arXiv每日学术速递 周一至周五更新
arXiv 2610.15589cs.LGcs.CL
收藏

Top-k蒸馏从未计算的梯度

The Gradient That Top-k Distillation Never Computes

Rasul Khanbayov, Hasan Kurban

AI总结:

该研究指出Top-k蒸馏的重新归一化会使控制尾部质量方向的梯度为零,全词汇梯度含尾部质量加权残差,实验显示其效果小于师生模型对选择,常用缓存k值低于精确恢复所需的k=d+1。

摘要:

许多已部署的蒸馏流水线向学生模型展示了教师模型的截断视图:保留前k个概率,重新归一化,并对剩余部分最小化散度。人们假设重新归一化可解释缺失的质量。我们证明,它消除了尾部质量的可见性,但并未消除移动尾部质量的自由度。重新归一化的目标仅依赖于保留的token之间的对数几率,因此在每个位置,其沿控制尾部质量方向的梯度恰好为零;在真实教师模型上,该分量约为梯度的2×10^-15至3×10^-15。全词汇梯度等于截断梯度加上由尾部质量加权的残差,而训练仅作用于第一项。若没有交叉熵项,Top-k学生模型的尾部质量会偏离教师模型,而全词汇对照组则会略微向教师模型移动;加入交叉熵项后,差距缩小约四倍但仍存在。在七个开放权重教师模型上,保留集仅从k=d+1(d为隐藏维度)起确定教师模型的分布:在所有七个模型上,从该点起恢复是精确的,而常用缓存大小低于该值。在我们的离线策略运行中,实际效果存在,但小于师生模型对选择的影响。重新归一化是一种归一化,而非保障措施。代码可在此https URL获取。

英文摘要:

Many deployed distillation pipelines show the student a truncated view of the teacher: keep the top-k probabilities, renormalize, and minimize a divergence on what remains. Renormalization is assumed to account for the missing mass. We prove that it removes the visibility of tail mass, not the freedom to move it. The renormalized objective depends only on log-odds among the retained tokens, so at each position its gradient along the directions that control tail mass is exactly zero; on a real teacher that component measures $2$-$3\times10^{-15}$ of the gradient. The full-vocabulary gradient equals the truncated gradient plus a residual weighted by the tail masses, and training acts only on the first term. Without the cross-entropy term, a top-k student's tail mass drifts away from the teacher's while a full-vocabulary control moves slightly toward it; with it, the gap shrinks about fourfold but persists. On seven open-weight teachers, the retained set determines the teacher's distribution only from $k=d+1$ ($d$ the hidden dimension): recovery is exact from there on all seven, and commonly cached sizes sit below it. In our off-policy runs the practical effect is real but smaller than the choice of teacher-student pair. Renormalization is a normalization, not a safeguard. The code is available at https://github.com/KurbanIntelligenceLab/top-k-distillation.

机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。

↑