通过方向分解解耦Transformer中的表示演化
Disentangling Representation Evolution in Transformers through Directional Decomposition
- University of Maryland, College Park(马里兰大学帕克分校)
- Northeastern University(东北大学)
- ByteDance(字节跳动)
机构由 AI 辅助整理,请以论文原文为准。
AI总结:
本研究通过方向分解将Transformer表示更新分解为平行与垂直分量,发现值空间平行操作更稳健,并可用于压缩诊断和训练干预。
AI中文摘要:
Transformer表示通过学习到的加性变换进行演化,这些变换要么保持其当前方向,要么重定向它。我们将这种演化视为一种函数几何,将学习到的更新分解为平行分量和垂直分量。在预训练模型中,我们发现除残差恒等路径外,存在显著的平行分量。然后,我们将该分解应用于两个空间:相对于隐藏状态的注意力更新和MLP更新,以及相对于当前token值的注意力值聚合。定向编辑揭示了强烈的空间依赖性不对称性:排除自身的值空间平行操作明显比残差空间和垂直对应操作更稳健,在仅缩放非自身聚合的同时保留直接自身消息。相同的分解给出了压缩引起的更新误差的组件级描述:垂直误差比平行误差更清晰地区分压缩方法。大量实验进一步表明,在从头预训练期间进行全聚合平行抑制会降低验证损失轨迹并改善下游平均性能,其中值空间变体最强。总之,这些结果将表示几何与编辑稳健性、压缩诊断和训练时干预联系起来。代码可在项目仓库中获取。
英文摘要:
Transformer representations evolve through learned additive transformations that either preserve their current direction or redirect it. We study this evolution as a functional geometry, decomposing learned updates into parallel and perpendicular components. Across pretrained models, we find substantial parallel components beyond the residual identity path. We then apply the decomposition in two spaces: to attention and MLP updates relative to the hidden state, and to attention value aggregation relative to the current token's value. Targeted edits reveal a strongly space-dependent asymmetry: exclude-self value-space parallel manipulation is markedly more robust than residual-space and perpendicular counterparts, preserving the direct self message while scaling only the non-self aggregate. The same decomposition gives a component-resolved description of compression-induced update error: perpendicular error separates compression methods more clearly than parallel error. Extensive experiments further demonstrate that full-aggregate parallel suppression during from-scratch pretraining lowers validation-loss trajectories and improves downstream averages, with the value-space variant strongest. Together, these results connect representation geometry to editing robustness, compression diagnosis, and training-time intervention. Code is available in the \href{https://github.com/Shwai-He/Transformer-Geometry}{project repository}.