Tensor Programs VI: Feature Learning in Infinite-Depth Neural Networks
Greg Yang, Dingli Yu, Chen Zhu, Soufiane Hayou
Introduction
Deep neural networks have showcased remarkable performance across a broad range of tasks, including image classification, game playing exemplified by AlphaGo , and natural language processing demonstrated by GPT-4 . A prevailing trend in developing these networks is to increase their size and complexity, with empirical evidence indicating that using the same computation resources, models with more parameters tend to exhibit better performance. There are two ways to increase any network size: width and depth. The properties of the width (given a fixed depth) have been extensively studied in the literature: recent work by Yang et al. identified the Maximal Update Parametrization (P) that guarantees maximal feature learning in the infinite width limit.Here maximal feature learning refers to change in features in the infinite width limit. This should be contrasted with the lazy training regime where the change in features is of order . Another benefit of P is hyperparameter transfer which enables hyperparameter tuning on smaller models; the optimal hyperparameter choice for the smaller model remains optimal for larger models (i.e., models with larger width). However, despite the achievements of large-scale deep models and the theoretical understanding of scaling width, increasing the depth of neural networks still has both practical limitations and theoretical difficulties. In practice, increasing depth beyond some level often results in performance degradation and/or significant shifts in the optimal hyperparameters. In theory, unlike increasing width, increasing depth introduces new parameters that significantly change the training dynamics. In this paper, we aim to solve this problem by extending P to include depth scaling. We call the depth scaling Depth-P.
The issue of depth scaling has persisted over time. A decade ago, deep neural networks experienced significant degradation problems — having more than a few dozen layers would increase the training error instead of improving the model’s performance. This was partly due to the vanishing or exploding gradient problem that affects the efficient propagation of information through the network. The introduction of residual networks (ResNet) has partially resolved this issue, allowing for the training of deeper networks with improved performance. ResNet is constructed by layering residual blocks, which are composed of a series of convolutional layers and then an element-wise addition with the input. This element-wise addition (commonly referred to as skip connection) is a significant innovation of ResNet and remains an important ingredient in modern architectures including Transformers .
Specifically, in a residual architecture, the -th residual block is formulated as
where is the input, is the output, are the parameters of the block, and (often called the residual branch) is a mapping that defines the layer (e.g. a stack of convolutions in ResNet, or SelfAttention and MLP in a Transformer). In this work, we focus on the case where is a biasless perceptron with (or without) activation.
The stacking of many residual blocks causes an obvious issue even at the initialization — the norm of grows with , so the last layer features do not have a stable norm when increasing the depth. Intuitively, one can stabilize these features by scaling the residual branches with a depth-dependent constant. However, scaling the residual branches with arbitrarily small constants might result in no feature learning in the large depth limit since the gradients will also be multiplied with the scaling factor.
When each block has only one layer (one matrix multiply), we identify the parametrization we call Depth-P as the optimal parametrization for deep networks. It maximizes both feature learning and feature diversityWe give a formal definition of feature learning and feature diversity later in the paper. among all possible parametrizations of block multiplier and learning rate with depth. Our framework extends the previous results on P which deals with optimal width scaling . It completes the width scaling and hence provides a full width and depth scaling recipe that guarantees maximal feature learning and hyperparameter transfer across width and depth. Depth-P contains the following modifications to the standard practice:
There is a multiplier for each residual branch before adding to its input, which is inversely proportional to the square root of (where is the depth). Formally, with a constant independent from ,
We set the learning rate of so that the update of during training is proportional to . We derive different learning rate schemes for different optimization algorithms based on this principle. For Adam, because it is scale-invariant to the gradient, the learning rate of is set to be . On the other hand, the learning rate of for SGD is set as a constant because the gradient of is already of size due to the multiplier.
In block depth (i.e., is a biasless perceptron, is a single matrix), this scaling leads to the following properties:
At the initialization, each one of the residual blocks contributes to the main branch. These contributions are independent of each other, so the sum of them is of size .
During training, the contribution of the update of each residual block is due to the combining effect of the learning rate and multiplier. The contributions of the updates are highly correlated, so they sum up to .
More detailed intuition of this scaling approach can be found in Section 3 where we provide a simple analysis with linear networks after one gradient step. We give a complete classification of depthwise parametrizations in section 7.
We thoroughly compare Depth-P with other scaling strategies with a branch multiplier and parameter update .It implies that the effective learning rate is proportional to for Adam and for SGD if the network is stable at initialization. As shown in Figure 1, the space of is divided into several areas, each resulting in a different behavior when :
Having is required to stabilize the network at initialization. This ensures that he hidden activations and the network output do not explode at initialization;
For any , the network is unstable during training. The change in hidden activations or the network output explodes with depth during training;
For any , training outcome is trivial. The change of the network vanishes as depth increases;
For any with , the network is unfaithful (a formal definition will provided later in the paper). The hidden activations explode during training as depth increases;
For any and , we show that the network converges to a redundant limit that lacks feature diversity, in that close layers have similar outputs (in a neural ODE fashion).
The only choice of and left is , which corresponds to Depth-P.
The rigorous definitions and proofs are presented in Section 7.
2 Hyperparameter Transfer for Depth.
The optimality of Depth-P implies (under some assumptions) that the optimal hyperparameters of the networks also converge as the depth () increases. This convergence suggests that the optimal hyperparameters of shallower networks are approximately equal to those of deeper networks. As a direct implication, we can leverage this property to infer the hyperparameters for deeper networks from the shallower ones, effectively reducing the cost associated with hyperparameter tuning. With Depth-P, we successfully train networks comprising thousands of residual blocks, while also showcasing the transferability of hyperparameters across depth.
3 Impossibility Results for Block Depth ≥2absent2\geq 2
While the block depth 1 case admits a positive result, we show that the block depth case does not and cannot (section 9). The basic issue is the weights in different layers within a block is forced to interact additively instead of multiplicatively when depth is large, if one wants to retain diversity. This causes block depth to have worse performance than block depth and for the optimal hyperparameters to shift with depth. We demonstrate this pedagogically on resnet with MLP blocks but also on Megatron transformer trained on Common Crawl. These observations entail the need to rethink the current approach to hyperparameter transfer.
Related Works
The infinite-width limit of neural networks has been a topic of extensive research in the literature. Numerous studies have predominantly focused on examining the behavior of various statistical quantities at initialization. Some works have gone beyond the initialization stage to explore the dynamics of feature learning in neural networks.
With standard parametrization, a learning rate of order ,We also obtain the lazy infinite-width limit with the NTK parametrization and a learning rate. being the width, yields the so-called lazy training regime in the infinite-width limit, where the features remain roughly constant throughout training . This regime is also known as the Neural Tangent Kernel (NTK) regime and its convergence properties have been extensively studied in the literature .
Recent empirical studies (e.g. ) have provided compelling evidence that feature learning plays a crucial role in the success of deep learning. It is widely acknowledged that the remarkable performance achieved by deep neural networks can be attributed to their ability to acquire meaningful representations through the process of training. Consequently, scaling the network architecture emerges as a natural choice to enhance the performance of such models.
In this context, P (Maximal Update Parameterization), introduced in , has emerged as a promising approach for maximizing feature learning while simultaneously preventing feature explosion as the network width increases, given a fixed depth. Notably, P facilitates hyperparameter transfer across varying network widths. This means that instead of tuning hyperparameters directly on large models, one can optimize them on smaller models and utilize the same set of hyperparameters for larger models.
The derivation of P leverages the Tensor Programs framework , which provides valuable tools for capturing the behavior of neural networks in the infinite-width regime during the training process.
2 Depth Scaling
While increasing the width of neural networks can lead to improved performance, increasing the depth of the network also yields significant performance gains, and most state-of-the-art models use deep architectures. The introduction of skip connections played a pivotal role in enabling the training of deep networks. However, it became apparent that even with skip connections and normalization layers, training deep networks remains a challenging task . Moreover, tuning hyperparameters for large depth networks is a time-and-resource-consuming task.
To address the challenges associated with training deep networks, several studies have proposed scaling the network blocks using a depth-dependent scaler to ensure stability of features and gradients at initialization or in the kernel regime . However, these works lack insights into the dynamics with feature learning. For instance, one might argue that features can still experience explosive growth if the learning rate is not properly chosen. Therefore, an effective depth scaling approach should not only ensure stability at initialization but also provide guidelines for scaling the learning rate.
This motivation underlies the development of Depth-P, which offers a comprehensive framework for depth scaling. Depth-P encompasses block multipliers and learning rate scaling, providing a complete recipe for training deep networks. In the case of Multi-Layer Perceptrons (MLPs) (no skip connections), Jelassi et al. showed that a learning rate scaling of guarantees stability after the initial gradient step. However, it remains unclear how the learning rate should be adjusted beyond the first step, and this scaling is not suitable for architectures with residual connections.
Warm-Up: An Intuitive Explanation with Linear Networks
Let us begin with a simple example that provides the necessary intuition underpinning our depth scaling strategy. Given a depth , width , consider a linear residual network of the form
To simplify the analysis, we consider gradient updates based on a single datapoint. The first gradient step is given by
where is the learning rate, and is a matrix with update directions. For instance, we have the following expressions for with SGD and Adam:
AdamFor the sake of simplification, we consider SignSGD in this section, which can be seen as a memory-less version of Adam. The analysis is valid for any training algorithm that gives gradients.: .
where . We argue that behaves as (in norm). This is the due to the scaling factor. To see this, we further simplify the analysis by considering the case (single neuron per layer) and the squared loss. In this case, the term simplifies to
With SGD, we have that , where and is the target output. Therefore, it is easy to see that
Hence, the magnitude of the first order term in eq. 2 is given by
which shows that the update is stable in depth as long as in depth. More precisely, this is the maximal choice of learning rate that does not lead to exploding features as depth increases.
With Adam, we have , and therefore we obtain
where we have used the same arguments as before. In this case, the first order term in eq. 2 is given by
Therefore, the maximal learning rate that one can choose without exploding the features is given by .
Summary: By ensuring that parameter update is , the features remain stable while feature update is . This update is due to the accumulation of correlated terms across depth.
2 Convergence when Depth goes to ∞\infty
Let us look at again in the simple case and analyze its behaviour when . This paragraph is only intended to give an intuition for the convergence. A rigorous proof of such convergence will be later presented in the paper. Let us consider the case with SGD training with learning rate and let and . With this, we have the following
WLOG, let us assume that . Then, with high probability (the event that , for some notion of “”, occurs with a probability of at least for some )This follows from simple concentration inequalities for sub-exponential random variables., we have that . We can therefore look at which simplifies the task. Taking the log and using Taylor expansion under a high probability event, we obtain
for some . The first and third terms and converge (almost surely) to a standard Gaussian and , respectively. The second term also converges naturally, since converges in to a Log-Normal random variable () and with a delicate treatment (involving high probability bounds), one can show that the term converges (in norm) at large depth. This implies that one should expect to have some notion of weak convergence as depth grows. Note that the same analysis becomes much more complicated for general width . To avoid dealing with high probability bounds, a convenient method consists of taking the width to infinity first , then analyzing what happens as depth increases. We discuss this in the next section.
3 A Discussion on the General Case
The extension to the general width scenario () necessitates a more intricate treatment of the term to find optimal scaling rules, yet the proposed scaling remains optimal for general width. This preliminary analysis lays the groundwork for proposing a specific learning rate scaling scheme that maximizes feature learning. Moreover, demonstrating the optimality of this scaling strategy in the presence of non-linearities is a non-trivial task. The primary challenge stems from the correlation among the post-activations induced during the training process. Overcoming these challenges requires a rigorous framework capable of addressing the large depth limit of crucial quantities in the network.
For this purpose, we employ the Tensor Program framework to investigate the behavior of essential network quantities in the infinite-width-then-depth limit. By leveraging this framework, our theoretical findings establish that the aforementioned scaling strategy remains optimal for general networks with skip connections. Our framework considers the setup where the width is taken to infinity first, followed by depth. This represents the case where , which encompasses most practical settings (e.g. Large Language Models).
A naive approach to depth scaling can be as follows: since the weights might become highly correlated during training, one has to scale the blocks with . To understand this, let us assume a block multiplier of and consider the scenario of perfect correlation where all weights are equal, i.e., for every . In this case, the last layer features can be expressed as . When , the features are likely to exhibit an explosive growth with increasing depth, while opting for is guaranteed to stabilize the features.
However, in this paper, we demonstrate that this intuition does not align with practical observations. Contrary to expectations, the features do not undergo an explosive growth as the depth increases when . This phenomenon is attributed to two key factors: random initialization and learning rate scaling with depth. These factors ensure that the weight matrices never become highly correlated in this particular fashion during the training process.
In summary, while a naive depth scaling strategy based on scaling blocks might suggest the need for to stabilize the features, our findings reveal that in practice, this is not the case. The interplay of random initialization and learning rate scaling effectively prevents the features from experiencing explosive growth, even with the choice of .
SGD Training Dynamics of Infinitely Deep Linear Networks
In this section, we continue to study the linear neural network with residual connections under Depth-P. Using the Tensor Program framework , we rigorously derive the training dynamics of SGD for the linear residual network when the width and the depth sequentially go to infinity. The road map of our analysis consists the following three steps.
Since the network is linear, every random variable can be written as a linear combination of a set of zero-mean “base” random variables by the Master Theorem of Tensor Programs . Therefore, we can track the random variables by analyzing the coefficients of their corresponding linear combinations, along with the covariance between the “base” random variables.
Since the number of random variables and the number of “base” random variables scale linearly with , the coefficients of all random variables can be represented by a six-dimensional tensor, where two of the dimensions have shape . We then map the tensor to a set of functions whose input domain is . Finally, we claim that the functions converge when , and identify their limits as the solution of a set of functional integrals.
In Section 10.1, we conduct a thorough empirical verification of our theory in the linear case. The experiments clearly show the convergence of deep linear residual networks under Depth-P.
1 Width Limit under μ𝜇\muP
Now when we look back to Program 1, the definitions of scalars and random variables should be clear (except for \mathchoice{\scalebox{0.7}[1.0]{\displaystyle\talloblong}}{\scalebox{0.7}[1.0]{\textstyle\talloblong}}{\scalebox{0.7}[1.0]{\scriptstyle\talloblong}}{\scalebox{0.7}[1.0]{\scriptscriptstyle\talloblong}}W_{0}^{l}x_{t}^{l-1}\rangle and \mathchoice{\scalebox{0.7}[1.0]{\displaystyle\talloblong}}{\scalebox{0.7}[1.0]{\textstyle\talloblong}}{\scalebox{0.7}[1.0]{\scriptstyle\talloblong}}{\scalebox{0.7}[1.0]{\scriptscriptstyle\talloblong}}W_{0}^{l\top}\widetilde{\delta}x_{t}^{l}\rangle). One can find straightforward correspondence between those and their finite counterpart, for example:
corresponds to , and corresponds to ;
\mathchoice{\scalebox{0.7}[1.0]{\displaystyle\talloblong}}{\scalebox{0.7}[1.0]{\textstyle\talloblong}}{\scalebox{0.7}[1.0]{\scriptstyle\talloblong}}{\scalebox{0.7}[1.0]{\scriptscriptstyle\talloblong}}x_{t}^{l}\rangle corresponds to and \mathchoice{\scalebox{0.7}[1.0]{\displaystyle\talloblong}}{\scalebox{0.7}[1.0]{\textstyle\talloblong}}{\scalebox{0.7}[1.0]{\scriptstyle\talloblong}}{\scalebox{0.7}[1.0]{\scriptscriptstyle\talloblong}}\widetilde{\delta}x_{t}^{l}\rangle corresponds to . (Recall is the normalized version of .)
By SGD, , which corresponds to \mathchoice{\scalebox{0.7}[1.0]{\displaystyle\talloblong}}{\scalebox{0.7}[1.0]{\textstyle\talloblong}}{\scalebox{0.7}[1.0]{\scriptstyle\talloblong}}{\scalebox{0.7}[1.0]{\scriptscriptstyle\talloblong}}W_{t}^{l}x_{t}^{l-1}\rangle=\mathchoice{\scalebox{0.7}[1.0]{\displaystyle\talloblong}}{\scalebox{0.7}[1.0]{\textstyle\talloblong}}{\scalebox{0.7}[1.0]{\scriptstyle\talloblong}}{\scalebox{0.7}[1.0]{\scriptscriptstyle\talloblong}}W_{0}^{l}x_{t}^{l-1}\rangle-\frac{1}{\sqrt{L}}\sum_{s=0}^{t-1}\mathchoice{\scalebox{0.7}[1.0]{\displaystyle\talloblong}}{\scalebox{0.7}[1.0]{\textstyle\talloblong}}{\scalebox{0.7}[1.0]{\scriptstyle\talloblong}}{\scalebox{0.7}[1.0]{\scriptscriptstyle\talloblong}}\widetilde{\delta}x_{s}^{l}\rangle\langle x_{s}^{l-1}\mathchoice{\scalebox{0.7}[1.0]{\displaystyle\talloblong}}{\scalebox{0.7}[1.0]{\textstyle\talloblong}}{\scalebox{0.7}[1.0]{\scriptstyle\talloblong}}{\scalebox{0.7}[1.0]{\scriptscriptstyle\talloblong}}x_{t}^{l-1}\rangle.
Now we can dive into the definition of \mathchoice{\scalebox{0.7}[1.0]{\displaystyle\talloblong}}{\scalebox{0.7}[1.0]{\textstyle\talloblong}}{\scalebox{0.7}[1.0]{\scriptstyle\talloblong}}{\scalebox{0.7}[1.0]{\scriptscriptstyle\talloblong}}W_{0}^{l}x_{t}^{l-1}\rangle and \mathchoice{\scalebox{0.7}[1.0]{\displaystyle\talloblong}}{\scalebox{0.7}[1.0]{\textstyle\talloblong}}{\scalebox{0.7}[1.0]{\scriptstyle\talloblong}}{\scalebox{0.7}[1.0]{\scriptscriptstyle\talloblong}}W_{0}^{l\top}\widetilde{\delta}x_{t}^{l}\rangle. Let be the set of initial random matrices of size , i.e., , and . Let denote the set of all vectors in training of the form for some . Then for every , and , we can decompose \mathchoice{\scalebox{0.7}[1.0]{\displaystyle\talloblong}}{\scalebox{0.7}[1.0]{\textstyle\talloblong}}{\scalebox{0.7}[1.0]{\scriptstyle\talloblong}}{\scalebox{0.7}[1.0]{\scriptscriptstyle\talloblong}}Wy\rangle into the sum of \mathchoice{\scalebox{0.7}[1.0]{\displaystyle\talloblong}}{\scalebox{0.7}[1.0]{\textstyle\talloblong}}{\scalebox{0.7}[1.0]{\scriptstyle\talloblong}}{\scalebox{0.7}[1.0]{\scriptscriptstyle\talloblong}}Wy\widehat{\rangle\mkern-3.0mu}\mkern 3.0mu and \mathchoice{\scalebox{0.7}[1.0]{\displaystyle\talloblong}}{\scalebox{0.7}[1.0]{\textstyle\talloblong}}{\scalebox{0.7}[1.0]{\scriptstyle\talloblong}}{\scalebox{0.7}[1.0]{\scriptscriptstyle\talloblong}}Wy\dot{\rangle\mkern-3.0mu}\mkern 3.0mu, where \mathchoice{\scalebox{0.7}[1.0]{\displaystyle\talloblong}}{\scalebox{0.7}[1.0]{\textstyle\talloblong}}{\scalebox{0.7}[1.0]{\scriptstyle\talloblong}}{\scalebox{0.7}[1.0]{\scriptscriptstyle\talloblong}}Wy\widehat{\rangle\mkern-3.0mu}\mkern 3.0mu is a random variable that act as if were independent of , and \mathchoice{\scalebox{0.7}[1.0]{\displaystyle\talloblong}}{\scalebox{0.7}[1.0]{\textstyle\talloblong}}{\scalebox{0.7}[1.0]{\scriptstyle\talloblong}}{\scalebox{0.7}[1.0]{\scriptscriptstyle\talloblong}}Wy\dot{\rangle\mkern-3.0mu}\mkern 3.0mu is the random variable capturing the correlation part between and . Specifically, let us briefly track what happens to during training. In the first step, we have which has roughly Gaussian coordinates (in the large width limit). In this case, we have \mathchoice{\scalebox{0.7}[1.0]{\displaystyle\talloblong}}{\scalebox{0.7}[1.0]{\textstyle\talloblong}}{\scalebox{0.7}[1.0]{\scriptstyle\talloblong}}{\scalebox{0.7}[1.0]{\scriptscriptstyle\talloblong}}W^{l}_{0}x^{l-1}_{0}\dot{\rangle\mkern-3.0mu}\mkern 3.0mu=0. After the first backprop, we have , which means that the update in will contain a term of the form for some vector . This implies that will contain a term of the form for some vector . This term induces an additional correlation term that appears when we take the width to infinity. The \mathchoice{\scalebox{0.7}[1.0]{\displaystyle\talloblong}}{\scalebox{0.7}[1.0]{\textstyle\talloblong}}{\scalebox{0.7}[1.0]{\scriptstyle\talloblong}}{\scalebox{0.7}[1.0]{\scriptscriptstyle\talloblong}}W^{l}_{0}x^{l-1}_{1}\dot{\rangle\mkern-3.0mu}\mkern 3.0mu is defined by isolating this additional correlation term from . The remaining term is Gaussian in the infinite-width limit, which defines the term \mathchoice{\scalebox{0.7}[1.0]{\displaystyle\talloblong}}{\scalebox{0.7}[1.0]{\textstyle\talloblong}}{\scalebox{0.7}[1.0]{\scriptstyle\talloblong}}{\scalebox{0.7}[1.0]{\scriptscriptstyle\talloblong}}W^{l}_{0}x^{l-1}_{1}\widehat{\rangle\mkern-3.0mu}\mkern 3.0mu. Formally, we present the following definition.
We define \mathchoice{\scalebox{0.7}[1.0]{\displaystyle\talloblong}}{\scalebox{0.7}[1.0]{\textstyle\talloblong}}{\scalebox{0.7}[1.0]{\scriptstyle\talloblong}}{\scalebox{0.7}[1.0]{\scriptscriptstyle\talloblong}}Wy\rangle\mathbin{\overset{\text{{def}}}{=}}\mathchoice{\scalebox{0.7}[1.0]{\displaystyle\talloblong}}{\scalebox{0.7}[1.0]{\textstyle\talloblong}}{\scalebox{0.7}[1.0]{\scriptstyle\talloblong}}{\scalebox{0.7}[1.0]{\scriptscriptstyle\talloblong}}Wy\widehat{\rangle\mkern-3.0mu}\mkern 3.0mu+\mathchoice{\scalebox{0.7}[1.0]{\displaystyle\talloblong}}{\scalebox{0.7}[1.0]{\textstyle\talloblong}}{\scalebox{0.7}[1.0]{\scriptstyle\talloblong}}{\scalebox{0.7}[1.0]{\scriptscriptstyle\talloblong}}Wy\dot{\rangle\mkern-3.0mu}\mkern 3.0mu for every and , where
\mathchoice{\scalebox{0.7}[1.0]{\displaystyle\talloblong}}{\scalebox{0.7}[1.0]{\textstyle\talloblong}}{\scalebox{0.7}[1.0]{\scriptstyle\talloblong}}{\scalebox{0.7}[1.0]{\scriptscriptstyle\talloblong}}Wy\widehat{\rangle\mkern-3.0mu}\mkern 3.0mu is a Gaussian variable with zero mean. ,
, \mathchoice{\scalebox{0.7}[1.0]{\displaystyle\talloblong}}{\scalebox{0.7}[1.0]{\textstyle\talloblong}}{\scalebox{0.7}[1.0]{\scriptstyle\talloblong}}{\scalebox{0.7}[1.0]{\scriptscriptstyle\talloblong}}Wy\widehat{\rangle\mkern-3.0mu}\mkern 3.0mu and \mathchoice{\scalebox{0.7}[1.0]{\displaystyle\talloblong}}{\scalebox{0.7}[1.0]{\textstyle\talloblong}}{\scalebox{0.7}[1.0]{\scriptstyle\talloblong}}{\scalebox{0.7}[1.0]{\scriptscriptstyle\talloblong}}W^{\prime}z\widehat{\rangle\mkern-3.0mu}\mkern 3.0mu are independent if . \mathchoice{\scalebox{0.7}[1.0]{\displaystyle\talloblong}}{\scalebox{0.7}[1.0]{\textstyle\talloblong}}{\scalebox{0.7}[1.0]{\scriptstyle\talloblong}}{\scalebox{0.7}[1.0]{\scriptscriptstyle\talloblong}}Wy\widehat{\rangle\mkern-3.0mu}\mkern 3.0mu is also independent from \mathchoice{\scalebox{0.7}[1.0]{\displaystyle\talloblong}}{\scalebox{0.7}[1.0]{\textstyle\talloblong}}{\scalebox{0.7}[1.0]{\scriptstyle\talloblong}}{\scalebox{0.7}[1.0]{\scriptscriptstyle\talloblong}}U\rangle and \mathchoice{\scalebox{0.7}[1.0]{\displaystyle\talloblong}}{\scalebox{0.7}[1.0]{\textstyle\talloblong}}{\scalebox{0.7}[1.0]{\scriptstyle\talloblong}}{\scalebox{0.7}[1.0]{\scriptscriptstyle\talloblong}}nV\rangle.
\mathchoice{\scalebox{0.7}[1.0]{\displaystyle\talloblong}}{\scalebox{0.7}[1.0]{\textstyle\talloblong}}{\scalebox{0.7}[1.0]{\scriptstyle\talloblong}}{\scalebox{0.7}[1.0]{\scriptscriptstyle\talloblong}}Wy\dot{\rangle\mkern-3.0mu}\mkern 3.0mu is defined to be a linear combination of \{\mathchoice{\scalebox{0.7}[1.0]{\displaystyle\talloblong}}{\scalebox{0.7}[1.0]{\textstyle\talloblong}}{\scalebox{0.7}[1.0]{\scriptstyle\talloblong}}{\scalebox{0.7}[1.0]{\scriptscriptstyle\talloblong}}z\rangle:W^{\top}z\in\mathcal{V}_{W^{\top}}\}. Then we can unwind any \mathchoice{\scalebox{0.7}[1.0]{\displaystyle\talloblong}}{\scalebox{0.7}[1.0]{\textstyle\talloblong}}{\scalebox{0.7}[1.0]{\scriptstyle\talloblong}}{\scalebox{0.7}[1.0]{\scriptscriptstyle\talloblong}}y\rangle inductively as a linear combination of \mathchoice{\scalebox{0.7}[1.0]{\displaystyle\talloblong}}{\scalebox{0.7}[1.0]{\textstyle\talloblong}}{\scalebox{0.7}[1.0]{\scriptstyle\talloblong}}{\scalebox{0.7}[1.0]{\scriptscriptstyle\talloblong}}\bullet\widehat{\rangle\mkern-3.0mu}\mkern 3.0mu, \mathchoice{\scalebox{0.7}[1.0]{\displaystyle\talloblong}}{\scalebox{0.7}[1.0]{\textstyle\talloblong}}{\scalebox{0.7}[1.0]{\scriptstyle\talloblong}}{\scalebox{0.7}[1.0]{\scriptscriptstyle\talloblong}}U\rangle and \mathchoice{\scalebox{0.7}[1.0]{\displaystyle\talloblong}}{\scalebox{0.7}[1.0]{\textstyle\talloblong}}{\scalebox{0.7}[1.0]{\scriptstyle\talloblong}}{\scalebox{0.7}[1.0]{\scriptscriptstyle\talloblong}}nV\rangle, which allows us to fully define
2 Depthwise Scaling of Random Variables
As mentioned in 4.1, both \mathchoice{\scalebox{0.7}[1.0]{\displaystyle\talloblong}}{\scalebox{0.7}[1.0]{\textstyle\talloblong}}{\scalebox{0.7}[1.0]{\scriptstyle\talloblong}}{\scalebox{0.7}[1.0]{\scriptscriptstyle\talloblong}}x_{t}^{l}\rangle and \mathchoice{\scalebox{0.7}[1.0]{\displaystyle\talloblong}}{\scalebox{0.7}[1.0]{\textstyle\talloblong}}{\scalebox{0.7}[1.0]{\scriptstyle\talloblong}}{\scalebox{0.7}[1.0]{\scriptscriptstyle\talloblong}}\widetilde{\delta}x_{t}^{l-1}\rangle can be written as linear combination of “base” random variables: \{\mathchoice{\scalebox{0.7}[1.0]{\displaystyle\talloblong}}{\scalebox{0.7}[1.0]{\textstyle\talloblong}}{\scalebox{0.7}[1.0]{\scriptstyle\talloblong}}{\scalebox{0.7}[1.0]{\scriptscriptstyle\talloblong}}W_{0}^{m}x_{s}^{m-1}\widehat{\rangle\mkern-3.0mu}\mkern 3.0mu\}_{s\in\{0,\ldots,t\},m\in[L]},\{\mathchoice{\scalebox{0.7}[1.0]{\displaystyle\talloblong}}{\scalebox{0.7}[1.0]{\textstyle\talloblong}}{\scalebox{0.7}[1.0]{\scriptstyle\talloblong}}{\scalebox{0.7}[1.0]{\scriptscriptstyle\talloblong}}W_{0}^{m\top}\widetilde{\delta}x_{s}^{m}\widehat{\rangle\mkern-3.0mu}\mkern 3.0mu\}_{s\in\{0,\ldots,t\},m\in[L]},\mathchoice{\scalebox{0.7}[1.0]{\displaystyle\talloblong}}{\scalebox{0.7}[1.0]{\textstyle\talloblong}}{\scalebox{0.7}[1.0]{\scriptstyle\talloblong}}{\scalebox{0.7}[1.0]{\scriptscriptstyle\talloblong}}U\rangle and \mathchoice{\scalebox{0.7}[1.0]{\displaystyle\talloblong}}{\scalebox{0.7}[1.0]{\textstyle\talloblong}}{\scalebox{0.7}[1.0]{\scriptstyle\talloblong}}{\scalebox{0.7}[1.0]{\scriptscriptstyle\talloblong}}nV\rangle. Moreover, the coefficients of the linear combinations can be calculated in a recursive way: by expanding \mathchoice{\scalebox{0.7}[1.0]{\displaystyle\talloblong}}{\scalebox{0.7}[1.0]{\textstyle\talloblong}}{\scalebox{0.7}[1.0]{\scriptstyle\talloblong}}{\scalebox{0.7}[1.0]{\scriptscriptstyle\talloblong}}W_{0}^{l}x_{t}^{l-1}\rangle using 4.1, we have
The recursive formula for \mathchoice{\scalebox{0.7}[1.0]{\displaystyle\talloblong}}{\scalebox{0.7}[1.0]{\textstyle\talloblong}}{\scalebox{0.7}[1.0]{\scriptstyle\talloblong}}{\scalebox{0.7}[1.0]{\scriptscriptstyle\talloblong}}\widetilde{\delta}x_{t}^{l}\rangle is similar.
Using this induction, we claim in the linear combinations, the coefficient of every \mathchoice{\scalebox{0.7}[1.0]{\displaystyle\talloblong}}{\scalebox{0.7}[1.0]{\textstyle\talloblong}}{\scalebox{0.7}[1.0]{\scriptstyle\talloblong}}{\scalebox{0.7}[1.0]{\scriptscriptstyle\talloblong}}\bullet\widehat{\rangle\mkern-3.0mu}\mkern 3.0mu is , and the coefficient of \mathchoice{\scalebox{0.7}[1.0]{\displaystyle\talloblong}}{\scalebox{0.7}[1.0]{\textstyle\talloblong}}{\scalebox{0.7}[1.0]{\scriptstyle\talloblong}}{\scalebox{0.7}[1.0]{\scriptscriptstyle\talloblong}}U\rangle and \mathchoice{\scalebox{0.7}[1.0]{\displaystyle\talloblong}}{\scalebox{0.7}[1.0]{\textstyle\talloblong}}{\scalebox{0.7}[1.0]{\scriptstyle\talloblong}}{\scalebox{0.7}[1.0]{\scriptscriptstyle\talloblong}}nV\rangle is . We also claim the covariance between any pairs of random variables in the form of \mathchoice{\scalebox{0.7}[1.0]{\displaystyle\talloblong}}{\scalebox{0.7}[1.0]{\textstyle\talloblong}}{\scalebox{0.7}[1.0]{\scriptstyle\talloblong}}{\scalebox{0.7}[1.0]{\scriptscriptstyle\talloblong}}x_{t}^{l}\rangle and \mathchoice{\scalebox{0.7}[1.0]{\displaystyle\talloblong}}{\scalebox{0.7}[1.0]{\textstyle\talloblong}}{\scalebox{0.7}[1.0]{\scriptstyle\talloblong}}{\scalebox{0.7}[1.0]{\scriptscriptstyle\talloblong}}\widetilde{\delta}x_{t}^{l-1}\rangle is .
, \forall\mathchoice{\scalebox{0.7}[1.0]{\displaystyle\talloblong}}{\scalebox{0.7}[1.0]{\textstyle\talloblong}}{\scalebox{0.7}[1.0]{\scriptstyle\talloblong}}{\scalebox{0.7}[1.0]{\scriptscriptstyle\talloblong}}y\rangle\in\{\mathchoice{\scalebox{0.7}[1.0]{\displaystyle\talloblong}}{\scalebox{0.7}[1.0]{\textstyle\talloblong}}{\scalebox{0.7}[1.0]{\scriptstyle\talloblong}}{\scalebox{0.7}[1.0]{\scriptscriptstyle\talloblong}}x_{t}^{l}\rangle,\mathchoice{\scalebox{0.7}[1.0]{\displaystyle\talloblong}}{\scalebox{0.7}[1.0]{\textstyle\talloblong}}{\scalebox{0.7}[1.0]{\scriptstyle\talloblong}}{\scalebox{0.7}[1.0]{\scriptscriptstyle\talloblong}}\widetilde{\delta}x_{t}^{l}\rangle\},
, \forall\mathchoice{\scalebox{0.7}[1.0]{\displaystyle\talloblong}}{\scalebox{0.7}[1.0]{\textstyle\talloblong}}{\scalebox{0.7}[1.0]{\scriptstyle\talloblong}}{\scalebox{0.7}[1.0]{\scriptscriptstyle\talloblong}}y\rangle\in\{\mathchoice{\scalebox{0.7}[1.0]{\displaystyle\talloblong}}{\scalebox{0.7}[1.0]{\textstyle\talloblong}}{\scalebox{0.7}[1.0]{\scriptstyle\talloblong}}{\scalebox{0.7}[1.0]{\scriptscriptstyle\talloblong}}x_{t}^{l}\rangle,\mathchoice{\scalebox{0.7}[1.0]{\displaystyle\talloblong}}{\scalebox{0.7}[1.0]{\textstyle\talloblong}}{\scalebox{0.7}[1.0]{\scriptstyle\talloblong}}{\scalebox{0.7}[1.0]{\scriptscriptstyle\talloblong}}\widetilde{\delta}x_{t}^{l}\rangle\}, \forall\mathchoice{\scalebox{0.7}[1.0]{\displaystyle\talloblong}}{\scalebox{0.7}[1.0]{\textstyle\talloblong}}{\scalebox{0.7}[1.0]{\scriptstyle\talloblong}}{\scalebox{0.7}[1.0]{\scriptscriptstyle\talloblong}}z\rangle\in\{\mathchoice{\scalebox{0.7}[1.0]{\displaystyle\talloblong}}{\scalebox{0.7}[1.0]{\textstyle\talloblong}}{\scalebox{0.7}[1.0]{\scriptstyle\talloblong}}{\scalebox{0.7}[1.0]{\scriptscriptstyle\talloblong}}x_{s}^{m}\rangle,\mathchoice{\scalebox{0.7}[1.0]{\displaystyle\talloblong}}{\scalebox{0.7}[1.0]{\textstyle\talloblong}}{\scalebox{0.7}[1.0]{\scriptstyle\talloblong}}{\scalebox{0.7}[1.0]{\scriptscriptstyle\talloblong}}\widetilde{\delta}x_{s}^{m}\rangle\},
The reasoning of 4.2 is provided in Appendix C. Note the computation of covariance can also be written as a recursive formula. The reasoning relies essentially on an inductive argument.
3 Infinite Depth Limit
Now we formalize our argument above and obtain the formula describing the dynamics of the network when . We first write the coefficients of the linear combinations as a six dimensional tensor , where . Specifically, represents the derivative of \mathchoice{\scalebox{0.7}[1.0]{\displaystyle\talloblong}}{\scalebox{0.7}[1.0]{\textstyle\talloblong}}{\scalebox{0.7}[1.0]{\scriptstyle\talloblong}}{\scalebox{0.7}[1.0]{\scriptscriptstyle\talloblong}}x_{t}^{l}\rangle and \mathchoice{\scalebox{0.7}[1.0]{\displaystyle\talloblong}}{\scalebox{0.7}[1.0]{\textstyle\talloblong}}{\scalebox{0.7}[1.0]{\scriptstyle\talloblong}}{\scalebox{0.7}[1.0]{\scriptscriptstyle\talloblong}}\widetilde{\delta}x_{t}^{l}\rangle w.r.t. \mathchoice{\scalebox{0.7}[1.0]{\displaystyle\talloblong}}{\scalebox{0.7}[1.0]{\textstyle\talloblong}}{\scalebox{0.7}[1.0]{\scriptstyle\talloblong}}{\scalebox{0.7}[1.0]{\scriptscriptstyle\talloblong}}W_{0}^{m}x_{s}^{m-1}\widehat{\rangle\mkern-3.0mu}\mkern 3.0mu and \mathchoice{\scalebox{0.7}[1.0]{\displaystyle\talloblong}}{\scalebox{0.7}[1.0]{\textstyle\talloblong}}{\scalebox{0.7}[1.0]{\scriptstyle\talloblong}}{\scalebox{0.7}[1.0]{\scriptscriptstyle\talloblong}}W_{0}^{m\top}\widetilde{\delta}x_{s}^{m}\widehat{\rangle\mkern-3.0mu}\mkern 3.0mu. Here, we use to denote kets appears in the forward pass (\mathchoice{\scalebox{0.7}[1.0]{\displaystyle\talloblong}}{\scalebox{0.7}[1.0]{\textstyle\talloblong}}{\scalebox{0.7}[1.0]{\scriptstyle\talloblong}}{\scalebox{0.7}[1.0]{\scriptscriptstyle\talloblong}}x_{t}^{l}\rangle and \mathchoice{\scalebox{0.7}[1.0]{\displaystyle\talloblong}}{\scalebox{0.7}[1.0]{\textstyle\talloblong}}{\scalebox{0.7}[1.0]{\scriptstyle\talloblong}}{\scalebox{0.7}[1.0]{\scriptscriptstyle\talloblong}}W_{0}^{m}x_{s}^{m-1}\widehat{\rangle\mkern-3.0mu}\mkern 3.0mu), and to denote kets in the backward pass (\mathchoice{\scalebox{0.7}[1.0]{\displaystyle\talloblong}}{\scalebox{0.7}[1.0]{\textstyle\talloblong}}{\scalebox{0.7}[1.0]{\scriptstyle\talloblong}}{\scalebox{0.7}[1.0]{\scriptscriptstyle\talloblong}}\widetilde{\delta}x_{t}^{l}\rangle and \mathchoice{\scalebox{0.7}[1.0]{\displaystyle\talloblong}}{\scalebox{0.7}[1.0]{\textstyle\talloblong}}{\scalebox{0.7}[1.0]{\scriptstyle\talloblong}}{\scalebox{0.7}[1.0]{\scriptscriptstyle\talloblong}}W_{0}^{m\top}\widetilde{\delta}x_{s}^{m}\widehat{\rangle\mkern-3.0mu}\mkern 3.0mu). Formally, \mathbf{\Gamma}_{t,s,0,0,l,m}=\frac{\partial\mathchoice{\scalebox{0.7}[1.0]{\displaystyle\talloblong}}{\scalebox{0.7}[1.0]{\textstyle\talloblong}}{\scalebox{0.7}[1.0]{\scriptstyle\talloblong}}{\scalebox{0.7}[1.0]{\scriptscriptstyle\talloblong}}x_{t}^{l}\rangle}{\partial\mathchoice{\scalebox{0.7}[1.0]{\displaystyle\talloblong}}{\scalebox{0.7}[1.0]{\textstyle\talloblong}}{\scalebox{0.7}[1.0]{\scriptstyle\talloblong}}{\scalebox{0.7}[1.0]{\scriptscriptstyle\talloblong}}W_{0}^{m}x_{s}^{m-1}\widehat{\rangle\mkern-3.0mu}\mkern 3.0mu}, \mathbf{\Gamma}_{t,s,0,1,l,m}=\frac{\partial\mathchoice{\scalebox{0.7}[1.0]{\displaystyle\talloblong}}{\scalebox{0.7}[1.0]{\textstyle\talloblong}}{\scalebox{0.7}[1.0]{\scriptstyle\talloblong}}{\scalebox{0.7}[1.0]{\scriptscriptstyle\talloblong}}x_{t}^{l}\rangle}{\partial\mathchoice{\scalebox{0.7}[1.0]{\displaystyle\talloblong}}{\scalebox{0.7}[1.0]{\textstyle\talloblong}}{\scalebox{0.7}[1.0]{\scriptstyle\talloblong}}{\scalebox{0.7}[1.0]{\scriptscriptstyle\talloblong}}W_{0}^{m\top}\widetilde{\delta}x_{s}^{m}\widehat{\rangle\mkern-3.0mu}\mkern 3.0mu}, \mathbf{\Gamma}_{t,s,1,0,l,m}=\frac{\partial\mathchoice{\scalebox{0.7}[1.0]{\displaystyle\talloblong}}{\scalebox{0.7}[1.0]{\textstyle\talloblong}}{\scalebox{0.7}[1.0]{\scriptstyle\talloblong}}{\scalebox{0.7}[1.0]{\scriptscriptstyle\talloblong}}\widetilde{\delta}x_{t}^{l}\rangle}{\partial\mathchoice{\scalebox{0.7}[1.0]{\displaystyle\talloblong}}{\scalebox{0.7}[1.0]{\textstyle\talloblong}}{\scalebox{0.7}[1.0]{\scriptstyle\talloblong}}{\scalebox{0.7}[1.0]{\scriptscriptstyle\talloblong}}W_{0}^{m}x_{s}^{m-1}\widehat{\rangle\mkern-3.0mu}\mkern 3.0mu}, \mathbf{\Gamma}_{t,s,1,1,l,m}=\frac{\partial\mathchoice{\scalebox{0.7}[1.0]{\displaystyle\talloblong}}{\scalebox{0.7}[1.0]{\textstyle\talloblong}}{\scalebox{0.7}[1.0]{\scriptstyle\talloblong}}{\scalebox{0.7}[1.0]{\scriptscriptstyle\talloblong}}\widetilde{\delta}x_{t}^{l}\rangle}{\partial\mathchoice{\scalebox{0.7}[1.0]{\displaystyle\talloblong}}{\scalebox{0.7}[1.0]{\textstyle\talloblong}}{\scalebox{0.7}[1.0]{\scriptstyle\talloblong}}{\scalebox{0.7}[1.0]{\scriptscriptstyle\talloblong}}W_{0}^{m\top}\widetilde{\delta}x_{s}^{m}\widehat{\rangle\mkern-3.0mu}\mkern 3.0mu}.
For , \Gamma_{t,-1,0,0}\left(p,q\right)=\frac{\partial\mathchoice{\scalebox{0.7}[1.0]{\displaystyle\talloblong}}{\scalebox{0.7}[1.0]{\textstyle\talloblong}}{\scalebox{0.7}[1.0]{\scriptstyle\talloblong}}{\scalebox{0.7}[1.0]{\scriptscriptstyle\talloblong}}x_{t}^{\lceil Lp\rceil}\rangle}{\partial\mathchoice{\scalebox{0.7}[1.0]{\displaystyle\talloblong}}{\scalebox{0.7}[1.0]{\textstyle\talloblong}}{\scalebox{0.7}[1.0]{\scriptstyle\talloblong}}{\scalebox{0.7}[1.0]{\scriptscriptstyle\talloblong}}U\rangle},\Gamma_{t,-1,0,1}\left(p,q\right)=\frac{\partial\mathchoice{\scalebox{0.7}[1.0]{\displaystyle\talloblong}}{\scalebox{0.7}[1.0]{\textstyle\talloblong}}{\scalebox{0.7}[1.0]{\scriptstyle\talloblong}}{\scalebox{0.7}[1.0]{\scriptscriptstyle\talloblong}}x_{t}^{\lceil Lp\rceil}\rangle}{\partial\mathchoice{\scalebox{0.7}[1.0]{\displaystyle\talloblong}}{\scalebox{0.7}[1.0]{\textstyle\talloblong}}{\scalebox{0.7}[1.0]{\scriptstyle\talloblong}}{\scalebox{0.7}[1.0]{\scriptscriptstyle\talloblong}}nV\rangle},\Gamma_{t,-1,1,0}\left(p,q\right)=\frac{\partial\mathchoice{\scalebox{0.7}[1.0]{\displaystyle\talloblong}}{\scalebox{0.7}[1.0]{\textstyle\talloblong}}{\scalebox{0.7}[1.0]{\scriptstyle\talloblong}}{\scalebox{0.7}[1.0]{\scriptscriptstyle\talloblong}}\widetilde{\delta}x_{t}^{\lceil Lp\rceil}\rangle}{\partial\mathchoice{\scalebox{0.7}[1.0]{\displaystyle\talloblong}}{\scalebox{0.7}[1.0]{\textstyle\talloblong}}{\scalebox{0.7}[1.0]{\scriptstyle\talloblong}}{\scalebox{0.7}[1.0]{\scriptscriptstyle\talloblong}}U\rangle},\Gamma_{t,-1,1,1}\left(p,q\right)=\frac{\partial\mathchoice{\scalebox{0.7}[1.0]{\displaystyle\talloblong}}{\scalebox{0.7}[1.0]{\textstyle\talloblong}}{\scalebox{0.7}[1.0]{\scriptstyle\talloblong}}{\scalebox{0.7}[1.0]{\scriptscriptstyle\talloblong}}\widetilde{\delta}x_{t}^{\lceil Lp\rceil}\rangle}{\partial\mathchoice{\scalebox{0.7}[1.0]{\displaystyle\talloblong}}{\scalebox{0.7}[1.0]{\textstyle\talloblong}}{\scalebox{0.7}[1.0]{\scriptstyle\talloblong}}{\scalebox{0.7}[1.0]{\scriptscriptstyle\talloblong}}nV\rangle}.
Here are normalized to $\GammaL\mathbf{\Gamma}_{t,s,a,b,l,m}\sqrt{L}\mathbf{\Gamma}_{t,s,a,b,l,m}=\mathcal{O}(1/\sqrt{L})s=-1\mathchoice{\scalebox{0.7}[1.0]{}}{\scalebox{0.7}[1.0]{}}{\scalebox{0.7}[1.0]{}}{\scalebox{0.7}[1.0]{}}U\rangle\mathchoice{\scalebox{0.7}[1.0]{}}{\scalebox{0.7}[1.0]{}}{\scalebox{0.7}[1.0]{}}{\scalebox{0.7}[1.0]{}}nV\rangle$.
Using this definition of and , it is convenient to write their recursive formula in the following lemma.
and can be computed recursively as follows:
where if , and if .
The proof of Lemma 4.3 is straightforward from Program 1. In Appendix C, we also give a formal proof that and converge when grows to infinity, in the case where is powers of . The restriction on being powers of is imposed for the convenience of the proof, and the convergence of and is true in the general case. Moreover, we derive the infinite depth behavior based on the recursion of and in Lemma 4.3.
This gives a convergence in distribution:
In the limit, the kets \mathchoice{\scalebox{0.7}[1.0]{\displaystyle\talloblong}}{\scalebox{0.7}[1.0]{\textstyle\talloblong}}{\scalebox{0.7}[1.0]{\scriptstyle\talloblong}}{\scalebox{0.7}[1.0]{\scriptscriptstyle\talloblong}}x^{L}_{s}\rangle,s=0,1,\ldots, converge in distribution as a zero-mean Gaussian process with kernel
Thus, for each fixed neuron index , the collection converges in distribution to a zero-mean Gaussian process with kernel in the then limit.
For audience familiar with stochastic processes, we in fact have a weak convergence of the entire continuous-depth-indexed process \{\mathchoice{\scalebox{0.7}[1.0]{\displaystyle\talloblong}}{\scalebox{0.7}[1.0]{\textstyle\talloblong}}{\scalebox{0.7}[1.0]{\scriptstyle\talloblong}}{\scalebox{0.7}[1.0]{\scriptscriptstyle\talloblong}}x^{p}_{s}\rangle,\mathchoice{\scalebox{0.7}[1.0]{\displaystyle\talloblong}}{\scalebox{0.7}[1.0]{\textstyle\talloblong}}{\scalebox{0.7}[1.0]{\scriptstyle\talloblong}}{\scalebox{0.7}[1.0]{\scriptscriptstyle\talloblong}}\delta x^{p}_{s}\rangle\}_{p\in,s\geq 0} in the Skorohod topology.
What Causes Hyperparameter Transfer?
In a popular misconception, hyperparameter transfer is implied by the existence of a limit. For example, the fact that P transfers hyperparameters, in this misconception, is because of the existence of the feature learning limit (aka the limit), the limit of P as width goes to infinity. However, this is not the case. Indeed, there are a plethora of infinite-width limits, such as the NTK limit, but there can only be one way how the optimal hyperparameters scale, so existence cannot imply transfer. In a stronger version of this misconception, transfer is implied by the existence of a “feature learning” limit. But again, this is False, because there are infinite number of feature learning limits (where the limit is the unique maximal one).
Instead, what is true is that the optimal limit implies the transfer of optimal hyperparameters. For example, in the width limit case, P is the unique parametrization that yields a maximal feature learning limit. Compared to all other limits, this is obviously the optimal one. Hence P can transfer hyperparameters across width.
So far, there is no a priori definition for the “optimality” of a limit: One can only tell by classifying all possible limits; it turns out only a small number of different behavior can occur in the limit, and thus one can manually inspect for which limit is the optimal one.
Similarly, in this work, to derive a depthwise scaling that allows transfer, we need to classify all possible infinite depth limits — and Depth-P will turn out to be optimal in a sense that we define later in the paper.There are important nuances here that will be spelled out in an upcoming paper. For example, if the space of hyperparameters is not chosen correctly, then it could appear that no limit is optimal in any manner. For example, if one in (widthwise) SP, one only thinks about the 1D space of the global learning rate, then all infinite-width limits are defective — and indeed there is no hyperparameter transfer where the bigger always does better. More interestingly than the width case, here we have multiple modes of feature learning when taking the depth limit and it is important to discern which mode of feature learning is optimal. Thus, again, it is insufficient to derive any one limit, even with feature learning, and be able to infer it yields HP transfer.
In section 10, we provide experiments with block scaling , aka ODE scaling, which provably induces feature learning in the infinite-depth limit, but is sub-optimal. Our results show a significant shift in the optimal learning rate with this parametrization.
Preliminaries for the General Case
For the general case, we recall and extend the notation from the previous sections and also define new ones.
1 Unified Scaling for SGD, Adam, and All Entrywise Optimizers
We extend the definition of entrywise update () for depth scaling, allowing us to study the unified depth scaling for SGD, Adam, and other optimization algorithms that perform only entrywise operations.
where , are the gradients of at time .
For SGD, , and the “true” learning rate is . For Adam,
and the “true” learning rate is .
The purpose of multiplying the gradients before is to make sure the inputs to are w.r.t. and It is called faithfulness in Yang and Littwin .; otherwise, the update might be trivial when and become large. For example, if gradients are entrywise, then, in Adam, directly feeding gradients to will always give an output of because of the constant .
In this paper, we will only consider such that is .Note in Definition 6.1 can be different for parameters, so it is possible to make every parameter to satisfy the condition. As a result, the output of is also in general. Therefore, decides the scale of the update and should be our focus. We call the effective learning rate.
2 μ𝜇\muP and Widthwise Scaling
Maximal update parametrization (P) considers the change of initialization and learning rate of each weight matrix in the network when width scales up.Reparametrization is also included in the original P, but it is not necessary for the purpose of this paper. It provides a unique initialization and learning rate of each weight matrix as a function of width that makes the update of each weight matrix maximal (up to a constant factor). The benefit of P is not only the theoretical guarantee but also the hyperparameter stability when scaling up the width .
In this paper, we assume the widthwise scaling follows P. That is, the in the effective learning rate and the initialization variance of each weight matrix follows Table 2.
3 Our Setup
We consider an -hidden-layer residual network with biasless perceptron blocks:
In general, without mean subtraction, the mean of will dominate the depthwise dynamics. For example, when is relu, each layer will only add nonnegative quantities to that on average is positive. Its accumulation over depth either causes the network output to blow up if the multiplier is too large, or lack feature diversity otherwise. As we shall see, mean subtraction removes this failure mode and enable more powerful infinite-depth limits.Note that using an odd nonlinearity will also achieve similar results because they have no mean under a symmetrically distributed input, which is approximately the case for throughout training. This is the case for = identity that we discussed earlier. But it turns out odd nonlinearities minimize feature diversity, so mean subtraction is a much better solution.
We independently initialize each entry of from
The gradients of are multiplied by before being processed by : i.e., the update at time is
where , are the gradients of at time and is applied entrywise.
Classification of Depthwise Parametrizations
In this section, we provide a comprehensive description of the impact of depth parametrization on stability and update size. For this purpose, we only have two scalings to keep track of: the branch multiplier and the learning rate scaling because the initialization scale is fixed by the faithfulness property (defined below). Requiring that the features don’t blow up at initialization means that the branch multipliers must be at most . Assuming the updates are faithful (i.e., input to gradient processing functions are entrywise), the update size can be at most for the hidden layers, by an (Jacobian) operator-norm argument, but potentially much less. Naively speaking, there can be a trade-off between update size and initialization: if initialization is large, then the update may need to be small so as not to blow up the other parts of the network; likewise if the initialization is small, then the update size can be larger. But one may be surprised that a careful calculation shows that there is no trade-off: we can maximize both initialization and update size at the same time.
Remark: in this section, we state the results as “claims” instead of theorems. In Appendix F.4, we provide “heuristic” proofs that can be made rigorous under non-trivial technical conditions. We also showcase the correctness of the claims by proving them rigorously in our linear setting in Appendix D. We believe this additional layer of complexity is unneeded and does not serve the purpose of this paper.
A training routine is the package of , , and the input batches.
stable during training if for any training routine, any time , , we have
where the symbol ‘’ refers to the change after one gradient step.
We say the parametrization is stable if it is stable both at initialization and during training.
We say a parametrization is faithful at step if for all . We say the parametrization is faithful if it is faithful for all . We also say it is faithful at initialization (resp. faithful during training) if this is true at (resp. for ).
Note faithfulness here refers to “faithfulness to ”, meaning the input to is . This is different from the definition of faithfulness in Yang and Littwin , where faithfulness refers to “faithfulness to ” meaning the input to is . “faithfulness to ” is already assumed in this work as mentioned in Section 6.1.
We say a parametrization induces feature learning in the limit “, then ”, if there exist a training routine, and , and any , we have .
We are now ready to state the main results. The next claim provides a necessary and sufficient condition under which a parametrization is stable at initialization.
A parametrization is stable at initialization iff .
Claim 7.1 is not new and similar results were reported by Hayou et al. . However, Hayou et al. focuses on initialization and lacks a similar stability analysis during training. In the next result, we identify two different behaviours depending on the scaling of the learning rate.
Consider a parametrization that is stable at initialization. Then the following hold (separately from each other).
It is stable during training as well iff .
It is nontrivial iff .
Therefore, it is both stable and nontrivial iff .
From Claim 7.1 and Claim 7.2, having and is a necessary and sufficient condition for a parametrization to be stable and nontrivial throughout training. In the next result, we therefore restrict our analysis to such parametrizations and study their faithfulness.
Consider a stable and nontrivial parametrization. The following hold (separately from each other).
It is faithful at initialization iff . As a result, is the minimal choice of that guarantees faithfulness.
It is faithful during training iff .
Therefore, a stable and nontrivial parametrization is faithful iff .
The first claim follows from well-known calculations of randomly initialized residual networks . For the second claim, the intuition here is just that if and then , i.e., the update size blows up with depth. This would then cause the input to the nonlinearities to blow up with size.
One might argue that faithfulness at initialization is not important (e.g. features at initialization could converge to zero without any stability or triviality issues) and what matters is faithfulness throughout training. It turns out that faithfulness at initialization plays a crucial role in the optimal use of network capacity. To see this, we first define the notion of feature diversity exponent, which relates to the similarity in the features of adjacent layers.
We say a parametrization has feature diversity exponent if is the maixmal value such that for all and sufficiently small , and all time ,
where should be interpreted in the limit “, then , then ”. We say a parametrization is redundant if .
In other words, the feature diversity exponent is a measure of how different the outputs are in layers that are close to each other. With , the output of each layer is essentially the same as the output of the previous layer in the sense that the rate of change from one layer to the next is bounded (at least locally), and hence the network is intuitively “wasting” parameters.
Consider a stable and nontrivial parametrization that is furthermore faithful during training (but not necessarily at initialization). Then it is redundant if .
To understand the intuition behind Claim 7.4, let us see what happens when . In this case, the randomness of the initialization weights will have no impact on training trajectory as depth increases. To see this, consider some layer index . The blocks are divided by which is larger than the magnitude of accumulated randomness (of order ). This basically destroys all the randomness from initialization and therefore the randomness in the learned features will consist only of that coming from and (input and output matrices). When depth goes to infinity, the contribution of the randomness in two adjacent layers becomes less important, we end up with adjacent layers becoming very similar because the gradients to these layers are highly correlated.
In contrast, we have the following result, which defines Depth-P.
is the unique parametrization that is stable, nontrivial, faithful, induces feature learning, and achieves maximal feature diversity with .
In terms of feature diversity, a phase transition phenomenon occurs when . More precisely, for Depth-P, we can show that while the same quantity is for all , which suggests that Depth-P yields rough path for . This allows the features to change significantly from one layer to the next, hence efficiently using the parameters. For readers who are familiar with rough path theory, the continuity exponent is a result of Brownian increments in the path.The reader might ask whether we can obtain an exponent smaller than . This is indeed possible, but it will entail using correlated weights. We leave this question for future work.
Moreover, with , there is a phenomenon of feature collapse in the sense that the features will be contained in the -algebra generated by the input and output layers, but contains no randomness from the hidden layers (see Section F.2). Intuitively, the case of is analogous to width situation, where deep mean field collapses to a single neuron (all neurons become essentially the same). For depth, the features (layers) are still relatively different but the redundancy does not allow significant variety in these features.
2 Sublety: Layerwise (local) linearization but not global linearization
We say a parametrization induces layerwise linearization iff each layer can be linearized without changing the network output when , that is, ,
A stable and nontrivial parametrization induces layerwise linearization iff .
However, note that this does not imply the entire network is linearized (w.r.t. all the parameters in the sense of Neural Tangent Kernel). In our setup, where the input and output layers are initialized at a constant scale (w.r.t. ), it is actually not possible to have a kernel limit. Even in our linear case in Section 4, one can see the learned model is not linear.
If the initialization of the output layer is times larger than our setup (assuming so the widthwise scaling still follows P), it may induce a parametrization that can linearize the entire network. In that situation, the learning rate has to be times smaller than Depth-P to obtain stability during training, so the change of parameters is also times smaller, which can lead to the linearization of the entire network. Since we focus on maximal feature learning, the rigorous argument is beyond the scope of this paper.
Feature Diversity
In this section, we show that the choice of nonlinearity and placement of nonlinearities can affect feature diversity greatly.
Gradient diversity is an important factor toward feature diversity. Observe that the gradient at is continuous in in the limit . In a linear model (or the pre-nonlin model, where nonlinearity is put before the weights), this causes to be very similar between neighboring blocks. As a result (because the weights receives an update proportional to ), in the next forward pass, neighboring blocks contribute very similarly to the main branch . This leads to a waste of model capacity.
2 Pre-Nonlin Leads to Poor Performance
For example, in Figure 2, for a relu pre-nonlin resnet (i.e. blocks are given by instead of ), we see that although Depth-P indeed transfers hyperparameters (as predicted by our theory), the performance is dramatically worse than the post-nonlin resnet in Figure 10, and depth gives no performance gains beyond 8 layers. Specifically, it is because like the linear case, and is also similar between neighboring blocks. As a result, the gradient of the weights , proportional to , has little diversity compared to nearby blocks.
3 Maximizing Feature Diversity with Absolute Value Nonlinearity
Indeed, as shown in Figure 3, swapping in absolute value for dramatically improves the training performance of deep (block depth 1) resnets.
In general, in lieu of absolute value, any even nonlinearity would suffice.
4 Feature Diversity is in Tension with Layerwise Linearization
The reason that can decorrelate is very much related to layerwise linearization. Recall that in Depth-P, can be decomposed to a zero-mean Gaussian part of size and a correction term of size (corresponding to the decomposition \mathchoice{\scalebox{0.7}[1.0]{\displaystyle\talloblong}}{\scalebox{0.7}[1.0]{\textstyle\talloblong}}{\scalebox{0.7}[1.0]{\scriptstyle\talloblong}}{\scalebox{0.7}[1.0]{\scriptscriptstyle\talloblong}}h^{l}\rangle=\mathchoice{\scalebox{0.7}[1.0]{\displaystyle\talloblong}}{\scalebox{0.7}[1.0]{\textstyle\talloblong}}{\scalebox{0.7}[1.0]{\scriptstyle\talloblong}}{\scalebox{0.7}[1.0]{\scriptscriptstyle\talloblong}}h^{l}\widehat{\rangle\mkern-3.0mu}\mkern 3.0mu+\mathchoice{\scalebox{0.7}[1.0]{\displaystyle\talloblong}}{\scalebox{0.7}[1.0]{\textstyle\talloblong}}{\scalebox{0.7}[1.0]{\scriptstyle\talloblong}}{\scalebox{0.7}[1.0]{\scriptscriptstyle\talloblong}}h^{l}\dot{\rangle\mkern-3.0mu}\mkern 3.0mu). is independent from for but can be very strongly correlated to all other . Thus, can decorrelate precisely because dominates , and this is also precisely the reason we have layerwise linearization.
In the scaling , is on the same order as and layerwise linearization does not occur, but also can no longer effectively decorrelated .
Once again, we remind the reader that layerwise linearization in this case is not detrimental (in this block depth 1 case) because in fact accumulate contributions from the learned features of all previous blocks and thus strongly depends on the learning trajectory (in contrast to the (widthwise) NTK case where is already determined at initialization).
Block Depth 2 and Above
Remark on notation: Here and in the next section, all big-O notation is in only; the scaling in width is assumed to be in P.
In most of this work, we have considered depth-1 MLP for in eq. 1, it’s straightforward to derive and classify the infinite-width-then-infinite-depth limits for larger depths in each block. In particular, the following scaling still makes sense in this more general setting with block depth and leads to a well defined limit:
This is what we call Depth-P in the block depth 1 case, but we shall not use this name in the general block depth case because this parametrization is no longer optimal.What we exactly mean by optimal will be explained below.
A very clear symptom of this is that the performance of block-depth-2 resnets is worse than that of block-depth-1 networks, when matching parameter count, although they can (but not always) catch up after training for a long time (figs. 4 and 5).
Simultaneously, we are seeing nontrivial or even significant hyperparameter shifts as the total number of blocks increases (fig. 6).
2 Defect of 1/L1𝐿1/\sqrt{L} Scaling in Block Depth 2
The reason that the scaling is no longer fine in the block depth case is the linearization of the multiplicative interaction between the layers in the block. Indeed, just like the block depth 1 case, the scaling forces the weight updates of each weight matrix to be smaller than the initialization . Thus, within the block, the training dynamics when depth is large is in the kernel regime, where the contribution to the block output is only a summation, instead of product, of individual contributions from each layer’s weights updates.
When aggregated over all blocks, the result is that there is only multiplicative interaction of across blocks but not within layers. In other words, the network output is dominated, for example in the linear case, by the contributions of the form where each can be one of or , but NOT . All other contributions (which all involve within-block interactions like ) are subleading. In the general nonlinear case, replacing the block
will achieve the same performance as depth , where and .
When block depth (our main subject of study in this work), all interactions are included but this is no longer true when .
In fig. 7, the heatmap of loss as a function of block multiplier and learning rate demonstrates this vividly for block depth 2.
The optimal sublevel set of (learning rate, block multiplier) has slope when the number of blocks is . In other words, around the optimum, double the learning rate while dividing the block multiplier by 4 has similar performance. This is because and interact multiplicatively, so that doubling their sizes leads to quadrupling their contribution to the block output. The simultaneous decrease of block multiplier by 4 then roughly keep their contribution invariant in size.
On the other hand, the optimal sublevel set has slope when the depth is : Doubling the learning rate while halving the block multiplier has similar performance. This reflects the fact that and now interact additively.
Intermediate depths interpolate this phenomenon, as seen in the plot for depth .
In the same heatmaps, one can see the optimal (learning rate, block multiplier) (in the parametrization) shifts from the middle of the grid to the upper left as depth goes from to , demonstrating the lack of hyperparameter transfer.
This change in slope is seen in relu networks as well, with or without layernorm.
Finally, we note that the scaling still yields a limit where the network still learns features as a whole, even though within each block this is no longer true. Thus, this is another reminder that mere "feature learning" does not imply "hyperparameter transfer"!
3 Classification of Parametrizations
These heatmaps already demonstrate that no parametrization of (global learning ratemeaning, the learning tied across all layers in a block, block multiplier) can transfer hyperparameters robustly, because any such parametrization can only shift the heatmaps but not stretch them, so one cannot "transfer" a sublevel set of one slope into a sublevel set of another slope.
But even if we allow learning rate to vary between layers in a block, no stable, faithful, nontrivial parametrization can avoid the linearization problem described above.
Indeed, for this to happen, the weight update must be at least of order (size of initialization) for some . But this would contribute a drift term to the block output that is as large as the noise term. This then implies that either the parametrization is unstable (if the block multiplier is ) or lacks feature diversity (if the block multiplier is ).
\mathchoice{\scalebox{0.7}[1.0]{\displaystyle\talloblong}}{\scalebox{0.7}[1.0]{\textstyle\talloblong}}{\scalebox{0.7}[1.0]{\scriptstyle\talloblong}}{\scalebox{0.7}[1.0]{\scriptscriptstyle\talloblong}}W_{0}^{l2}W^{l1}x^{l-1}\widehat{\rangle\mkern-3.0mu}\mkern 3.0mu is independent and zero-mean across (the noise term), while \mathchoice{\scalebox{0.7}[1.0]{\displaystyle\talloblong}}{\scalebox{0.7}[1.0]{\textstyle\talloblong}}{\scalebox{0.7}[1.0]{\scriptstyle\talloblong}}{\scalebox{0.7}[1.0]{\scriptscriptstyle\talloblong}}W_{0}^{l2}W^{l1}x^{l-1}\dot{\rangle\mkern-3.0mu}\mkern 3.0mu+\mathchoice{\scalebox{0.7}[1.0]{\displaystyle\talloblong}}{\scalebox{0.7}[1.0]{\textstyle\talloblong}}{\scalebox{0.7}[1.0]{\scriptstyle\talloblong}}{\scalebox{0.7}[1.0]{\scriptscriptstyle\talloblong}}\Delta W^{l2}W^{l1}x^{l-1}\rangle is correlated across (the drift term). \mathchoice{\scalebox{0.7}[1.0]{\displaystyle\talloblong}}{\scalebox{0.7}[1.0]{\textstyle\talloblong}}{\scalebox{0.7}[1.0]{\scriptstyle\talloblong}}{\scalebox{0.7}[1.0]{\scriptscriptstyle\talloblong}}W_{0}^{l2}W^{l1}x^{l-1}\widehat{\rangle\mkern-3.0mu}\mkern 3.0mu is always because the are. If is , then \mathchoice{\scalebox{0.7}[1.0]{\displaystyle\talloblong}}{\scalebox{0.7}[1.0]{\textstyle\talloblong}}{\scalebox{0.7}[1.0]{\scriptstyle\talloblong}}{\scalebox{0.7}[1.0]{\scriptscriptstyle\talloblong}}\Delta W^{l2}W^{l1}x^{l-1}\rangle=\Omega(1) as well, making the drift term as large as the noise term. If is , then \mathchoice{\scalebox{0.7}[1.0]{\displaystyle\talloblong}}{\scalebox{0.7}[1.0]{\textstyle\talloblong}}{\scalebox{0.7}[1.0]{\scriptstyle\talloblong}}{\scalebox{0.7}[1.0]{\scriptscriptstyle\talloblong}}W_{0}^{l2}\Delta W^{l1}x^{l-1}\dot{\rangle\mkern-3.0mu}\mkern 3.0mu=\Omega(1), causing \mathchoice{\scalebox{0.7}[1.0]{\displaystyle\talloblong}}{\scalebox{0.7}[1.0]{\textstyle\talloblong}}{\scalebox{0.7}[1.0]{\scriptstyle\talloblong}}{\scalebox{0.7}[1.0]{\scriptscriptstyle\talloblong}}W_{0}^{l2}W^{l1}x^{l-1}\dot{\rangle\mkern-3.0mu}\mkern 3.0mu=\mathchoice{\scalebox{0.7}[1.0]{\displaystyle\talloblong}}{\scalebox{0.7}[1.0]{\textstyle\talloblong}}{\scalebox{0.7}[1.0]{\scriptstyle\talloblong}}{\scalebox{0.7}[1.0]{\scriptscriptstyle\talloblong}}W_{0}^{l2}W_{0}^{l1}x^{l-1}\dot{\rangle\mkern-3.0mu}\mkern 3.0mu+\mathchoice{\scalebox{0.7}[1.0]{\displaystyle\talloblong}}{\scalebox{0.7}[1.0]{\textstyle\talloblong}}{\scalebox{0.7}[1.0]{\scriptstyle\talloblong}}{\scalebox{0.7}[1.0]{\scriptscriptstyle\talloblong}}W_{0}^{l2}\Delta W^{l1}x^{l-1}\dot{\rangle\mkern-3.0mu}\mkern 3.0mu to be .One can also observe that if , then by symmetry the backward pass suffers the same problem. But for general block depth, this argument does not say anything about the middle layers, while the argument presented above implies that cannot be for any .
The same argument can be straightforwardly adapted to nonlinear MLPs (with mean subtraction) and arbitrary block depth , and as well to general nonlinearities that are not necessarily positive-homogeneous, with hyperparameter space enlarged to include initialization.
4 So What is the Optimal Parametrization?
All of the above considerations suggest that we are missing crucial hyperparameters in our consideration when increasing the complexity of each block. Our study right now is akin to the naive study of the 1-dimensional hyperparameter space of the global learning rate in SP. Discovering these missing hyperparameters will be an important question for future work.
Experiments
In Section 4, we showed that a complete description of the training dynamics of linear networks can be formulated in terms of and . In this section, we provide empirical results supporting our theoretical findings. We first verify the finite-depth recursive formula for in Lemma 4.3 is the correct limit when the width goes to infinity, then proceed to show that the infinite-depth limit is the correct one.
In Figure 8, we train a series of -layer linear networks of width with steps on MNIST, and plot the root mean squareThe root mean square of a vector is , which is denoted as “l2” in Figures 8 and 9. of the layer outputs using solid lines. We also compute the infinite width limit of the corresponding statistics using the recursive formula for and plot them as dashed horizontal lines. For clarity of the figure, we only plot the statistics of the input layer, output layer, and hidden layers of index 16, 32, 48, and 64. It is clear that as the width grows, the solid lines converge to the dashed lines consistently across the training steps. It indicates that our computation of the infinite width limit is correct.
We verify that the infinite width limit above converges when the depth grows. We consider linear networks of the same architecture but vary the depth from to . We again compute the root mean square values of the layer outputs using the recursive formula for , and plot them in Figure 9 with depth being -axis. For clarity of the figure, we only plot the statistics of the input layer, output layer, and hidden layers of index , , , and . One can observe that the statistics of the layer outputs converge quickly when the depth grows from to , which verifies our convergence result.
2 Hyperparameter Transfer
In this section, we provide empirical evidence to show the optimality of Depth-P scaling and the transferability of some quantities across depth. We train vanilla residual network with block depth 1 (1 MLP layer in each residual block) on CIFAR-10 dataset using Adam optimizer, batch size , for epochs (input and output layers are fixed). The network is parameterized as follows
and the weights are trained with the rule
where the learning rate and the block multiplier are the hyperparameters.Note that here is the constant, and the effective learning rate is given by . The values of depend on the parametrization of choice. For Depth-P, we have , and for standard parametrization, we have .In standard parametrization, there is generally no rule to scale the learning rate with depth, and the optimal learning rate is typically found by grid search. Here, we assume that in standard parametrization, the learning rate is scaled by to preserve faithfulness. In our experiments, we assume base depth , meaning that we replace by in the parametrization above.
In Figure 10, we show the training loss versus learning rate for depths , for . For Depth-P, a convergence pattern can be observed for the optimal learning rate as depth grows. Optimal learning rates for small depths (e.g. ) exhibit a mild shift which should be expected, as our theory shows convergence in the large depth limit. However, starting from depth , the optimal learning rate is concentrated around . For parametrization that only scales the multiplier but not LR (, ), we observe the optimal learning rate shifts significantly. For standard parametrization without any depth scaling (), the optimal learning rate exhibits a more significant shift as depth grows. Moreover, even if one picks the optimal learning rate for each depth, the performance still degrades when the depth is very large, suggesting that standard parametrization is not suitable for depth scaling. Additional figures with multiple time slices are provided in Appendix G.
In Section 5, we explained when and why hyperparameter transfer occurs. Precisely, to obtain HP transfer, one needs to classify all feature learning limits and choose the optimal one. We introduced the notion of feature diversity and showed that Depth-P is optimal in the sense that it maximizes feature diversity. To show that optimality is needed for HP transfer, we train a resnet with which is also a feature learning limit. Figure 11 shows that in this case the learning rate exhibits a significant shift with depth. Interestingly, the constant in this case seems to increase with depth, suggesting that the network is trying to break from the ODE limit, which is sub-optimal. Note that in Figure 10, with Depth-P we obtain better training loss compared to the ODE parametrization in Figure 11.
Our theory considers only Mean Substraction (MS), and Figure 10 shows the results with MS. To see wether LN affects HP transfer, we train resnets with the same setup as Figure 10 with absolute value non-linearity and LN applied to before matrix multiplication with (preLN). We keep MS after non-linearity although it can be removed since LN is applied in the next layer. Our results, reported in Figure 12 suggest that Depth-P guarantees learning rate transfer with LN as well.
In Figure 13, we investigate the stability of the hyperparameter in Depth-P as depth increases. The results suggest that the optimal value of this constant converges as depth grows, which suggest transferability. Additional experiments with multiple time slices are provided in Appendix G.
3 What Happens in a Transformer?
Because transformers have block depth 2, as discussed in section 9, we have plenty of reasons to suspect that no parametrization of (learning rate, block multiplier) will be able to robustly transfer hyperparameters across depth for transformers.
Here we do a large scale experiment using Megatron trained on Common Crawl and catalogue our observations.We train the models for 3900 steps, using cosine decay schedule with 500 warmup steps. We use a sequence length of 4096, batch size 256, resulting in approximately 4B tokens per training run. In summary, in our particular setup (which should be close to most large language model pretraining), we see that the scaling seems to transfer hyperparameters at the end of training (LABEL:{fig:megatron-scaling-shifts}(Right)). However, we also see that 1) deeper does worse in initial training (LABEL:{fig:megatron-deeper-worse}(Left)), and 2) optimal hyperparameters scale like in the middle of training (Figure 16(Left)). Combined with the theoretical insights of Section 9, this leads us to conclude that while the scaling can potentially be practically useful in transformer training, it is likely to be brittle to architectural and algorithmic changes, or even simple things like training time.
In fact, we observe that transformers are insensitive to the block multiplier (Figure 14), so that the only relevant hyperparameter is really just learning rate. Thus, empirically measuring the scaling trend of the optimal learning rate, as done in modern large scale pretraining, can be a practically more robust way to transfer hyperparameters.
Here is the number of transformer layers, each of which consists of an attention layer and an MLP layer (each of which has depth 2).
4 Feature Diversity
In this section, we empirically verify our claims about feature diversity exponent (Claims 7.4 and 7.5). We use the same setup as in the last section, i.e., we train deep residual networks of width on CIFAR-10 dataset with Adam and batch size . In Figure 17, we compare two parametrizations, Depth-P () and the ODE parametrization . We measure at for the two parametrizations and varying depth. For each parametrization and depth , we rescale function by multiplying a constant such that , and then plot the rescaled function for a clean presentation. One can observe clearly that Depth-P has feature diversity exponent (almost) for any , while the curves for ODE parametrization move from to when grows. This exactly fits our theory that Depth-P maximizes the feature diversity, while other parametrizations (even with feature learning) have smaller feature diversity exponents that should go to in the infinite depth limit.
In Figure 18, we measure at , and rescale it by dividing additional and a constant such that , and then plot the rescaled function for a clean comparison between and . We observe that for both Depth-P and ODE parametrization, the slopes of the curves grow along with and . The growth along can be explained by the cumulative correlation between layers. The growth along for ODE parametrization is because the independent components between nearby layers decrease when grows. We do not have a clear understanding for the growth along for Depth-P and we leave it as a future work.
In Figure 19, we plot the same curves as in Figure 18 but comparing ReLU activation and absolute value activation under Depth-P. We observe that the slope of the curves for absolute value activation is smaller than ReLU activation. It matches our theory that absolute value activation increases feature diversity.
Acknowledgement
We thank Huishuai Zhang, Jeremy Bernstein, Edward Hu, Michael Santacroce, Lucas Liu for their helpful comments and discussion. D. Yu was supported by NSF and ONR. Part of this work was done during D. Yu’s internship at Microsoft.
Author Contributions
GY developed the core theory and ran experiments in early part of the exploratory stage and most experiments in the final draft. DY worked on and proved key claims for linear resnets (including the limiting equations, convergence, and classification of parametrization), drafted the very first version of the paper, and ran experiments verifying the theoretical claims (including the convergence of linear case and feature diversity separation). CZ ran experiments in later part of the exploratory stage. They revealed the viability of Depth-P in the block depth 1 case, in contrast to the general block depth case. CZ also ran the Megatron experiments in the final version of the paper. SH contributed to brainstorming since the beginning of the project, wrote the warm-up section on linear networks, formalized the notion of feature diversity exponent, and helped transforming experimental results into plots and visualizations.
References
Appendix A Notations
This section provides an introduction to the new TP notations from . We only require the definition of the inner and outer products in this paper.
A.1 The Tensor Program Ansatz: Representing Vectors via Random Variables
From the Tensor Programs framework , we know that as width becomes large, the entries of the (pre-)activation vectors and their gradients will become roughly iid, both at initialization and training. Hence any such vector’s behavior can be tracked via a random variable that reflects the distribution of its entries. While we call this the “Tensor Program Ansatz”, it is a completely rigorous calculus.
Because we will often need to multiply a ket with a diagonal matrix, we introduce a shorthand:
if is and is a -dimensional vector.
A.1.2 Outer Product
Likewise, if both and have shape , the expression
which corresponds to the limit of . This definition of \mathchoice{\scalebox{0.7}[1.0]{\displaystyle\talloblong}}{\scalebox{0.7}[1.0]{\textstyle\talloblong}}{\scalebox{0.7}[1.0]{\scriptstyle\talloblong}}{\scalebox{0.7}[1.0]{\scriptscriptstyle\talloblong}}\bm{x}\rangle\langle\bm{y}\mathchoice{\scalebox{0.7}[1.0]{\displaystyle\talloblong}}{\scalebox{0.7}[1.0]{\textstyle\talloblong}}{\scalebox{0.7}[1.0]{\scriptstyle\talloblong}}{\scalebox{0.7}[1.0]{\scriptscriptstyle\talloblong}} makes the expressions
unambiguous (since any way of ordering the operations give the same answer).
A.1.3 Nonlinear Outer Product
where \left(\mathchoice{\scalebox{0.7}[1.0]{\displaystyle\talloblong}}{\scalebox{0.7}[1.0]{\textstyle\talloblong}}{\scalebox{0.7}[1.0]{\scriptstyle\talloblong}}{\scalebox{0.7}[1.0]{\scriptscriptstyle\talloblong}}y^{1}\rangle^{\mathord{\mathchoice{\kern 1.0pt\framebox{\displaystyle 1}\kern 1.0pt}{\kern 1.0pt\framebox{\textstyle 1}\kern 1.0pt}{\kern 0.7pt\framebox{\scriptstyle 1}\kern 0.7pt}{\kern 0.5pt\framebox{\scriptscriptstyle 1}\kern 0.5pt}}},\ldots,\mathchoice{\scalebox{0.7}[1.0]{\displaystyle\talloblong}}{\scalebox{0.7}[1.0]{\textstyle\talloblong}}{\scalebox{0.7}[1.0]{\scriptstyle\talloblong}}{\scalebox{0.7}[1.0]{\scriptscriptstyle\talloblong}}y^{k}\rangle^{\mathord{\mathchoice{\kern 1.0pt\framebox{\displaystyle 1}\kern 1.0pt}{\kern 1.0pt\framebox{\textstyle 1}\kern 1.0pt}{\kern 0.7pt\framebox{\scriptstyle 1}\kern 0.7pt}{\kern 0.5pt\framebox{\scriptscriptstyle 1}\kern 0.5pt}}},\mathchoice{\scalebox{0.7}[1.0]{\displaystyle\talloblong}}{\scalebox{0.7}[1.0]{\textstyle\talloblong}}{\scalebox{0.7}[1.0]{\scriptstyle\talloblong}}{\scalebox{0.7}[1.0]{\scriptscriptstyle\talloblong}}\bm{z}\rangle^{\mathord{\mathchoice{\kern 1.0pt\framebox{\displaystyle 1}\kern 1.0pt}{\kern 1.0pt\framebox{\textstyle 1}\kern 1.0pt}{\kern 0.7pt\framebox{\scriptstyle 1}\kern 0.7pt}{\kern 0.5pt\framebox{\scriptscriptstyle 1}\kern 0.5pt}}}\right) is an iid copy of \left(\mathchoice{\scalebox{0.7}[1.0]{\displaystyle\talloblong}}{\scalebox{0.7}[1.0]{\textstyle\talloblong}}{\scalebox{0.7}[1.0]{\scriptstyle\talloblong}}{\scalebox{0.7}[1.0]{\scriptscriptstyle\talloblong}}y^{1}\rangle,\ldots,\mathchoice{\scalebox{0.7}[1.0]{\displaystyle\talloblong}}{\scalebox{0.7}[1.0]{\textstyle\talloblong}}{\scalebox{0.7}[1.0]{\scriptstyle\talloblong}}{\scalebox{0.7}[1.0]{\scriptscriptstyle\talloblong}}y^{k}\rangle,\mathchoice{\scalebox{0.7}[1.0]{\displaystyle\talloblong}}{\scalebox{0.7}[1.0]{\textstyle\talloblong}}{\scalebox{0.7}[1.0]{\scriptstyle\talloblong}}{\scalebox{0.7}[1.0]{\scriptscriptstyle\talloblong}}\bm{z}\rangle\right) independent from \mathchoice{\scalebox{0.7}[1.0]{\displaystyle\talloblong}}{\scalebox{0.7}[1.0]{\textstyle\talloblong}}{\scalebox{0.7}[1.0]{\scriptstyle\talloblong}}{\scalebox{0.7}[1.0]{\scriptscriptstyle\talloblong}}\bm{x}\rangle and the expectation is taken only over the former. This is just like, in the finite case,
where denotes outer product of vectors and expectation is taken over everything.
Note \phi(\mathchoice{\scalebox{0.7}[1.0]{\displaystyle\talloblong}}{\scalebox{0.7}[1.0]{\textstyle\talloblong}}{\scalebox{0.7}[1.0]{\scriptstyle\talloblong}}{\scalebox{0.7}[1.0]{\scriptscriptstyle\talloblong}}\bm{x}\rangle\langle\bm{y}\mathchoice{\scalebox{0.7}[1.0]{\displaystyle\talloblong}}{\scalebox{0.7}[1.0]{\textstyle\talloblong}}{\scalebox{0.7}[1.0]{\scriptstyle\talloblong}}{\scalebox{0.7}[1.0]{\scriptscriptstyle\talloblong}}) is not the image of the operator \mathchoice{\scalebox{0.7}[1.0]{\displaystyle\talloblong}}{\scalebox{0.7}[1.0]{\textstyle\talloblong}}{\scalebox{0.7}[1.0]{\scriptstyle\talloblong}}{\scalebox{0.7}[1.0]{\scriptscriptstyle\talloblong}}\bm{x}\rangle\langle\bm{y}\mathchoice{\scalebox{0.7}[1.0]{\displaystyle\talloblong}}{\scalebox{0.7}[1.0]{\textstyle\talloblong}}{\scalebox{0.7}[1.0]{\scriptstyle\talloblong}}{\scalebox{0.7}[1.0]{\scriptscriptstyle\talloblong}} under in the continuous function calculus of operators, but rather a “coordinatewise application” of . For example, if , then \phi(\mathchoice{\scalebox{0.7}[1.0]{\displaystyle\talloblong}}{\scalebox{0.7}[1.0]{\textstyle\talloblong}}{\scalebox{0.7}[1.0]{\scriptstyle\talloblong}}{\scalebox{0.7}[1.0]{\scriptscriptstyle\talloblong}}x\rangle\langle y\mathchoice{\scalebox{0.7}[1.0]{\displaystyle\talloblong}}{\scalebox{0.7}[1.0]{\textstyle\talloblong}}{\scalebox{0.7}[1.0]{\scriptstyle\talloblong}}{\scalebox{0.7}[1.0]{\scriptscriptstyle\talloblong}}) is not \mathchoice{\scalebox{0.7}[1.0]{\displaystyle\talloblong}}{\scalebox{0.7}[1.0]{\textstyle\talloblong}}{\scalebox{0.7}[1.0]{\scriptstyle\talloblong}}{\scalebox{0.7}[1.0]{\scriptscriptstyle\talloblong}}x\rangle\langle y\mathchoice{\scalebox{0.7}[1.0]{\displaystyle\talloblong}}{\scalebox{0.7}[1.0]{\textstyle\talloblong}}{\scalebox{0.7}[1.0]{\scriptstyle\talloblong}}{\scalebox{0.7}[1.0]{\scriptscriptstyle\talloblong}}x\rangle\langle y\mathchoice{\scalebox{0.7}[1.0]{\displaystyle\talloblong}}{\scalebox{0.7}[1.0]{\textstyle\talloblong}}{\scalebox{0.7}[1.0]{\scriptstyle\talloblong}}{\scalebox{0.7}[1.0]{\scriptscriptstyle\talloblong}}, the latter being what typically “squaring an operator” means, but rather \mathchoice{\scalebox{0.7}[1.0]{\displaystyle\talloblong}}{\scalebox{0.7}[1.0]{\textstyle\talloblong}}{\scalebox{0.7}[1.0]{\scriptstyle\talloblong}}{\scalebox{0.7}[1.0]{\scriptscriptstyle\talloblong}}x\rangle^{2}\langle y\mathchoice{\scalebox{0.7}[1.0]{\displaystyle\talloblong}}{\scalebox{0.7}[1.0]{\textstyle\talloblong}}{\scalebox{0.7}[1.0]{\scriptstyle\talloblong}}{\scalebox{0.7}[1.0]{\scriptscriptstyle\talloblong}}^{2}=\mathchoice{\scalebox{0.7}[1.0]{\displaystyle\talloblong}}{\scalebox{0.7}[1.0]{\textstyle\talloblong}}{\scalebox{0.7}[1.0]{\scriptstyle\talloblong}}{\scalebox{0.7}[1.0]{\scriptscriptstyle\talloblong}}x\odot x\rangle\langle y\odot y\mathchoice{\scalebox{0.7}[1.0]{\displaystyle\talloblong}}{\scalebox{0.7}[1.0]{\textstyle\talloblong}}{\scalebox{0.7}[1.0]{\scriptstyle\talloblong}}{\scalebox{0.7}[1.0]{\scriptscriptstyle\talloblong}}.
For readers familiar with the Tensor Programs papers, this new “bra-ket” notation (aka Dirac notation) relates to the old notation by
Appendix B Infinite-Width Limit with the Bra-ket notation
As before, when the width of the program goes to infinity, one can infer how the program behaves via a calculus of random variables. We define them below via the new ket notation instead of the earlier notation.
We recursively define the random variable \mathchoice{\scalebox{0.7}[1.0]{\displaystyle\talloblong}}{\scalebox{0.7}[1.0]{\textstyle\talloblong}}{\scalebox{0.7}[1.0]{\scriptstyle\talloblong}}{\scalebox{0.7}[1.0]{\scriptscriptstyle\talloblong}}x\rangle (called a ket) for each vector and deterministic number for each scalar in the program. For a vector in the program, we also define random variables \mathchoice{\scalebox{0.7}[1.0]{\displaystyle\talloblong}}{\scalebox{0.7}[1.0]{\textstyle\talloblong}}{\scalebox{0.7}[1.0]{\scriptstyle\talloblong}}{\scalebox{0.7}[1.0]{\scriptscriptstyle\talloblong}}Wx\widehat{\rangle\mkern-3.0mu}\mkern 3.0mu and \mathchoice{\scalebox{0.7}[1.0]{\displaystyle\talloblong}}{\scalebox{0.7}[1.0]{\textstyle\talloblong}}{\scalebox{0.7}[1.0]{\scriptstyle\talloblong}}{\scalebox{0.7}[1.0]{\scriptscriptstyle\talloblong}}Wx\dot{\rangle\mkern-3.0mu}\mkern 3.0mu (called hat-ket and dot-ket respectively) such that \mathchoice{\scalebox{0.7}[1.0]{\displaystyle\talloblong}}{\scalebox{0.7}[1.0]{\textstyle\talloblong}}{\scalebox{0.7}[1.0]{\scriptstyle\talloblong}}{\scalebox{0.7}[1.0]{\scriptscriptstyle\talloblong}}Wx\rangle=\mathchoice{\scalebox{0.7}[1.0]{\displaystyle\talloblong}}{\scalebox{0.7}[1.0]{\textstyle\talloblong}}{\scalebox{0.7}[1.0]{\scriptstyle\talloblong}}{\scalebox{0.7}[1.0]{\scriptscriptstyle\talloblong}}Wx\widehat{\rangle\mkern-3.0mu}\mkern 3.0mu+\mathchoice{\scalebox{0.7}[1.0]{\displaystyle\talloblong}}{\scalebox{0.7}[1.0]{\textstyle\talloblong}}{\scalebox{0.7}[1.0]{\scriptstyle\talloblong}}{\scalebox{0.7}[1.0]{\scriptscriptstyle\talloblong}}Wx\dot{\rangle\mkern-3.0mu}\mkern 3.0mu. These are the same as and in the old TP notation and they satisfy
Every dot-ket is a linear combination of previous kets, expressed by the following equation
eq. 9 is the same equation as in[25, Zdot] but formulated much more succinctly in the bra-ket notation:
There is an alternative notion for \mathchoice{\scalebox{0.7}[1.0]{\displaystyle\talloblong}}{\scalebox{0.7}[1.0]{\textstyle\talloblong}}{\scalebox{0.7}[1.0]{\scriptstyle\talloblong}}{\scalebox{0.7}[1.0]{\scriptscriptstyle\talloblong}}Wx\dot{\rangle\mkern-3.0mu}\mkern 3.0mu in Yang and Littwin that write
This is more convenient to write as we introduce the operator view.
We can see the ket \mathchoice{\scalebox{0.7}[1.0]{\displaystyle\talloblong}}{\scalebox{0.7}[1.0]{\textstyle\talloblong}}{\scalebox{0.7}[1.0]{\scriptstyle\talloblong}}{\scalebox{0.7}[1.0]{\scriptscriptstyle\talloblong}}Wx\rangle as the result of the action of an operator on the ket \mathchoice{\scalebox{0.7}[1.0]{\displaystyle\talloblong}}{\scalebox{0.7}[1.0]{\textstyle\talloblong}}{\scalebox{0.7}[1.0]{\scriptstyle\talloblong}}{\scalebox{0.7}[1.0]{\scriptscriptstyle\talloblong}}x\rangle.
Let be an initial matrix in a Tensor Program. We define \mathchoice{\scalebox{0.7}[1.0]{\displaystyle\talloblong}}{\scalebox{0.7}[1.0]{\textstyle\talloblong}}{\scalebox{0.7}[1.0]{\scriptstyle\talloblong}}{\scalebox{0.7}[1.0]{\scriptscriptstyle\talloblong}}W\mathchoice{\scalebox{0.7}[1.0]{\displaystyle\talloblong}}{\scalebox{0.7}[1.0]{\textstyle\talloblong}}{\scalebox{0.7}[1.0]{\scriptstyle\talloblong}}{\scalebox{0.7}[1.0]{\scriptscriptstyle\talloblong}},\widehat{\mathchoice{\scalebox{0.7}[1.0]{\displaystyle\talloblong}}{\scalebox{0.7}[1.0]{\textstyle\talloblong}}{\scalebox{0.7}[1.0]{\scriptstyle\talloblong}}{\scalebox{0.7}[1.0]{\scriptscriptstyle\talloblong}}}W\widehat{\mathchoice{\scalebox{0.7}[1.0]{\displaystyle\talloblong}}{\scalebox{0.7}[1.0]{\textstyle\talloblong}}{\scalebox{0.7}[1.0]{\scriptstyle\talloblong}}{\scalebox{0.7}[1.0]{\scriptscriptstyle\talloblong}}},\dot{\mathchoice{\scalebox{0.7}[1.0]{\displaystyle\talloblong}}{\scalebox{0.7}[1.0]{\textstyle\talloblong}}{\scalebox{0.7}[1.0]{\scriptstyle\talloblong}}{\scalebox{0.7}[1.0]{\scriptscriptstyle\talloblong}}}W\dot{\mathchoice{\scalebox{0.7}[1.0]{\displaystyle\talloblong}}{\scalebox{0.7}[1.0]{\textstyle\talloblong}}{\scalebox{0.7}[1.0]{\scriptstyle\talloblong}}{\scalebox{0.7}[1.0]{\scriptscriptstyle\talloblong}}} to be the linear operators on kets To be rigorous, we need to specify the “Hilbert space” of kets. This is somewhat pedantic and not crucial to the key points of this paper, but the Hilbert space can be constructed as follows: Let be the -algebra generated by the kets of the program . Let \Sigma(\pi)\mathrel{\raisebox{-1.29167pt}{\mathbin{\overset{\text{{def}}}{=}}}}\bigcup_{\pi^{\prime}\supseteq\pi}\sigma(\pi) be the union (more precisely, the direct limit) of over all programs extending . Then the Hilbert space in question is the space of random variables over the of our program. that act by
Any linear operator that is equal to \mathchoice{\scalebox{0.7}[1.0]{\displaystyle\talloblong}}{\scalebox{0.7}[1.0]{\textstyle\talloblong}}{\scalebox{0.7}[1.0]{\scriptstyle\talloblong}}{\scalebox{0.7}[1.0]{\scriptscriptstyle\talloblong}}W\mathchoice{\scalebox{0.7}[1.0]{\displaystyle\talloblong}}{\scalebox{0.7}[1.0]{\textstyle\talloblong}}{\scalebox{0.7}[1.0]{\scriptstyle\talloblong}}{\scalebox{0.7}[1.0]{\scriptscriptstyle\talloblong}} for some initial matrix is called an initial operator.
We also define the adjoint relations between the operators:
In the SGD case, the parameter update of is simple. With the operator notation and outer product notation, we can write
In this work, denotes change for one step, i.e.,
denotes total change, i.e.,
which we write succinctly \mathchoice{\scalebox{0.7}[1.0]{\displaystyle\talloblong}}{\scalebox{0.7}[1.0]{\textstyle\talloblong}}{\scalebox{0.7}[1.0]{\scriptstyle\talloblong}}{\scalebox{0.7}[1.0]{\scriptscriptstyle\talloblong}}\bar{\Delta}W_{t}^{l}\mathchoice{\scalebox{0.7}[1.0]{\displaystyle\talloblong}}{\scalebox{0.7}[1.0]{\textstyle\talloblong}}{\scalebox{0.7}[1.0]{\scriptstyle\talloblong}}{\scalebox{0.7}[1.0]{\scriptscriptstyle\talloblong}}=-\eta\mathchoice{\scalebox{0.7}[1.0]{\displaystyle\talloblong}}{\scalebox{0.7}[1.0]{\textstyle\talloblong}}{\scalebox{0.7}[1.0]{\scriptstyle\talloblong}}{\scalebox{0.7}[1.0]{\scriptscriptstyle\talloblong}}\widetilde{\delta}\bm{h}^{l}_{<t}\rangle{}_{\bm{\chi}}\langle\bm{x}^{l-1}_{<t}\mathchoice{\scalebox{0.7}[1.0]{\displaystyle\talloblong}}{\scalebox{0.7}[1.0]{\textstyle\talloblong}}{\scalebox{0.7}[1.0]{\scriptstyle\talloblong}}{\scalebox{0.7}[1.0]{\scriptscriptstyle\talloblong}}. (Compared to Yang and Littwin , and are changed from and because we want to use for gradients instead of , which is now used for depth differentiation).
For the rest of the paper, we write \mathchoice{\scalebox{0.7}[1.0]{\displaystyle\talloblong}}{\scalebox{0.7}[1.0]{\textstyle\talloblong}}{\scalebox{0.7}[1.0]{\scriptstyle\talloblong}}{\scalebox{0.7}[1.0]{\scriptscriptstyle\talloblong}}\bar{\Delta}W_{t}^{l}\mathchoice{\scalebox{0.7}[1.0]{\displaystyle\talloblong}}{\scalebox{0.7}[1.0]{\textstyle\talloblong}}{\scalebox{0.7}[1.0]{\scriptstyle\talloblong}}{\scalebox{0.7}[1.0]{\scriptscriptstyle\talloblong}}=-\eta\mathchoice{\scalebox{0.7}[1.0]{\displaystyle\talloblong}}{\scalebox{0.7}[1.0]{\textstyle\talloblong}}{\scalebox{0.7}[1.0]{\scriptstyle\talloblong}}{\scalebox{0.7}[1.0]{\scriptscriptstyle\talloblong}}\widetilde{\delta}\bm{h}^{l}_{<t}\rangle{}_{\bm{\chi}}\langle\bm{x}^{l-1}_{<t}\mathchoice{\scalebox{0.7}[1.0]{\displaystyle\talloblong}}{\scalebox{0.7}[1.0]{\textstyle\talloblong}}{\scalebox{0.7}[1.0]{\scriptstyle\talloblong}}{\scalebox{0.7}[1.0]{\scriptscriptstyle\talloblong}} for convenience. The generalization to eq. 10 follows Yang and Littwin .
Appendix C Details of the linear case
Here we provide a proof sketch of 4.2, the formal prove is implied by the existence of and in the infinite depth limit.
The claims can be reasoned by induction on and . Let us take \mathchoice{\scalebox{0.7}[1.0]{\displaystyle\talloblong}}{\scalebox{0.7}[1.0]{\textstyle\talloblong}}{\scalebox{0.7}[1.0]{\scriptstyle\talloblong}}{\scalebox{0.7}[1.0]{\scriptscriptstyle\talloblong}}x_{t}^{l}\rangle as an example, since \mathchoice{\scalebox{0.7}[1.0]{\displaystyle\talloblong}}{\scalebox{0.7}[1.0]{\textstyle\talloblong}}{\scalebox{0.7}[1.0]{\scriptstyle\talloblong}}{\scalebox{0.7}[1.0]{\scriptscriptstyle\talloblong}}\widetilde{\delta}x_{t}^{l-1}\rangle is symmetric with \mathchoice{\scalebox{0.7}[1.0]{\displaystyle\talloblong}}{\scalebox{0.7}[1.0]{\textstyle\talloblong}}{\scalebox{0.7}[1.0]{\scriptstyle\talloblong}}{\scalebox{0.7}[1.0]{\scriptscriptstyle\talloblong}}x_{t}^{l}\rangle. By expanding the definition of \mathchoice{\scalebox{0.7}[1.0]{\displaystyle\talloblong}}{\scalebox{0.7}[1.0]{\textstyle\talloblong}}{\scalebox{0.7}[1.0]{\scriptstyle\talloblong}}{\scalebox{0.7}[1.0]{\scriptscriptstyle\talloblong}}x_{t}^{l}\rangle, we have
Note by induction, \langle x_{s}^{l-1}\mathchoice{\scalebox{0.7}[1.0]{\displaystyle\talloblong}}{\scalebox{0.7}[1.0]{\textstyle\talloblong}}{\scalebox{0.7}[1.0]{\scriptstyle\talloblong}}{\scalebox{0.7}[1.0]{\scriptscriptstyle\talloblong}}x_{t}^{l-1}\rangle=\mathcal{O}(1) and \frac{\partial x_{t}^{l-1}}{\partial\mathchoice{\scalebox{0.7}[1.0]{\displaystyle\talloblong}}{\scalebox{0.7}[1.0]{\textstyle\talloblong}}{\scalebox{0.7}[1.0]{\scriptstyle\talloblong}}{\scalebox{0.7}[1.0]{\scriptscriptstyle\talloblong}}W_{0}^{l\top}\widetilde{\delta}x_{s}^{l}\widehat{\rangle\mkern-3.0mu}\mkern 3.0mu}=\mathcal{O}(1/\sqrt{L}), so
Then by unwinding \mathchoice{\scalebox{0.7}[1.0]{\displaystyle\talloblong}}{\scalebox{0.7}[1.0]{\textstyle\talloblong}}{\scalebox{0.7}[1.0]{\scriptstyle\talloblong}}{\scalebox{0.7}[1.0]{\scriptscriptstyle\talloblong}}\widetilde{\delta}x_{s^{\prime}}^{m^{\prime}}\rangle and noting that by induction, , \frac{\partial\mathchoice{\scalebox{0.7}[1.0]{\displaystyle\talloblong}}{\scalebox{0.7}[1.0]{\textstyle\talloblong}}{\scalebox{0.7}[1.0]{\scriptstyle\talloblong}}{\scalebox{0.7}[1.0]{\scriptscriptstyle\talloblong}}\widetilde{\delta}x_{s^{\prime}}^{m^{\prime}}\rangle}{\partial\mathchoice{\scalebox{0.7}[1.0]{\displaystyle\talloblong}}{\scalebox{0.7}[1.0]{\textstyle\talloblong}}{\scalebox{0.7}[1.0]{\scriptstyle\talloblong}}{\scalebox{0.7}[1.0]{\scriptscriptstyle\talloblong}}W_{0}^{m}x_{s}^{m-1}\widehat{\rangle\mkern-3.0mu}\mkern 3.0mu}=\mathcal{O}\left(\frac{1}{\sqrt{L}}\right), \frac{\partial\mathchoice{\scalebox{0.7}[1.0]{\displaystyle\talloblong}}{\scalebox{0.7}[1.0]{\textstyle\talloblong}}{\scalebox{0.7}[1.0]{\scriptstyle\talloblong}}{\scalebox{0.7}[1.0]{\scriptscriptstyle\talloblong}}\widetilde{\delta}x_{s^{\prime}}^{m^{\prime}}\rangle}{\partial\mathchoice{\scalebox{0.7}[1.0]{\displaystyle\talloblong}}{\scalebox{0.7}[1.0]{\textstyle\talloblong}}{\scalebox{0.7}[1.0]{\scriptstyle\talloblong}}{\scalebox{0.7}[1.0]{\scriptscriptstyle\talloblong}}W_{0}^{m\top}\widetilde{\delta}x_{s}^{m}\widehat{\rangle\mkern-3.0mu}\mkern 3.0mu}=\mathcal{O}\left(\frac{1}{\sqrt{L}}\right), \frac{\partial\mathchoice{\scalebox{0.7}[1.0]{\displaystyle\talloblong}}{\scalebox{0.7}[1.0]{\textstyle\talloblong}}{\scalebox{0.7}[1.0]{\scriptstyle\talloblong}}{\scalebox{0.7}[1.0]{\scriptscriptstyle\talloblong}}\widetilde{\delta}x_{s^{\prime}}^{m^{\prime}}\rangle}{\partial\mathchoice{\scalebox{0.7}[1.0]{\displaystyle\talloblong}}{\scalebox{0.7}[1.0]{\textstyle\talloblong}}{\scalebox{0.7}[1.0]{\scriptstyle\talloblong}}{\scalebox{0.7}[1.0]{\scriptscriptstyle\talloblong}}U\rangle}=\mathcal{O}\left(1\right), \frac{\partial\mathchoice{\scalebox{0.7}[1.0]{\displaystyle\talloblong}}{\scalebox{0.7}[1.0]{\textstyle\talloblong}}{\scalebox{0.7}[1.0]{\scriptstyle\talloblong}}{\scalebox{0.7}[1.0]{\scriptscriptstyle\talloblong}}\widetilde{\delta}x_{s^{\prime}}^{m^{\prime}}\rangle}{\partial\mathchoice{\scalebox{0.7}[1.0]{\displaystyle\talloblong}}{\scalebox{0.7}[1.0]{\textstyle\talloblong}}{\scalebox{0.7}[1.0]{\scriptstyle\talloblong}}{\scalebox{0.7}[1.0]{\scriptscriptstyle\talloblong}}nV\rangle}=\mathcal{O}\left(1\right), we have
Also by unwinding, \forall\mathchoice{\scalebox{0.7}[1.0]{\displaystyle\talloblong}}{\scalebox{0.7}[1.0]{\textstyle\talloblong}}{\scalebox{0.7}[1.0]{\scriptstyle\talloblong}}{\scalebox{0.7}[1.0]{\scriptscriptstyle\talloblong}}y\rangle\in\{\mathchoice{\scalebox{0.7}[1.0]{\displaystyle\talloblong}}{\scalebox{0.7}[1.0]{\textstyle\talloblong}}{\scalebox{0.7}[1.0]{\scriptstyle\talloblong}}{\scalebox{0.7}[1.0]{\scriptscriptstyle\talloblong}}x_{s}^{m}\rangle,\mathchoice{\scalebox{0.7}[1.0]{\displaystyle\talloblong}}{\scalebox{0.7}[1.0]{\textstyle\talloblong}}{\scalebox{0.7}[1.0]{\scriptstyle\talloblong}}{\scalebox{0.7}[1.0]{\scriptscriptstyle\talloblong}}\widetilde{\delta}x_{s}^{m}\rangle\},
C.2 Formal recursive formula of ΓΓ\Gamma and C𝐶C
By the same way of expanding \mathchoice{\scalebox{0.7}[1.0]{\displaystyle\talloblong}}{\scalebox{0.7}[1.0]{\textstyle\talloblong}}{\scalebox{0.7}[1.0]{\scriptstyle\talloblong}}{\scalebox{0.7}[1.0]{\scriptscriptstyle\talloblong}}x_{t}^{l}\rangle and \langle y\mathchoice{\scalebox{0.7}[1.0]{\displaystyle\talloblong}}{\scalebox{0.7}[1.0]{\textstyle\talloblong}}{\scalebox{0.7}[1.0]{\scriptstyle\talloblong}}{\scalebox{0.7}[1.0]{\scriptscriptstyle\talloblong}}x_{t}^{l}\rangle, we formally derive the recursive formula for and below.
can be computed recursively as follows:
,
For , , , , ,
,
,
For , , , , ,
The proof is straightforward from Program 1. The recursive nature of and yields the following infinite-depth behavior.
In the limit , we have :
, ,
The proof is by induction on . We will prove the following claims (A) (B) (C) (D) on given they are satisfied for any . For , (A) (B) (C) (D) are trivial.
,
, .
is -Lipschitz w.r.t. , and is -Lipschitz w.r.t. .
, .
(A) indicates that and converge. We only care about because will never be used, and is known: for ,
In the following subsections, we will prove inductively on increasing order of all and , and increasing order of that ,
;
For , ;
;
;
;
;
where , , , , .
Similar bounds also apply to and by induction on decreasing order of .
Combining both backward pass and forward pass at time shows (A)(B)(C)(D) also hold for with a larger (but constant) . Thus, (A)(B)(C)(D) hold for any constant by induction on training steps.
𝑝2𝐿\Gamma^{L}_{t,s,0,1}(p,p+\frac{2}{L}) and Assume ( is trivial), let , note that since , so for ,
Again assume ( is trivial because ), since , we can bound :
When , it is trivial. When , it is also trivial by Lipschitz w.r.t. , which results
we compare it with expanded based on its previous two steps
In order to bridge the two above, namely matching the inputs for and , we need a middle term
Now we can bound , and separately, which add up to be the bound for .
In sum, as ,
𝑝1𝐿C_{t,s,0}(p+\frac{1}{L}) in forward pass (Proof for C1, B1, A1) Now consider . By expanding
Since and are bounded and Lipschitz,
Since , we bound as:
we will prove that for ,
Then by (C1), for ,
Suppose , we compare and . Intuitively, both of them are , and their difference is . In particular, both of them can be written into four parts:
and where is defined in the same way as but with and instead of and . Next we bound one by one:
The only hard part to bound in is
Bounding is similar to , where we first bound
For , we first simplify
For , we use
which is used in . Finally,
Therefore, since ,
Appendix D Classification of Depthwise Parametrizations in Linear Case
We discuss the classification results on the linear residual networks with SGD training and give rigorous proofs for the claims in this simplified setting. Recall the linear residual networks:
where , and the effective learning rate of is . Without loss of generality, we assume .
Since \mathchoice{\scalebox{0.7}[1.0]{\displaystyle\talloblong}}{\scalebox{0.7}[1.0]{\textstyle\talloblong}}{\scalebox{0.7}[1.0]{\scriptstyle\talloblong}}{\scalebox{0.7}[1.0]{\scriptscriptstyle\talloblong}}x_{0}^{l-1}\rangle is independent from \mathchoice{\scalebox{0.7}[1.0]{\displaystyle\talloblong}}{\scalebox{0.7}[1.0]{\textstyle\talloblong}}{\scalebox{0.7}[1.0]{\scriptstyle\talloblong}}{\scalebox{0.7}[1.0]{\scriptscriptstyle\talloblong}}W_{0}^{l}x_{0}^{l-1}\widehat{\rangle\mkern-3.0mu}\mkern 3.0mu, we have
Therefore, \langle x_{0}^{L}\mathchoice{\scalebox{0.7}[1.0]{\displaystyle\talloblong}}{\scalebox{0.7}[1.0]{\textstyle\talloblong}}{\scalebox{0.7}[1.0]{\scriptstyle\talloblong}}{\scalebox{0.7}[1.0]{\scriptscriptstyle\talloblong}}x_{0}^{L}\rangle=\Theta(1) iff , otherwise explodes with large .
A similar argument stands for and . Therefore, we have proved Claim 7.1.
Similarly, we can get the stability of the first backward pass, i.e., for . Given , we can also settle the size of that
D.2 After the first step of gradient update
Now we look at the second forward pass, and assume the input is the same, i.e., \mathchoice{\scalebox{0.7}[1.0]{\displaystyle\talloblong}}{\scalebox{0.7}[1.0]{\textstyle\talloblong}}{\scalebox{0.7}[1.0]{\scriptstyle\talloblong}}{\scalebox{0.7}[1.0]{\scriptscriptstyle\talloblong}}x_{1}^{0}\rangle=\mathchoice{\scalebox{0.7}[1.0]{\displaystyle\talloblong}}{\scalebox{0.7}[1.0]{\textstyle\talloblong}}{\scalebox{0.7}[1.0]{\scriptstyle\talloblong}}{\scalebox{0.7}[1.0]{\scriptscriptstyle\talloblong}}x_{0}^{0}\rangle, we have
Now we write b^{l}=L^{\gamma}\frac{\partial\mathchoice{\scalebox{0.7}[1.0]{\displaystyle\talloblong}}{\scalebox{0.7}[1.0]{\textstyle\talloblong}}{\scalebox{0.7}[1.0]{\scriptstyle\talloblong}}{\scalebox{0.7}[1.0]{\scriptscriptstyle\talloblong}}x_{1}^{l-1}\rangle}{\partial\mathchoice{\scalebox{0.7}[1.0]{\displaystyle\talloblong}}{\scalebox{0.7}[1.0]{\textstyle\talloblong}}{\scalebox{0.7}[1.0]{\scriptstyle\talloblong}}{\scalebox{0.7}[1.0]{\scriptscriptstyle\talloblong}}W_{0}^{l\top}\widetilde{\delta}x_{0}^{l}\widehat{\rangle\mkern-3.0mu}\mkern 3.0mu} and c^{l}=-\langle x_{0}^{l-1}\mathchoice{\scalebox{0.7}[1.0]{\displaystyle\talloblong}}{\scalebox{0.7}[1.0]{\textstyle\talloblong}}{\scalebox{0.7}[1.0]{\scriptstyle\talloblong}}{\scalebox{0.7}[1.0]{\scriptscriptstyle\talloblong}}x_{1}^{l-1}\rangle, then
By expanding \mathchoice{\scalebox{0.7}[1.0]{\displaystyle\talloblong}}{\scalebox{0.7}[1.0]{\textstyle\talloblong}}{\scalebox{0.7}[1.0]{\scriptstyle\talloblong}}{\scalebox{0.7}[1.0]{\scriptscriptstyle\talloblong}}\widetilde{\delta}x_{0}^{l-1}\rangle=\mathchoice{\scalebox{0.7}[1.0]{\displaystyle\talloblong}}{\scalebox{0.7}[1.0]{\textstyle\talloblong}}{\scalebox{0.7}[1.0]{\scriptstyle\talloblong}}{\scalebox{0.7}[1.0]{\scriptscriptstyle\talloblong}}\widetilde{\delta}x_{0}^{l}\rangle+L^{-\alpha}\mathchoice{\scalebox{0.7}[1.0]{\displaystyle\talloblong}}{\scalebox{0.7}[1.0]{\textstyle\talloblong}}{\scalebox{0.7}[1.0]{\scriptstyle\talloblong}}{\scalebox{0.7}[1.0]{\scriptscriptstyle\talloblong}}W_{0}^{l\top}\widetilde{\delta}x_{t}^{l}\widehat{\rangle\mkern-3.0mu}\mkern 3.0mu=\mathchoice{\scalebox{0.7}[1.0]{\displaystyle\talloblong}}{\scalebox{0.7}[1.0]{\textstyle\talloblong}}{\scalebox{0.7}[1.0]{\scriptstyle\talloblong}}{\scalebox{0.7}[1.0]{\scriptscriptstyle\talloblong}}\widetilde{\delta}x_{0}^{L}\rangle+\sum_{m=l}^{L}L^{-\alpha}\mathchoice{\scalebox{0.7}[1.0]{\displaystyle\talloblong}}{\scalebox{0.7}[1.0]{\textstyle\talloblong}}{\scalebox{0.7}[1.0]{\scriptstyle\talloblong}}{\scalebox{0.7}[1.0]{\scriptscriptstyle\talloblong}}W_{0}^{m\top}\widetilde{\delta}x_{t}^{m}\widehat{\rangle\mkern-3.0mu}\mkern 3.0mu, we have
Note the four terms in eq. 11 are independent of each other.
Now it is easy to compute because only the first two terms in eq. 11 have correlation with :
with . For , we have the following recursive formula:
Finally, we can reason about the (note , so ), which indicates whether the parametrization is stable during the first stepWe need and for stability, but they are similar to ., and whether the parametrization is nontrivial for the first step:
Therefore, we have proved Claim 7.2 that the parametrization is stable during training iff , and is nontrivial iff .
Although there is no activation in the linear case, we still prove Claim 7.3 to enlighten the proof of the general case.
At the initialization, and have the same size, therefore, faithfulness is equivalent to stability, which means it happens iff .
During training, we can expand \mathchoice{\scalebox{0.7}[1.0]{\displaystyle\talloblong}}{\scalebox{0.7}[1.0]{\textstyle\talloblong}}{\scalebox{0.7}[1.0]{\scriptstyle\talloblong}}{\scalebox{0.7}[1.0]{\scriptscriptstyle\talloblong}}h_{1}^{l}\rangle in a similar way to eq. 11 as
Therefore, it is faithful iff . It is equivalent to because we have .
To simplify the analysis, we assume that is always an integer. We first expand
With , it is clear that the first term is , the second term has size , and the third term has size . Therefore, there are only two cases here: if , the overall size is ; if , the first and the third term vanish as , so the overall size is . In sum, we have proved Claims 7.4 and 7.5.
Claim 7.6 is trivial in this simplified setting because layerwise linearization is always true for linear nets. To enlighten the proof of the general case, we recap that \mathchoice{\scalebox{0.7}[1.0]{\displaystyle\talloblong}}{\scalebox{0.7}[1.0]{\textstyle\talloblong}}{\scalebox{0.7}[1.0]{\scriptstyle\talloblong}}{\scalebox{0.7}[1.0]{\scriptscriptstyle\talloblong}}\Delta W_{1}^{l}\mathchoice{\scalebox{0.7}[1.0]{\displaystyle\talloblong}}{\scalebox{0.7}[1.0]{\textstyle\talloblong}}{\scalebox{0.7}[1.0]{\scriptstyle\talloblong}}{\scalebox{0.7}[1.0]{\scriptscriptstyle\talloblong}}x_{1}^{l-1}\rangle=L^{-\gamma}c^{l}\mathchoice{\scalebox{0.7}[1.0]{\displaystyle\talloblong}}{\scalebox{0.7}[1.0]{\textstyle\talloblong}}{\scalebox{0.7}[1.0]{\scriptstyle\talloblong}}{\scalebox{0.7}[1.0]{\scriptscriptstyle\talloblong}}\widetilde{\delta}x_{0}^{l}\rangle=\Theta(L^{-\gamma}), which is much smaller than \mathchoice{\scalebox{0.7}[1.0]{\displaystyle\talloblong}}{\scalebox{0.7}[1.0]{\textstyle\talloblong}}{\scalebox{0.7}[1.0]{\scriptstyle\talloblong}}{\scalebox{0.7}[1.0]{\scriptscriptstyle\talloblong}}W_{0}^{l}x_{1}^{l-1}\rangle=\Theta(1) when . If there were an activation function, the linearization would bring an error of in , which means an error of to .
D.3 Beyond one step
The argument above is in general tracking the derivatives and covariance, in other words, and in the Depth-P case.
Now we generalize Lemma 4.3, and obtain the following recursion for and
where if , and if .
Then all the claims can be reasoned by tracking the order of and .
𝛼𝛾1\alpha+\gamma=1 and . The parametrizations with and are all nontrivial, stable, and faithful. However, there is a large gap between (Depth-P) and in terms of the difficulty of tracking and . For , we can see that , and for . In this case, we can simplify the recursion by ignoring with :
where if , and if . Note is simplified to a function that only depends on because is constant when fixing .
This simplification means the randomness in any does not have an effect on the dynamics in the infinite depth limit — the complicated functional integrals for in 4.4 are simplified to be ODEs when . This ODE dynamic also directly implies that the feature diversity exponent is 0 for .
Appendix E Nonlinear Depth-μ𝜇\muP Limit
When the nonlinearity is nontrivial, the distribution of the final representations may be highly non-Gaussian because of complex compositions of and , as one would suspect from known examples of large width limits. This is indeed the case for finite depth . But in fact, when , becomes a Gaussian process again!
The kernel of the limiting GP can be computed in a similar way as in the linear case:
where .
For sufficiently smooth nonlinearity , in the limit, the kets \mathchoice{\scalebox{0.7}[1.0]{\displaystyle\talloblong}}{\scalebox{0.7}[1.0]{\textstyle\talloblong}}{\scalebox{0.7}[1.0]{\scriptstyle\talloblong}}{\scalebox{0.7}[1.0]{\scriptscriptstyle\talloblong}}x^{L}_{s}\rangle,s=0,1,\ldots, converge in distribution as a zero-mean Gaussian process with kernel
as defined in Definition E.1. Thus, for each fixed neuron index , the collection converges in distribution to a zero-mean Gaussian process with kernel in the then limit.
We frame this as a claim because we do not want to get into the details of what “sufficiently smooth nonlinearity” means here, nor do we give a proof. Instead, we give an intuitive justification.
First, in Depth-P, we can Taylor expand each block
In this reasoning, the coefficients of a good linear combination correspond to in Definition E.1, and filling in the details of the induction yields the recursive formula in Definition E.1.
Finally, because a good linear combination is a large sum of independent terms, the central limit theorem tells us that \{\mathchoice{\scalebox{0.7}[1.0]{\displaystyle\talloblong}}{\scalebox{0.7}[1.0]{\textstyle\talloblong}}{\scalebox{0.7}[1.0]{\scriptstyle\talloblong}}{\scalebox{0.7}[1.0]{\scriptscriptstyle\talloblong}}x^{l}_{t}\rangle,\mathchoice{\scalebox{0.7}[1.0]{\displaystyle\talloblong}}{\scalebox{0.7}[1.0]{\textstyle\talloblong}}{\scalebox{0.7}[1.0]{\scriptstyle\talloblong}}{\scalebox{0.7}[1.0]{\scriptscriptstyle\talloblong}}\delta x^{l}_{t}\rangle\}_{l,t} converge in distribution to a Gaussian process. ∎
Claim E.1 is good news for theorists, that we have such a simple form for a fundamental architecture. At the same time, one may worry that this Gaussian form lacks expressivity. But in fact, some common architecture or algorithm choices would make the limit non-Gaussian. For example, the use of adaptive optimizers like Adam or SignSGD. Or the addition of a nonlinearity before the matrix multiply, i.e., “prenonlin”, (in addition to the one afterward, “postnonlin”).
In general, one obtains a stochastic differential equation with McKean-Vlasov elements describing the evolution of over depth and time. However, the stochastic integral involved is not the usual Ito or Stratonovich integral because the depthwise evolution requires integrating non-adapted process against Brownian motion. Instead, we need to use Skorohod integral and the SDE is only defined in the sense of Malliavin calculus. This is not just a mathematical nitpick; rather, assuming Ito calculus (which amounts to assuming incorrect independence between certain quantities) will lead to the wrong predictions and calculations. Malliavin calculus is intimately connected to Tensor Programs and we shall develop their relationship as well as the theory of the general infinite-depth limit in a future work.
Appendix F Heuristics for the proofs in the general case
The notation in this section is mostly defined in appendix A. The complete notation is defined in .
where coordinatewise, coordinatewise and coordinate-wise.
Similar to the linear case, one can show that under technical conditions (mostly on the activation function) that the infinite-depth limit of the TP follows the dynamics
where refers to the fractional layer index ( represents layer index as ), refers to the training step, \mathchoice{\scalebox{0.7}[1.0]{\displaystyle\talloblong}}{\scalebox{0.7}[1.0]{\textstyle\talloblong}}{\scalebox{0.7}[1.0]{\scriptstyle\talloblong}}{\scalebox{0.7}[1.0]{\scriptscriptstyle\talloblong}}W_{0}^{\lambda}\mathchoice{\scalebox{0.7}[1.0]{\displaystyle\talloblong}}{\scalebox{0.7}[1.0]{\textstyle\talloblong}}{\scalebox{0.7}[1.0]{\scriptstyle\talloblong}}{\scalebox{0.7}[1.0]{\scriptscriptstyle\talloblong}} the matrix operator (defined in Appendix B), and the tilde symbol refers to the “normalized” version of the object, i.e., multiply the ket with for some such that the multiplication (normalized ket) is w.r.t. , and same for the normalized operators. We also simplify to if it is already under wider tilde symbol. The first term represents a Gaussian noise.
Similar to the forward prop, we obtain the following dynamics for the infinite-depth TP
Here the term got dropped. The individual terms can be simplified as follows
where the other terms from the product rule drops out because
F.2 1/L1𝐿1/L branches
where the equality follows because \mathchoice{\scalebox{0.7}[1.0]{\displaystyle\talloblong}}{\scalebox{0.7}[1.0]{\textstyle\talloblong}}{\scalebox{0.7}[1.0]{\scriptstyle\talloblong}}{\scalebox{0.7}[1.0]{\scriptscriptstyle\talloblong}}x_{t}^{\lambda}\rangle is contained the -algebra of \mathchoice{\scalebox{0.7}[1.0]{\displaystyle\talloblong}}{\scalebox{0.7}[1.0]{\textstyle\talloblong}}{\scalebox{0.7}[1.0]{\scriptstyle\talloblong}}{\scalebox{0.7}[1.0]{\scriptscriptstyle\talloblong}}U_{0},V_{0}\rangle,so \dot{\mathchoice{\scalebox{0.7}[1.0]{\displaystyle\talloblong}}{\scalebox{0.7}[1.0]{\textstyle\talloblong}}{\scalebox{0.7}[1.0]{\scriptstyle\talloblong}}{\scalebox{0.7}[1.0]{\scriptscriptstyle\talloblong}}}W_{0}^{\lambda}\dot{\mathchoice{\scalebox{0.7}[1.0]{\displaystyle\talloblong}}{\scalebox{0.7}[1.0]{\textstyle\talloblong}}{\scalebox{0.7}[1.0]{\scriptstyle\talloblong}}{\scalebox{0.7}[1.0]{\scriptscriptstyle\talloblong}}}x_{t}^{\lambda}\rangle=0. Since \mathchoice{\scalebox{0.7}[1.0]{\displaystyle\talloblong}}{\scalebox{0.7}[1.0]{\textstyle\talloblong}}{\scalebox{0.7}[1.0]{\scriptstyle\talloblong}}{\scalebox{0.7}[1.0]{\scriptscriptstyle\talloblong}}\bar{\Delta}W_{t}^{\lambda}\mathchoice{\scalebox{0.7}[1.0]{\displaystyle\talloblong}}{\scalebox{0.7}[1.0]{\textstyle\talloblong}}{\scalebox{0.7}[1.0]{\scriptstyle\talloblong}}{\scalebox{0.7}[1.0]{\scriptscriptstyle\talloblong}}\in\sigma(\mathchoice{\scalebox{0.7}[1.0]{\displaystyle\talloblong}}{\scalebox{0.7}[1.0]{\textstyle\talloblong}}{\scalebox{0.7}[1.0]{\scriptstyle\talloblong}}{\scalebox{0.7}[1.0]{\scriptscriptstyle\talloblong}}U_{0},V_{0}\rangle)\otimes\sigma(\mathchoice{\scalebox{0.7}[1.0]{\displaystyle\talloblong}}{\scalebox{0.7}[1.0]{\textstyle\talloblong}}{\scalebox{0.7}[1.0]{\scriptstyle\talloblong}}{\scalebox{0.7}[1.0]{\scriptscriptstyle\talloblong}}U_{0},V_{0}\rangle), \mathchoice{\scalebox{0.7}[1.0]{\displaystyle\talloblong}}{\scalebox{0.7}[1.0]{\textstyle\talloblong}}{\scalebox{0.7}[1.0]{\scriptstyle\talloblong}}{\scalebox{0.7}[1.0]{\scriptscriptstyle\talloblong}}\bar{\Delta}W_{t}^{\lambda}\mathchoice{\scalebox{0.7}[1.0]{\displaystyle\talloblong}}{\scalebox{0.7}[1.0]{\textstyle\talloblong}}{\scalebox{0.7}[1.0]{\scriptstyle\talloblong}}{\scalebox{0.7}[1.0]{\scriptscriptstyle\talloblong}}x_{t}^{\lambda}\rangle\in\sigma(\mathchoice{\scalebox{0.7}[1.0]{\displaystyle\talloblong}}{\scalebox{0.7}[1.0]{\textstyle\talloblong}}{\scalebox{0.7}[1.0]{\scriptstyle\talloblong}}{\scalebox{0.7}[1.0]{\scriptscriptstyle\talloblong}}U_{0},V_{0}\rangle), and the expectation is really just over \widehat{\mathchoice{\scalebox{0.7}[1.0]{\displaystyle\talloblong}}{\scalebox{0.7}[1.0]{\textstyle\talloblong}}{\scalebox{0.7}[1.0]{\scriptstyle\talloblong}}{\scalebox{0.7}[1.0]{\scriptscriptstyle\talloblong}}}W_{0}^{\lambda}\widehat{\mathchoice{\scalebox{0.7}[1.0]{\displaystyle\talloblong}}{\scalebox{0.7}[1.0]{\textstyle\talloblong}}{\scalebox{0.7}[1.0]{\scriptstyle\talloblong}}{\scalebox{0.7}[1.0]{\scriptscriptstyle\talloblong}}}x_{t}^{\lambda}\rangle.
F.2.2 Backward
Here the \widehat{\mathchoice{\scalebox{0.7}[1.0]{\displaystyle\talloblong}}{\scalebox{0.7}[1.0]{\textstyle\talloblong}}{\scalebox{0.7}[1.0]{\scriptstyle\talloblong}}{\scalebox{0.7}[1.0]{\scriptscriptstyle\talloblong}}}W_{0}^{\lambda\top}\widehat{\mathchoice{\scalebox{0.7}[1.0]{\displaystyle\talloblong}}{\scalebox{0.7}[1.0]{\textstyle\talloblong}}{\scalebox{0.7}[1.0]{\scriptstyle\talloblong}}{\scalebox{0.7}[1.0]{\scriptscriptstyle\talloblong}}} and \dot{\mathchoice{\scalebox{0.7}[1.0]{\displaystyle\talloblong}}{\scalebox{0.7}[1.0]{\textstyle\talloblong}}{\scalebox{0.7}[1.0]{\scriptstyle\talloblong}}{\scalebox{0.7}[1.0]{\scriptscriptstyle\talloblong}}}W_{0}^{\lambda\top}\dot{\mathchoice{\scalebox{0.7}[1.0]{\displaystyle\talloblong}}{\scalebox{0.7}[1.0]{\textstyle\talloblong}}{\scalebox{0.7}[1.0]{\scriptstyle\talloblong}}{\scalebox{0.7}[1.0]{\scriptscriptstyle\talloblong}}} drop out because the former is zero-mean and indepenent from \mathchoice{\scalebox{0.7}[1.0]{\displaystyle\talloblong}}{\scalebox{0.7}[1.0]{\textstyle\talloblong}}{\scalebox{0.7}[1.0]{\scriptstyle\talloblong}}{\scalebox{0.7}[1.0]{\scriptscriptstyle\talloblong}}U_{0},V_{0}\rangle and the latter drops out because \mathchoice{\scalebox{0.7}[1.0]{\displaystyle\talloblong}}{\scalebox{0.7}[1.0]{\textstyle\talloblong}}{\scalebox{0.7}[1.0]{\scriptstyle\talloblong}}{\scalebox{0.7}[1.0]{\scriptscriptstyle\talloblong}}x_{t}^{\lambda}\rangle is contained the -algebra of \mathchoice{\scalebox{0.7}[1.0]{\displaystyle\talloblong}}{\scalebox{0.7}[1.0]{\textstyle\talloblong}}{\scalebox{0.7}[1.0]{\scriptstyle\talloblong}}{\scalebox{0.7}[1.0]{\scriptscriptstyle\talloblong}}U_{0},V_{0}\rangle.
F.3.2 Backward
F.4 Justifications of the claims
Claim 7.2. Stability during training when is straightforward (some technical conditions on the activation function are required). This is because the weight updates are of order and feature updates involve no more than terms of size (plus higher order terms that do not contribute to the update in the large depth limit). When , the contribution of a sum of at most terms of order will decrease to zero, and the network output will converge to in this case, yielding a trivial limit. However, when , the updates remain important in the infinite depth limit, yielding a non-trivial limit.
Claim 7.3. Consider a stable and nontrivial parametrization (i.e. ). Faithfulness at initialization is achieved only when . This was proven in in a more general setup. Faithfulness during training is ensured as long as because feature updates are always in depth. With , and the weight updates explode with depth in this case, which yield exploding behaviour for .
Claim 7.4 When , we obtain smooth limiting dynamics when as demonstrated in Section F.3. This limiting process is a smooth process (no Brownian jumps) that satisfies the required definition of redundancy.
Claim 7.5. It remains to prove that Depth-P is non-redundant. This is a result of the limiting dynamics in this case (Section F.1) . With Depth-P, the randomness of the initialization in the hidden layer remains present throughout training, inducing a Brownian-like term that breaks redundancy.
Claim 7.6. In Depth-P, is which is much smaller than . Therefore, , thus satisfies 7.7. Similar to the depth-P case, for , the activation in the forward pass can be linearized which indicates layerwise linearization when .
Appendix G Additional Experiments
G.2 Experiments with Block Depth 2
Currently, our theory covers resnets with block depth 1, and our experiments confirm the theoretical findings. We conducted similar experiments for clock depth 2 (i.e. the residual block consists of 2 fully connected layers) to see whether the learning rate transfers with Depth-P. The results are reported in Figure 21. The results show a significant shift in the learning rate which might indicate that as block depth increases, adjustments are needed to stabilize hyperparameters with depth.