b

DiscoverSearch
About
My stuff
Scaling Limit of Neural Networks with the Xavier Initialization and Convergence to a Global Minimum
2019·arXiv
Abstract
Abstract

We analyze single-layer neural networks with the Xavier initialization in the asymptotic regime of large numbers of hidden units and large numbers of stochastic gradient descent training steps. The evolution of the neural network during training can be viewed as a stochastic system and, using techniques from stochastic analysis, we prove the neural network converges in distribution to a random ODE with a Gaussian distribution. The limit is completely different than in the typical mean-field results for neural networks due to the 1√N normalization factor in the Xavier initialization (versus the  1N factor in the typical mean-field framework). Although the pre-limit problem of optimizing a neural network is non-convex (and therefore the neural network may converge to a local minimum), the limit equation minimizes a (quadratic) convex objective function and therefore converges to a global minimum. Furthermore, under reasonable assumptions, the matrix in the limiting quadratic objective function is positive definite and thus the neural network (in the limit) will converge to a global minimum with zero loss on the training set.

Consider a single-layer neural network with the Xavier initialization:

image

where  Ci ∈ R, W i ∈ Rd, x ∈ Rd, and  σ(·) :  R → R. The number of hidden units is N and the output is scaled by a factor 1√N(the widely-used Xavier initialization, see [2]). The objective function is

image

where the data (X, Y ) ∼ π(dx, dy), Y ∈ R, and the parameters  θ= (C1, . . . , CN, W 1, . . . , W N) ∈ RN×(1+d). For notational convenience, we may refer to  gN(x; θ) as  gN(x) in our analysis below.

The model parameters  θare trained using stochastic gradient descent. The parameter updates are given by:

image

for k = 0, 1, . . ., T N where T > 0.  αNis the learning rate (which may depend upon N). The data samples are (xk, yk) are i.i.d. samples from a distribution  π(dx, dy). We impose the following assumption.

image

The activation function  σ ∈ C2b(R), i.e.  σis twice continuously differentiable and bounded.

The randomly initialized parameters (Ci0, W i0) are i.i.d., mean-zero random variables with a distribution µ0(dc, dw).

The random variable  Ci0has compact support and  ⟨∥w∥ , µ0⟩ < ∞.

The sequence of data samples (xk, yk) is i.i.d. from the probability distribution  π(dx, dy).

image

There is a fixed dataset of M data samples (x(i), y(i))Mi=1and therefore  π(dx, dy) = 1M

image

Note that the last assumption also implies that  π(dx, dy) has compact support.

We will study the limiting behavior of the network output  gNk(x) for  x ∈ D = {x(1), . . . , x(M)}as the number of hidden units N and stochastic gradient descent steps T N simultaneously become large. The

network output converges in distribution to the solution of a random ODE as  N → ∞.

1.1 Main Results

Define the empirical measure

image

Note that the neural network output can be written as the inner-product

image

Due to Assumption 1.1, as  N → ∞and for  x ∈ D,

image

where  G ∈ RMis a Gaussian random variable. We also of course have that

image

Define the scaled processes

image

We will study convergence in distribution of the random process (µNt , hNt) as  N → ∞in the space DE([0, T ]) where  E = M(R1+d) × RM. DE([0, T ]) is the Skorokhod space and M(S) is the space of probability measures on S.

The main contribution of our work is a rigorous proof that a neural network with the Xavier initialization and trained with stochastic gradient descent converges in distribution to a random ODE as the number of units and training steps become large. In addition, our convergence analysis will also address several interesting questions:

Our results provide a rigorous convergence guarantee for the Xavier initialization (i.e., the 1√Nnor- malization factor), which is almost universally used in deep learning models. A priori it is unclear if the neural network  gNk(x) will converge as  N → ∞since, for k > 0, the  Ciσ(W i · x) is correlated with Cjσ(W j · x) and therefore a limit may not exist. If a limit did not exist, this would imply that the neural network model could have poor numerical behavior for large N. We prove that a limit does exist.

Although the pre-limit problem of optimizing a neural network is non-convex (and therefore the neural network may converge to a local minimum), the limit equation minimizes a quadratic objective function.

We show that the matrix in the limiting quadratic objective function is positive definite, and therefore the neural network (in the limit) will converge to a global minimum with zero loss on the training set.

Convergence to a global minimum for a neural network has been recently proven in [3], [4], and [5]. Our work contributes to this growing literature by showing that convergence to a global minimum is a simple consequence of the mean-field limit for neural networks. A detailed discussion of these papers and other related literature is provided in Section 1.2.

Our main results are presented below.

Theorem 1.2. The process (µNt , hNt) converges in distribution in the space  DE([0, T ]) as  N → ∞to (µt, ht) which satisfies, for every  f ∈ Cb2(R1+d), the random ODE

image

Proof. See Sections 3, 4, and 5.

Recall that  G ∈ RMis a Gaussian random variable; see equation (1.2). In addition, note that ¯µtin the limit equation (1.3) is a constant, i.e.  µt = µ0for  t ∈[0, T ]. Therefore, (1.3) reduces to

image

Since (1.4) is a linear equation in  CRM([0, T ]), the solution  htis unique.

To better understand (1.4), define the matrix  A ∈ RM×Mwhere

image

where  x, x′ ∈ D. Ais finite-dimensional since we fixed a training set of size M in the beginning. Then, (1.4) becomes

image

where ˆY = (y(1), . . . , y(M)). Therefore,  htis the solution to a continuous-time gradient descent algorithm which minimizes a quadratic objective function.

image

Therefore, even though the pre-limit optimization problem is non-convex, the neural network’s limit will minimize a quadratic objective function.

An interesting question is whether  ht →ˆY as  t → ∞. That is, in the limit of large numbers of hidden units and many training steps, does the neural network model converge to a global minimum with zero training error. Theorem 1.3 shows that  ht →ˆY as  t → ∞if A is positive definite. Corollary 1.4 proves that, under reasonable hyperparameter choices and if the data samples are in distinct directions (see [1]), A will be positive definite.

Theorem 1.3. If A is positive definite, then

image

Proof. Consider the transformation ˜ht = ht −ˆY . Then,

image

Then, ˜ht →0 (and consequently  ht →ˆY ) as  t → ∞if A is positive definite.

image

Corollary 1.4. Assume Assumption 1.1. A sufficient condition for A to be positive definite is  σ(·) is nonpolynomial and slowly increasing (i.e., limx→∞σ(x)xa= 0 for every a > 0),  µ0is positive when evaluated on sets of positive Lebesgue measure and the data samples  x(i)are in distinct directions (as defined on page 192 of [1]).

Proof. See Section 6.

image

Examples of activation units  σ(·) satisfying the conditions in Corollary 1.4 include sigmoid functions and hyperbolic tangent functions. Using a normal distribution for the initialization of the parameters in the neural network is a common choice in practice (covered by the requirements of Corollary 1.4).

Remark 1.5. For presentation purposes we have not explicitly denoted the bias term in the model. However, it is clear that this can be handled by requiring the first component of the vector x to be equal to one for example. This would result in the neural network taking the form  gN(x; θ) = 1√N�Ni=1 Ciσ(W i · x + bi). We leave the rest of the details to the interested reader.

1.2 Literature Review

[11], [12], [13], and [15] study the asymptotics of single-layer neural networks with a 1Nnormalization; that is,  gN(x; θ) = 1N�Ni=1 Ciσ(W i · x). [14] studies the asymptotics of deep (i.e., multi-layer) neural networks with a 1Nnormalization in each hidden layer. In the single layer case, the limit for the neural network satisfies a partial differential equation. As discussed in [11], it is not necessarily true that the limiting equation (a PDE in this case) will converge to the global minimum of an objective function with zero training error.

The 1Nnormalization studied in [11], [12], [13], and [15] is convenient since the single-layer neural network is then in a traditional mean-field framework where it can be described via an empirical measure of the parameters. However, the 1√Nnormalization that we study in this paper is more widely-used in practice (it is referred to as the Xavier initialization and was first introduced in [2]). The 1√Nnormalization requires different analysis than the standard mean-field analysis 1N, and it produces a completely different limit. Importantly, under reasonable conditions, the limit equation converges to a global minimum with zero training error. In addition, for the limit to hold, we show that the 1√Nnormalization requires the effective learning rate for the parameters to be of the order  N −3/2.

Convergence to a global minimum for a neural network has been recently proven in [3], [4], and [5]. Although it has been long understood that neural networks have universal approximation properties (see [8], [9], and [10]), it has until recently been commonly believed that training algorithms for neural networks (e.g., gradient descent) may converge to a local minimum (and not a global minimum) since neural networks are non-convex. [3], [4], and [5] showed that neural networks (under suitable conditions) will converge to a global minimum during training. This result is quite remarkable considering the optimization problem is non-convex, and it provides an important mathematical guarantee for the field of deep learning.

[3], [4], and [5] do not study the mean-field limit of a neural network with the Xavier initialization, which is the focus of our paper. Once the mean field limit is established, we show that convergence to a global minimum is a simple consequence of the limit equation. There are also some differences between our assumptions and the assumptions required for the theorems of [3], [4], and [5]. [3] and [4] study gradient descent while our paper studies stochastic gradient descent, which introduces additional technical challenges due to the stochastic dynamics. [5] studies stochastic gradient descent for a framework where the neural network’s output layer parameters are not trained. In their paper, the  Ciparameters are randomly generated and then frozen (i.e., they do not change during training). In practice, all of the parameters in the neural network, including the output layer parameters, are trained with stochastic gradient descent and therefore it is worthwhile to consider the more general case. [5] also imposes an assumption that the loss function vanishes at infinity. [3], [4], and [5] all require that every data sample has the same magnitude, i.e.��x(i)��= 1 for every i = 1, . . . , M. We do not require this assumption.

[6] proved a limit for neural networks with a Xavier initialization when they are trained with continuous-time gradient descent. Our paper proves a limit for neural networks trained with the (standard) discrete-time stochastic gradient descent algorithm which is used in practice. Our method of proof is also different than the approach of [6]. Whereas [6] begins their analysis in continuous time (due to their framework being continuous-time gradient descent), our paper rigorously passes from discrete time (where the stochastic gradient descent updates evolve) to continuous time through weak convergence analysis of appropriate stochastic processes and measure-valued processes. In [6], the authors directly study the evolution of the derivatives of the output with respect to the parameters, while we address the limiting behavior of the underlying associated stochastic processes and measure-valued processes.

1.3 Organization of Paper

Section 2 derives equations describing the evolution of the pre-limit process (µN, hN). Relative compactness of the family of processes (µN, hN) is proven in Section 3. Section 4 proves that any limit point of the process must satisfy the equation (1.3). These results are collected together in Section 5 to prove that (µN, hN) converges in distribution to the solution of equation (1.3). Corollary 1.4 is proven in Section 6.

We begin by analyzing evolution of the network output  gNk(x). Using a Taylor expansion,

image

for points  W i,∗kand  W i,∗,∗kin the line segment connecting the points  W ikand  W ik+1. Let  αN = αN. Substi- tuting (1.1) into (2.1) yields

image

Using (2.3), we can write the evolution of  hNtfor  t ∈[0, T ] as

image

Next, we decompose the summations into a drift and martingale component.

image

For convenience, we define the martingale terms (the third and fourth terms in the equation above) as M N,1tand  M N,2t, respectively. The equation for  hNtcan be re-written in terms of a Riemann integral and the scaled measure  µNt, yielding

image

In addition, using conditional independence of the terms in the series for  M N,1tand  M N,2tas well as the bounds from Lemmas 3.2 and 3.1, we have that

image

We can also analyze the evolution of the empirical measure  νNkin terms of test functions  f ∈ C2b(R1+d). Using a Taylor expansion, we find that

image

for points ( ¯Cik, ¯W ik), ( ˆCik, ˆW ik) and ( ˜Cik, ˜W ik) in the segments connecting  Cik+1with  Cikand  W ik+1with  W ik, respectively.

Substituting (1.1) into (2.5) yields

image

Therefore,

image

In this section we prove that the family of processes  {µN, hN}Nis relatively compact. Section 3.1 proves compact containment. Section 3.2 proves regularity. Section 3.3 combines these results to prove relative compactness.

3.1 Compact Containment

image

Proof. The unimportant finite constant  C < ∞may change from line to line. We first observe that

image

where the last inequality follows from the definition of  gNk(x) and the uniform boundedness assumption on σ(·). Then, we subsequently obtain that

image

This implies that

image

Let us now define  mNk= 1N

image

have that 1N

image

By the discrete Gronwall lemma and using  k/N ≤ T,

image

where the last inequality follows from the random variables  Ci0taking values in a compact set. Now, we turn to the bound for  ∥ W ik ∥. We start with the bound (using Young’s inequality)

image

for a constant  C < ∞that may change from line to line. Taking an expectation, using Assumption 1.1, the bound (3.2), and using the fact that  k/N ≤ T, we obtain

image

for all  i ∈ Nand all k such that  k/N ≤ T, concluding the proof of the lemma.

image

Using the bounds from Lemma 3.1, we can now establish a bound for  gNk(x) for  x ∈ D.

Lemma 3.2. For all  i ∈ N, all k such that  k/N ≤ T, and any  x ∈ D,

image

Proof. Recall equation (2.2), which describes the evolution of  gNk(x).

image

This leads to the bound

image

We now square both sides of the above inequality.

image

Then, using a telescoping series,

image

Taking expectations,

image

Taking advantage of the fact that  xjis sampled from a fixed dataset D of M data samples,

image

and therefore

image

Recall that

image

Combining this bound with the bound (3.4) and using the discrete Gronwall lemma yields, for any 0  ≤ k ≤ T N,

image

Substituting this bound into equation (3.3) produces the desired bound

image

for any 0  ≤ k ≤ T N.

image

Proof. For each L > 0, define  KL= [−L, L]1+d. Then, we have that  KLis a compact subset of  R1+d, and for each  t ≥0 and  N ∈ N,

image

where we have used Markov’s inequality and the bounds from Lemma 3.1. We define the compact subsets of  M(R1+d)

image

and we observe that

image

Given that limL→∞�∞j=1 C(L+j)3/2= 0, we have that, for each  η >0, there exists a compact set ˆKLsuch that

image

Due to Lemma 3.2 and Markov’s inequality, we also know that, for each  η >0, there exists a compact set U = [−B, B]Msuch that

image

Therefore, for each  η >0, there exists a compact set ˆKL × [−B, B]M ⊂ Esuch that

image

3.2 Regularity

image

Proof. We start by noticing that a Taylor expansion gives for 0  ≤ s ≤ t ≤ T

image

for points ( ¯Ci,¯W i) and ( ˆCi,ˆW i) in the segments connecting  Ci⌊Ns⌋with  Ci⌊Nt⌋and  W i⌊Ns⌋with  W i⌊Nt⌋, respectively.

Let’s now establish a bound on  |Ci⌊Nt⌋ − Ci⌊Ns⌋|for  s < t ≤ Twith 0  < t − s ≤ δ <1.

image

where  C < ∞is some unimportant constant. Then, the statement of the Lemma follows.

We next establish regularity of the process  hNtin  DRM([0, T ]). For the purposes of the following lemma, let the function  q(z1, z2) = min{∥z1 − z2∥ , 1}where  z1, z2 ∈ RMand  ∥z∥ = |z1| + · · · + |zM|.

Lemma 3.5. For any  δ ∈(0, 1), there is a constant  C < ∞such that for 0  ≤ u ≤ δ <1, 0  ≤ v ≤ δ ∧ t, t ∈[0, T ],

image

Proof. Recall that

image

Therefore,

image

This yields the bound

image

where we have used the boundedness of  σ′(·) (from Assumption 1.1) and the bounds from Lemma 3.1. Taking expectations,

image

Using the bounds (3.6) and (3.7),

image

The bound (3.7) holds for each  x ∈ D. Therefore,

image

The statement of the Lemma then follows.

image

3.3 Combining our results to prove relative compactness

Lemma 3.6. The family of processes  {µN, hN}N∈Nis relatively compact in  DE([0, T ]).

Proof. Combining Lemmas 3.3 and 3.4, and Theorem 8.6 of Chapter 3 of [7] proves that  {µN}N∈Nis relatively compact in  DM(R1+d)([0, T ]). (See also Remark 8.7 B of Chapter 3 of [7] regarding replacing supNwith limNin the regularity condition B of Theorem 8.6.) Similarly, combining Lemmas 3.3 and 3.5 proves that  {hN}N∈Nis relatively compact in  DRM([0, T ]). Since relative compactness is equivalent to tightness, we have that the probability measures of the family

of processes  {µN}N∈Nare tight. Similarly, we have that the probability measures of the family of process

{hN}N∈Nare tight. Therefore,  {µN, hN}N∈Nis tight. Then,  {µN, hN}N∈Nis also relatively compact.

image

Let  πNbe the probability measure of a convergent subsequence of�µN, hN�0≤t≤T. Each  πNtakes values in the set of probability measures  M�DE([0, T ])�. Relative compactness, proven in Section 3, implies that there is a subsequence  πNkwhich weakly converges. We must prove that any limit point  πof a convergent subsequence  πNkwill satisfy the evolution equation (1.3).

Lemma 4.1. Let  πNkbe a convergent subsequence with a limit point  π. Then,  πis a Dirac measure concentrated on (µ, h) ∈ DE([0, T ]) and (µ, h) satisfies equation (1.3).

Proof. We define a map  F(µ, h) :  DE([0, T ])  → R+for each  t ∈[0, T ],  f ∈ C2b(R1+d), g1, · · · , gp ∈ Cb(R1+d), q1, · · · , qp ∈ Cb(RM), and 0  ≤ s1 < · · · < sp ≤ t.

image

Then, using equations (2.4) and (2.6), we obtain

image

Since  F(·) is continuous and  F(µN) is uniformly bounded (due to the uniform boundedness results of Section 3),

image

Since this holds for each  t ∈[0, T ],  f ∈ C2b(R1+d) and  g1, · · · , gp, q1, · · · , qp ∈ Cb(R1+d), (µ, h) satisfies the evolution equation (1.3).

We now combine the previous results of Sections 3 and 4 to prove Theorem 1.2. Let  πNbe the probability measure corresponding to (µN, hN). Each  πNtakes values in the set of probability measures  M�DE([0, T ])�. Relative compactness, proven in Section 3, implies that every subsequence  πNkhas a further sub-sequence πNkmwhich weakly converges. Section 4 proves that any limit point  πof  πNkmwill satisfy the evolution equation (1.3). Equation (1.3) is a finite-dimensional, linear equation and therefore has a unique solution. Therefore, by Prokhorov’s Theorem,  πNweakly converges to  π, where  πis the distribution of (µ, h), the unique solution of (1.3). That is, (µN, hN) converges in distribution to (µ, h).

This section proves that under reasonable hyperparameter choices, the matrix A in the limit equation will be positive definite.

Proof. We first show that A is equivalent to the covariance matrix of the random variables U = �U(x(1)), . . . , U(x(M))�,

which are defined as

image

To prove that A is positive definite, we need to show that  z⊤Az >0 for every non-zero  z ∈ RM.

image

The functions  σ(x(i) · W) are linearly independent since the  x(i)are in district directions (see Remark3.1 of [1]). Therefore, for each non-zero z, there exists a point  w∗such that

image

for some  η >0 such that for (c, w) ∈ B

image

Then,

image

and A is positive definite, concluding the proof of the Corollary.

[1] Yoshifusa Ito. Nonlinearity creates linear independence. Advances in Computational Mathematics, 5: 189-203, 1996.

[2] X. Glorot and Y. Bengio. Understanding the difficulty of training deep feedforward neural networks. Proceedings of the thirteenth international conference on artificial intelligence and statistics, pp. 249-256. 2010.

[3] S. Du, J. Lee, H. Li, L. Wang, and X. Zhai. Gradient Descent Finds Global Minima of Deep Neural Net- works. Proceedings of the 36th International Conference on Machine Learning, Long Beach, California, PMLR 97, 2019.

[4] S. Du, X. Zhai, B. Poczos, and A. Singh. Gradient Descent Provably Optimizes Over-Parameterized Neural Networks. ICLR, 2019.

[5] D. Zou, Y. Cao, D. Zhou, and Q. Gu. Stochastic Gradient Descent Optimizes Over-parameterized Deep ReLU Networks. arXiv: 1811.08888, 2018.

[6] A. Jacot, F. Gabriel, and C. Hongler. Neural Tangent Kernel: Convergence and Generalization in Neural Networks. 32nd Conference on Neural Information Processing Systems (NeurIPS 2018), Montreal, Canada.

[7] S. Ethier and T. Kurtz. Markov Processes: Characterization and Convergence. 1986, Wiley, New York, MR0838085.

[8] K. Hornik, M. Stinchcombe, and H. White. Multilayer feedforward networks are universal approximators. Neural Networks, 2(5), 359-366, 1989.

[9] K. Hornik. Approximation capabilities of multilayer feedforward networks. Neural Networks, 4(2), 251-257, 1991.

[10] C. Kuan and K. Hornik. Convergence of learning algorithms with constant learning rates. IEEE Transactions on Neural Networks, 2(5), 484-489, 1991.

[11] S. Mei, A. Montanari, and P. Nguyen. A mean field view of the landscape of two-layer neural networks Proceedings of the National Academy of Sciences, 115 (33) E7665-E767, 2018.

[12] J. Sirignano and K. Spiliopoulos. Mean Field Analysis of Neural Networks: A Law of Large Numbers. SIAM Journal on Applied Mathematics, Vol. 80, Issue 2, pp. 725–752, 2020.

[13] J. Sirignano and K. Spiliopoulos. Mean Field Analysis of Neural Networks: A Central Limit Theorem. Stochastic Processes and their Applications, Volume 130, Issue 3, March 2020, pp. 1820-1852, 2020.

[14] J. Sirignano and K. Spiliopoulos. Mean Field Analysis of Deep Neural Networks. Mathematics of Operations Research, 2021, to appear.

[15] G. M. Rotskoff and E. Vanden-Eijnden. Neural Networks as Interacting Particle Systems: Asymptotic Convexity of the Loss Landscape and Universal Scaling of the Approximation Error. arXiv:1805.00915, 2018.


Designed for Accessibility and to further Open Science