Quantifying Depth Sufficiency in Residual Neural Networks: A First-Order Criterion
Abstract
How can we determine whether a trained neural network is already deep enough? We study this under a fixed function-preserving residual-growth protocol specifying insertion locations, residual families, zero-output initializations, and zero-state first-order updates. We define first-order residual depth saturation as the absence of a strict local decrease from every admissible insertion. We prove residual non-degeneracy is necessary and sufficient: additional depth has first-order value exactly when conditional activation gradients have a nonzero projection onto at least one admissible residual tangent space. This boundary is shared by descent-compatible zero-state updates and invariant under regular local reparameterizations preserving that tangent space. Under residual-signal realizability, raw activation-gradient vanishing exactly certifies saturation. Across ResNets, GPT-2-style models, and continued-pretrained Pythia checkpoints, the maximum activation-gradient norm decreases toward a low-signal regime with depth. Function-preserving growth also achieves converged performance competitive with training from scratch. These results support activation-gradient magnitude as a conservative diagnostic of the remaining empirical first-order value of residual depth.
Introduction
Increasing depth is a standard way to expand neural-network capacity, yet its marginal benefit does not persist indefinitely: models often improve as layers are added and then enter a regime in which further depth yields little gain in test dataset. This raises a basic question for model scaling and adaptive growth: given a trained network, how can we determine whether additional residual depth still has useful optimization value? Comparing independently trained models of different depths cannot isolate this question, since their performance differences may reflect initialization, optimization difficulty, training budget, regularization, or finite-sample variation. Function-preserving residual insertion (Chen et al. 2015; Wei et al. 2016) provides a cleaner setting: a residual block initialized to produce globally zero output leaves the represented function unchanged, so the marginal value of new depth can be studied at a common initialization. Existing growth methods, however, provide no exact criterion for when residual growth should terminate.
Some works on normalized residual networks introduced a residual non-degeneracy condition and showed that it is sufficient for constructing a locally improving expanded model (Cheng et al. 2026). This leaves open a logically prior question: does the condition exactly characterize whether any admissible first-order residual direction remains? We study this question relative to a fixed residual-growth protocol that specifies, before observing the gradient signal, the admissible insertion candidates, the parameterized residual family with its function-preserving initialization, and a zero-state, descent-compatible first-order update for the inserted parameters. A candidate is operationally saturated when this update cannot produce a strict decrease from the function-preserving initialization for any sufficiently small positive step. Our main theorem shows that this boundary does not depend on the optimizer chosen within the stated first-order class.
The tangent-space projection is the appropriate parameterization-independent quantity, because a raw activation gradient may contain components that the selected residual family cannot express. For standard zero-output blocks—a feature-producing subnetwork followed by a trainable output projection—the parameter criterion reduces to the cross-gradient between the activation gradient and the residual features; holding the feature parameters fixed loses no first-order directions, since their derivative vanishes at a zero output projection. We further introduce a checkpoint-specific residual-signal realizability condition, requiring only that the current conditional activation-gradient signal lie in this tangent space. Under realizability the projection preserves the full signal, and raw activation-gradient vanishing becomes a necessary and sufficient saturation certificate.
Our experiments combine two complementary forms of evidence. First, we measure the sample-wise activation-gradient norm across depth in ResNets trained on CIFAR-10, CIFAR-100, and ImageNet-100, in Pythia checkpoints continued-pretrained on FineWeb-Edu, and in GPT-2-style models trained from scratch on the same corpus. Because orthogonal projection cannot increase norm, this score upper-bounds the empirical projected residual-growth value on every fixed sample. Second, on four controlled CIFAR-10 ResNet configurations we insert one globally zero-output residual block at a time, comparing function-preserving growth with training the same final-depth architectures from random initialization to control for optimization disadvantages of the growth procedure. Additional blocks produce realized gains at shallower depths, and these gains disappear once the sample-wise score enters a stable low-signal regime.
Our contributions are fourfold. First, we introduce an operational notion of first-order residual depth saturation and prove that its boundary is shared by all zero-state, descent-compatible first-order updates. Second, we characterize this boundary through the parameterization-invariant projection of the conditional activation gradient onto the residual tangent space, and derive the cross-gradient criterion for standard zero-output blocks. Third, we establish exact and approximate residual-signal realizability conditions under which raw activation gradients can replace the projected criterion. Finally, we combine broad fixed-sample gradient measurements with controlled one-block growth and from-scratch comparisons, supporting low sample-wise activation-gradient energy as a conservative practical indicator that little empirical first-order value of residual depth remains.
Related Work
Net2Net and Network Morphism introduced function-preserving operators that widen or deepen a trained network without changing the represented function (Chen et al. 2015; Wei et al. 2016). This idea underlies efficient Transformer pre-training through progressive stacking, parameter reuse and knowledge inheritance, learned or lossless expansion operators, and variance-transfer initialization (Gong et al. 2019; Gu et al. 2020; Du et al. 2024; Chen et al. 2022; Qin et al. 2021; Wang et al. 2023, 2024; Yuan et al. 2023). These works address how to grow efficiently and presuppose that added capacity is useful; none gives an exact criterion for when residual growth stops having local optimization value.
Deciding when and where to grow is a classical theme of constructive learning (Fahlman and Lebiere 1990; Ash 1989). Recent policies schedule depth growth via validation heuristics or fitting risk (Wen et al. 2019; Wu et al. 2024), and local scores select beneficial insertions through splitting directions, gradient norms, expressivity bottlenecks, topological derivatives, and natural-expansion scores (Wu et al. 2019, 2021; Evci et al. 2022; Verbockhaven et al. 2024; Krishnanunni et al. 2025; Mitchell et al. 2023). These criteria are sufficient conditions or heuristics for beneficial growth; we instead characterize exactly when no admissible function-preserving residual insertion admits a first-order improvement.
Residual networks behave like ensembles of shallow paths, and stochastic depth and layer pruning of large language models reveal substantial redundancy in trained depth (Veit et al. 2016; Huang et al. 2016; Gromov et al. 2024; Men et al. 2024); zero-initialized residual branches are benign and trainable (Zhang et al. 2019; Bachlechner et al. 2021), supporting our zero-output initialization. Unlike scaling-law comparisons of independently trained models (Kaplan et al. 2020; Levine et al. 2020), our function-preserving setting isolates the marginal first-order value of additional depth at a common checkpoint.
Closest to our work, Cheng et al. (2026) show that residual non-degeneracy (Condition 1) is sufficient for constructing a locally improving expanded model; we prove that it is also necessary under a fixed zero-state protocol, yielding a saturation boundary invariant to the first-order optimizer and to reparameterizations preserving the residual tangent space.
Problem Setup, Assumptions, and Notation
Problem Setup
Let be the input space, let be the label space, and let be a probability distribution on . We write , where is an input and is its label. Every predictor considered below maps to , and the loss is a measurable function . For any measurable predictor , define whenever the expectation is finite. For a fixed sample , define .
We follow the residual-insertion notation of (Cheng et al. 2026). Let be a trained reference model with . Before observing any activation-gradient signal or growth outcome, we fix a residual-growth protocol. The protocol specifies a finite set of admissible insertion candidates. Each candidate consists of an insertion location, a parameterized residual family, a designated function-preserving initialization, and a first-order optimizer direction rule for the newly inserted parameters.
At candidate , decompose the reference model as and define , where is the hidden-state dimension at candidate . Let denote the distribution of induced by . When a single candidate is fixed, we suppress and write , , , and .
The parameterized residual family at candidate is , where and . The designated local origin satisfies for every ; equivalently, on the full ambient hidden-state space. The notation denotes a local coordinate centered at this initialization and does not require every raw parameter in the residual branch to be numerically zero.
The expanded model is . Since , the insertion preserves the represented function pointwise and . Define the population and empirical objectives associated with candidate by and .
All components of the residual-growth protocol are fixed in advance. The candidates, residual families, parameterizations, designated origins, and optimizer direction rules may not be changed after the activation-gradient signal has been observed. All internal hyperparameters that determine each direction rule are fixed; the positive scalar step size used in the local analysis remains free.
Assumptions
The assumptions below have distinct roles. Assumptions 1 and 2 support the main saturation theorem. Assumption 3 is invoked only when the exact projected criterion is replaced by the raw activation-gradient criterion. Assumption 4 is used only for the supplementary finite-sample consistency result.
Assumption 1 (First-order regularity).
For every candidate and for -almost every , the map is Fréchet differentiable at . Its measurable gradient is denoted by . Define the conditional population signal by .
For -almost every , the map is Fréchet differentiable at . Its measurable Jacobian with respect to , evaluated at the origin, is denoted by , where denotes the Jacobian with respect to the active residual coordinate .
There exists a neighborhood of the origin on which is finite. The map is Fréchet differentiable at , and its derivative is obtained by interchanging sample-wise differentiation and expectation. For a fixed sample , empirical statements are understood on samples for which all corresponding sample-wise derivatives exist; an i.i.d. sample has this property almost surely under the preceding conditions.
We further assume and , where is the operator norm. Conditional Jensen’s inequality then gives , and Cauchy–Schwarz ensures that the population residual-parameter gradient defined below is finite.
A standard sufficient condition for the interchange in Assumption 1 is a local integrable Lipschitz envelope: for each candidate , there exist and an integrable random variable such that whenever . For any sequence , sample-wise Fréchet differentiability makes the normalized remainder converge pointwise to zero. The local Lipschitz bound controls both the difference quotient and the norm of its derivative by , so the normalized remainder is dominated by . Dominated convergence then yields an population remainder, which gives Fréchet differentiability of and the stated differentiation–expectation interchange. Uniform integrability of the local difference quotients is an alternative sufficient condition.
First-order residual gradients and Condition 1.
For a fixed sample , let and . Define and . For a direction , write and for the Fréchet directional derivatives at the origin.
Condition 1 (Residual non-degeneracy).
At candidate , population residual non-degeneracy holds if there exists such that . For a fixed sample , its empirical counterpart holds if there exists such that .
Assumption 2 (Fixed zero-state descent-compatible first-order update).
At every candidate , the optimizer direction rule and all internal hyperparameters that determine it are fixed as part of the residual-growth protocol. We call the optimizer zero-state when the active residual coordinate is initialized at and every optimizer state variable associated with is initialized at its neutral zero value. We assume that the optimizer used by the protocol is zero-state.
Given the exact population or full-sample empirical residual-parameter gradient , the local update has the form , where is a free scalar step size and is the fixed direction map. We assume and for every . Since , every such direction is feasible for all sufficiently small positive .
This class includes gradient descent and positive-definite preconditioned gradient descent. It also includes the first bias-corrected Adam or AdamW update at zero state: coordinatewise, , where is the numerical-stability constant. Hence and for ; decoupled weight decay contributes no first-step drift because the active residual coordinate is zero. The analysis does not cover Hessian-based updates, externally injected perturbations, nonzero initial optimizer states, or stochastic escape from a zero full gradient.
Population and empirical first-order saturation.
A candidate is population first-order improvable if there exists such that, for every , . It is population first-order saturated otherwise. The empirical notions are defined by replacing and with and ; the corresponding step-size threshold is denoted by . The reference model is first-order depth-saturated relative to the fixed protocol if every candidate is population first-order saturated. Unless explicitly qualified, “first-order saturated” refers to the population notion.
Residual tangent-space objects.
For each candidate , let with inner product and norm . Define the residual tangent operator by . Since is finite-dimensional, it is closed; define and let be the orthogonal projector onto .
For the fixed sample , define the empirical Hilbert space with and . Define and its matrix representation . The stacked tangent operator is , and denotes the orthogonal projector onto .
Assumption 3 (Residual-signal realizability).
At every candidate to which the raw activation-gradient criterion is applied, the current conditional activation-gradient signal is realizable by the fixed residual tangent space: .
The stronger equality is called population tangent completeness. Since , exact population tangent completeness is impossible whenever is infinite-dimensional, as is typical for non-atomic hidden-state distributions.
On the fixed sample , residual-signal realizability means . The stronger condition that be surjective onto is called sample-wise tangent completeness.
Assumption 4 (Independent finite-sample probing).
For the supplementary finite-sample consistency result, all probabilities are conditional on the fixed reference model and the complete residual-growth protocol. Let be independent of the data and randomness used to train . In that result, all empirical quantities are instantiated with and .
For every , assume . As increases, the reference model and the complete protocol remain fixed; adaptive selection of a new candidate or residual family after observing the probe sample is not covered.
Practical motivation.
We focus on first-order optimization because gradient-based methods are the practical default for modern large-scale neural networks, whereas exact and structured second-order methods introduce substantially larger memory and computational costs (Anil et al. 2020). Residual-signal realizability is motivated by common ResNet and Transformer branches, which typically consist of a feature-producing subnetwork followed by a trainable terminal output map (He et al. 2016; Vaswani et al. 2017). Zero-initializing that terminal map preserves the reference function while retaining nonzero upstream features. An unconstrained output projection alone does not guarantee realizability, however: the upstream features must also span the sample-dependent variation required by the current activation-gradient signal.
Notation
Residual growth values.
Define the local population and empirical residual growth values by and . Define their depth-wide counterparts by and . Their dependence on the fixed reference model and residual-growth protocol is suppressed throughout.
Standard zero-output residual blocks.
At candidate , consider , where and . During the local insertion test, is fixed and is the active parameter, initialized at . We identify , , and . Writing , every matrix perturbation satisfies . Allowing to vary as an additional active coordinate does not enlarge the first-order tangent space at , because at the designated origin. Thus fixing is a lossless first-order simplification.
Define the Frobenius inner product and norm by and . Define and . Let , so that .
Let be the orthogonal projector onto the row space of , where † is the Moore–Penrose pseudoinverse. Under the tuple–matrix identification of , the matrix representation of is . Consequently, finite-sample residual-signal realizability is equivalent to . Sample-wise tangent completeness is equivalent to , in which case .
When one candidate is fixed, we suppress and write , , , , and .
First-Order Residual Depth Saturation
This section characterizes the exact boundary between residual depth that retains first-order optimization value and residual depth that cannot be activated from a function-preserving initialization.
Main Theorem: An Exact Saturation Boundary
Condition 1 was introduced in prior work as a sufficient condition for a locally improving residual insertion (Cheng et al. 2026). We show that, under the fixed protocol, it is also necessary for first-order improvement.
Theorem 1 (Necessary and sufficient characterization of first-order residual depth saturation).
Suppose Assumptions 1 and 2 hold. At every candidate , the following statements are equivalent:
-
1.
Condition 1 holds at .
-
2.
.
-
3.
.
-
4.
.
-
5.
There exists such that, for every , .
Consequently, if and only if every candidate is population first-order saturated, equivalently, if and only if the reference model is first-order depth-saturated relative to the fixed protocol.
Items 1–4 characterize the existence of an arbitrary strict first-order descent direction in the fixed residual parameter space. Item 5 is the optimizer-realization statement: it concerns specifically the update obtained by applying the fixed direction map to the exact residual gradient. Its reverse implication uses the zero-state property and should not be read as a claim that a stationary point cannot be left by stochastic or higher-order mechanisms.
The qualifier first-order is essential. The theorem does not exclude improvements obtained through higher-order curvature, externally injected perturbations, stochastic escape, or a different residual-growth protocol. The projected activation gradient and the residual-parameter gradient share the same zero-versus-nonzero boundary, but their norms generally differ. The growth value depends only on the residual tangent subspace and is invariant under regular local reparameterizations that preserve this subspace, whereas the Euclidean parameter-gradient norm is coordinate-dependent.
A finite joint-insertion extension, under an additional joint Fréchet-regularity condition, is stated in the supplementary material. A separate local-smoothness corollary gives an explicit one-step decrease for ordinary gradient descent without changing the main equivalence.
Residual-Signal Realizability in Common Architectures
Theorem 1 shows that the universal criterion is the activation-gradient component contained in the fixed residual tangent space. Residual-signal realizability permits this projected criterion to be replaced by the raw activation-gradient signal.
Theorem 2 (Activation-gradient characterization under residual-signal realizability).
Suppose Assumptions 1 and 2 hold at a fixed candidate .
-
1.
If , then . Consequently, Condition 1 holds if and only if , and the candidate is population first-order saturated if and only if -almost everywhere.
-
2.
If , then . Consequently, empirical Condition 1 holds if and only if , equivalently .
- 3.
-
4.
For this standard block, sample-wise tangent completeness is equivalent to . Under this condition, , and therefore if and only if .
If residual-signal realizability holds at every candidate, simultaneous activation-gradient vanishing is equivalent to depth-wide first-order saturation.
Activation-gradient vanishing is always sufficient for local first-order saturation, even without realizability. Realizability is needed only for the reverse implication. More quantitatively, let . If and , then Pythagoras gives . The same statement holds on a fixed sample after replacing , , and by , , and , respectively.
Many ResNet and Transformer branches contain a feature-producing subnetwork followed by a trainable output map. Zero-initializing the terminal map preserves the reference function while keeping the upstream features nonzero. Wide and diverse features can therefore make signal-relative realizability plausible.
For an arbitrary fixed residual block, the projected activation gradient is the parameterization-invariant exact criterion; the residual-parameter gradient has the same zero-versus-nonzero boundary. For a standard zero-output block, the latter reduces to the activation–feature cross-gradient. Under residual-signal realizability, the raw activation gradient may be used directly.
Finite-Sample Certification
The preceding results characterize saturation through population residual-parameter gradients, which are not directly observable. We therefore consider an independent probe sample drawn after the reference model and the complete residual-growth protocol have been fixed.
For each candidate , let , , and . Define and .
Experiments
We conduct two complementary experiments to evaluate the proposed depth-saturation criterion. First, we examine how the maximum per-example activation-gradient norm changes with depth across ResNets trained on CIFAR-10, CIFAR-100, and ImageNet-100, GPT-2-style models trained on FineWeb-Edu, and official Pythia checkpoints continued-pretrained on the same corpus. Second, we compare function-preserving growth with training the same final architectures from random initialization to determine whether zero-output insertion impairs converged solution quality. The training and model settings are provided in the Appendix. All models are well-trained.
Activation-Gradient Norms Across Model Depth
We first examine how the fixed-sample activation-gradient signal changes as model depth increases. This analysis covers ResNets trained on CIFAR-10, CIFAR-100, and ImageNet-100, official Pythia checkpoints continued-pretrained on FineWeb-Edu, and GPT-2-style models trained from scratch on FineWeb-Edu.
For each admissible candidate , i.e., at the input of an existing residual structure in this experiment, define .
Under sample-wise residual-signal realizability, , the empirical activation-gradient signal lies entirely in the admissible residual tangent space. Hence, . If realizability holds at every candidate, then . Thus, under sample-wise realizability, exactly equals the empirical first-order residual-growth value. Without verified realizability, we only have , so is the upper bound of . However, it is enough to use this upper bound to gain the value of because for most of cases, is close to zero.
Analysis
Figure 1 shows a broadly consistent transition from a high-signal, depth-beneficial regime to a stable low-signal regime. For clearly show resluts, CIFAR 100 results are divideds into two subfigures. For the controlled ResNet and GPT-2-style sweeps, decreases rapidly together with task loss at shallow and intermediate depths, and then changes only modestly once the loss improvements begin to diminish. Pythia exhibits a similar but sharper transition. ImageNet-100 is less monotone at intermediate depths, but the overall envelope of still decreases and reaches its minimum at the largest evaluated depth.
The relevant observation is therefore not strict monotonicity at every checkpoint, but the emergence of a persistent low-signal plateau. Because is the maximum over all admissible insertion locations, a small conservatively implies that the empirical projected residual-growth value is small at every candidate. The alignment between this regime and diminishing task-loss improvements is consistent with the proposed first-order saturation criterion. However, a large raw score does not guarantee a realizable residual direction, and the training-sample diagnostic need not exactly track test loss performance. These results therefore motivate using a stable low-signal plateau, rather than a universal threshold or an isolated checkpoint, as the practical indicator of residual depth saturation.
As shown in Figure 1, the proposed depth-saturation indicator exhibits a consistent relationship with the marginal benefit of increasing model depth across CIFAR-10, CIFAR-100, and Pythia. At relatively shallow depths, the indicator decreases rapidly as additional residual structures improve model performance. However, once the indicator approaches the low-signal regime—approximately , further increases in depth yield little or no additional performance improvement. This transition occurs at approximately 16 residual structures for the CIFAR-10 ResNet (), 11 residual structures for the CIFAR-100 ResNet (), and 33 residual structures for Pythia (). The close alignment between the emergence of a near-zero indicator and the disappearance of measurable performance gains supports the use of the proposed metric as a practical diagnostic of residual depth sufficiency. In particular, a persistently small value suggests that little first-order optimization value remains available from adding further residual structures.
Extended-depth evaluation.
We conducted independent large-depth experiments (Training hundreds of these models is prohibitively expensive.). For ImageNet-100, ResNet-256/257/258 yielded scores of //, with training losses decreasing to // and test losses fluctuating at //. Similarly, GPT-2 configurations (700/701/702 residual structures) showed scores of //, training losses decreasing to //, and test losses fluctuating at //. In both settings, scores remained below approximately . The change of training and test loss is so small. Given the probabilistic nature of test loss performance and its sensitivity to finite-sample and optimization variability, depth saturation need not manifest as monotonically worsening test loss. Crucially, test performance merely fluctuated within a range without systematic gains from increased depth. This confirms that once scores reach a persistent near-zero level, additional residual structures yield minimal marginal improvements in test loss performance, even if isolated deeper checkpoints occasionally achieve better point estimates.
Function-Preserving Growth versus From-Scratch Training
For the same four CIFAR-10 ResNet configurations, we compare the function-preserving grown model with a model of the same final architecture trained from random initialization. Both models use the same optimization recipe and are trained to their respective convergence criteria. This comparison tests whether the disappearance of post-growth improvement could be explained by an optimization disadvantage caused by the function-preserving initialization. It is a convergence-quality comparison rather than a compute-matched estimate of training efficiency. The model in this section is well-trained and fully converged with enough computational resources. The Local Effect of Activation-Gradient-Matched Insertions experiments is shown in Appendix.
Comparison protocol.
We evaluate four ResNet configurations on CIFAR-10. For each configuration, the Growth model is obtained by inserting one globally zero-output residual block into a converged shallower network. The insertion preserves the reference function exactly before optimization. After insertion, the parameters of the deeper model are trained using the classification objective until the prescribed convergence criterion is reached. The corresponding Scratch model has exactly the same final architecture and parameter count, but all of its parameters are initialized randomly and trained from scratch.
The two procedures use the same dataset, data preprocessing, model architecture, optimizer family, regularization, and convergence criterion. This experiment compares the quality of the solutions reachable from the two initializations. It is not a compute-matched comparison of training efficiency, because the Growth model inherits the optimization already invested in its shallower reference model.
| Train Loss | Test Loss | |||
| Model | Scratch | Growth | Scratch | Growth |
| ResNet-10 | 0.0088 | 0.0070 | 0.3045 | 0.2589 |
| ResNet-11 | 0.0082 | 0.0068 | 0.2874 | 0.2626 |
| ResNet-12 | 0.0059 | 0.0069 | 0.2822 | 0.2580 |
| ResNet-13 | 0.0059 | 0.0057 | 0.2948 | 0.2510 |
Analysis
As shown in Table 1, function-preserving growth reaches training losses that are closely comparable to those obtained by training the same final architectures from scratch. In three of the four configurations—ResNet-10, ResNet-11, and ResNet-13—Growth achieves a lower training loss, whereas ResNet-12 shows only a small increase relative to Scratch. Averaged across all four architectures, the training loss is for Growth and for Scratch. These differences are small in absolute magnitude and do not indicate a systematic optimization disadvantage caused by the zero-output initialization. In particular, preserving the original network function at insertion does not appear to trap the expanded model near the inherited solution or prevent the enlarged architecture from reaching a competitive minimum after subsequent task-loss optimization. Within the evaluated CIFAR-10 ResNet configurations, function-preserving insertion therefore provides a viable initialization for continued training.
The test loss results are also consistently favorable to Growth. Growth obtains a lower test loss for all four final architectures, with absolute reductions ranging from for ResNet-12 to for ResNet-10. The average test loss decreases from to , corresponding to a relative reduction of approximately . This improvement is not accompanied by a systematic increase in training loss, suggesting that it cannot be explained simply by weaker fitting of the training data. The train–test gap is generally smaller under Growth, especially for ResNet-12, where Growth has a slightly higher training loss but a lower test loss. This pattern is consistent with the inherited shallower representation changing the optimization trajectory of the expanded model and potentially inducing different implicit regularization.
Conclusion
We developed a first-order framework for evaluating whether additional residual depth remains locally useful under a fixed function-preserving growth protocol. We showed that a residual insertion admits a strict first-order improvement if and only if the conditional activation gradient has a nonzero projection onto the corresponding residual tangent space. For standard zero-output residual blocks, this condition reduces to an activation–feature cross-gradient criterion. In the evaluated CIFAR-10 configurations, function-preserving growth reaches converged training losses comparable to those obtained from scratch. Together, these results establish tangent-space projection as an exact local criterion for the remaining first-order optimization value of residual depth.
References
- Scalable second order optimization for deep learning. arXiv preprint arXiv:2002.09018. Cited by: Practical motivation..
- Dynamic node creation in backpropagation networks. Connection Science 1 (4), pp. 365–375. Cited by: Related Work.
- Rezero is all you need: fast convergence at large depth. In Uncertainty in artificial intelligence, pp. 1352–1361. Cited by: Related Work.
- Bert2bert: towards reusable pretrained language models. In Proceedings of the 60th Annual Meeting of the Association for Computational Linguistics (Volume 1: Long Papers), pp. 2134–2148. Cited by: Related Work.
- Net2net: accelerating learning via knowledge transfer. arXiv preprint arXiv:1511.05641. Cited by: Introduction, Related Work.
- A qualitative test-risk mechanism for scaling behavior in normalized residual networks. arXiv preprint arXiv:2605.08297. Cited by: Introduction, Related Work, Problem Setup, Main Theorem: An Exact Saturation Boundary.
- Stacking your transformers: a closer look at model growth for efficient llm pre-training. Advances in Neural Information Processing Systems 37, pp. 10491–10540. Cited by: Related Work.
- Gradmax: growing neural networks using gradient information. arXiv preprint arXiv:2201.05125. Cited by: Related Work.
- The cascade-correlation learning architecture. In Advances in Neural Information Processing Systems 2, D. S. Touretzky (Ed.), pp. 524–532. External Links: Link Cited by: Related Work.
- Efficient training of bert by progressively stacking. In International conference on machine learning, pp. 2337–2346. Cited by: Related Work.
- The unreasonable ineffectiveness of the deeper layers. arXiv preprint arXiv:2403.17887. Cited by: Related Work.
- On the transformer growth for progressive bert training. arXiv preprint arXiv:2010.12562. Cited by: Related Work.
- Deep residual learning for image recognition. In Proceedings of the IEEE conference on computer vision and pattern recognition, pp. 770–778. Cited by: Practical motivation..
- Deep networks with stochastic depth. arXiv preprint arXiv:1603.09382. Cited by: Related Work.
- Scaling laws for neural language models. arXiv preprint arXiv:2001.08361. Cited by: Related Work.
- Topological derivative approach for deep neural network architecture adaptation. arXiv preprint arXiv:2502.06885. Cited by: Related Work.
- Limits to depth efficiencies of self-attention. Advances in Neural Information Processing Systems 33, pp. 22640–22651. Cited by: Related Work.
- Shortgpt: layers in large language models are more redundant than you expect. arXiv preprint arXiv:2403.03853. Cited by: Related Work.
- Self-expanding neural networks. arXiv preprint arXiv:2307.04526. Cited by: Related Work.
- Knowledge inheritance for pre-trained language models. arXiv preprint arXiv:2105.13880. Cited by: Related Work.
- Attention is all you need. Advances in neural information processing systems 30. Cited by: Practical motivation..
- Residual networks behave like ensembles of relatively shallow networks. Advances in neural information processing systems 29. Cited by: Related Work.
- Growing tiny networks: spotting expressivity bottlenecks and fixing them optimally. arXiv preprint arXiv:2405.19816. Cited by: Related Work.
- Learning to grow pretrained models for efficient transformer training. arXiv preprint arXiv:2303.00980. Cited by: Related Work.
- Lemon: lossless model expansion. In International Conference on Learning Representations, Vol. 2024, pp. 3338–3367. Cited by: Related Work.
- Network morphism. In International conference on machine learning, pp. 564–572. Cited by: Introduction, Related Work.
- Autogrow: automatic layer growing in deep convolutional networks. arXiv preprint arXiv:1906.02909. Cited by: Related Work.
- When to grow? a fitting risk-aware policy for layer growing in deep neural networks. In Proceedings of the AAAI Conference on Artificial Intelligence, Vol. 38, pp. 5994–6002. Cited by: Related Work.
- Firefly neural architecture descent: a general approach for growing neural networks. arXiv preprint arXiv:2102.08574. Cited by: Related Work.
- Splitting steepest descent for growing neural architectures. Advances in neural information processing systems 32. Cited by: Related Work.
- Accelerated training via incrementally growing neural networks using variance transfer and learning rate adaptation. Advances in Neural Information Processing Systems 36, pp. 16673–16692. Cited by: Related Work.
- Fixup initialization: residual learning without normalization. arXiv preprint arXiv:1901.09321. Cited by: Related Work.
Appendix A Complete Notation
Tables 2–4 collect the symbols used in the main text and supplementary proofs. Dependence on the fixed reference model and residual-growth protocol is suppressed when no ambiguity arises.
| Symbol | Meaning |
| Input space, label space, and data distribution on . | |
| Predictor output dimension. | |
| A fixed sample and its cardinality. | |
| Loss, population risk, and fixed-sample empirical risk. | |
| Trained reference model. | |
| Fixed finite candidate set and one candidate. | |
| Reference-model components below and above candidate . | |
| Hidden state, its dimension, and its induced distribution. | |
| Parameterized residual family at candidate . | |
| Active residual parameter domain, dimension, and local coordinate. | |
| Residual function and corresponding expanded model. | |
| Population and empirical objectives as functions of . | |
| Population and empirical directions in the residual non-degeneracy condition stated in the main paper. | |
| Fixed first-order direction map and free positive step-size scalar. | |
| Population and empirical local descent thresholds. | |
| Positive numerical-stability constant in the first Adam/AdamW direction. | |
| Integrable local Lipschitz envelope and neighborhood radius in the dominated-differentiation remark in the main paper. | |
| Matrix operator norm. |
| Symbol | Meaning |
| Sample activation gradient and conditional population activation-gradient signal. | |
| Jacobian of with respect to , evaluated at . | |
| Population and empirical residual-parameter gradients. | |
| Population and empirical Fréchet derivatives applied to direction . | |
| Population hidden-state Hilbert space, tangent operator, tangent range, and orthogonal projector. | |
| Empirical Hilbert space and tuple/matrix forms of the sample activation-gradient signal. | |
| Stacked tangent operator and projector onto its range. | |
| Population and empirical local residual growth values. | |
| Maximal local growth values over the fixed candidate set. | |
| Tangent adjoint, population tangent Gram operator, and empirical tangent Gram matrix. | |
| Distance from to in the norm; denotes the empirical analogue. | |
| Dimension of a finite-dimensional vector space or vectorized tensor. | |
| Relative residual-realizability error in . | |
| Optional population and empirical local smoothness constants in Corollary 1. |
| Symbol | Meaning |
| Feature parameters, their designated value, active output projection, feature map, fixed feature map, and feature dimension in the standard block. | |
| Population and empirical activation–feature cross-gradients. | |
| Residual-feature matrix and projector onto its row space. | |
| Frobenius inner product and norm. | |
| Moore–Penrose pseudoinverse, vectorization, and identity. | |
| Number of jointly inserted blocks, their distinct locations listed from upstream to downstream, and original network segments between them. | |
| Full residual transformation and canonical injection into joint block . | |
| Ordered joint candidate tuple, product parameter, and joint direction. | |
| Jointly expanded model and its population objective. | |
| Independent probe sample, one-sample residual-gradient contribution, and probe gradient estimate. | |
| Population saturation score, empirical score, and residual-gradient variance. | |
| Detection threshold and empirical saturation decision. | |
| Practical near-saturation tolerance, separation radius, and hypotheses and . | |
| Indicator of an event. | |
| Experimental scores and . | |
| Dimension-normalized visualization score ; it is not used to rank candidates with unequal hidden dimensions. |
Remark 1 (Normalization of the experimental activation-gradient score).
The score uses the same sample normalization as . Under finite-sample residual-signal realizability, . A coordinate-normalized variant has the same zero-versus-nonzero boundary but can change candidate rankings when hidden dimensions differ. It should therefore be treated as a descriptive visualization scale rather than as the exact empirical growth value.
Appendix B Detailed Experimental Settings
This section gives the architecture, data, optimization, checkpoint, and measurement details for the depth-scaling experiments. Unless stated otherwise, depth is the controlled architectural variable: width, classification or language-modeling heads, and the remaining model hyperparameters are held fixed within each sweep.
B.1 Depth Variables and Gradient Measurement
ResNet depth.
The ResNet experiments start from a stagewise ResNet-8 backbone containing one BasicBlock in each of three stages. We denote by the number of residual blocks added to this fixed backbone, so a model contains residual blocks in total. Added blocks are assigned cyclically to layer1, layer2, and layer3. This rule changes depth without changing the stage widths or classification head and avoids placing all added capacity at the end of the network.
GPT-2 depth.
For GPT-2-style models, denotes the total number of decoder blocks. The baseline has , and therefore denotes the baseline architecture with one additional decoder block. Hidden size, feed-forward size, number of attention heads, positional encoding, normalization, vocabulary, and the per-update optimization recipe are fixed as varies; the documented run durations are specified below.
Recorded activation-gradient statistic.
For a residual block, decoder block, classifier, or language-modeling head, let be the complete input-activation tensor at location for analysis batch , and let be that batch’s loss. Each analysis batch requires one forward and one backward pass. The run-time diagnostic stored by the experiment scripts is
| (2) |
where the norm is taken once over the full, flattened activation-gradient tensor and the resulting scalar is averaged over analysis batches. Inputs to the final fully connected classifier and LM head are recorded as diagnostic endpoints; the residual-growth candidate set itself contains the residual- or decoder-block boundaries.
Equation (2) documents the batch-level quantity retained in the experimental logs. The sample-normalized Hilbert-space score used in the theoretical comparisons is defined separately in Remark 1. For a fixed batch construction, both statistics vanish exactly when all recorded activation gradients vanish, but their nonzero numerical scales need not agree. Quantitative comparisons therefore use a fixed analysis-batch protocol within each model family.
B.2 CIFAR-10 and CIFAR-100
Data and preprocessing.
CIFAR-10 and CIFAR-100 each contain training images and test images at resolution . Training images are randomly cropped after four-pixel padding and randomly flipped horizontally. Test images receive no random augmentation. Images are then normalized using the mean and standard deviation of the corresponding dataset. CIFAR-10 and CIFAR-100 use 10 and 100 output classes, respectively.
Architecture.
Both datasets use the same stagewise ResNet-8 backbone. The base channel count is 16, and the three stage widths are 16, 32, and 64. Transitions between stages downsample with stride 2. We sweep , using the cyclic block-allocation rule described above.
| Configuration item | CIFAR-10 and CIFAR-100 setting |
| Objective and optimizer | Cross-entropy loss; SGD with momentum. |
| Initial learning rate | , multiplied by after epochs 100 and 150. |
| Momentum and weight decay | Momentum ; weight decay . |
| Batch size and random seed | Batch size 128; seed 1. |
| Maximum duration | 300 epochs. |
| Early stopping | Enabled only after at least 180 epochs. Training stops when the training loss fails to improve by more than for 30 consecutive epochs. |
| Saved checkpoints | The final checkpoint (last) and the checkpoint with the lowest training loss (best_train). Validation and test results are not used for checkpoint selection. |
B.3 ImageNet-100
Subset construction and preprocessing.
ImageNet-100 is constructed from ImageNet-1K and contains training images and validation images, with 50 validation images per class. Training uses RandomResizedCrop(224) and random horizontal flipping. At evaluation time, the shorter image side is resized to 256 pixels and a center crop is taken. Images are normalized by the standard ImageNet mean and standard deviation. The data are loaded with torchvision.datasets.ImageFolder, and the number of classes is inferred from the directory structure.
Architecture and run configuration.
To isolate the effects of dataset scale and depth, the ImageNet-100 experiments retain the three-stage CIFAR ResNet-8 backbone, including its , stride-1 stem. In particular, they do not introduce the , stride-2 convolution or max pooling used by standard ImageNet ResNets. The initial sweep uses , with base channel count 32. Each configuration is run for 300 epochs with global batch size 128, automatic mixed precision, and data parallelism across four GPUs.
B.4 GPT-2 Depth Sweep on Ascend
Model architecture.
The GPT-2 experiments use the MCore GPTModel implementation in Megatron-LM/MindSpeed. The baseline follows the main dimensions of GPT-2 Small: hidden size 768, feed-forward size 3072, 12 attention heads, and maximum sequence length 1024. It uses learned absolute positional embeddings, LayerNorm, GELU activations, attention and hidden dropout of 0.1, and initialization standard deviation 0.02. The vocabulary contains tokens, input and output embeddings are tied, and linear-layer biases are retained.
Only the number of decoder blocks changes across the controlled depth sweep; all other architectural dimensions are held fixed. The parameter count therefore increases with depth. The extended-depth configurations reported in the main paper follow the same architectural conventions.
FineWeb-Edu data.
The training corpus is a FineWeb-Edu subset containing approximately GPT-2 tokens. The data are divided into 98% training, 1% validation, and 1% test splits. The training split contains approximately packed sequences of length 1024. With global batch size 32, we define one round as 9,273 optimizer steps, approximately one complete pass over the training split.
| Configuration item | GPT-2 depth-sweep setting |
| Numerical precision and device allocation | BF16; one Ascend NPU per model for the initial controlled-depth runs. |
| Batching | Micro-batch size 4, global batch size 32, and eight gradient accumulation steps. |
| Optimizer | Adam with , , weight decay 0.1, and gradient clipping at 1.0. |
| Learning-rate schedule | Initial rate , minimum rate , 1% warmup, and cosine decay. |
| Random seed | 1234. |
| Training duration | The initial controlled-depth runs are capped at five rounds. Selected checkpoints are subsequently continued to a total of ten rounds. |
| Early stopping | The range of the mean training losses over the most recent ten rounds must be below . With a ten-round cap, this criterion can first be evaluated only after the final round. |
| Saved checkpoints | The lowest-training-loss checkpoint (best_train) and the final checkpoint (last) at every completed depth. |
The completed schedules documented in Table 6 cover the controlled-depth experiments. The extended-depth configurations reported in the main paper use the same model definition and per-update optimization recipe.
B.5 Pythia Continued-Pretraining Analysis
The Pythia study considers six deduplicated pretrained model configurations spanning a range of model sizes. Each model is initialized from the official step143000 checkpoint and then continued pretraining on FineWeb-Edu before activation-gradient measurement.
During measurement, model parameters are frozen while gradients are retained for hidden activations. Activation-gradient norms are recorded at decoder-block inputs using the fixed analysis protocol described in Equation (2). Because the Pythia configurations vary in architectural dimensions in addition to depth, these results provide cross-model evidence rather than a controlled depth-only comparison.
Appendix C Preliminary Identities
Lemma 1 (Population directional derivative).
Under the first-order regularity assumption stated in the main paper, for every ,
| (3) |
Proof.
For -almost every , the Fréchet chain rule gives
The first-order regularity assumption stated in the main paper permits differentiation under the expectation, giving the first equality in (3). The second follows from the definition of . Since is measurable with respect to , conditional expectation gives
∎
Lemma 2 (Bounded tangent operator and adjoint identity).
The operator is bounded. Its Hilbert adjoint satisfies . Consequently,
| (4) |
Proof.
For ,
so is bounded. Lemma 1 shows for every , hence . Now exactly when is orthogonal to , which is equivalent to . The final equivalence is the definition of . ∎
Lemma 3 (Empirical directional derivative and projection).
For every fixed sample satisfying the differentiability conditions in the main paper’s first-order regularity assumption and every ,
| (5) |
Moreover,
| (6) |
Appendix D Proof of the Main-Paper Necessary-and-Sufficient Saturation Theorem
Proof.
Fix and abbreviate . By Lemma 1, the residual non-degeneracy condition stated in the main paper is the existence of with . This implies . Conversely, if , choosing gives ; the interior-point condition on makes sufficiently small steps feasible. Thus statements 1 and 2 are equivalent. Lemma 2 gives the equivalence of statements 2, 3, and 4.
Suppose . The fixed zero-state descent-compatible update assumption stated in the main paper and Lemma 1 give
Fréchet differentiability therefore yields such that for every . Conversely, if , zero-state descent compatibility gives , so strict decrease is impossible. This proves statement 5.
Since is finite, if and only if every . The local equivalences identify this with depth-wide first-order saturation. Lemma 3 gives the empirical result by the same argument, with a threshold . ∎
Corollary 1 (Quantitative descent under local smoothness).
Fix candidate and suppose ordinary gradient descent is used, so . If is -Lipschitz on a neighborhood containing the segment , then
for every . In particular, at the one-step decrease is at least . The same statement holds for with empirical smoothness constant .
Proof.
The standard descent lemma gives . Substitute . The empirical proof is identical. ∎
D.1 Closed Forms for the Growth Values
Define and .
Lemma 4 (Gram-matrix representation).
The growth values satisfy
| (7) |
Proof.
Because , . Hence
The empirical formula follows from the same finite-dimensional projection identity for under the empirical inner product. ∎
Remark 2 (Parameterization invariance and fixed-sample interpolation).
The geometric definition of depends only on and is therefore invariant under every regular local reparameterization that preserves this range. For an invertible coordinate change , one has , , and . Applying Lemma 4 in either coordinate system gives the same scalar , because the represented tangent subspace is unchanged. By contrast, is coordinate-dependent.
Fix a sample size and draw . Suppose the selected standard block lies in an overparameterized regime in which sample-wise tangent completeness holds almost surely at this fixed ; this requires at least and almost surely. Then , and
This is a fixed- interpolation identity, not an assertion that sample-wise tangent completeness persists as when the feature dimension is fixed. It explains why the supplementary consistency result estimates the population residual gradient rather than asserting without additional rank-stability and complexity assumptions.
Appendix E Joint Insertion of Several Residual Blocks
Let be an ordered tuple of candidates at distinct insertion locations, listed from upstream to downstream in the fixed feed-forward network topology. Write the original network as , where the maps are the original network segments between consecutive insertion locations. Define and
| (8) |
with , in the product space , and .
Corollary 2 (Joint insertion of independently parameterized blocks).
Assume that the first-order regularity assumption stated in the main paper for every . Assume additionally that, for -almost every , the joint sample loss is Fréchet differentiable with respect to at the joint origin, and that is Fréchet differentiable there with derivative obtained by interchanging differentiation and expectation. Suppose the active parameter blocks are disjoint and every globally.
A strict joint first-order descent direction is a vector satisfying . Such a direction exists if and only if at least one candidate in satisfies the residual non-degeneracy condition stated in the main paper.
Proof.
Let be the canonical injection into block . Because every , each full residual transformation held at its designated origin is on the full ambient space. Therefore, for every ,
no differentiability of the intermediate network segments is needed for this pointwise identity.
Let , which is a continuous linear functional by joint Fréchet differentiability. Restricting to coordinate block and applying Lemma 1 gives
Every joint direction decomposes as , so linearity yields
Thus the joint derivative is represented by the concatenated vector . It has a negative direction if and only if at least one component is nonzero, which is equivalent to the residual non-degeneracy condition stated in the main paper for at least one candidate by the main paper’s necessary-and-sufficient saturation theorem. ∎
Appendix F Proof of the Main-Paper Activation-Gradient Characterization Theorem
Proof.
If , then , so . The main paper’s necessary-and-sufficient saturation theorem gives the population equivalence. If , then , yielding the empirical equivalence.
For the standard block, every matrix direction satisfies . Therefore,
Hence under the fixed vectorization convention, and the population residual non-degeneracy condition stated in the main paper holds exactly when . The empirical statement follows identically and does not use residual-signal realizability.
If and are both treated as active raw parameters, then at the derivative with respect to is . Hence the full tangent range is identical to the range obtained by fixing and varying only ; this reduction loses no first-order directions.
The sample tangent range in matrix form is . Under the tuple–matrix identification, ; multiplication by a positive scalar does not change orthogonality or the associated projector. A matrix belongs to this range exactly when each row belongs to the row space of . Hence the matrix representation of is and . Moreover, if and only if . The stacked tangent operator is surjective exactly when the row space of is all of , equivalently when . Then and if and only if . Applying the local equivalences at every candidate gives the depth-wide statement. ∎
Remark 3 (Approximate residual-signal realizability).
Orthogonal Pythagoras gives
Consequently, if for some , then whenever . The identical conclusion holds on a fixed sample using the empirical distance and norm. This approximate form is often more relevant than exact realizability when the feature dimension is smaller than the sample size.
Appendix G Supplementary Finite-Sample Consistency Result
Under the independent finite-sample probing assumption stated in the main paper, instantiate all empirical quantities with and . Define and
Let and, for a deterministic threshold , define . By the main paper’s necessary-and-sufficient saturation theorem,
| (9) |
Theorem 3 (Consistent finite-sample saturation detection).
Under the independent finite-sample probing assumption stated in the main paper, for every ,
| (10) |
If and , then
In view of (9), this detector is consistent for first-order depth saturation relative to the fixed protocol.
Proof.
Independence and centering give . Markov’s inequality applied to the squared norm and a union bound over the finite set prove (10).
If , then
If , choose with . For all sufficiently large , . On the event , , and therefore . ∎
Remark 4 (Coordinate dependence and practical near-saturation).
The statistic and the threshold use Euclidean norms of residual-parameter gradients. Their zero-versus-nonzero boundary is invariant under regular reparameterization, but their numerical scales are protocol- and coordinate-dependent. The consistency theorem should therefore be interpreted relative to the fixed parameterization.
Exact saturation, , is a knife-edge population hypothesis. A practical separated test may instead fix and and compare with using decision threshold . On the event , the test is correct under either hypothesis. Thus (10) bounds its error probability by . Implementing the rule requires an upper estimate of the variances ; rate-optimal threshold selection and adaptive power analysis require additional assumptions.
Remark 5 (Why an independent probe sample is needed).
The fixed-sample equivalences in the main theorems are deterministic and may be evaluated on the training sample. The consistency theorem instead interprets an empirical gradient as an estimator of its population counterpart. Reusing the data that trained the reference model generally breaks the conditional i.i.d. argument unless additional stability or sample-splitting assumptions are introduced.
Appendix H More experiments
On four converged CIFAR-10 ResNets, we insert a globally zero-output residual block and fit only its terminal projection to a small negative activation-gradient target, testing whether the resulting first-order direction produces an immediate reduction in the empirical task loss.
H.1 Local Effect of Activation-Gradient-Matched Insertions
We next examine whether an activation-gradient-matched residual block produces the immediate task-loss change predicted by the fixed-sample first-order analysis. We evaluate four converged CIFAR-10 ResNet checkpoints with reference depths 8, 14, 20, and 34.
For four converged ResNet configurations on CIFAR-10, we directly construct one additional residual block by matching its output to a small negative activation-gradient perturbation. At the selected candidate location , we freeze the reference model and cache the training-set hidden representations together with their activation gradients . Both quantities are detached and treated as a fixed regression dataset. The inserted block is a standard ResNet block. Its feature-producing parameters are initialized using the standard ResNet initialization and then held fixed, while the terminal output projection is initialized at and is the only optimized parameter. We fit by gradient descent on
where the plus sign reflects the regression target . The zero initialization makes the insertion globally function-preserving before fitting, while training only restricts the construction to the first-order tangent family generated by the fixed residual features. After the auxiliary objective has converged, the fitted block is inserted and evaluated immediately; no classification-loss optimization or joint fine-tuning is performed. The matching scale, optimization schedule, and candidate-selection rule are fixed without using held-out performance. We report the matching error, the relative magnitude of the resulting hidden-state perturbation, and the changes in training loss.
| Reference | Train loss(ave) | Test loss(ave) | ||
| ResNet-8 | ||||
| ResNet-14 | ||||
| ResNet-20 | ||||
| ResNet-34 |
Analysis.
Table 7 reports the immediate loss changes after inserting one activation-gradient-matched residual block, without subsequent task-loss optimization or joint fine-tuning. The insertion reduces the training loss for all four checkpoints, by , , , and for ResNet-8, ResNet-14, ResNet-20, and ResNet-34. Because the target is constructed from activation gradients on the same training sample, this sign consistency is the main behavior predicted by the fixed-sample first-order analysis. The results are consistent with the fitted block capturing a descending component within the tangent family generated by the fixed features.
The reductions are small, as expected from and from evaluation before task-loss fine-tuning. Thus, the experiment tests an immediate local improvement rather than the gain after fully optimizing the expanded model. The reduction decreases from for ResNet-8 to for ResNet-20 and ResNet-34, qualitatively consistent with diminishing empirical first-order value of additional depth. However, differing baseline losses and one insertion per checkpoint prevent Table 7 from establishing a monotone or calibrated depth–gain relationship. Test-loss point estimates improve by and for ResNet-8 and ResNet-14, but worsen by and for ResNet-20 and ResNet-34. All changes are smaller than or comparable to the reported uncertainty.