Transformer performance scales with depth, but layer count merely counts the opportunities for sequential computation: layers could still behave as nearly independent refinements that barely depend on one another. We study how transformers develop functional depth during pretraining, introducing an exact inclusion-exclusion decomposition that isolates the connected component, i.e., the computation that appears only when a specified set of layers acts together under identity ablation. Tracking this quantity across public checkpoints of Pythia, OLMo, and Amber yields three findings. First, write-relative connected coordination strengthens from its initialization or earliest-checkpoint baseline as pretraining proceeds, across all measured interaction orders. Second, these connected components are behaviorally consequential under direct intervention: deleting them damages perplexity more than deleting a norm-matched random direction at the same site in all 35 measured model-order cells. Third, pairwise representation similarity is consistently negatively correlated with pairwise connected coordination across seven models, yet the two signals are not interchangeable: similarity- and coordination-based block-removal criteria often agree in Pythia but diverge on Amber. Together, these results suggest that architectural depth provides the opportunity for sequential computation, while pretraining progressively organizes cross-layer dependencies within that depth.
Figures & tables
Figure 1: Development of connected cross-layer coordination during pretraining (pythia-410m). Each panel visualizes one checkpoint (columns, init–64k steps) at one interaction order k (rows, k=3 – 6 ): nodes are layers ordered by depth, and each arc spans an adjacent window T of k layers, with intensity proportional to its normalized connected component UT , scaled by the order-level ratio Rk . Coordination is weak relative to later checkpoints at initialization and progressively concentrates into an early-interior band as training proceeds, across every measured order.
Series
Models
L
d
Checkpoints
Pythia
410M
24
1024
8 (0–64k steps, 134B tok.)
1B
16
2048
1.4B
24
2048
2.8B
32
2560
6.9B
32
4096
OLMo
1B
16
2048
7 (4B–3T tok.)
Table 1: Model series and released checkpoints used in the developmental analysis.
Model
Order k
k=2
k=3
k=4
k=5
k=6
Pythia-410M
base
0.35
0.14
0.06
0.03
0.02
final
0.62
0.54
0.58
0.72
0.98
Rk
1.76
3.86
9.06
21.3
47.1
Pythia-1B
base
0.43
0.21
0.12
0.08
0.06
final
0.69
0.66
0.79
1.00
1.38
Table 2: Write-relative connected component UT (Eq. 10 ) at the baseline checkpoint (base) and the final released pretraining checkpoint (final), with the ratio Rk=UTfinal/UTbase for k=2 – 6 (geometric mean over windows). At the baseline UT decays by roughly half per order; training removes this decay, keeping it O(1) at every order.
Figure 2: Coordination ratio Rk over pretraining (Pythia-1.4B), averaged over all adjacent windows of order k . All orders start near Rk=1 and separate upward as training proceeds. Bands are 95% bootstrap confidence intervals over adjacent windows.
Model
PPL
k=2
k=3
k=4
k=5
k=6
(real)
U -del.
rand.
U -del.
rand.
U -del.
rand.
U -del.
rand.
U -del.
rand.
Pythia-410M
34.7
11.8×
3.5×
8.2×
2.8×
4.7×
2.2×
6.4×
5.9×
19.8×
9.4×
Pythia-1B
30.4
14.5×
2.1×
5.7×
3.3×
2.9×
1.9×
7.2×
3.2×
52.9×
11.9×
Pythia-1.4B
26.1
10.8×
2.3×
52.5×
3.1×
12.5×
4.3×
35.1×
2.5×
224×
19.8×
Pythia-2.8B
22.0
6.7×
3.5×
21.6×
1.24×
15.0×
3.2×
167×
3.9×
111×
5.3×
Pythia-6.9B
19.3
6.6×
3.0×
809×
2.0×
63.0×
5.4×
1472×
162×
1253×
898×
Table 3: Perplexity increase (relative to the unintervened model) from deleting the connected component UT versus a norm-matched random direction at the same site, for k=2 – 6 . The two deletions have identical magnitude at the intervention point, so the gap is attributable to the deleted direction being connected. U -deletion is more damaging in all 35 cells.
Model
k
Dense ↓
ρsim
Coordination
CKA
Low (safe) ↓
High (risky) ↓
ρ
High (safe) ↓
Low (risky) ↓
ρ
pythia-410M
2
34.7
−0.52
70.2 [14–15]
85.5 [21–22]
+0.63
68.2 [10–11]
139.4 [1–2]
−0.57
3
84.0 [10–12]
2130.0 [5–7]
+0.83
80.0 [9–11]
1486.3 [3–5]
−0.70
4
155.6 [18–21]
15978.1 [5–8]
+0.84
126.5 [12–15]
23693.8 [3–6]
−0.71
pythia-1B
2
30.4
−0.66
233.1 [1–2]
90.6 [13–14]
+0.05
76.3 [8–9]
233.1 [1–2]
−0.81
3
77.8 [6–8]
1026.2 [3–5]
+0.83
106.1 [7–9]
156.5 [11–13]
−0.68
Table 4: Perplexity after removing k consecutive layers, with blocks selected by coordination versus CKA. Bracketed indices denote the removed block; best and second best per row. ρsim is the model-level Spearman correlation between pairwise CKA and U^{i,j} over all layer pairs. ρ is the Spearman correlation between a metric’s block score and post-removal perplexity; correct ranking gives ρ>0 for coordination and ρ<0 for CKA.
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 (dmodel/nlayer) 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.
Keyu Wang, Yangyi Huang, Jiale Kang +3
ELLIS Institute Tübingen · Max Planck Institute for Intelligent Systems · Tübingen AI Center +1
We investigate whether transformers use their depth adaptively across tasks of increasing difficulty. Using a controlled multi-hop relational reasoning task based on family stories, where difficulty is determined by the number of relationship hops that must be composed, we monitor (i) how predictions evolve across layers via early readouts (the logit lens) and (ii) how task-relevant information is integrated across tokens via causal patching. For pretrained models, we find some limited evidence for adaptive depth use: some larger models need fewer layers to arrive at plausible answers for easier tasks, and models generally use more layers to integrate information across tokens as chain length increases. For models finetuned on the task, we find clearer and more consistent evidence of adaptive depth use, with the effect being stronger for less constrained finetuning regimes that do not preserve general language modeling abilities.
An operation's input-output function does not, by itself, determine its computational role within a represented process. That role also depends on the processes producing its inputs and receiving its outputs, a philosophical stance termed deep learning externalism (DLE). We develop a mathematical account of represented computation that distinguishes functional equivalence, retained predecessor distinctions, restricted receiver capability, and context-dependent effective architectures. The resulting equivalences depend on which computational relations a scientific description must preserve. We prove that two injective producer contexts can preserve every predecessor distinction while changing whether fixed local and attention receiver families are equivalent. We investigate these relations in a dimension-labelled PreNorm Transformer and their evolution under training. Residual bypasses restrict complete-state information identifications to two merges per block, while finer branches can change receiver accessibility. Exact gradient-descent models yield covariance-dependent geometric attenuation under learned producer routing and algebraic (t−1/2) attenuation under Q/K-softmax training, with optimal bounded-receiver recovery errors derived in both cases. Coupled producer-attention dynamics establish how learning jointly reorganizes the presented features and receiver allocation. Finally, present functional or receiver-profile equivalence need not determine future behavior under an optimizer. In an input-conditioned attention model, two accessibility measurements form an exact reduced predictive state, whereas one alone does not.