Transformer depth builds interconnected computations during pretraining

Functional Depth Is Learned: Isolating the Computation That Layers Produce Only Together

Artificial Intelligence

Summary

Deep learning models called transformers perform better when they have more layers, but it wasn’t clear if each layer worked mostly independently or together. The authors studied how these layers combine their work through pretraining and found that layers develop stronger joint computations over time. They showed that removing these combined parts harms the model’s performance more than removing random parts. This means transformer depth helps organize complex tasks by connecting layers, rather than just stacking many simple ones.

What this means in practice

  • For machine learning engineers: Improve model debugging by identifying layer groups whose combined computations critically affect transformer performance.
  • For ai system designers: Design deeper transformer architectures while monitoring and fostering inter-layer cooperation for better task-specific performance.

Authors

JaeSeong Kim, KyungTae Lim

Abstract

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.