DepthBench:衡量残差连接如何实现更多计算深度
研究论文 · 2026/09/29
深度是增加Transformer计算能力的一种自然方式,但随着深度增加,更深层的作用可能减弱。近期方法通过增强归一化(如LayerNorm Scaling)或残差连接(如mHC、AttnRes)来改善信息流和深度利用。然而,这些方法是否真正将增加的架构深度转化为有效计算深度,以及其报告的增益是源于更好的跨深度信息访问还是未考虑的混杂因素,尚不清楚。本文提出DepthBench,一个用于研究不同架构计算深度的受控基准。我们在保持模型大小和预训练配方不变的情况下,系统地将宽度-深度比(d_model/n_layer)从浅宽型变化到深窄型。在10种代表性架构中,我们发现将更多容量分配给深度的收益强烈依赖于架构。标准Pre-LN及其大多数基于归一化和缩放变体在模型变得更深更窄时几乎没有收益,甚至可能降低性能,而HC和Full AttnRes即使在极端深形状下也能持续改进。这些增益不仅限于预训练损失,还持续转化为改进的领域特定性能和有效计算。受控的层级分析进一步表明,HC和Full AttnRes的增益与更有效地利用额外层相关,揭示了不同架构间计算深度的不同机制。总体而言,我们的结果确定残差连接设计是深度能否作为有意义缩放轴的关键决定因素,它使额外的架构深度能够转化为有效计算。
本文通过受控基准DepthBench,系统揭示了残差连接设计对深度作为缩放轴的关键作用,为理解Transformer深度利用机制提供了重要见解,并指出了现有归一化方法的局限性。
Depth is a natural way to increase the computational capacity in Transformers, yet the contribution of deeper layers can diminish as depth grows larger. Recent approaches enhance normalization (e.g., LayerNorm Scaling) or residual connections (e.g., mHC, AttnRes) to enable better information flow and depth utilization. However, it remains unclear whether they truly translate increased architectural depth into effective computational depth, and whether their reported gains stem from better access to information across depth, or unaccounted-for confounding factors. In this paper, we introduce DepthBench, a controlled benchmark for studying computational depth across various architectures. We systematically vary the width--depth aspect ratio (d_{model}/n_{layer}) from shallow--wide to deep--narrow shapes, while keeping the model size and pre-training recipe fixed. Across 10 representative architectures, we find that the benefit of allocating more capacity to depth is strongly architecture-dependent. Standard Pre-LN and most of its norm- and scaling-based variants provide little benefit and can even degrade performance as models become deeper and narrower, whereas HC and Full AttnRes improve consistently even at extreme deep shapes. These gains extend beyond pre-training loss and consistently translate into improved domain-specific performance and effective computation. Controlled layer-level analyses further show that the gains of HC and Full AttnRes are associated with more effective utilization of additional layers, revealing distinct mechanisms of computational depth across architectures. Overall, our results identify residual connection design as a key determinant of whether depth can serve as a meaningful scaling axis by enabling additional architectural depth to translate into effective computation.