arXiv:2607.18348cs.LGcs.AI2026-07被引 1

分析变压器残差流在不同层间的几何变化规律。

An Analysis of Residual-Stream Geometry Across Transformer Depth

论文配图:An Analysis of Residual-Stream Geometry Across Transformer Depth
图 1 · 摘自论文原文
  • 用相对位移和正交普罗克拉斯分析残差流变化
  • 早期和晚期层位移大,中间层较平稳,最终层残差最大
  • 结果具模型特异性且对任务条件不敏感,适合研究模型内部机制

本文提出一种以过渡为中心的变压器残差流几何分析方法。相对位移衡量连续层间表示的移动距离,正交普罗克拉斯分析将每次过渡分解为刚性旋转与非刚性残差。在六种指令微调模型上,针对代码生成与跨语言翻译任务,这些度量揭示出可重复的深度规律:相对位移显著依赖层位置,通常在早期和晚期较大,中间三分之一较平静;同一模型内各条件下几乎不变。旋转幅度随深度基本恒定,而普罗克拉斯残差与角度集中度则随深度变化,残差在最后过渡达到峰值。生成过程中,非英语目标比英语目标在最后一层有更大的位移和残差。这些结果作为描述性几何规律呈现,而非计算开销或因果解释。贡献在于建立残差流过渡的测量框架,并证明在此研究设置下,深度曲线具有模型依赖性且基本条件稳定。

原文摘要 · Abstract (English)

We propose a transition-centred geometric analysis of transformer residual streams. Relative displacement measures how \emph{far} representations move between consecutive layers, and orthogonal Procrustes analysis separates each transition into a rigid rotation and a non-rigid residual. Across six instruction-tuned models, on code generation and cross-lingual translation, these measurements reveal reproducible depth regularities. Relative displacement is strongly layer-dependent; typically larger early and late, with a quieter middle third; and nearly invariant across conditions within each model. Rotation magnitude is nearly constant across depth, while Procrustes residual and angle concentration remain depth-modulated, with residual peaking at the final transition. During generation, non-English targets show larger final-layer displacement and residual than English targets. We present these as descriptive geometric regularities, not as measures of computational effort or causal explanations. The contribution is a measurement framework for residual-stream transitions and evidence that, in the settings studied here, depth curves are model-dependent and largely condition-stable.

Transformer残差流几何分析

Thank you to arXiv for use of its open access interoperability. PaperDance 不是 arXiv 官方产品;中文卡片由大模型生成,请以原文为准。