T RANSITION TO L INEARITY OF W IDE N EURAL N ETWORKS IS AN E MERGING P ROPERTY OF A SSEMBLING W EAK M ODELS
A BSTRACT
Wide neural networks with linear output layer have been shown to be near-linear, and to have near-constant neural tangent kernel (NTK), in a region containing the optimization path of gradient descent.
These ﬁndings seem counter-intuitive since in general neural networks are highly complex models.
Why does a linear structure emerge when the networks become wide?
In this work, we provide a new perspective on this “transition to linearity” by considering a neural network as an assembly model recursively built from a set of sub-models corresponding to individual neurons.
In this view, we show that the linearity of wide neural networks is, in fact, an emerging property of assembling a large number of diverse “weak” sub-models, none of which dominate the assembly.
I NTRODUCTION
Success of gradient descent methods for optimizing neural networks, which generally correspond to highly non-convex loss functions, has long been a challenge to theoretical analysis.
A series of recent works including Du et al.
(2018; 2019); Allen-Zhu et al.
; Zou et al.
; Oymak & Soltanolkotabi (2020) showed that convergence can indeed be shown for certain types of wide networks.
Remarkably, Jacot et al.
(2018) demonstrated that, when the network width goes to inﬁnity, the Neural Tangent Kernel (NTK) of the network becomes constant during training with gradient ﬂow, a continuous time limit of gradient descent.
Based on that Lee et al.
(2019) showed that the training dynamics of gradient ﬂow in the space of parameters for the inﬁnite width network is equivalent to that of a linear model.
As discussed in (Liu et al., 2020), the constancy of the Neural Tangent Kernel stems from the fact that wide neural networks with linear output layer “transition to linearity” as their width increases to inﬁnity.
The network becomes progressively more linear in O (1) -neighborhoods around the network initialization, as the network width grows.
Speciﬁcally, consider the neural network as a function f ( θ ) of its parameters θ and write the Taylor expansion with the Lagrange remainder term:
[Equation]
where H is the Hessian, the second derivative matrix of f , and ξ is a point between θ and θ 0 .
The “transition to linearity” is the phenomenon when the quadratic term 12 ( θ − θ 0 ) T H ( ξ )( θ − θ 0 ) tends to zero in an O (1) ball around θ 0 as the network width increases to inﬁnity.
In particular, transition to linearity provides a method for showing that the square loss function of wide neural networks satisfy the Polyak-Lojasiewicz (PL) inequality which guarantees convergence of (Stochastic) Gradient Descent to a global minimum (Liu et al., 2022).
While the existing analyses demonstrate transition to linearity mathematically, the underlying structure of that phenomenon does not appear to be fully clear.
What structural properties account for it?
Are they speciﬁc to neural networks, or also apply to more general models?
In this paper, we aim to explain this phenomenon from a more structural point of view and to reveal some underlying mechanisms.
We provide a new perspective in which a neural network, as well as each of its hidden layer neurons before activation, can be viewed as an “assembly model”, built up by linearly assembling a set of sub-models, corresponding to the neurons from the previous layer.
Speciﬁcally, a ( l + 1) -layer pre-activation neuron
[Equation]
as a linear combination of the l -th layer neurons α ( l ) i , is considered as an assembly model, whereas the l -layer neurons α ( l ) i are considered as sub-models.
Furthermore, each pre-activation ˜ α ( l ) i is also an assembly model constructed from ( l − 1) -th layer neurons α ( l − 1) i .
In this sense, the neural network is considered as a multi-level assembly model.
To show O (1) -neighborhood linearity, we prove that the quadratic term in the Taylor expansion Eq.(1) vanishes in O (1) -neighborhoods of network initialization, as a consequence of assembling sufﬁciently many sub-models .
To illustrate the idea of assembling, we start with a simple case: assembling independent sub-models in Section 2.
The key ﬁnding is that, as long as the assembly model is not dominated by one or a few sub-models, the quadratic term in the Taylor expansion Eq.(1) becomes small in O (1) - neighborhoods of the parameter space when the number of sub-models m is tends to inﬁnity.
This means that as m increases to inﬁnity, the assembly model becomes a linear function of parameters.
Since we put almost no requirements on the form of sub-models, it is the assembling process that results in the linearity of the assembly model.
This case includes two-layer neural networks as examples.
For deep neural networks (Section 3), we consider a neural network as a multi-level assembly model each neuron is considered as an assembly model constructed iteratively from all the neurons from the previous layer.
We then follow an inductive argument: using near-linearity of previous-layer pre-activation neurons to show the linearity of next-layer pre-activation neurons.
Our key ﬁnding is that, when the network width is large, the neurons within the same layer become essentially independent to each other in the sense that their gradient directions are orthogonal in the parameter space.
This orthogonality allows for the existence of a new coordinate system such that these neuron gradients are parallel to the new coordinate axes.
Within the new coordinate system, one can apply the argument of assembling independent sub-models, and obtain the O (1) -neighborhood linearity of the pre-activation neurons, as well as the output of the neural network.
We further point out that this assembling viewpoint and the O (1) -neighborhood linearity can be extended to more general neural network architectures, e.g., DenseNet.
We end this section by commenting on a few closely related concepts and point out some of the differences.
Boosting.
Boosting (Schapire, 1990; Freund, 1995), which is a popular method that combines multiple “weak” models to produce a powerful ensembe model, has a similar form with the assembly model, Eq.(4), see, e.g., Friedman et al.
However, we note a few key differences between the two.
First, in boosting, each “weak” model is trained separately on the dataset and the coefﬁcients (i.e., v i in Eq.(4)) of the weak models are determined by the model performance.
In training an assembly model, the “weak” sub-models (i.e., hidden layer neurons), are never directly evaluated on the training dataset, and the coefﬁcients v i are considered as parameters of the assembly model and trained by gradient descent.
Second, in boosting, different data samples may have different sample weights.
In assembling, the data samples always have a uniform weight.
Bagging and Reservoir computing.
Bagging (Breiman, 1996) and Reservoir computing (Jaeger, 2001) are two other ways of combining multiple sub-models to build a single model.
In bagging, each sub-model is individually trained and the ensemble model is simply the average or the max of the sub-models.
In reservoir computing, each sub-model is ﬁxed, and only the coefﬁcients of the linear combination are trainable.
Notation.
We use bold lowercase letters, e.g., v , to denote vectors, capital letters, e.g., W , to denote matrices.
We use (cid:107) · (cid:107) to denote the Euclidean norm of vectors and spectral norm (i.e., matrix 2-norm) for matrices.
We denote the set { 1 , 2 , · · · , n } as [ n ] .
We use ∇ w f to denote the partial derivative of f with respect to w .
When w represents all of the parameters of f , we omit the subscript, i.e., ∇ f .
A SSEMBLING I NDEPENDENT M ODELS
In this section, we consider assembling a sufﬁciently large number m of independent sub-models and show that the resulting assembly model is (approximately) linear in O (1) -neighborhood of the model parameter space.
Ingredients: sub-models.
Let’s consider a set of m (sub-)models { g i } mi =1 , where each model g i , with a set of model parameters w i ∈
D
i ⊂ P i
=
R p
i , takes an input x ∈ D x ⊂ R d and outputs a scalar prediction
g i ( w i ; x ) .
Here P i is the parameter space of sub-model g i and D x is the domain of the input.
By independence, we mean that any two distinct models g i and g j share no common model parameters:
[Equation]
In this sense, the change of g i ’s output, as a result of change of it parameters w i , does not affect the outputs of the other models
g j where j (cid:54) = i .
In addition, we require that there is no dominating sub-models over the others.
Speciﬁcally, we assume the following in this section:
Assumption 1 (No dominating sub-models) .
There exists a constant c ∈ (0 , 1) independent of m such that, for any parameter setting { w i : w i ∈
D i } mi =1 and input x ∈ D x ,
[Equation]
Furthermore, we assume that max[ | g 1 ( w 1 ; x ) | , · · · , | g m ( w m ; x ) | ] ∈ [ a, b ] ⊂ R for some constants a > 0 and b > 0 .
Remark 1.
This assumption guarantees that most of the outputs of the sub-models are at the same order, typically O (1) .
It makes sure that the resulting assembly model is not dominated by one or a minor portion of the sub-models.
This is typically seen for the neurons of neural networks.
We further make the following technical assumption, which is common in the literature.
Assumption 2 (Twice differentiablity and smoothness) .
Each sub-model g i is twice differentiable with respect to the parameters w i , and is β -smooth in the parameter space: there exists a positive number β such that, for any i ∈ [ m ] ,
[Equation]
This assumption makes sure that for each g i , the gradient is well-deﬁned and its Hessian has a bounded spectral norm.
Assembly model.
Based on these sub-models { g i } mi =1 , we construct an assembly model (or supermodel) f , using linear combination as follows:
[Equation]
where v i is the weight of the sub-model g i , and 1 /s ( m ) , as a function of m , is the scaling factor.
Here, we denote θ as the set of parameters of the assembly model, θ := ( w 1 , . . . , w m ) .
The total number of parameters that f has is p = (cid:80) mi =1 p i .
Typical choices for the weights v i are setting v i = 1 for all i ∈ [ m ] , or random i.i.d.
drawing v i from some zero-mean probability distribution.
Remark 2.
For the ease of analysis and simplicity of notation, we assumed that the outputs of assembly model f and sub-models g
i are scalars.
It is not difﬁcult to see that our analysis below also applies to the scenarios of ﬁnite dimensional model outputs.
The scaling factor 1 /s ( m ) .
The presence of the scaling factor 1 /s ( m ) is to keep the output of assembly model f at the order O (1) w.r.t.
m .
In general, we expect that s ( m ) grows with m .
In particular, when v i are chosen i.i.d.
from a probability distribution with mean zero, e.g., {− 1 , 1 } , the sum in Eq.(4) is expected to be of the order √ m , under the Assumption 1.
In this case, the scaling factor 1 /s ( m ) =
O (1 / √ m ) .
Now, we will show that the assembly model f has a small quadratic term in its Taylor expansion, when the size of the set of sub-models i.e. m , is sufﬁciently large.
Theorem 1.
Consider the assembly model f constructed in Eq.(4) with each v i either set to beor randomly drawn from {− 1 , 1 } , and suppose Assumption 1 and 2 hold.
Given a positive number
R > 0 and a parameter setting θ 0 ∈ R p , for any θ ∈ R p such that (cid:107) θ − θ
(cid:107) ≤ R , the absolute value of the quadratic term in Taylor expansion Eq.(1) is bounded by:
[Equation]
Proof.
In what follows, we don’t explicitly write out the dependence on θ and x in the Hessian
H :
= ∂ 2 f ∂θ 2 , for simplicity of notation.
We further denote H
g
i :=
∂ 2 g i ∂ w 2 i as the Hessian of g i .
We decompose the assembly model Hessian H as a linear combination of H g
i .
By the deﬁnition of the assembly model in Eq.(4), an arbitrary entry H jk of the Hessian can be written as: H jk = 1 s ( m ) (cid:80) mi
=1 v i ∂
2 g i
∂θ j ∂θ k .
Here θ j , θ k are two individual parameters of the assembly model f .
Note that ∂
2 g i
∂θ j ∂θ k is non-zero, only if both θ j and θ k are parameters of sub-model g i , i.e., θ j , θ k ∈ P i .
Hence, the assembly model Hessian can be decomposed as a linear combination of sub-model Hessians:
H =
[Equation]
i H g i .
Therefore, the quadratic term becomes
[Equation]
and its absolute value is bounded by
[Equation]
In the second inequality, we used that | v i | = 1 and that g i is β -smooth.
Because of the independence of the sub-models as seen in Eq.(2), the summation in the above equation becomes (cid:107) θ − θ 0 (cid:107) 2 , which is bounded by R 2 , as stated in the theorem condition.
Therefore, we conclude the theorem.
It is important to note that β is a constant and 1 /s ( m ) =
O (1 / √ m ) .
Then we have the following corollary in the limiting case.
Corollary 1.
Consider the assembly model f
under the same setting as in Theorem 1.
If the number of sub-models m increases to inﬁnity, then for all parameter θ 0 and input x , the quadratic term
[Equation]
as long as θ is within an O (1) -neighborhood of θ 0 , i.e., (cid:107) θ − θ 0 (cid:107) 2 ≤ R for some constant R > 0 .
Example: Two-layer neural networks.
A good example of this kind of assembly model is the two-layer neural network.
A two-layer neural network is mathematically deﬁned as:
[Equation]
where m is the number of hidden layer neurons, σ ( · ) is the activation function, x ∈ R d is the network input, and W ∈ R m × d and u ∈ R m are the parameters for the ﬁrst and second layer, respectively.
Here, we can view the i -th hidden neuron and all the parameters w i and u i that connect to it as the i -th sub-model: g i =
u i σ ( w Ti x ) .
We see that these sub-models do not share parameters, and each sub-model has d + 1 parameters.
In addition, the weights of the sub-models are all 1 .
By Corollary 1, the two-layer neural network becomes a linear model in any O (1) -neighborhoods, as the network width m increases to inﬁnity.
This is consistent with the previous observation that a two-layer neural network transitions to linearity Liu et al.
Gaussian distributed weights v i .
Another common way to set the weights v i of the sub-models is to independently draw each v i from N (0 , 1) .
In this case, v i is unbounded, but with high probability the quadratic term is still O
(log( m ) / √ m ) .
Please see the detailed analysis in Appendix A.
Hierarchy of assembly models.
In principle, we can consider the assembly model f , together with multiple similar models independent to each other, as sub-models, and construct a higher-level assembly model.
Repeating this procedures, we can have a hierarchy of assembly models.
Our analysis above also applies to this case and each assembly model is also O (1) -neighborhood linear, when the number of its sub-models is sufﬁciently large.
However, one drawback of this hierarchy is that the total number of parameters of the highest level assembly model increase exponentially with the number of levels.
We will see shortly that wide neural networks, as a hierarchy of assembly models, allows overlapping between sub-models, but still keeping the O (1)
-neighborhood linearity.
D EEP N EURAL N ETWORKS AS A SSEMBLING M ODELS
In this section, we view deep neural networks as multi-level assembly models and show how the
O (1) -neighborhood linearity arises naturally as a consequence of assembling.
Setup.
We start with the deﬁnition of multi-layer neural networks.
A L -layer full-connected neural network is deﬁned as follows:
[Equation]
where σ ( · ) is the activation function and is applied entry-wise above.
We assume σ ( · ) is twice differentiable to make sure that the network f is twice differentiable and its Hessian is well-deﬁned.
We also assume that σ ( · ) is an injective function, which includes the commonly used sigmoid , tanh , softplus , etc.
In the network, with m l being the width of l -th hidden layer, ˜ α ( l ) ∈ R m l (called pre-activations ) and α ( l ) ∈
R m l (called post-activations ) represent the vectors of the l -th hidden layer neurons before and after the activation function, respectively.
Denote θ :=
( W (1) , . . .
, W ( L ) ) , with W ( l ) ∈
R m l − 1 × m l , as all the parameters of the network, and θ ( l ) :=
( W (1) , . . .
, W ( l ) )
as the parameters before layer l .
We also denote p and p ( l ) as the dimension of θ and θ ( l ) , respectively.
Denote θ ( α ( l ) i ) as the set of the parameters that neuron α ( l ) i depends on.
This neural network is typically initialized following Gaussian random initialization: each parameter is independently drawn from normal distribution, i.e., ( W ( l ) 0 ) ij ∼ N (0 , 1) .
In this paper, we focus on the O (1) -neighborhood of the initialization θ 0 .
As pointed out by Liu et al.
(2020), the whole gradient descent trajectory is contained in a O (1) -neighborhood of the initialization θ 0 (more precisely, a Euclidean ball B ( θ 0 , R ) with ﬁnite R ).
Overview of the methodology.
As it is deﬁned recursively in Eq.(8), we view the deep neural network as a multi-level assembly model.
Speciﬁcally, a pre-activation neuron at a certain layer l is considered as an assembly model constructed from the post-activation neurons at layer l − 1 , at the same time its post-activation also serves as a sub-model for the neurons in layer l + 1 .
Hence, a preactivation ˜
α ( l ) i is an l -level assembly model, and the post-activation α ( l ) i is a ( l +1) -level sub-model.
To prove the O (1) -neighborhood linearity of the neural network, we start from the linearity at the ﬁrst layer, and then follow an inductive argument from layer to layer, up to the output.
The main argument lies in the inductive steps, from layer l to layer l +1 .
Our key ﬁnding is that, in the inﬁnite width limit, the neurons within the same layer become independent to each other, which allows us using the arguments in Section 2 to prove the O (1)
-neighborhood linearity.
Since the exact linearity happens in the inﬁnite width limit, in the following analysis we take m 1 , m 2 , . . .
, m L − 1 → ∞ sequentially, the same setting as in Jacot et al.
Note that for neural networks that ﬁnite but large network width, the linearity will be approximate; the larger the width, the closer to linear.
3. B ASE CASE : F IRST AND SECOND HIDDEN LAYER .
The ﬁrst hidden layer pre-activations are deﬁned as: ˜ α
(1) = 1 √ m 0 W (1) x , where m 0 =
d .
It is obvious that each element of ˜ α
(1) is linear in its parameters.
Each second layer pre-activation ˜ α (1) i , i ∈
[ m 2 ] can be considered as a two-layer neural network with parameters { W (1) , w (2) i } , where w (2) i is the i -th row of W (2) .
As we have seen in Section 2, the sub-models of a two-layer neural network share no common parameters, and the assembly model, which is the network itself, is O (1) -neighborhood linear in the limit of m 1 → ∞ .
3. F ROM LAYER l TO LAYER l + 1 .
First, we make the induction hypothesis at layer l .
Assumption 3 (Induction hypothesis) .
Assume that all the l -th layer pre-activation neurons ˜
α
( l ) are
O (1) -neighborhood linear in the limit of m 1 , . . .
, m l − 1 → ∞ .
Under this assumption, we will ﬁrst show two key properties about the sub-models, i.e., the l -th layer post-activation neurons α ( l ) : (1) level sets of these neurons are hyper-planes with co-dimension 1 in
O (1) -neighborhoods; (2) normal vectors of these hyper-planes are orthogonal with probability one in the inﬁnite width limit.
Setup.
Note that l -th layer neurons only depend on the parameters θ ( l ) .
Without ambiguity, denote the parameter space spanned by θ ( l ) as P .
We can write θ ( l ) as
[Equation]
where w ( l ) i is the i -th row of the weight matrix W ( l ) .
One observation is that the set of parameters of neuron α ( l ) i is θ ( α ( l ) i )
= θ
[Equation]
) ∪ w ( l )
[Equation]
Namely, θ ( l − 1) are shared by all l -layer neurons and each parameter in w ( l ) i is privately owned by only one neuron α ( l ) i .
Hence, we can decompose the parameter space P as: P = (cid:76) m l i =
P i , where common space P 0 is spanned by θ ( l − 1) and the private spaces P i , i (cid:54) = 0 , are spanned by w ( l ) i .
Deﬁne a set of projection operators { π i } m l i =
such that, for any vector z ∈ P , π i ( z ) ∈ P i , and (cid:80) m
l i =
π i ( z ) =
z .
Property 1: Level sets of neurons are hyper-planes.
The ﬁrst key observation is that each of the l -th layer post-activations α ( l ) has linear level sets in the O (1) -neighborhoods.
Theorem 2 (Linear level sets of neurons) .
Assume the induction hypothesis Assumption 3 holds.
Given a ﬁx input x , for each post-activation α ( l ) i , i ∈ [ m l ] , the level set
[Equation]
is linear or an empty set, for all c ∈ R , where N ( θ 0 ) is an O (1) -neighborhood of θ 0 .
Moreover, these level sets are parallel to each other: for any c 1 , c 2 ∈ R , if S c 1 (cid:54) = ∅ and S c 2 (cid:54) = ∅ , then S c 1 and
S c 2 are parallel to each other.
Remark 3.
With abuse of notation, we did not explicitly write out the dependence of the level set on the neuron α ( l ) i , the input x , and the network initialization θ 0 .
Proof.
First, note that all the pre-activation neurons ˜ α ( l ) are linear in N ( θ 0 ) in the limit of m 1 , . . .
, m l − 1 → ∞ , as assumed in the induction hypothesis.
This linearity of these function guarantees that all the level sets of the pre-activations { θ ( l ) :
˜
α
( l ) i ( θ ( l ) ; x ) =
c } ∩ N ( θ 0 ) , for all c ∈ R and i ∈ [ m l ] are either linear or empty sets, and they are parallel to each other.
Since the activation function σ ( · ) is element-wisely applied to the neurons, it does not change the shape and direction of the level sets.
Speciﬁcally, if { θ ( l ) : α ( l ) i ( θ ( l ) ; x ) = c } is non-empty, then { θ ( l ) : α ( l ) i ( θ ( l ) ; x )
= c } = { θ ( l ) :
˜ α ( l )
i ( θ ( l ) ; x ) = σ − 1 ( c ) } .
Therefore, { θ ( l ) : α ( l ) i ( θ ; x ) =
c } ∩ N ( θ 0 ) is linear or an empty set, and the activation function σ ( · ) preserves the parallelism.
This means that, although each of the neurons α ( l ) is constructed by a large number of neurons in previous layers containing tremendously many parameters and is transformed by non-linear functions, it actually has a very simple geometric structure.
A geometric view of the post-activation neurons is illustrated in Figure 1.
As the neurons have scalar outputs and σ ( · ) is injective by assumption, each level set is a piece of a co-dimension 1 hyper-plane in the p -dimensional parameter space P .
Hence, at each point of the hyper-plane there exists a unique (up to a negative sign) unit-length normal vector n , which is perpendicular to the hyper-plane.
A direct corollary of the linearity of the level sets, Theorem 2, is that the normal vector n is identical everywhere in the O (1) - neighborhood N ( θ 0 ) .
Corollary 2.
Assume the induction hypothesis Assumption 3 holds.
Given a speciﬁc neuron α ( l ) i and an input x , for any θ ( l ) 1 , θ ( l ) 2 ∈ P ∩ N ( θ 0 ) , n ( θ ( l ) 1 ) = n ( θ ( l ) 2 ) .
Hence, we can deﬁne n i as the normal vector for each neuron α ( l ) i .
The next property is about the set of normal vectors { n i } m l i =1 .
Property 2: Orthogonality of normal vectors n i .
Now, let’s look at the directions of the normal vectors n i .
Note that the neuron α ( l ) i does not depend on the parameters w ( l ) j for any j (cid:54)
=
i , hence π j ( n i ) =
for all j / ∈ { i, 0 } .
That means:
Proposition 1.
For all i ∈ [ m l ] , the normal vector n i resides in the sub-space P i ⊕ P 0 , and can be decomposed as n i =
π i ( n i ) + π 0 ( n i ) .
As π i ( n i ) ∈ P i , and P i ∩ P
j = { 0 } for i (cid:54) =
j , the components { π i ( n i ) } m l i =1 are orthogonal to each other:
[Equation]
By Proposition 1, to show the orthogonality of the normal vectors { n i } m l i =1 , it sufﬁces to show the orthogonality of { π 0 ( n i ) } m l i =1 .
Since it is perpendicular to the corresponding level sets, the normal vector n i is parallel to the gradient ∇ α
( l ) i , up to a potential negative sign.
Similarly, the projection π 0 ( n i ) is parallel to the partial gradient ∇ θ ( l − 1)
˜ α ( l ) i .
By the deﬁnition of neurons in Eq.(8) and the constancy of n i in the neighborhood N ( θ 0 ) , we have
[Equation]
Here, because α ( l − 1) is an m l -dimensional vector, ∇ α ( l − 1) is an m l × p ( l − 1) matrix, where p ( l − 1) denotes the size of θ ( l − 1) .
It is important to note that the matrix ∇ α ( l − 1) is shared by all the neurons in layer l and is independent of the index i , while the vector w ( l ) i, 0 , which is w ( l ) i at initialization, is totally private to the l -th layer neurons.
Recall that the vectors { w ( l ) i, 0 } m l i =1 are independently drawn from N ( 0 , I m l − 1 × m l − 1 ) .
As is wellknown, when the vector dimension m l − 1 is large, these independent random vectors { w ( l ) i, 0 } are nearly orthogonal.
When in the inﬁnite width limit, the orthogonality holds with probability 1 : ∀ (cid:15) >
[Equation]
From Eq.(11), we see that the partial gradients {∇ θ ( l − 1) ˜
α ( l ) i } m l
i =1 are in fact the result of applying a universal linear transform, i.e., ∇ α ( l − 1) , onto a set of nearly orthogonal vectors.
The following lemma shows that the vectors remain orthogonal even after this linear transformation.
Lemma 1.
[Equation]
See the proof in Appendix C.
Recalling Eq.(10) and the fact that the normal vectors π 0 ( n i ) are parallel to the gradients ∇ θ ( l − 1)
˜ α ( l ) , we immediately have that these normal vectors are orthogonal with probability 1 , in the limit of m l − 1 → ∞ , as stated in the following theorem.
Theorem 3 (Orthogonality of normal vectors) .
[Equation]
Remark 4.
As seen in Section 2, a two-layer neural network Eq.(7) is an assembly model with independent sub-models.
The normal vectors { n i } m l i =1 are exactly orthogonal to each other, even for ﬁnite hidden layer width.
See Appendix B for an numerical veriﬁcation of this orthogonality.
This orthogonality allows the existence of a new coordinate system such that all the normal vectors are along the axes.
Speciﬁcally, in the old coordinate system O , each axis is along an individual neural network parameter θ k ∈ θ with k ∈ [ p ] .
After an appropriate rotation, O can be transformed to a new coordinate system O (cid:48) such that each normal vector n i is parallel to one of the new axes.
See Figure 2 for an illustration.
Denote θ (cid:48) as the set of new parameters that are long the axes of new coordinate system O (cid:48) : θ (cid:48)
=
R θ , where R is a rotation operator.
The interesting observation is that each neuron α ( l ) i essentially depends on only one new parameter θ (cid:48)
i ∈ θ (cid:48) , because its gradient direction is parallel with one normal vector n i and n i is along one axis in the new coordinate system O (cid:48) .
Moreover, different neurons depends on different new parameters, as normal vectors are never parallel.
Hence, these neurons are essentially independent to each other.
This view actually allows us to use the analysis for assembling independent models in
Section 2 to show the O (1) -neighborhood linearity at layer l + 1 , as follows.
Linearity of the pre-activations in layer l +1 .
Having the properties for neurons in layer l discussed above, we are now ready to analyze the pre-activation neurons ˜ α
( l +1) in layer l + 1 as assembly models.
Recall that each pre-activation ˜ α
( l +1) is deﬁned as:
[Equation] [Equation]
Without ambiguity, we omitted the index i for the pre-activation ˜ α
( l +1) and the weights w ( l +1) .
We want to derive the quadratic term (i.e., the Lagrange remainder term) of ˜ α
( l +1) in its Taylor expansion and to show it is arbitrarily small, in the O (1) -neighborhood
N ( θ 0 ) .
First, let’s consider the special case where the parameters w ( l +1) are ﬁxed, i.e., w ( l +1) =
w ( l +1), and ˜ α
( l +1) only depends on θ ( l ) .
This case conveys the key concepts of the O (1) -neighborhood linearity after assembling.
We will relax this constraint in Appendix D.
Consider an arbitrary parameter setting θ ∈ N ( θ 0 ) , and let R :
= (cid:107)
θ − θ 0 (cid:107) =
O (1) .
By the deﬁnition of assembly model ˜ α
( l +1) in Eq.(15), the quadratic term in its Taylor expansion Eq.(1) can be decomposed as:
[Equation]
where H ˜ α ( l +1) =
[Equation]
2 ˜ α
( l +1)
∂θand
H α ( l ) i =
∂
2 α ( l ) i ∂θ 2 are the Hessians of ˜ α
( l +1) and α ( l ) i , respectively, and ξ ∈ P is on the line segment between θ ( l ) and θ ( l ) 0 .
We bounded the term in the square bracket using a treatment analogous to Theorem 1.
First, as seen in Property 1, the level sets of α ( l ) i are hyper-planes with co-dimension 1 , perpendicular to n i .
Then the value of α ( l ) i only depends on the component ( θ − θ 0 ) T n i , and Hessian H α ( l ) i is rank 1 and can be written as H α ( l ) i
=
c n i n Ti , with some constant c ≤ β .
Hence, we have
[Equation]
Here β is the smoothness of the sub-model, i.e., post-activation α ( l ) .
By Eq.(16), we have:
[Equation] [Equation]
Second, by the orthogonality of normal vectors as in Theorem 3, we have
[Equation]
Combining the above two equations, we obtain the following theorem which upper bound the magnitude of the quadratic term of ˜ α
( l +1) :
Theorem 4 (Bounding the quadratic term) .
Assume that the parameters in layer l + 1 are ﬁxed to the initialization.
For any parameter setting θ ∈ N ( θ 0 ) ,
[Equation]
For the Gaussian random initialization, the above upper bound is of the order O (log( m l ) / √ m l ) .
Hence, as m l → ∞ , the quadratic term of pre-activation ˜ α
( l +1) in the ( l + 1) -th
layer vanishes, and the function ˜
α ( l +1) becomes linear.
Concluding the induction analysis.
Applying the analysis in Section 3.2, Theorem 2 - 4, with a standard induction argument, we conclude that the neural network, as well as each of its hidden pre-activation neurons, is O (1)
-neighborhood linear, in the inﬁnite network width limit, m 1 , . . .
, m L − 1 → ∞ .
Extension to other architectures.
In Appendix E, we further show that the assembly analysis and the O (1) -neighborhood linearity also hold for DenseNet (Huang et al., 2017).
C ONCLUSION AND F UTURE DIRECTIONS
In this work, we viewed a wide fully-connected neural network as a hierarchy of assembly models.
Each assembly model corresponds to a pre-activation neuron and is linearly assembled from a set of sub-models, the post-activation neurons from the previous layer.
When the network width increases to inﬁnity, we observed that the neurons within the same hidden layer become essentially independent.
With this property, we shown that the network is linear in an O (1) -neighborhood around the network initialization.
We believe the assembly analysis and the principles we identiﬁed, especially the essential independence of sub-models, and their iterative construction, are signiﬁcantly more general than the speciﬁc structures we considered in this work, and, for example, apply to a broad range of neural architectures.
In future work, we aim to apply the analysis to general feed-forward neural networks, such as architectures with arbitrary connections that form an acyclic graph. A CKNOWLEDGEMENTS
We are grateful for the support of the NSF and the Simons Foundation for the Collaboration on the
Theoretical Foundations of Deep Learning 1 through awards DMS-2031883 and #814639.
We also acknowledge NSF support through IIS-1815697 and the TILOS institute (NSF CCF-2112665)
A R ANDOM SUB - MODEL WEIGHTS WITH G AUSSIAN DISTRIBUTION
Let’s consider the case where the weights v i of the sub-models are randomly drawing from Gaussian distributions, for example the normal distribution N (0 , 1) .
That is
[Equation]
where v i ’s are randomly drawn from N (0 , 1) .
In this case, there is no strict upper bounded on the absolute values of weights | v i | .
But with high probability, we can still bound them using the following lemma.
Lemma 2.
Let v 1 , ..., v m be i.i.d.
Gaussian variables.
Then with probability at least 1 −
[Equation]
The above lemma can be obtained by letting t = log m in Eq.
(2 . 10) in Vershynin (2018) and using union bound.
Using the same analysis as in the proof of Theorem 1, we have, with probability at least
[Equation]
Under Assumption 2, β is a constant.
Note that as the number of m goes to inﬁnity, the probability 1 − 2 e − 0 .
5log 2 m +log m converges to 1 .
Since 1 /s ( m ) is O (1 / √ m ) , hence, we get
[Equation]
When m → ∞ , the quadratic term of the Taylor expansion converges to 0 , with probability 1 .
B E XPERIMENTAL VERIFICATION OF THE ORTHOGONALITY IN T HEOREM
In this section, we run experiments to verify the theoretical ﬁnding in Theorem 3, that the normal vectors n i within the same hidden layer tends to become more and more orthogonal, as the layer width increases.
Speciﬁcally, we run two experiments.
In the ﬁrst one, we use full-batch gradient descent to train 4 -layer fully-connected neural networks on a simple dataset D : 20 images randomly selected from
CIFAR-10 of the classes “airplane” or “bird”.
In the network, all the hidden layers have the same width m .
Given a training sample and any two neurons ˜ α
i and ˜ α j in the same layer, we compute the cosine cos θ ij between the gradients ∇ ˜ α
i and ∇ ˜ α j as
[Equation]
As a metric to measure the orthogonality of the gradients, the average absolute cosine | cos θ | is calculated by averaging | cos θ ij | over all pairs of ( i, j ) with i (cid:54) =
j and over all data samples.
Left panel of Figure 3 shows the numerical results of the average absolute cosine | cos θ | as a function of network width m .
We see that, as m increases, | cos θ | monotonically decreases towards zero, verifying that the neuron gradients becomes more and more orthogonal.
In the second experiment, we consider a bottleneck network, which has three hidden layers, with the 1 st and 3 rd layers with large width m = 1000 and 2 nd layer with width m b as the bottleneck layer.
We train this bottleneck network using full-batch gradient descent on the same dataset D as in the ﬁrst experiment.
Given a training sample and any two neurons ˜ α
i and ˜ α j in the bottleneck layer (i.e., 2 nd hidden layer), we compute the cosine of the angle between their gradients using Eq.
and then take the average of its absolute value over all pairs of different neurons and over all data samples.
We use this averaged absolute cosine | cos θ | as the metric to measure the orthogonality of the gradients.
Right panel of Figure 3 shows the relation between | cos θ | and the bottleneck width m b .
It is clear that | cos θ | monotonically decreases towards zero as m b increase, verifying the orthogonality of gradients of bottleneck neurons.
C P ROOF OF L EMMA
As in Eq.
(11), the partial gradient ∇ θ ( l − 1) ˜
α ( l ) i can be written as:
[Equation]
Hence, we have
[Equation]
Note that w ( l ) i, 0 and w ( l ) j, 0 are independent to each other when i (cid:54) =
j , and ∇ α ( l − 1) is a ﬁxed matrix independent of w ( l ) i, 0 and w ( l ) j, 0 .
Denote a j := ∇ α ( l − 1) ( ∇ α ( l − 1) )
T w ( l ) j, 0 ∈ R m l − 1 .
Then, ( ∇ θ ( l
[Equation]
1) ˜ α
( l
[Equation]
the inner product of two independent vectors w ( l ) i, 0 and a j with a scaling factor 1 /m l − 1 .
When conditioned on the vector a j , the quantity in Eq.(23) is a Gaussian variable:
[Equation]
because w ( l ) i is initialized following N ( 0 , I ) .
In the limit of m l − 1 → ∞ , if the variance a Tj a j m
[Equation]
−converges to 0 , then this Gaussian variable should also converges to zero with probability 1 , from which we can conclude the lemma.
In the following, we will show that the variance a Tj a j m 2 l − 1 converges to 0 with probability 1 in this limit.
First, we need the following lemma to upper bound the spectral norm of ∇ α ( l ) .
The proof is deferred to Section C.1.
Lemma 3.
Consider the neural networks deﬁned in Eq.(8) with random Gaussian initialized parameters.
There exist a constant C > 0 , such that, with probability at least 1 − 4( l + 1) e
[Equation]
m/ 2 , we have
[Equation]
with m = min { m 1 , m 2 , . . .
, m l − 1 } .
Since a j = ∇ α ( l − 1) ( ∇ α ( l − 1) )
T w ( l ) j, 0 , using Lemma 3, we can bound (cid:107) a Tj a j (cid:107) by
[Equation]
Recall that w ( l ) j, 0 ∈ R m l − 1 follows the Gaussian distribution N ( 0 , I ) .
Then (cid:107) w ( l ) j, 0 (cid:107) 2 ∼ χ 2 ( m l − 1 ) .
By Lemma 1 in Laurent & Massart (2000), we have with probability at least 1 − e − m l − 1 ,
[Equation]
By union bound, we have with probability 1 − 2( L + 1) e − m/ 2 − e − m l − 1 , the variance
[Equation]
m
[Equation]
−
[Equation]
In the inﬁnite network width limit m 1 , . . .
, m l − 1 → ∞ , we see that the variance converges to 0 and the probability converges to 1 .
C. P ROOF OF L EMMA
Proof.
First, note that ∇ α ( l − 1) ( ∇ α ( l − 1) )
T can be decomposed as
[Equation]
Then, its spectral norm can be bounded by
[Equation]
(cid:13)(cid:13)(cid:13)(cid:13)(cid:13)(cid:13)
[Equation]
In the following, we need to bound the terms
[Equation]
To simplify the presentation of the proof, we assume in the following that each network hidden layer has the same width m .
We leave the general analysis for the readers.
We use the following lemma to bound the spectral norm of the weight matrices at initialization.
Lemma 4.
If each component of W ( l ) 0 , l ∈ [ L ] , is i.i.d.
drawn from N (0 , 1) , then with probability at least 1 − 2 e − m/ 2 ,
[Equation]
See the proof in Section C.2.
There is also a lemma that bounds the Euclidean norm of each hidden layer neuron vector α ( l ) .
Lemma 5 (Modiﬁed Lemma F.3 of (Liu et al., 2020)) .
There exists constants C α , B α > 0 such that, with probability at least 1 − 2( L + 1) e
[Equation]
m/ 2 , for all l ∈
[ L ] ,
[Equation]
Using the above two lemmas, we can bounded those two terms.
At initialization, we have, with probability at least 1 − 2 e − m/ 2 ,
[Equation]
and with probability at least 1 − 2( L + 1) e − m/ 2 , for all l ∈ [ L ] ,
[Equation] [Equation]
Here Σ (cid:48)
( l ) is a diagonal matrix, with the diagonal entry Σ (cid:48)
( l ) ii = σ (cid:48)
(˜ α ( l ) i ) and L σ is the degree of
Lipschitz continuity of the activation function σ ( · ) .
Now, using the above results, we can upper bound the spectral norm of the matrix ∇ α ( l − 1) ( ∇ α ( l − 1) ) T .
With probability 1 − 4( L + 1) e − m/ 2 , we have
[Equation]
(cid:13)(cid:13)(cid:13)(cid:13)(cid:13)
[Equation]
Since l ≤ L , we can see that, for sufﬁcient large network width m , the spectral norm (cid:107)∇ α ( l − 1) ( ∇ α ( l − 1) )
T (cid:107) is bounded by a constant.
C. P ROOF OF L EMMA
Proof.
Consider an arbitrary random matrix A ∈ R m a × m b with each entry
A i,j ∼ N (0 , 1) .
By
Corollary 5.35 of Vershynin (2010), for any t > 0 , we have with probability at least 1 − 2exp( − t 2 2 ) ,
[Equation]
For the initial neural network weight matrices, we have
[Equation]
Letting t = √ m and noting that m > d , we ﬁnish the proof.
D I NCLUDING w ( l +1) AS PARAMETERS
Now, we consider the more general case where parameters in layer l + 1 are not ﬁxed.
Then, the quadratic term of the pre-activation ˜ α
( l +1) is written as:
[Equation]
where ξ is some point between θ 0 and θ .
Note that ˜ α
( l +1) is linear in w ( l +1) , hence, ∂ 2 ˜ α
( l +1) ( ∂ w ( l +1) ) 2 is always a zero matrix.
Hence, term A ≡ 0 .
Moreover, by Theorem 4, the term B becomes zero, as the width m l increases to inﬁnity.
For the term C , we note that
[Equation]
Here, α ( l ) = ( α ( l ) 1 , . .
, α ( l ) m l ) is the vector of the neurons in layer l and ∇ α ( l ) is the matrix of the ﬁrst-order derivative of the vector α ( l ) .
Using Lemma 3, we have an upper bound on the spectral norm: (cid:107)∇ α ( l ) (cid:107) ≤ √ C , with C > 0 being a constant.
Therefore, we have
[Equation]
In the limit of m l → ∞ , term C converges to 0 .
Therefore, we have proved that each ( l + 1) -th layer pre-activation ˜ α
( l +1) has a vanishing quadratic term in its Taylor expansion Eq.(1), and hence becomes linear, in the limit of m l → ∞ .
E D ENSE N ET
In a DenseNet (Huang et al., 2017), a l -th layer neuron takes all previous layer neurons as inputs:
[Equation] [Equation]
where the “Concat” function concatenates all the vector arguments into a single long vector with m being the size, and ∗ is the matrix multiplication.
The pre-activation can be viewed as the sum of l linear functions, ˜ α ( l )
= (cid:80) ll (cid:48)
=
1 ˜ α ( l (cid:48) )
U , where each ˜ α ( l (cid:48) )
U := 1 √ m U ( l (cid:48) )
α ( l (cid:48) ) has a similar form as the pre-activation in full-connected neural network Eq.(8), but with parameters U ( l (cid:48) ) being a subset of W ( l ) .
Hence, using the analysis in Section 3, in the inﬁnite network width limit and in O (1) - neighborhoods of the initialization, each of the pre-activations of the DenseNet is a summation of l ≤ L linear functions, and hence is linear.
Therefore, the DenseNet is also linear in O (1) - neighborhoods of the initialization.