发现变压器优化中隐藏的边界运动,可显著提升模型性能。
Hidden Boundary Motion in Transformer Optimization: Function-Space Orthogonalization of Affine Weight and Bias Updates
- 将权重和偏置更新分解为形状与边界两部分,揭示隐含函数关联。
- 实验显示边界项占权重梯度的66.4%,且99.4%由权重实现。
- 新优化器使准确率提升至85.81%,适合追求精度的训练者。
权重和偏置通常作为独立参数优化,但当仿射层输入均值非零时,二者不表示独立函数。对于仿射映射 $z=Wx+b$,权重更新包含一个与样本无关的位移 $ΔWμ$,其功能上等同于偏置更新。我们称此为隐藏贡献“边界运动”,并将每次更新分解为中心化、随样本变化的“形状”分量与共享的“边界”分量。在从头训练的四层Transformer(IMDb数据集)上,偏置类项 $g_bμ^ op$ 的中位数范数为原始权重梯度范数的0.664;更显著的是,$\norm{ΔWμ}/\norm{Δb}$ 中位数达134.7,而 $\norm{ΔWμ}/\norm{Δb+ΔWμ}$ 为0.994。因此,在AdamW下,边界运动几乎完全通过权重矩阵实现而非显式偏置。我们设计诊断优化器SBO-AdamW,独立优化 $g_W-g_bμ^ op$ 与 $g_b$,并补偿权重引起的边界位移。单种子实验中,验证准确率从81.68%升至85.81%,测试准确率从78.73%升至82.73%,最佳验证检查点提前至第800步而非第3000步。然而,批量中心补偿导致严重偏置坐标漂移并大幅降低边界能量。当前证据支持边界运动是重要优化机制,但尚未建立通用稳定优化器。下一步需实现稳定的中心化仿射参数化。
原文摘要 · Abstract (English)
Weights and biases are normally optimized as separate parameter tensors, yet they do not represent separate functions when the input to an affine layer has nonzero mean. For an affine map $z=Wx+b$ with input mean $μ$, a weight update contains a sample-independent displacement $ΔWμ$ that is functionally indistinguishable from a bias update. We call this hidden contribution \emph{boundary motion} and decompose each update into a centered, sample-varying \emph{shape} component and a shared \emph{boundary} component. On a four-layer Transformer trained from scratch on IMDb, the bias-like term $g_bμ^\top$ has a median norm equal to 0.664 of the raw weight-gradient norm across affine layers and training checkpoints. More strikingly, the median ratio $\norm{ΔWμ}/\norm{Δb}$ is 134.7, while $\norm{ΔWμ}/\norm{Δb+ΔWμ}$ is 0.994. Thus, under AdamW, the observed boundary motion is almost entirely realized through the weight matrix rather than the explicit bias. We implement a diagnostic optimizer, Shape--Boundary Orthogonal AdamW (SBO-AdamW), that optimizes $g_W-g_bμ^\top$ and $g_b$ with independent Adam states and compensates the weight-induced boundary displacement. In a single-seed experiment, SBO-AdamW raises validation accuracy from 81.68\% to 85.81\% and validation-selected test accuracy from 78.73\% to 82.73\%, with the best validation checkpoint occurring at step 800 instead of step 3000. However, the moving-batch-center compensation produces severe bias-coordinate drift and strongly reduces boundary energy. The present evidence therefore supports hidden boundary motion as an important optimization mechanism, but it does not yet establish a final general-purpose optimizer. A stable centered-affine parameterization is identified as the required next step.
Thank you to arXiv for use of its open access interoperability. PaperDance 不是 arXiv 官方产品;中文卡片由大模型生成,请以原文为准。