{'fraction_non_alphanumeric': 0.03659845316952226, 'fraction_numerical': 0.015394293749768716, 'mean_word_length': 4.188940092165899, 'pattern_counts': {'":': 0, '<': 12, '<?xml version=': 0, '>': 1, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
Mean field theory for deep dropout networks: digging up gradient backpropagation deeply

In recent years, the mean field theory has been applied to the study of neural networks and has achieved a great deal of success. The theory has been applied to various neural network structures, including CNNs, RNNs, Residual networks, and Batch normalization. Inevitably, recent work has also covered the use of dropout. The mean field theory shows that the existence of depth scales that limit the maximum depth of signal propagation and gradient backpropagation. However, the gradient backpropagation is derived under the gradient independence assumption that weights used during feed forward are drawn independently from the ones used in backpropagation. This is not how neural networks are trained in a real setting. Instead, the same weights used in a feed-forward step needs to be carried over to its corresponding backpropagation. Using this realistic condition, we perform theoretical computation on linear dropout networks and a series of experiments on dropout networks. Our empirical results show an interesting phenomenon that the length gradients can backpropagate for a single input and a pair of inputs are governed by the same depth scale. Besides, we study the relationship between variance and mean of statistical metrics of the gradient and shown an emergence of universality. Finally, we investigate the maximum trainable length for deep dropout networks through a series of experiments using MNIST and CIFAR10 and provide a more precise empirical formula that describes the trainable length than original work.


Introduction
Deep neural networks have achieved exceptional results in a range of fields since its inception [1]. Recent seminal innovations have been proposed to improve the performance of neural networks further. For example, residual networks [2] and batch normalization [3], which were introduced to overcome the gradient vanishing and exploding problem, enabled the trainable length to be very deep. Another technology is the dropout [4], which is a regularization technique for reducing the over-fitting problem. It is also the focus of this paper. In dropout network, units are randomly dropped during training, which can prevent complex co-adaptations [4].
More recently, we have witnessed several signs of progress made using mean field theory [5][6][7] in deep learning. The mean field considers networks after random initialization, whose weights and biases were i.i.d. Gaussian distributed, and the width of each layer tends to infinity. As a result of studying signal propagation under mean field theory, an order-to-chaos expressivity phase transition split by a critical line has been found [5]. Later, how parameter initialization may impact the gradient of backpropagation was studied, and the conclusion that the ordered and chaotic phases correspond to regions of vanishing and exploding gradient respectively was shown [6]. The results were also equivalently applied to networks with or without dropout.
The main contribution of the mean field theory for random networks is that it shows the existence of depth scales that limit the maximum depth of signal propagation and gradient backpropagation. Practically, the result is to show a hypothesis that random networks may be trained precisely when information can travel through them. Thus, the depth scales provide bounds on how deep a network may be trained for a specific choice of hyper-parameters [6]. This ansatz was tested and verified by practical experiments on MNIST and CIFAR10 dataset with wide width fully-connected networks [6], deep dropout networks [6], and residual networks [8].
However, the mean field calculation for the gradient is based on the so-called gradient independence assumption, which states that the weights used during feed forward are drawn independently from the ones used in backpropagation. This is in an effort to make the calculation of gradient feasible regardless of the choice of activation functions. This assumption was later formulated explicitly [8] for residual networks and was illustrated in a review [9]. While it enjoys the correct prediction of gradient dynamics in some cases, our experiments show that under the condition in which the weights in feed-forward are carried over to its backpropagation, the length that gradients can backpropagate for a single and a pair of inputs are governed by the same depth scale on deep dropout networks instead.
By further studying the mean and variance of gradient statistics metrics on deep dropout networks, we show an emergence of universality for the relationship between the mean and variance. This universality exists regardless of the choice of hyper-parameters, including dropout rate and activation function. After summarizing the theoretical results about the trainable length of deep dropout networks governed by maximum depth of signal propagation and gradient backpropagation, we perform a series of experiments to investigate it. Empirically, we find a more precise way to describe the maximum trainable length for deep dropout networks, compared with the original results [6].
Following the mean field theory, [7] studied all singular values of the input-output Jacobian and found a strong connection between dynamical isometry and fast training speed. Later, the analysis of the spectrum of input-output Jacobian has been developed to provide a detailed analytic understanding [18] and a nonlinear random matrix theory for deep learning [19]. The study of the spectrum of input-output Jacobian is based on the mean field theory, which will not be addressed in this work since it is trivial to extend the analysis method by [7] to the dropout networks.
In contrast to the mean field theory view to the random networks, [20] studied the relationship between random networks and kernels while [21,22] adopted another view of Gaussian processes (GPs) in the realm of Bayesian learning. The correspondence between single infinite neural networks and Gaussian process was first observed by [23]. Moreover, a mean field study of the dynamics of networks in the infinite width limit [24] has achieved great success by [25] recently.
Finally, dropout training in deep neural networks can be viewed as approximate Bayesian inference in deep Gaussian processes [26]. Further, dropout can be used in the Neural Network GP [21]. While  (2) and Equation (4) with different activations and dropout rates. (a) The iterative length map of q l aa in Linear network at σ w = 0.5 and σ b = 1.5. Theoretical predictions (solid lines) match well with network simulations (dots) within a standard error (shadow). The intersection between map and unity line determine its fixed points q * ab . Different color correspond to different dropout rates: ρ = 1 is red, ρ = 0.7 is green, and ρ = 0.4 is blue. (b) The iterative length map of q l aa in Tanh network at σ w = 2.5 and σ b = 0.5. (c) The iterative length map of c l ab in ReLU network at σ w = 0.9 and σ b = 0.5. Only intersection of network at ρ = 1 (red) is c * ab = 1, the others are c * ab < 1. (d) The iterative length map of c l ab in Erf network at σ w = 0.9 and σ b = 0.5. Again, c * ab = 1 only holds at ρ = 1.
this topic is interesting, we do not include the Bayesian learning of random dropout networks in our work.

Background
In this section, we review the mean field theory for deep dropout networks. We give the main definitions, setup, and notations, and introduce the results of theory for random networks at initialization, including signal feed-forward and gradient backpropagation, respectively.

Feed Forward
Consider a feed-forward, fully-connected, untrained, and dropout network of depth L with layer width N . We denote synaptic weight and bias for the l-th layer by W l ij and b l i ; pre-activations and post-activations by z l i and y l i respectively. Finally, we take the input to be y 0 i = x i and the dropout keep rate to be ρ. The information propagation in this network is governed by, where φ : R → R is the activation function and p ∼ Bernoulli(ρ). We adopt the mean field theory assumption [5,6], where W l ij ∼ N (0, , and the width N tends to infinite. Since the weights and biases are randomly distributed, these equations define a probability distribution on the pre-activations over an ensemble of untrained neural networks. Under the mean field approximation, z l i can be replaced by a Gaussian distribution with zero mean. Consider a single input x i;a , where the subscript a refers to the index of input. We define the length quantities q l aa = 1 N N i=1 (z l i;a ) 2 , which is the mean squared pre-activations. According to the mean field approximation, the length quantity is described by the recursion relation, where is the measure for a normal distribution. This equation describes how a single input evolves through a random neural network. To study the property of evolution, we investigate the fixed point at q * aa ≡ lim l→∞ q l aa . One way to estimate the fixed point is to plot Equation (2) with the unity line, and the intersection is the fixed point. We show the result for Equation (2) with Linear dropout network and Tanh dropout network in Figure 1(a)(b). Note that the smaller the dropout rate ρ, the larger the fixed point value q * aa .
The propagation of a pair of inputs x i;a and x i;b , where the subscript a and b refer to different inputs, can be studied by looking at the correlation between the two inputs after l layers. We definite this correlation quantity as q l ab = 1 . Similarly, the correlation q l ab will be given by the recurrence relation, where u 1 = q l−1 aa z 1 and u 2 = q l−1 bb (c l−1 ab z 1 + 1 − (c l−1 ab ) 2 z 2 ), with c l ab = q l ab / q l aa q l bb .
This equation also have a fixed point at c * ab ≡ lim l→∞ c l ab . It is known that c * ab = 1 when ρ = 1, while c * ab < 1 when ρ < 1 [6]. We show the result of Equation (4) on the ReLU and Erf dropout networks in Figure 1(c)(d), which demonstrate the main conclusion about fixed-point without (ρ = 1) and with (ρ < 1) dropout.
The main contribution of mean field theory for the fully-connected networks without dropout (ρ = 1) is that it presents a phase diagram, which is determined by a crucial quantity, This quantity was firstly introduce by [5] to determine whether or not the c * ab = 1 is an attractive fixed point. When χ 1 < 1, the fixed point is unstable. Conversely, when χ 1 > 1, the fixed point is stable. Thus, the critical line χ 1 = 1 separates two phases. One is the chaotic phase (χ 1 < 1), where a pair of inputs end up asymptotically decorrelated, and the other is the ordered phase, in which a pair of inputs end up asymptotically correlated.
We give a comment on the difference between q l aa and c l ab here. The random networks in the infinite width limit can be viewed as the Gaussian processes, where q l aa and c l ab are the diagonal and nondiagonal elements of the compositional kernel [21], respectively. Intuitively, the non-diagonal element of the kernel measures the correlation between different data points while the diagonal component measures the information of one input itself.
The study of information propagation shows the existence of a depth-scales ξ 2 , which represent the length of propagation of the following qualities: where . Intuitively, the depth-scales ξ 2 measures how far can correlation between two different inputs survives through the network.

Back Propagation
There is a duality between the forward propagation of signals and the backpropagation of gradients. Given a loss E, we have where δ l i = ∂E ∂z l i . We define the metric of gradient for both a single input and a pair of inputs cases: Within mean field theory, the scale of fluctuations of the gradient of weights in a layer will be proportional toq l aa ≡ E δ l i;a δ l i;a , which can be written as, g l aa ∝q l aa [6]. On the other hand, the correlation between gradients of a pair of inputs will be proportional toq l ab ≡ E δ l i;a δ l i;b , namely, g l ab ∝q l ab . In order to work out the recurrence relation forq l aa andq l ab , an approximation was made [6], named gradient independence assumption, that the weights used during forward propagation are drawn independently from the weights used in backpropagation. In this way, the term φ (z l i ), δ l+1 j and W l+1 ji in Equation (7) can be addressed independently. Then, the recurrence behavior ofq l aa andq l ab are achieved,q l aa =q l+1 aa χ 1 ,q l ab =q l+1 ab χ 2 .
(9) where we redefine the quantity χ 1 for the dropout networks, Equation (9) has an exponential solution with, Similar to the signal propagation, gradient backpropagation can limit the trainable length in the way of gradient vanishing or gradient exploding, which is measured by the depth-scales ξ 1 and ξ 2 .

Gradient Backpropagation
In this section, we first calculate the metrics of gradient g aa and g ab theoretically without the gradient independence assumption on linear dropout networks. We then conduct a series experiment for metrics of gradient on deep dropout networks, including non-linear cases. Finally, we show an emergence of a universal relationship between mean and variance of metrics of the gradient.

Breaking the gradient independence assumption
We follow the fact that weights used in a feed-forward are carried over to its back-propagation. We first provide a theoretical treatment to the linear networks in which we assume the output is the last layer of network y L i = z L i without soft-max. The labels of data are set to be zeros, and the loss is the mean squared loss.
For space reason, we omit details of the calculation and present the primary analysis and final results here. The main problem is that we should expand δ l+1 j when calculating δ l i in Equation (7), since δ l+1 j can correlate with W l+1 ji without the gradient independence assumption. Using g l aa as an example, we perform: 2. Then we compute g L−1 By parity of reasoning, we obtained the results for the penultimate layer g L−2 aa . The correlation between terms that contain W L ij and W L−1 ij are considered. 4. As the index of the layer decreases, the amount of calculation becomes larger and larger.
Thus we use the induction method to achieve the results for the left layers.
We use the same approach to derive the result for g l ab . As a result, we have, By analyzing the first formula of Equation 12, we find that g l aa = g l+1 aa χ 1 . This can be better observed by dividing the expression related to layer l into two factors: one is ( σ 2 w ρ ) L−l , and the other is The first factor accounts for g l aa = g l+1 aa χ 1 , where χ 1 = σ 2 w ρ for linear dropout networks. And second factor will be stable after several layers starting from the last layer L due to σ 2 w < ρ. We show an excellent match between the theoretical calculation above with simulation using networks with width N = 500 and layer L = 200 over 100 different instantiations of the network in Figure 2(a). Despite the successful prediction of theoretical calculation for g l aa , our theoretical results for g l ab only hold on the case of ρ = 1 while fail to predict the experimental behavior except for last few layers when ρ < 1, as shown in Figure 2(b)(c). After a few layers from L, the variances began to increase dramatically as shown in Figure 2(c). We noticed that unlike the case of computing q l ab , using χ 2 is prohibitive for computing g l ab . On the other hand, we try a function regarding χ 1 to fit g l ab , and find an interesting observations that χ 1 is a much more compatible term for g l ab , i.e, g l ab = g l+1 ab χ 1 . This is demonstrated in Figure 2(d).
The incompatible phenomenon between theoretical calculation and experimental results for g l ab begins with the emergence of variance, as shown in Figure 2(c). One possible explanation is that the emergence of variance is caused by limited network length. Thus, we can reduce this variance by increasing network length only. To check if this explanation works, we further investigate the relationship between variance and mean of g l ab with different network widths N . The answer is that g l ab = g l+1 ab χ 1 holds regardless of the finite width. We will demonstrate it in the next section. After studying the gradient behavior at the linear networks, we conduct a series of experiments on the nonlinear case since the theoretical formulation for nonlinear activation or with the soft-max layer is intractable. We firstly use g l ab as the metric of gradient and find it has a huge variance when ρ < 1. This is because the element of the gradient matrix with a pair of inputs can be either negative or positive. To find a metric with low variance, we consider the metricg l ab ≡ 1 | whose elements are all positive. Besides, it is the 1 norm of the gradient matrix.
We plot g l aa andg l ab as a function of l in Figure 3. Interestingly, our simulations show that both g l ab andg ab are governed by χ 1 in a range of activations. Thus we make a conjecture that the relation, holds on deep dropout networks. Summary feed-forward propagation gradient backpropagation empirical results metric q aa q ab g aa g ab realistic condition (our work) -

Emergence of Universality
We have studied three statistical metrics of the gradient, i.e. g aa , g ab , andg ab using their mean value.
Inevitably, the variance of these metrics can give us essential information about the gradient. To do this, we performed a series of experiments to obtain the mean and variance of g aa , g ab andg ab with different activation and different network width N . First, we show the relationship between variance and mean of the metric of gradient with different activations, including Linear, ReLU, Tanh, and Hard Tanh. We denote the mean of g aa , g ab and g ab as m l aa , m l ab , andm l ab , while naming the variance as V l aa , V l ab , andṼ l ab respectively. We show the variance as a function of mean in Figure 4, and find the emergence of universality between the variance and mean regardless of dropout rate and choice of activation for g aa , g ab , andg l ab . The plot of variance as a function of mean shows a power-law between them since it is like a straight line in the log-log plot. To estimate the power, we use a simple equation V ∝ m 2 to compare with the experiment results. Surprisingly, all three curves are consistent with V ∝ m 2 . Thus we make a conjecture that the universal power coefficient between the variance and mean is 2.
Then, we investigate the relationship between variance and mean with different network width N and show the results in Figure 5. This time, we perform experiments on the ρ = 0.9 Tanh networks with different network width N . Again, the relationship between variance and mean satisfies universality, which means the Equation (13) does not depend on the network width of N .
We want to point out that we have performed the same investigation on q l aa and c l ab . However, we did not observe a similar universal relationship between variance and mean of q l aa and c l ab . This may occur due to the different behavior of q l aa (q l ab ) and g l aa (g l ab ). As Equation 6 shows, the mean of c l ab will converge to a fixed point after several layers, which means that the mean of c l ab will be stable in deeper layers. So, we won't expect a universal relation between the mean and the variance in this case.
In summary, we have tried all the parameter freedom that we can tune, the universal power coefficient between the variance and mean remains the same. We conclude that once the topological structure of the neural network is set, the power coefficient is universal.

Experiments
According to the theoretical results, during feed-forward, we expect that length-scale ξ 2 control the propagation of c l ab , while ξ 1 measure the number of layers that gradient metrics g l aa and g l ab can survive during backpropagation. However, [6] claimed that both networks with or without dropout networks have a limited trainable length, which is governed by the depth-scale ξ 2 . As our experimental results show, which be demonstrated later, this statement is not exactly right. To summarize, we present the comparison for the length-scale between [6] and our work in Table 1.

Training speed
Before investigating this problem, we study the relationship between training speed and choice of hyper-parameters. We confine the hyper-parameters at the critical line χ 1 = 1 for the network with and without dropout and train networks of a range of length with width N = 400 for 10 3 steps with a batch size of 10 3 on the standard CIFAR10 dataset. Strictly speaking, χ 1 = 1 is not the critical line when ρ < 1, since χ 2 < 1. For learning rates of each network, we consider logarithmically spaced in steps 10 1 . To search the optimal learning rate, we select a threshold accuracy of p = 0.25 and measure the first step τ when performance exceeds p. We show the steps τ as a function of learning rate η on the networks of dropout rate ρ = 1.0, 0.99, and 0.98 in Figure 6.
We find that for networks without dropout, there is a universal scaling τ = f 1 (ηL) between the steps and learning rate, where f 1 is a scaling function, as shown in Figure 6(a). Note that it is different to the result that τ / √ L = f 1 (ηL) in [7] where they use the standard CIFAR10 dataset augmented with random flips, crops, and so on. The difference may be caused by the pretreatment of the dataset in [7]. Besides, we study the networks with ρ = 0.99 and ρ = 0.98, and find that the scaling τ = f 2 (η) can be kept under a limited length L = 120 for ρ = 0.99 and L = 55 for ρ = 0.98, as shown in Figure  6(b) and (c) respectively.

Trainable length
Now we study the problem of trainable length. We consider random networks of depth 10 ≤ L ≤ 250, and 1 ≤ σ 2 w ≤ 4 with σ 2 b = 0.05. We train these networks using Stochastic Gradient Descent (SGD) and RMSProp on MNIST and CIFAR10 with Gaussian and Orthogonal weights, which can be seen as another variant of weight initialization in the mean field theory [7]. We perform four experiments on the network without dropout (ρ = 1) with different datasets, optimizer, and learning rate to conduct a comprehensive study, and plot the results in Figure 7(a)-(d). Besides, four experiments are conducted on the dropout networks (ρ < 1), and results are shown in Figure 7(e)-(h). We color in bright yellow the training accuracy that networks achieved as a function of σ 2 w and L for different dropout rates.
From the heatmap, we can observe a boundary in which accuracy began to drop. We noticed that there are two boundaries, left and right. In order to show its relationship with ξ 1 and ξ 2 , we superimpose them onto the heatmap.
In figure 7(a), we use the same learning rate and optimizer as those in Figure 5(a)-(c) of [6]. We use a learning rate of 10 −3 for SGD when L ≤ 200, and 10 −4 for larger L. From the plot, we find the 6ξ 2 underestimates the scope of train-ability in the σ 2 w -L plane, while 12ξ 1 is more compatible with the experimental result. We note the phenomenon that 6ξ 2 underestimates the scope of train-ability also happened in Figure 5(b)(c) of [6]. In figure 7(b), we adopt the same learning rate and optimizer as those in Figure 5(d) of [6], where we use a learning of 10 −5 and RMSProp optimizer. Here, the only difference is that we use 1000 training steps instead of 300 training steps in [6]. According to the simulation result, 12ξ 1 (solid line) and ξ 2 (dashed line) are identical on the left boundary, while they differ on the right side. We make a comparison between 12ξ 1 and 12ξ 2 , and find that 12ξ 1 has a much better argument with the trainable length while 12ξ 2 overrates the trainable length on the right side.
Based on the analysis of Figure 7(a)(b), we may conclude that 12ξ 1 can be used to measure the maximum trainable length of the network without dropout. We further reinforce this conclusion by performing experiments on different learning rates, weight initialization, and datasets. In figure(c), we use orthogonal weight initialization. In figure(d), we perform experiment on CIFAR10 dataset and adopt a learning rate of η = c/L, where c is constant. These learning rates were selected for the reason that each learning rate can lead to the fast step to a certain test accuracy at χ 1 = 1, as shown in Figure 6. In a word, we attribute the maximum trainable length to L ≤ min{12ξ 1 , 12ξ 2 } = 12ξ 1 , where the relation ξ 1 ≤ ξ 2 holds on the network without dropout.
Furthermore, we consider the dropout case in Figure 7(e)-(h). We have studied three different dropout rate: ρ = 0.99 (Figure 7(e)), ρ = 0.98 (Figure 7(f)(g)), and ρ = 0.95 (Figure 7(h)). We find that both ξ 1 and ξ 2 have connections to the trainable length: the networks appear to be trainable when L ≤ min{12ξ 1 , 12ξ 2 }. Networks on the left side are influenced by 12ξ 2 while they are constrained by the 12ξ 1 on the right size. Note that the formula L ≤ min{12ξ 1 , 12ξ 2 } is valid in the no dropout case as discussed above. To conclude, we show an improved relationship between maximum trainable length and length scale ξ 1 and ξ 2 than [6]. This conclusion that both ξ 1 and ξ 2 have connections to the trainable length instead of only ξ 2 [6] is more compatible with the theoretical results.

Discussion
In this paper, we have investigated the dropout networks by calculating its statistical metrics of gradient during the backpropagation at initialization and conjecture that both gradients metric with a single input and a pair of inputs are governed by the same quantity χ 1 . We further investigate the relationship between variance and mean of statistical metrics empirically and find an emergence of universality. Our finding of a universal relationship between variance and mean of statistical metrics of gradient backpropagation suggests a deeper mechanism behind it. This mechanism may be comprehended better by studying more different network structures such as Resnet. Finally, for networks with or without dropout, we attribute the maximum trainable length to the formula L ≤ min{12ξ 1 , 12ξ 2 }, which is novel and important.

Supplemental Material
1 Theoretical derivation of gradient metrics at initialization 1.1 Derivation of q l aa on linear dropout networks with a single input (1)The L th layer: Since, We rewrite Eq (S1) as: j,j ,k,k m,m ,n,n ( p L−1 n,a p L−1 n ,a Finally, we have, To summarize, we list the results for q L aa , q L−1 aa , and q L−2 aa : Using mathematical induction method we draw the conclusion that, Using the relation, we obtain the final result, (S13)

Derivation of q l ab on linear dropout networks with a pair of inputs
(1)The L th layer: (2)The (L − 1) th layer: Here, we have We rewrite Eq (S14) as: To summarize, we list the results for q L ab , q L−1 ab , and q L−2 ab : q L ab = 4q * ab (S21) Using mathematical induction method we draw the conclusion that