研究问题
\(\mu\)P 允许从窄网络把最优超参数迁移到宽网络。论文问:对 residual depth \(L\),branch multiplier 与 learning rate 应怎样共同缩放,才能在 \(L\to\infty\) 时既保持 \(O(1)\) feature change,又避免相邻层变成冗余的 neural ODE,并由浅网预测深网超参数?
背景
初始化稳定只要求独立 residual increments 的方差不爆炸;训练时各层 updates 高度相关,累积律不同。因此 branch scaling 与 optimizer-specific learning-rate scaling 必须一起分类。 作者把最优性分成 feature learning 和 feature diversity:前者要求训练引起有限非零表示变化,后者要求深度方向仍保留独立结构,而不是所有相邻层输出平滑同质化。
模型与方法
对 block depth 1,Depth-\(\mu\)P 取 \(x^l=x^{l-1}+aL^{-1/2}g^l(x^{l-1};W^l)\)。SGD 的参数更新本身已有 \(L^{-1/2}\) 梯度因子,因此 base learning rate 保持 \(O(1)\);Adam 对梯度尺度不敏感,learning rate 取 \(\eta L^{-1/2}\)。 作者分类 branch exponent \(\alpha\) 与 update exponent \(\gamma\):\(\alpha+\gamma<1\) 更新爆炸,\(>1\) feature learning 消失;\(\alpha+\gamma=1\) 且 \(\alpha>1/2\) 形成冗余 smooth limit,唯一同时 maximal learning/diversity 的点是 \(\alpha=\gamma=1/2\)。
核心结果与证据
Figure 3 比较 homogeneous nonlinearities:在同一 CIFAR-10/Adam 设置下,absolute value 的最小 log loss 随深度下降得比 ReLU 更快;作者解释 \(\phi'(h)=\operatorname{sign}(h)\) 最大化跨层 decorrelation,从而提高 feature diversity。 Depth-\(\mu\)P 在单层 residual blocks 上实现 depthwise hyperparameter transfer,并可训练上千 blocks;但 pre-nonlinearity ResNet 虽然 transfer,8 层后几乎无性能增益,说明 transfer 不是架构质量的充分条件。 block depth \(\ge2\) 出现不可能性:为保 diversity,block 内多层 weights 在极限中被迫加性而非乘性耦合,最优超参数随深度漂移。Megatron/Common Crawl 中更深模型早期更差、中期最优 learning rate 近 \(O(1)\)、训练末期才近 \(L^{-1/2}\),没有单一全程 transfer law。
Figure 3 · absolute value 的 derivative 更强地 decorrelate 层间 updates,并在此实验中改善深度收益。
物理解读:The plot is empirical support within one setup, not a universal activation ranking.
来源:paper.pdf \(p\). 18, Figure 3
有效性与局限
正面定理针对 infinite width 后 infinite depth、residual block depth 1 和特定 homogeneous nonlinearities;finite width/depth、normalization、attention 与训练时长可改变最优 scaling。absolute value 在本文设置中改善 loss,不代表对所有数据与架构优于 ReLU,也可能改变表达偏置。 作者对现代 Transformer 给出的是限制性结论而非现成 recipe:\(L^{-1/2}\) 可能迁移 maximum viable learning rate,却不能同时对齐训练全过程的 optimum。理论的“唯一最优”依赖选定的参数化空间和 feature-diversity 定义。
复现与资源
原文:https://arxiv.org/abs/2310.02244。全文 57 页,PDF SHA-256:e1777ad3d3a77e870a3c3ef8daa7bd05ad186a94cd3bf0f68e552c11b7e746e8。 复现需固定 widthwise \(\mu\)P、block depth、pre/post-nonlinearity、normalization、optimizer、\(a,\eta\)、训练 steps/epochs 与数据;迁移图应展示完整二维超参数 surface,而非只报最佳点。 Evidence status: full-text verified; no independent reproduction performed.
阅读指南
先读 Table 1 与 Eq. (1),分别跟踪初始化 increments 和训练 updates 的 \(L\) 标度;再看 \((\alpha,\gamma)\) 分类和 feature-diversity 定义。随后用 Figure 3 检验 nonlinearity 机制,最后读 block-depth-2 与 Megatron 反例,明确 Depth-\(\mu\)P 的适用边界。
← 上一篇 An Effective Theory of Collective Deep Learning
下一篇 → Fusing Models with Complementary Expertise
Discussion
评论与讨论
评论公开保存在 GitHub Discussions;阅读无需登录,发表评论需要 GitHub 账号。