解析深度Transformer中各组件如何影响初始阶段的秩保留,揭示架构设计的本质权衡。
Transforming Rank: How Architecture Navigates the Spectral Pathologies of Depth

- 跳过连接与归一化通过调节分支与跳跃路径的相对尺度,控制梯度秩的保持
- 预归一化使秩稳定而非崩溃,后归一化则导致秩塌陷,因分支-跳跃比不同
- 宽度扩展和双矩阵结构用额外参数维持表示与雅可比秩,避免残差坍缩
我们研究了Transformer前馈块中每个组件如何决定网络深度初始化时秩的保留程度。跳过连接和归一化传统上被视为控制幅值的机制,我们重新诠释为维持梯度秩的工具,因为使网络具有表达力的矩阵乘法与非线性激活本身会降低秩。结果显示,跳过连接在秩塌陷与类集成行为之间权衡,其效果由分支与跳跃路径的相对尺度决定:跳过连接将梯度绕开残差分支(秩损失处),而非沿促使层间组合的长梯度路径传播。归一化的位置通过设定深度上的分支-跳跃比控制这一权衡,统一了归一化位置与深度缩放的研究,尤其解释了为何后归一化导致秩塌陷、而前归一化使秩趋于平稳。其他架构特性,如用于扩宽与收缩的双矩阵结构,通过额外参数维持表示或分支雅可比秩。第二个矩阵消除会随块数增长的相干均值尖峰,防止残差表示坍缩;两矩阵间的宽度扩展使分支雅可比保持满秩:在扩展空间中应用降秩激活后,仍保留足够方向覆盖原始空间,该宽度符合Marchenko-Pastur定律。输入-输出雅可比的初始化秩可预测哪些网络能在CIFAR-10上训练。综上,深度网络的架构设计可被重新理解为在秩塌陷、类集成行为与参数量之间进行内在权衡。
原文摘要 · Abstract (English)
We investigate how each component of the Transformer feedforward block architecture design determines how much rank survives across depth at initialization. We reinterpret skip connections and normalization, long understood as controlling magnitude, as mechanisms for preserving gradient rank across depth, since the very matrix multiplications and nonlinear activations that make the network expressive also reduce the rank. We show that skip connections trade off rank collapse against ensemble-like behavior, controlled by the relative scales of the branch and the skip: skip connections route the gradient around the residual branch, where rank is lost, rather than along the long gradient paths that encourage the layers to compose. The placement of the normalization layer controls this same tradeoff by setting the branch-to-skip ratio across depth, unifying much of the normalization placement and depth scaling literature, in particular why rank collapses for Post-Norm but plateaus for Pre-Norm. Other aspects of the architecture, like the two-matrix structure that expands and contracts the width, use additional parameters to preserve the representation or branch Jacobian rank. The second matrix decorrelates a coherent mean spike that would grow across blocks with a single matrix and uncentered activation, preventing the residual representation from collapsing. The width expansion between the two matrices keeps the branch Jacobian full rank: applying the rank-reducing activation in this expanded space leaves enough directions to span the original, at a width that follows a Marchenko--Pastur law. The initialization rank of the input--output Jacobian predicts which networks train on CIFAR-10. Taken together, we recast architecture design for deep networks as navigating an intrinsic tradeoff among rank collapse, ensemble-like behavior, and parameter count.
Thank you to arXiv for use of its open access interoperability. PaperDance 不是 arXiv 官方产品;中文卡片由大模型生成,请以原文为准。