DepthBench: Measuring How Residual Connections Enable More Computational Depth
Organizations: ELLIS Institute Tübingen · Max Planck Institute for Intelligent Systems · Tübingen AI Center · The Chinese University of Hong Kong
Abstract
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 (\text{e.g.}, LayerNorm Scaling) or residual connections (\text{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 () 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.
Figures & tables
| Method | Update rule | Weight | Source |
| Baseline | |||
| Pre-LN ( Xiong et al., 2020 ) | Fixed | ||
| LayerNorm variants | |||
| Sandwich-LN ( Ding et al., 2021 ) | Fixed | ||
| LNS ( Sun et al., 2026 ) | Fixed | ||
| DeepNorm ( Wang et al., 2024 ) | Fixed | ||
| Setting | Matched Budget | # Shapes | Aspect Ratios | Purpose |
|---|---|---|---|---|
| Main benchmark | 400M total | 7 | – | Comprehensive architecture comparison |
| Iso-backbone control | 300M backbone | 6 | – | Control for backbone-size variation |
| Multi-scale suite | 200M–500M total | 3 | 28, 43, 76 | Test consistency across model scales |
| Validation at scale | 1.6B total | 3 | Validate trends at larger scale |
| Layers | Hidden | Intermediate | Heads | Head Dim. | Aspect Ratio | Backbone Size | Total Size | Total Diff. |
|---|---|---|---|---|---|---|---|---|
| 16 | 1216 | 3248 | 16 | 76 | 76.00 | 284M | 407M | |
| 20 | 1120 | 2992 | 16 | 70 | 56.00 | 301M | 414M | |
| 24 | 1024 | 2736 | 16 | 64 | 42.67 | 302M | 405M | |
| 28 | 960 | 2560 | 16 | 60 | 34.29 | 310M | 406M | |
| 32 | 896 | 2400 | 16 | 56 | 28.00 | 309M | 399M | |
| 42 | 800 | 2144 | 16 | 50 | 19.05 | 324M | 404M |
| Pre-LN | Sandwich-LN | LNS | DeepNorm | KEEL | MoDA | Full AttnRes | Block AttnRes | HC | mHC |
|---|---|---|---|---|---|---|---|---|---|
Appendix figures & tables10 assets
Supplementary material from the paper’s appendix.
Appendix
| Peak LR | |||||
|---|---|---|---|---|---|
| Pre-LN MoDA | 2.775 | 2.764 | 2.773 | 2.864 | – |
| Post-LN MoDA | 4.893 | 3.842 | 2.912 | 2.933 | 3.443 |
| Architecture | Parameters | vs. Pre-LN |
|---|---|---|
| Pre-LN / LNS / DeepNorm | 405.41M | — |
| Sandwich-LN | 405.46M | M |
| KEEL | 405.45M | M |
| AttnRes (Full / Block) | 405.51M | M |
| HC ( ) | 405.70M | M |
| mHC ( ) | 410.13M | M |
| Layers | Hidden | Intermediate | Heads | Head Dim. | Aspect Ratio | Backbone Size | Backbone Diff. | Total Size |
|---|---|---|---|---|---|---|---|---|
| 16 | 1248 | 3328 | 16 | 78 | 78.00 | 299M | 425M | |
| 24 | 1024 | 2736 | 16 | 64 | 42.67 | 302M | 405M | |
| 32 | 896 | 2400 | 16 | 56 | 28.00 | 309M | 399M | |
| 42 | 768 | 2048 | 16 | 48 | 18.29 | 297M | 375M | |
| 70 | 608 | 1632 | 16 | 38 | 8.69 | 312M | 373M | |
| 84 | 544 | 1456 | 16 | 34 | 6.48 | 299M | 354M |
| Layers | Hidden | Intermediate | Heads | Head Dim. | Aspect Ratio | Backbone Size | Total Size | Total Diff. |
| 200M – 4B training tokens | ||||||||
| 24 | 672 | 1792 | 16 | 42 | 28.00 | 130M | 198M | |
| 18 | 768 | 2048 | 16 | 48 | 42.67 | 127M | 205M | |
| 12 | 896 | 2400 | 16 | 56 | 74.67 | 116M | 206M | |
| 300M – 6B training tokens | ||||||||
| 28 | 800 | 2144 | 16 | 50 | 28.57 | 216M | 296M | |
| Layers | Hidden | Intermediate | Q/KV Heads | Head Dim. | Aspect Ratio | Backbone Size | Total Size | Total Diff. |
|---|---|---|---|---|---|---|---|---|
| 28 | 2048 | 6144 | 16 / 8 | 128 | 73.14 | 1.409B | 1.615B | |
| 40 | 1728 | 5184 | 16 / 8 | 108 | 43.20 | 1.433B | 1.607B | % |
| 54 | 1504 | 4512 | 16 / 8 | 94 | 27.85 | 1.466B | 1.617B |
Attention Residual Connections
Attention residual connections use learned, input-dependent routing to combine earlier layer outputs instead of relying only on fixed skips.
See all 23 papers