Optimal Depth of Neural Networks
Not on the map. Why?
Abstract (arXiv)
Determining the optimal depth of a neural network is a fundamental yet challenging problem, typically resolved through resource-intensive experimentation. This paper introduces a formal theoretical framework to address this question by recasting the forward pass of a deep network, specifically a Residual Network (ResNet), as an optimal stopping problem. We model the layer-by-layer evolution of hidden representations as a sequential decision process where, at each layer, a choice is made between halting computation to make a prediction or continuing to a deeper layer for a potentially more refined representation. This formulation captures the intrinsic trade-off between accuracy and computational cost. Our primary theoretical contribution is a proof that, under a plausible condition of diminishing returns on the residual functions, the expected optimal stopping depth is provably finite, even in an infinite-horizon setting. We leverage this insight to propose a novel and practical regularization term, Lrm depth, that encourages the network to learn representations amenable to efficient, early exiting. We demonstrate the generality of our framework by extending it to the Transformer architecture and exploring its connection to continuous-depth models via free-boundary problems. Empirical validation on ImageNet confirms that our regularizer successfully induces the theoretically predicted behavior, leading to significant gains in computational efficiency without compromising, and in some cases improving, final model accuracy.
Key facts. No citing papers in the map yet (data through 14 Oct 2026). Builds on 9 of its 13 references that are in the map. First posted on arXiv 20 Jun 2025.
Builds on
9 of 13 references.
References · 9
- 2017Attention Is All You Needcited by 60,361
- 2015Deep Residual Learning for Image Recognitioncited by 52,096
- 2019DistilBERT, a distilled version of BERT: smaller, faster, cheaper and lightercited by 4,307
- 2018Neural Tangent Kernel: Convergence and Generalization in Neural Networkscited by 2,621
- 2017Visualizing the Loss Landscape of Neural Netscited by 1,130
- 2016Deep Networks with Stochastic Depthcited by 979
- 2018MINE: Mutual Information Neural Estimationcited by 683
- 2019Deep Learning via Dynamical Systems: An Approximation Perspectivecited by 78
- 2025Universal Approximation Theorem of Deep Q-Networkscited by 6
Built on by
Not cited yet.
Similar, not cited
Close in wording, no citation either way
- 2026Scaling Adaptive Depth with Norm-Agnostic Residual Networks
- 2026When Do Early-Exit Networks Generalize? A PAC-Bayesian Theory of Adaptive Depth
- 2022Training Thinner and Deeper Neural Networks: Jumpstart Regularization
- 2023Adaptive Depth Networks with Skippable Sub-Paths
- 2026Depth Laws for the Precision Floor of Trained Neural Networks: Amplification, Residual Scaling, and a Quantization-Aware Training Paradox
- 2026Gradient Smoothing: Coupling Layer-wise Updates for Improved Optimization
- 2026ANCRe: Adaptive Neural Connection Reassignment for Efficient Depth Scaling
- 2023Diffused Redundancy in Pre-trained Representations