Feature Learning in L 2 -regularized DNNs: Attraction/Repulsion and Sparsity
Abstract
We study the loss surface of DNNs with L 2 regularization.
We show that the loss in terms of the parameters can be reformulated into a loss in terms of the layerwise activations Z ℓ of the training set.
This reformulation reveals the dynamics behind feature learning: each hidden representations Z ℓ are optimal w.r.t.
to an attraction/repulsion problem and interpolate between the input and output representations, keeping as little information from the input as necessary to construct the activation of the next layer.
For positively homogeneous nonlinearities, the loss can be further reformulated in terms of the covariances of the hidden representations, which takes the form of a partially convex optimization over a convex cone.
This second reformulation allows us to prove a sparsity result for homogeneous
DNNs: any local minimum of the L 2 -regularized loss can be achieved with at most N ( N + 1) neurons in each hidden layer (where N is the size of the training set).
We show that this bound is tight by giving an example of a local minimum that requires N 2 / 4 hidden neurons.
But we also observe numerically that in more traditional settings much less than N 2 neurons are required to reach the minima.
Introduction
It is generally believed that the success of deep learning hinges on the ability of deep neural networks (DNNs) to learn features that are well suited to the task they are trained on.
There is however little understanding of what these features are and how they are selected by the network.
On the other hand recent results [12] have shown that it is possible to train DNNs without feature learning.
This suggests the existence of two regimes of DNNs, a kernel regime (also called lazy or
NTK regime) without feature learning and an active regime where features are learned.
The presence or absence of feature learning can depend on multiple factors, such as the initialization/parametrization of DNNs [3, 25, 17, 13], very large depths [10] or large learning rate [16, 5].
In this paper, we focus on the impact of L 2 regularization on feature learning in DNNs.
This analysis is further motivated by recent results [8, 9, 4] which show that the implicit bias of gradient descent on losses such as the cross entropy (which decay exponentially towards infinity) is essentially the same as the bias induced by L 2 regularization in DNNs.
Generally, the bias induced by the addition of L 2 -regularization on the parameters θ of a model f θ can be described by the representation cost R ( f ) =
min θ : f θ = f
∥ θ ∥ 2 , since min θ C ( f θ ) + λ ∥ θ ∥ 2 = min f C ( f ) + λR ( f ) .
In deep linear networks, the addition of L 2 regularization on the parameters corresponds to the addition of an L p -Schatten norm regularization to the represented matrix, with p = 2 / L where L is the depth of the network [9, 6].
This implies a sparsity effect that increases with depth L .
In non-linear networks the sparsity effect of L 2 -regularization has been described for shallow networks ( L = 2 ) in [1, 20, 23] or for shallow non-linear networks with added linear layers [19].
Though it seems natural that this effect should become stronger for deeper networks, to our knowledge little theoretical work has been done in this area.
1.1 Contributions
In this paper, we study the minima of the loss of L 2 regularized fully-connected DNNs of depth L .
We propose two reformulations of the loss:
The first reformulation expresses the loss in terms of the representations Z 1 , . . .
, Z L (the layer pre-activations of every input in the training set) of every layer of the network.
This reformulation has the advantage of being local - the optimal choice of a layer Z ℓ only depends on its neighboring layers Z ℓ − 1 and Z ℓ +1 .
The optimal choice of representation Z ℓ is at the balance between an attractive force (determined by the previous layer) and a repulsive force (coming from the next layer).
It illustrates how the representations Z 1 , . . .
, Z L −interpolates between the input layer Z 0 and output layer Z L . 2.
The second reformulation expresses the loss in terms of the covariances of the representation before applying the non-linearity K ℓ = Z Tℓ Z ℓ and after the non-linearity K σℓ =
( Z σℓ ) T Z σℓ .
For positively homogeneous non-linearities and when the number of neurons n ℓ in every hidden layer ℓ is larger or equal to N ( N + 1) for N the number of datapoints, this reformulation is an optimization of a (partially convex) loss over the covariances ( K 1 , K σ 1 ) , . . .
, ( K L − 1 , K σL − 1 ) and the outputs Z L , restricted to a (translated) convex cone.
This reformulation does not depend on the number of neurons n ℓ in the hidden layers (as long as n ℓ ≥ N ( N + 1) ).
The second reformulation implies that for positively homogeneous non-linearities such as the ReLU, as the number of neurons in the hidden layers n ℓ increase, the global minimum of the L 2 -regularized loss goes down until reaching a plateau (i.e. adding neurons does not lead to an improvement in the loss).
This illustrates the sparsity effect of L 2 -regularization, where the optimum reached on a very large network is equivalent to a much smaller network.
The start of the plateau hence gives a measure of sparsity of the global minimum.
We show that the minimal number of neurons n ℓ to reach this plateau is determined by a notion of rank Rank σ ( K ℓ , K σ ℓ ) of the covariance pairs.
We show that Rank σ ( K ℓ , K σℓ ) ≤ N ( N + 1) , i.e. the plateau must start before N ( N + 1) and that the scaling of this upper bound is tight by giving an example dataset such that at the optimum Rank σ ( K ℓ , K σℓ ) ≥ N 2 / 4 .
We also present other datasets where the start of the plateau is either constant or grows linearly with the number of datapoints.
We also observe empirically that the plateau can start at much smaller widths for real data such as MNIST and the teacher/student setting.
Setup
We consider fully-connected deep neural networks with L + 1 layers, numbered from 0 (the input layer) to L (the output layer), with nonlinear activation function σ : R → R (e.g. the ReLU σ ( x ) = max { 0 , x } )).
Each layer ℓ contains n ℓ neurons and we denote n = ( n 1 , . . .
, n L ) the widths of the network.
Given an input dataset { x 1 , . . .
x N } ⊂ R n 0 of size N , we consider the data matrix
X = ( x 0 , . . .
, x n ) ∈ R n 0 × N , and encode the activations and preactivations of the whole data set by considering the pre-activations Z ℓ ( X ; W ) ∈ R n ℓ × N and activations Z σℓ ( X ; W ) ∈ R ( n ℓ +1) × N given by:
[Equation]
where W = ( W ℓ ) ℓ =1 ,...,L is the collection of n ℓ × ( n ℓ − 1 + 1)
-dim weight matrices W ℓ , σ ( Z ℓ ) is obtained by applying elementwise the nonlinearity σ to the matrix Z ℓ , and the scalar β ∈ R represents the amount of bias (i.e. when β =
there is no bias, when β = 1 this definition is equivalent to the traditional definition of bias).
The output of the network is the pre-activation of the L -th layer Z L .
We often drop the dependence on the weights W and on the dataset X and simply write Z ℓ and Z σℓ .
We denote f W : R n 0 → R n L the network function , which maps an input x to the pre-activation at the last layer.
2.1 L 2 -Regularized Loss and Representation Cost
Given a general cost functional C : R n L × N → R , the L 2 -regularized loss of DNNs of widths n is
[Equation]
where ∥ W ∥ is the L 2 -norm of W understood as a vector.
Note that ∥ W ∥ 2 = (cid:80) Lℓ =
∥ W ℓ ∥ 2 F where ∥·∥ F denotes the Frobenius norm.
From now on, we often omit to specify the widths n and simply write L λ .
The additional regularization cost should bias the network toward low norm solutions.
This bias on the parameters leads to a bias in function space, which is described by the so-called representation cost R n ( f ) defined on functions f : R n 0 → R n L :
[Equation]
where the minimum is taken over all choices of parameters W of a width n network, with fixed β bias amount, such that the network function f W equals f .
By convention, if no such parameters exist then R n ( f ) = + ∞ .
Similarly, given an input-output pair X ∈ R n 0 × N , Y ∈ R n L × N , the representation cost R n ( X, Y ) is:
[Equation]
with again the convention that if there exists no weight W such that Z L ( X, W )
=
Y , then
R n ( X, Y ) =
+ ∞ .
The representation cost R n naturally describes the bias induced by the L 2regularized loss of DNNs since:
[Equation]
Two Reformulations of the Regularized Loss: Hidden Representation and Covariance Optimization
We now provide two reformulations of the L 2 -regularized loss L λ ( W ) and representation cost
R n ( X, Y ) , which both put emphasis on the hidden representations Z ℓ and how they are progressively modified throughout the neural network.
The first reformulation holds for general non-linearities while the second only applies to networks with homogeneous nonlinearities.
3.1 Feature optimization : attraction/repulsion
The key observation is that the weights W ℓ can be decomposed as follows:
[Equation]
[Figure]
where the residual matrix ˜ W ℓ is orthogonal to Z σℓ − 1 , i.e. ˜ W ℓ Z σℓ − 1 = 0 , and ( · ) + is the Moore-Penrose pseudo-inverse.
This stems from the fact that W ℓ = W ℓ P Im Z σℓ − 1 + ˜ W ℓ where ˜ W ℓ := W ℓ P
(Im Z σℓ − 1 ) ⊥ , and P
Im Z σℓ − 1 , resp.
P (Im Z σℓ − 1 ) ⊥ , is the orthogonal projection on Im Z σℓ − 1 , resp.
on the orthogonal complement of Im Z σℓ − 1 ; one concludes using the facts that P Im Z σℓ − 1 =
Z σℓ − 1 (cid:0)
Z σℓ − 1 (cid:1) + and Z ℓ =
W ℓ Z σℓ − 1 .
Note that the matrix ˜ W ℓ does not affect either the hidden representations Z ℓ nor the output Z L .
Besides, the Frobenius norm of W ℓ can be rewritten as || W ℓ || 2 F = || Z ℓ (cid:0) Z σℓ
[Equation]
1 (cid:1) + || 2 F + || ˜ W ℓ
|| 2 F .
When minimizing the L 2 -regularized cost, it is therefore always optimal to consider null residual matrices ˜
W ℓ = 0 , resulting in a reformulation of the cost which only depends on the pre-activations Z ℓ :
Proposition 1.
The infimum of L λ ( W ) =
C ( Z L ( X ; W ))
+ λ ∥ W ∥ 2 , over the parameters W ∈ R P is equal to the infimum of
[Equation]
over the set Z of hidden representations Z = ( Z ℓ ) ℓ =1 ,...,L such that Z ℓ ∈ R n ℓ × N , Im Z Tℓ +1 ⊂
Im ( Z σℓ ) T , with the notations Z σ 0 = (cid:18)
Xβ 1 TN (cid:19) and Z σℓ = (cid:18) σ ( Z ℓ ) β 1 TN (cid:19) .
Furthermore, if W is a local minimizer of L λ then ( Z 1 ( X ; W ) , . . .
, Z L ( X ; W )) is a local minimizer of L rλ .
Conversely, keeping the same notations, if ( Z ℓ ) ℓ =1 ,...,L is a local minimizer of L rλ , then
W =
( Z ℓ ( Z σℓ − 1 ) + ) ℓ =1 ,...,L is a local minimizer of L λ .
Note that one can also reformulate the representation cost:
[Equation]
The representation in terms of the output and hidden representations have several interesting properties, especially when it comes to minimization:
The optimization becomes local in the sense that all terms and constraints depend either only on the output cost C ( Z L ) or on two neighboring terms (e.g. (cid:13)(cid:13)(cid:13) Z ℓ (cid:0) Z σℓ − 1 (cid:1) + (cid:13)(cid:13)(cid:13) 2 F ).
As a result, the (projected) gradient of the loss L rλ ( Z 1 , ..., Z L ) w.r.t.
to Z ℓ only depends on Z ℓ − 1 , Z ℓ and Z ℓ +1 .
This is in contrast to the optimization of L λ ( W ) , where the gradient of C ( Z L ) with respect to W ℓ depends on all parameters W 1 , . . .
, W L .
The value (cid:13)(cid:13)(cid:13) Z ℓ (cid:0) Z σℓ − 1 (cid:1) + (cid:13)(cid:13)(cid:13) 2 F represents a ’multiplicative distance’ between Z ℓ and Z σℓ −(in contrast to the ’additive distance’ (cid:13)(cid:13)
Z ℓ − Z σℓ − 1 (cid:13)(cid:13) 2 F ); the representation Z ℓ therefore interpolates multiplicatively between Z ℓ − 1 and Z ℓ +1 .
This is most obvious for linear networks (i.e. σ = id and β = 0 ): in this case, one can check that at any global minimizer, the covariances of the hidden layers equal Z Tℓ Z ℓ = X T
( X − T Z TL Z L X − 1 ) ℓL X , interpolating between the input covariance X T X and output covariance Z TL Z L .
A lot of work has been done to propose biologically plausible training methods for DNNs [2, 11], in contrast to backpropagation which is not local.
A line of work [21, 18, 22], propose a biologically plausible optimization technique which minimizes a cost which closely resembles our first reformulation, with the multiplicative distances (cid:13)(cid:13)(cid:13) Z ℓ (cid:0) Z σℓ − 1 (cid:1) + (cid:13)(cid:13)(cid:13) 2 F replaced by additive ones (cid:13)(cid:13)
Z ℓ − Z σℓ − 1 (cid:13)(cid:13) 2 F .
Due to this change, there is no direct correspondence between the networks trained with this biologically plausible technique and those trained with backpropagation.
If one could extend this training technique to work with multiplicative distances one could guarantee such a direct correspondence.
The optimization leads to an attraction-repulsion algorithm.
If we optimize only on the term Z ℓ and fix all other representations, the only two terms that depend on Z ℓ are (cid:13)(cid:13)(cid:13)
Z ℓ (cid:0) Z σℓ − 1 (cid:1) + (cid:13)(cid:13)(cid:13) 2 F and (cid:13)(cid:13)(cid:13) Z ℓ +1 ( Z σℓ ) + (cid:13)(cid:13)(cid:13) 2 F .
The former term is attractive as it pushes the representations Z ℓ towards the origin (and hence pushes the representations at depth ℓ of every input towards each other), especially along directions where Z σℓ − 1 is small.
The latter term is repulsive as it pushes the representations Z σℓ away from the origin, especially along directions where Z ℓ +1 is large.
This attraction-repulsion process is similar to the Information Bottleneck theory [24]: the repulsive term ensure that Z ℓ keeps enough information about the inputs to reconstruct Z ℓ +1 , while the attractive term pushes Z ℓ to keep as little information as possible.
The attraction and repulsion forces of of the ℓ -th layer are the derivative ∂ Z ℓ (cid:13)(cid:13)(cid:13) Z ℓ (cid:0)
Z σℓ − 1 (cid:1) + (cid:13)(cid:13)(cid:13) 2 F and ∂ Z ℓ (cid:13)(cid:13)(cid:13) Z ℓ +1 ( Z σℓ ) + (cid:13)(cid:13)(cid:13) 2 F which are both n ℓ × N matrices.
One can visualize these forces either column by column (each column corresponding to a datapoint i = 1 , . . .
, N ) or line by line (each line corresponding to a neuron k = 1 , . .
. , n ℓ ).
These two visualizations of the forces are presented in
Figure 1 for the two hidden layers of a depth L = 3 network, projected to the 2 largest principal components of the columns resp.
lines of Z ℓ .
Figures 1a and 1c illustrate how the inputs corresponding to different classes are pushed away from each other, leading to a clustering effect.
Figures 1b and 1d show that the neurons naturally align along rays starting from the origin.
This happens for homogeneous non-linearities, such as the ReLU in this example, because if two neurons k, k ′ have proportional activations, i.e. Z ℓ,k = αZ ℓ,k for some α ∈ R , then their attractive and repulsive forces will also be proportional with the same scaling α .
As a result, the neuron k is stable, i.e. the attraction and repulsion cancel each other, if and only if the neuron k ′ is stable.
This phenomenon can be interpreted as a form of sparsity: a group of aligned neurons can be replaced by a single neuron without changing the resulting function Z L .
Can we guarantee a degree of sparsity in the hidden representations?
Can we bound the number of aligned groups in a neuron?
In the next section, we introduce a further reformulation of the loss which allows us to partially answer these questions.
3.2 Covariance learning : partial convex optimization for positively homogeneous nonlinearities
The loss of the first reformulation L rλ depends on the hidden representations Z ℓ and Z σℓ only through the covariances K ℓ =
Z Tℓ Z ℓ and K σℓ =
( Z σℓ ) T Z σℓ , since (cid:13)(cid:13)(cid:13) Z ℓ (cid:0) Z σℓ − 1 (cid:1) + (cid:13)(cid:13)(cid:13) 2 F =
Tr (cid:104) K ℓ (cid:0) K σℓ − 1 (cid:1) + (cid:105) .
Hence, we provide a second reformulation expressed in terms of the tuple of covariance pairs K
= (( K 1 , K σ 1 ) , . . .
, ( K L − 1 , K σL − 1 )) and the outputs Z L .
Using the notations K σ 0 =
X T X + β 2 1 N × N and K L =
Z TL Z L , we define:
[Equation]
It remains to identify the set K n ( X ) of covariances K and outputs Z L which can be represented by a width n network with inputs X .
For positively homogeneous nonlinearities of degree 1 such as the ReLU (i.e. when σ ( λx ) =
λσ ( x ) for any positive λ ), the set K n ( X ) can be expressed using the notion of conical hulls.
Definition 2.
The conical hull of Ω ⊂
R d is the set cone (Ω) :=
[Equation]
and
its
[Equation]
-conical hull for m ≥ 1 is the set
[Equation]
Note that by Caratheodory’s theorem for conical hulls, cone m (Ω) =
cone (Ω) for any m ≥ d .
We now proceed to the description of the set K n ( X ) and obtain the second formulation of the Lregularized loss and of the representation loss R n in terms of covariances:
Proposition 3.
For positively homogeneous non-linearities σ , the infimum of L λ ( W ) =
C ( Z L ( X ; W ))
+ λ ∥ W ∥ 2 , over the parameters W ∈ R P is equal to the infimum over K n ( X ) of
[Equation]
The set K n ( X ) is the set of covariances K
= (( K 1 , K σ 1 ) , . . .
, ( K L − 1 , K σL − 1 )) and outputs Z L such that for all hidden layer ℓ = 1 , . . .
, L − 1 :
• the pair ( K ℓ , K σℓ ) belongs to the (translated) n ℓ -conical hull
[Equation]
[Equation]
• Im K ℓ ⊂ Im K σℓ − 1 , with the notation K σ
=
X T X + β 2 1 N × N , and Im Z L ⊂
Im K σL − 1 .
Note that one can also reformulate the representation cost:
[Equation]
Remark 4 .
In contrast to the first loss L rλ whose local minima were in correspondence with the local minima of the original loss L λ , the second loss L k λ can in some cases have strictly less critical points and local minima.
Indeed, since the map W (cid:55)→ ( K , Z L ) is continuous, if ( K (W) , Z L ( W )) is a local minimum, then so is W .
However, the converse is not true: we provide a counterexample in the
Appendix, i.e. a set of weights W of a depth L = 2 network which is a local minimum of L λ and such that the corresponding ( K , Z L ) is not a local minimum of L k λ .
Since the dimension of the space of pairs of symmetric N × N matrices is N ( N +1) , if n ℓ ≥ N ( N +1) then, by the Caratheodory’s theorem for conical hulls,
[Equation]
Hence, as soon as n ℓ ≥ N ( N + 1) for all hidden layers, the set K n ( X ) does not depend on the list of widths n .
We denote
[Equation]
this width-independent set.
The following proposition shows that for sufficiently wide networks with a positively homogeneous nonlinearity, training a deep DNN with L 2 regularization is equivalent to a partially convex optimization over a translated convex cone.
Proposition 5.
The set K ( X ) is a translated convex cone: after the suitable translation, it is equal to its conical hull.
The cost L k λ ( K , Z L ) is partially convex w.r.t.
to the outputs Z L and the pairs ( K ℓ , K σℓ ) , i.e. it is convex if one fixes the other parameters and let only ( K ℓ , K σℓ ) , or Z L , vary.
3.3 Direct optimization of the reformulations
It is natural at this point to wonder whether one could optimize directly over the representations
Z (using the first reformulation) or over the covariances K and output Z L (using the second reformulation), and whether this would have an advantage over the traditional optimization of the weights.
For the first reformulation, one can simply use the projected gradient descent with updates given by
[Equation]
for any projection P Z to the constraint space Z .
For example, a projection is obtained by mapping
Z ℓ to Z ℓ P Im Z σℓ − 1 sequentially from ℓ = 1 to ℓ = L .
Note however that the loss explodes as the constraints become unsatisfied so that for gradient flow, there is no need for the projections.
This suggests that these projections might also be unnecessary as long as the learning rate is small enough.
For more details, see Appendix B.1.
For the second reformulation, there is no obvious way to compute a projection to the constraint space
K : the cone S is spanned by an infinite amount of points and we do not have an explicit formula for the dual cone S ∗ .
Frank-Wolfe optimization can be used to overcome the need for computing the projections.
However, these direct optimizations of the reformulations lead to issues of computational complexity and stability.
First, the computation of the gradients ∇L rλ
( Z ) and ∇L k λ
( K , Z L ) requires solving a linear equation of dimension N , which is very costly, in contrast to the traditional optimization of the weights W for which the gradient can be computed very efficiently.
Second, if Z σℓ is not full-rank, the computation of its pseudo-inverse ( Z σℓ ) + and the projection P Im Z σℓ are very unstable.
Therefore, if we only have finite-precision knowledge of Z ℓ , we cannot reliably compute ( Z σℓ ) + nor P Im Z σℓ .
Although it could be possible to solve these problems (e.g. using the Tikhonov regularization for the unstability problem) and to develop efficient algorithms to optimize both reformulations efficiently, we decided in this paper to focus on the theoretical implications of these reformulations.
Sparsity of the Regularized Optimum for Homogeneous DNNs
In this section, we assume that the non-linearity is positively homogenous.
Under this assumption, the second reformulation of the loss (and of the representation cost) holds and implies the existence of a sparsity phenomenon.
First observe that as the widths n increase, both the global minimizer of the loss min W L λ ( W ) and the representation cost R n ( X, Y ) diminish.
We denote by L λ, n the L 2 -regularized loss of DNNs with widths n .
Recall that the depth L is fixed.
Proposition 6.
If n ≤ n ′ (in the sense that n ℓ ≤ n ′ ℓ for all ℓ and n 0 = n ′ 0 and n L = n ′ L ), then
[Equation]
and for any X ∈ R n 0 × N and Y ∈ R n L × N , R n ( X, Y ) ≥ R n ′ ( X, Y ) .
Proof.
Let us assume that the parameters W ∗ are optimal for a width n network, the parameters can be mapped to parameters of a wider network by adding ‘dead’ neurons (i.e. neurons with zero incoming and outcoming weights) without changing the network function f W ∗ nor the norm of the parameters ∥ W ∥ .
For DNNs with positively homogeneous nonlinearities, a direct consequence of our reformulation through the hidden covariances is that both the global minimum of the loss L λ and the representation cost R n ( X, Y ) plateau for any widths n such that n ℓ ≥ N ( N + 1) .
Proposition 7.
For any positively homogeneous nonlinearity σ , any widths n and n ′ such that n 0 = n ′ 0 , n L = n ′ L and for all ℓ = 1 , . . .
, L − 1 , n ℓ , n ′ ℓ ≥ N ( N + 1) , for all λ > 0 , we have:
[Equation]
Under the same conditions R n ( X, Y ) =
R n ′ ( X, Y
Proof.
This follows directly from the second reformulation and the fact that by Caratheodory’s theorem for conical hulls, S n = S if n ≥ N ( N + 1) (see discussion after Remark 4).
We can therefore define a width-independent representation cost R ( X, Y ) (which still depends on the fixed depth L ) equal to the representation cost R n ( X, Y ) of any sufficiently wide network.
4.1 Rank of the Hidden Representations
Now that we have revealed the plateau phenomenon, a natural question that we investigate in this section is when does this plateau begin.
In order to do so, we introduce the notion of rank
Rank σ ( K, K σ ) of a pair of Gram matrices ( K, K σ ) ∈ S which is the minimal number k
such that
[Equation]
(4.1) for some z 1 , . . .
, z k ∈ R N .
This notion of rank describes exactly the minimal number of neurons required to recover a set of covariances K :
Proposition 8.
Let ( K , Z L ) ∈ K
( X ) , then there are parameters W of a width n network with covariances and outputs K if and only if n ℓ ≥ Rank σ ( K ℓ , K σℓ ) for all ℓ = 1 , . . .
, L − 1 .
We can now describe the plateau R = { n : min W ∈ R P n L λ, n ( W ) =
min m min W ∈ R P
m L λ, m ( W ) } , i.e. the set of widths n such that the minimum min W ∈ R P n L λ, n ( W ) is optimal over all possible widths:
Corollary 9.
Let K min be the set of covariances sequences ( K , Z L ) which are global minima of the second reformulation.
We have that n ∈ R if and only if there is a ( K , Z L ) ∈ K min such that n ℓ ≥ Rank σ ( K ℓ , K σℓ ) .
Hence, the investigation of Rank σ ( · , · ) is crucial to understand where the plateau begins; unfortunately, it can be difficult to compute.
However, from its definition and the Caratheodory’s theorem for conical hulls (see our discussion after Remark 4), we have the following natural bounds:
Lemma 10.
For any pair ( K, K σ ) ∈ S , we have Rank ( K ) ≤ Rank σ ( K, K σ ) ≤ N ( N + 1) .
We show in the next section that the order of magnitude of the upper bound is tight.
More specifically, we construct a dataset for which any global optimum satisfies Rank σ ( K 1 , K σ 1 ) ≥ N 2 / 4 .
This implies that, in this example, the plateau transition occurs when the number of hidden neurons is of order
O ( N 2 ) .
Note however that, in our numerical experiments (see Figure 2), the rank of the global optimum can be much smaller for more traditional dataset such as MNIST.
Remark 11 .
The start of the plateau measures a notion of sparsity of the learned network, since the networks learned in the plateau are equivalent to a network at the start of the plateau, i.e. large networks are equivalent in terms of their covariances and outputs ( K , Z L ) to a (potentially much) smaller network.
Even though the set of pairs ( K ℓ , K σℓ ) in the cone S that are not full rank has measure zero, the optimal representations ( K ℓ , K σℓ ) always lie on the border of the cone S (since the derivative of the cost L kλ w.r.t. ( K ℓ , K σℓ ) never vanishes) where the rank is lower. More precisely, the rank is determined by the dimension of the smallest face that contains the optimum (e.g. the pairs ( K ℓ , K σℓ ) on the edges of S have rank at most 2 for example, while those on the vertices are rank 1). We can identify different degrees of sparsity depending on how the rank of the hidden representations scales with the number of datapoints N : if the rank is o ( N ) the covariances K ℓ , K σℓ are low-rank (in the traditional linear sense) and for shallow networks the effective number of parameters (i.e. the number of parameters at the start of the plateau) is o ( N 2 ) , if the rank is o ( √ N ) then for deep networks the effective number of parameters o ( N ) .
This could explain why very large networks with ‘too many parameters’ are able to generalize, since their effective number of parameters is of the order of the number datapoints.
Very large networks can therefore be trained safely knowing that thanks to L 2 -regularization, the network is able to recognize what is the ’right’ width of the network.
4.2 Tightness of the Upper-Bound
In this section, we construct a pair of input and output datasets X and Y , both in R N × N , such that for any optimal parameters W of a ReLU network of depth L = 2 with no bias ( β = 0 ), the rank of the hidden representation Rank σ ( K 1 , K σ 1 ) is greater than N 2 / 4 .
Note that one can write the decomposition (4.1) as K = C T C and K σ = B T B where C
=
( z 1 , . . .
, z k ) and B = ReLU( C ) is obtained by applying elementwise the ReLU to C .
Key to our construction is the fact that B is then a matrix with non-negative entries: the matrix K σ is completely positive and Rank σ ( K, K σ ) can be studied using the CP-rank of K :
Definition 12.
A N × N matrix A is completely positive if A = B T B for a k × N matrix B with non-negative entries.
The CP-rank Rank cp ( A ) of a completely positive matrix
A is the minimal integer k such A = B T B for a k × N matrix B with non-negative entries.
When σ is the ReLU, the kernel K σℓ is completely positive for all hidden layers ℓ , and thus
[Equation]
In order to obtain the tightness of the upper bound, we proceed in two steps: first, we construct a completely positive matrix A with high CP-rank, and then construct inputs X and outputs Y such that the optimal hidden covariance K 1 = K σ 1 for a depth L = 2 network equals the matrix A .
As shown in [7], bi-partite graphs can be used to construct matrices with high CP-rank.
We refine this by showing that graphs on N vertices without cliques of 3 or more vertices lead to N × N matrices with CP-rank equal to the number of edges, and as a corollary, we construct a completely positive matrix with CP-rank equal to N 2 / 4 .
Proposition 13.
Given a graph G with N vertices and k edges, consider the k × N matrix E with entries E ev = 1 if the vertex v is an endpoint of the edge e and E ev = 0 otherwise.
The matrix
A =
E T E is completely positive and if the graph G contains no cliques of 3 or more vertices then
Rank cp ( A ) =
k .
Hence, to obtain a completely positive matrix of high CP-rank, it remains to find a graph with no cliques and as many edges as possible.
For even N , we consider the complete bipartite graph, i.e. the graph with two groups of size N/ 2 and with edges between any two vertices iff they belong to different groups.
For this graph, the matrix B N = E T E takes the form of a block matrix:
[Equation]
where 1 N 2 is the N/ 2 × N/ 2 matrix with all ones entries.
Since this bipartite graph has no cliques and N 2 / 4 edges, from the previous proposition, we obtain Rank cp ( B N )
=
N 2 4 .
The following proposition shows how for any completely positive matrix (with CP-rank k ) there is a dataset such that a shallow ReLU network will have a hidden representation pair ( K 1 , K σ 1 ) of rank k :
Proposition 14.
Consider a width- n shallow network ( L = 2 ) with ReLU activation, no bias β = 0 , n 0 = N , n 1 ≥ N ( N + 1) , input dataset X N = I N , and any output dataset Y N such that (cid:0) Y TN Y N (cid:1)is a completely positive matrix with CP-rank k .
At any global minimum of R n ( X N , Y N ) , we have Rank σ ( K 1 , K σ 1 ) =
k .
Furthermore for λ small enough, at any global minimum of L MSE λ, n ( W ) =
1 N ∥ Y ( X N ; W ) − Y N ∥ 2 F + λ ∥
W ∥ 2 , we have
Rank σ ( K 1 , K σ 1 ) ≥ k .
By Proposition 14, with the outputs Y N = B N , the rank of the hidden representations (and the start the plateau) is larger or equal to N 2 4 .
This shows that the order N 2 of the bound of Lemma 10 is tight when it comes to data-agnostic bounds.
However under certain assumptions on the data one can guarantee a much earlier plateau.
For example, if we instead apply Proposition 14 to a task closer to classification, where the columns of the outputs Y N ∈ R n L × N are one-hot vectors, then ( Y TN Y N ) 12 is (up to permutations of the columns/lines) a block diagonal matrix with n L constant positive blocks, which is completely positive with CP-rank equal to the number of classes n L .
This is in line with our empirical experiments in
Figure 2 where we observe in MNIST a plateau starting roughly at a width of 10, which is the number of classes.
Another example where the structure of the data leads to an earlier plateau is when the input and output dimensions are both 1, in which case we can guarantee that the start of the plateau grows at most linearly with the number of datapoints N :
Proposition 15.
Consider shallow networks ( L = 2 ) with scalar inputs and outputs ( n 0 = n 2 = 1 ), a
ReLU nonlinearity, and a dataset X, Y ∈ R 1 × N .
Both the representation cost R n ( X, Y ) and global minimum min W L λ, n ( W ) for any λ > 0 are independent of the width n 1 as long as n 1 ≥ 4 N .
More generally, we propose to view the start of the plateau as an indicator of how well a certain task is adapted to a DNN architecture.
An early plateau suggests that the network is able to solve the task optimally with very few neurons, in contrast to a late plateau.
The fact that the optimal network requires few neurons (and hence few parameters) can be used to guarantee good generalization.
4.3 Conclusion
We have given two reformulations of the loss of L 2 -regularized DNNs.
The first works for a general non-linearity and shows how the hidden representations of the inputs Z 1 , . . .
, Z L − 1 are learned to interpolate between the input and output representations, as a balance between attraction and repulsion forces for every layer.
The second reformulation for homogeneous non-linearities allows us to analyze a sparsity effect of L 2 -regularized DNNs, where the learned networks are equivalent to another network with much fewer neurons.
This effect can be visualized by the appearance of a plateau in the minimal loss as the number of neurons grows, the earlier the plateau, the sparser the solution, since an early plateau means that very few neurons were required to obtain the same loss as a network with an infinite number of neurons.
We show that this plateau cannot start later than N ( N + 1) , and then show that the order of this bound is tight by constructing a toy dataset for which the plateau starts at N 2 / 4 , however, we observe that on more traditional datasets, the start of the plateau can be much earlier.
Acknowledgements
C. Hongler acknowledges support from the Blavatnik Family Foundation, the Latsis Foundation, and the NCCR Swissmap.
A Experimental Setup
The experiments were done on fully-connected DNNs of depth L = 3 with varying widths.
We used the MNIST dataset [15] under the ’Creative Commons Attribution-Share Alike 3.0’ license.
For the MNIST examples we trained the networks on the multiclass cross-entropy loss with L 2regularization.
We also used synthetic data sampled from a teacher network.
The network has depth L = 3 , widths n = (50 , 10 , 10 , 10) with random Gaussian weights.
The cost used was the Mean Squared Error (MSE).
For the experiments of Figure 1 of the main, the DNN was trained with full batch GD.
For the experiments of Figure 2 we first trained with Adam [14] and finished with full batch GD (GD seems to be better suited to consistently reach the bottom of the local minima, though Adam trains faster overall).
For the right plot of Figure 2, three independent networks were trained for every width and the one with the smallest loss at the end of training was chosen (the plotted test error is that of the chosen network).
The goal of Figure 2 is to identify the start of the plateau, note however that we cannot guarantee that our training procedures actually approaches a global minimum.
Interestingly it was easier to observe a plateau on MNIST rather than on the teacher network data, which is why we had to take the minimum over 3 trials in the teacher setting.
This could be due to the change of loss (from cross entropy to the MSE) or due to the change of the data.
Note that in Figure 2 (right), it is unclear whether the ’failed’ trials , i.e. the small blue dots with a loss above the plateau even for large widths, are stuck at local minima of the loss or if they could have reached the plateau if we had trained them longer.
The experiments each took between 1 and 4 hour on a single NVIDIA GeForce GTX 1080.
B Equivalence for the first reformulation
Proposition 16 (Proposition 1 of the main) .
The infimum of L λ ( W ) =
C ( Z L ( X ; W ))
+ λ ∥ W ∥ 2 , over the parameters W ∈ R P is equal to the infimum of
[Equation]
over the set Z of hidden representations Z = ( Z ℓ ) ℓ =1 ,...,L such that Z ℓ ∈ R n ℓ × N , Im Z Tℓ +1 ⊂
Im ( Z σℓ ) T , with the notations Z σ 0 = (cid:18)
Xβ 1 TN (cid:19) and Z σℓ = (cid:18) σ ( Z ℓ ) β 1 TN (cid:19) .
Furthermore, if W is a local minimizer of L λ then ( Z 1 ( X ; W ) , . . .
, Z L ( X ; W )) is a local minimizer of L rλ .
Conversely, keeping the same notations, if ( Z ℓ ) ℓ =1 ,...,L is a local minimizer of L rλ , then
W =
( Z ℓ ( Z σℓ − 1 ) + ) ℓ =1 ,...,L is a local minimizer of L λ .
Proof.
We write Φ for the map which sends some weights W to the hidden representations ( Z 1 ( X ; W ) , . . .
, Z L ( X ; W )) and Ψ for the map which sends some hidden representations
Z ∈ Z to W with weight matrices W ℓ = Z ℓ (cid:0) Z σℓ − 1 (cid:1) + .
We clearly have Φ(Ψ( Z ))
=
Z for any Z ∈ Z , however it is not true in general that Ψ(Φ( W )) for all W (actually this is true iff W lies in the image of Ψ ).
Let L λ ( W )
=
C ( Y W ) + λ ∥ W ∥ 2 and L rλ ( Z ) =
C ( Z L ) + λ (cid:80)
Lℓ =1 (cid:13)(cid:13)(cid:13) Z ℓ (cid:0)
Z σℓ − 1 (cid:1) + (cid:13)(cid:13)(cid:13) 2 F .
One can show that L λ (Ψ( Z )) =
L rλ ( Z ) for all Z ∈ Z and L rλ (Φ( W ))
≤ L λ ( W ) for all W (actually
L rλ (Φ( W ))
=
L λ ( W ) if W ∈ ImΨ and L rλ (Φ( W )) <
L λ ( W ) otherwise).
The first fact implies that inf W L λ ( W ) ≤ inf Z ∈Z L rλ ( Z ) while the second implies inf W L λ ( W ) ≥ inf Z ∈Z L rλ ( Z ) , furthermore the maps Φ and Ψ must map global minimizers to global minimizers.
Local Minima: We now extend the correspondence to local minima and saddles:
We prove that if Z is a local minimum of Z (cid:55)→ L rλ ( Z ) then W = Ψ( Z ) is a local minimum of W (cid:55)→
L λ ( W ) through the contrapositive: if W = Ψ( Z ) is not a local minimum of the loss
W (cid:55)→
L λ ( W ) (i.e. there is a sequence of weights W 1 , W 2 , . . .
which converges to W with
L λ ( W i ) <
L λ ( W ) for all i ) then Z is not a local minimum.
We simply consider the sequence
Z i =
Φ( W i ) which converges to Z = Φ(Ψ( Z )) by the continuity of Φ .
This sequence satisfies
L rλ ( Z i ) ≤
L λ ( W i ) <
L λ ( W ) =
L rλ ( Z ) , proving that Z is not a local minimum.
Let us now prove if W is a local minimum of W (cid:55)→
L λ ( W ) then Z = Φ( W ) is a local minimum of Z
(cid:55)→ L rλ ( Z ) , again using the contrapositive.
Assume that there is a sequence Z 1 , Z 2 , . . .
which converges to Z = Φ( W ) with L r
λ ( Z i ) <
L r λ
( Z ) for all i .
We consider the sequence W i =
Ψ( Z i ) , however this sequence might not be convergent since Ψ is not continuous, however we know the sequence is bounded, since ∥ W i ∥
= (cid:80) Lℓ =1 (cid:13)(cid:13)(cid:13)(cid:13)
Z i,ℓ (cid:16) Z σi,ℓ − 1 (cid:17) + (cid:13)(cid:13)(cid:13)(cid:13)
F ≤ 1 λ L rλ ( Z i ) <
1 λ L rλ ( Z ) , this implies that there exists a subsequence Z k i
such that W k
i
=
Ψ ( Z k i ) converges to some weights
W ′ .
Note that since Φ( W ) =
Φ( W ′ )
the weight matrices must agree up to ’useless weights’, i.e. for all ℓ
[Equation]
If ˜ W ℓ ̸ = 0 then W is not a local minimum (since we could choose the weights W ϵℓ
= Z ℓ (cid:0) Z σℓ − 1 (cid:1) +
+ (1 − ϵ )
˜ W ℓ for any 0 < ϵ < 1 to get a lower loss).
We may therefore assume ˜ W ℓ = 0 , but this implies that ˜ W ′ ℓ
= 0 too since ∥ W ∥ =
∥ W ′ ∥ and therefore W ′ =
W and therefore W is not a local minimum since the sequence W k i approaches W with a strictly lower loss.
B.1 Optimization
It is possible to optimize the first reformulation directly, using projected gradient descent to guarantee that the constraints Im Z Tℓ +1 ⊆
Im ( Z σℓ ) T remain satisfied.
As we show now, this projection is unnecessary in the continuous case, which suggests that it might also be unnecessary in gradient descent with a small enough learning rate.
Assume there is a ℓ s.t.
Im Z
Tℓ +
⊈ Im ( Z σℓ ) T , i.e. there is a vector v ∈ R N (with ∥ v ∥ = 1 ) such that v ∈ ker Z σℓ but ∥ Z ℓ +1 v ∥ > 0 .
Consider any ˜ Z such that (cid:13)(cid:13)(cid:13)
˜
Z − Z (cid:13)(cid:13)(cid:13) ≤ ϵ , then
[Equation]
ϵ
[Equation]
This implies that the loss explodes in the vicinity of any point where the constraints are not satisfied.
As a result, gradient flow on the cost L rλ starting from a value with a non-zero loss will never approach a non-acceptable point (where Im Z
Tℓ +
⊈
Im ( Z σℓ ) T ) since the loss is decreasing during gradient flow.
C Equivalence for the second reformulation
Proposition 17 (Proposition 3 of the main) .
For positively homogeneous non-linearities σ , the infimum of L λ ( W ) =
C ( Z L ( X ; W ))
+ λ ∥ W ∥ 2 , over the parameters W ∈ R P is equal to the infimum over K n ( X ) of
[Equation]
The set K n ( X ) is the set of covariances K
= (( K 1 , K σ 1 ) , . . .
, ( K L − 1 , K σL − 1 )) and outputs Z L such that for all hidden layer ℓ = 1 , . . .
, L − 1 :
• the pair ( K ℓ , K σℓ ) belongs to the (translated) n ℓ -conical hull S n ℓ ,β = cone n ℓ (cid:0)(cid:8)(cid:0)
xx T , σ ( x ) σ ( x ) T (cid:1) : x
∈ R N
(cid:9)(cid:1)
+ (0 , β 2 1 N × N ) , • Im K ℓ ⊂ Im K σℓ − 1 , with the notation K σ 0 =
X T X + β 2 1 N × N and for the outputs, Im Z L ⊂
Im K σL − 1 .
Proof.
Consider the map Ψ that maps parameters W to the the tuple ( K , Z L ) .
We simply need to show that the image of Ψ is the set K n ( X ) .
The fact that ImΨ ⊂ K n ( X ) can easily be checked.
To prove ImΨ ⊃ K n ( X ) we need to construct a pre-image W ∈ Ψ − 1 ( K , Z L ) from any tuple ( K , Z L ) in K n ( X ) .
For every hidden layer ℓ , we have ( K ℓ , K σℓ )
∈
S n ℓ ,β .
There are hence representations
Z ℓ ∈ R n ℓ × N such that K ℓ = Z Tℓ Z ℓ and K σℓ =
σ ( Z ℓ ) T σ ( Z ℓ ) + β 2 1 N × N , furthermore for all ℓ , we have Im Z
Tℓ
= Im K ℓ and Im (cid:18) σ ( Z ℓ ) β 1 TN (cid:19)
=
Im K σℓ , which implies that Im Z Tℓ ⊂
Im (cid:0) Z σℓ − 1 (cid:1) T and therefore that the tuple ( Z 1 , . . .
Z L ) is in the set Z n and we can choose the weight matrices W ℓ = Z ℓ (cid:0)
Z σℓ − 1 (cid:1) + to obtain a preimage W ∈ Ψ − 1 ( K , Z L ) .
C.1 Non-correspondence of the local minima
Let us consider the map Γ : Z (cid:55)→ ( K , Z L ) which maps each hidden representation Z ℓ to the kernel pair ( Z Tℓ Z ℓ , ( Z σℓ ) T Z σℓ ) .
The continuity of Γ implies that if Γ( Z ) is a local minimum then so is Z .
The converse is not true, instead we have:
Proposition 18.
A kernel and outputs pair ( K , Z L ) is a local minimum if all Z ∈ Γ − 1 ( K ) are local minima.
Proof.
We will prove the contrapositive of this statement: if ( K , Z L ) is a saddle (i.e. there is a sequence ( K 1 , Z L, 1 ) , ( K 2 , Z L, 2 ) , . . .
which converges to ( K , Z L )
such that L λ ( K i , Z L,i ) <
L λ ( K , Z L ) ), then there is a Z ∈ Γ − 1 ( K , Z L ) which is a saddle.
First note that for any i , Γ − 1 ( K i , Z L,i ) is compact (it is closed and bounded since ∥ Z ℓ ∥ 2 F =
Tr [ K ℓ ] < ∞ ).
There is hence a sequence Z 1 , Z 2 . . . .
with Z i ∈ Γ − 1 ( K i , Z L,i ) which converges to some Z .
By the continuity of Γ , we have Γ( Z ) =
( K , Z L )
and we have L λ
( Z i ) =
L λ ( K i , Z L,i ) <
L λ ( K , Z L ) =
L λ ( Z ) , hence proving that Z is a saddle as needed.
Let us now give an example of a set of weights W of a depth L = 2 network which is a local minimum of L λ but such that the corresponding covariances ( K , Z L ) are not a local minimum of L kλ :
Proposition 19.
Consider a shallow ReLU network ( L = 2 ) of widths n 0 = 1 , n 1 = 2 , n 2 = 1 with no bias β = 0 .
Consider the MSE error L λ ( W ) =
1 N ∥ Y ( X ; W ) − Y ∥ 2 F for the size N = 2 dataset with inputs X = ( 1 − 1 ) and outputs Y =
For any λ < 1 and any choices of a 1 , a 2 > 0 s.t. a 21 + a 22 = 1 − λ the parameters
W 1 = (cid:18) aa(cid:19) , W 2 = ( aa 2 ) are a local minimum of the loss L λ ( W ) however, the corresponding covariances and outputs ( K 1 , K σ 1 ) , Z 2 are not a local minimum of the second reformulation L cλ (( K 1 , K σ 1 ) , Z 2 ) .
Proof.
Consider a depth L = 2 network with no bias ( β = 0 ) and widths n = (1 , 2 , 1) with a training set of size N = 2 , with inputs X = (1 , − 1) and outputs Y =
Let us consider this loss in the region where all four weights are positive:
[Equation]
with a 1 , a 2 , b 1 , b 2 ≥ 0 .
We then have the following activations
[Equation]
The cost therefore takes the form
[Equation]
Let us now reformulate the loss in terms of the two positive values
[Equation]
Since 2( c + d ) = a 21 + a 22 + b 21 + b 22 and c − d = a 1 b 1 + a 2 b 2 , we can rewrite
[Equation]
The above is minimized (over the set of positive c, d ) at c = 1 − λ and d = 0 , since it is the unique point of the quarterplane (cid:26)(cid:18) cd (cid:19)
[Equation]
c, d ≥ 0 (cid:27) where the gradient
[Equation]
points toward the inside of the quarterplane.
The set weights which optimal amongst the set of positive weights equals the set of positive weights such that c = 1 − λ and d = 0 .
Such weights a 1 , a 2 , b 1 , b 2 must satisfy a 1 = b 1 and a
=
b 2 (since d = 0 ) and a 21 + a 22 = 1 − λ (since c = 1 − λ ).
In other terms, the weights of the form
[Equation]
for any choice of positive a 1 , a 2 s.t.
a 21 + a 22 = 1 − λ (we have assumed that λ < 1 ).
For any choice of a 1 , a 2 that are both strictly positive, the above weights lie in the inside of the set of positive weights, which implies that these weights form a local minimum.
To prove that the corresponding covariances ( K 1 , K σ 1 ) are not a local minimum of the reformulation, it is sufficient to find a pre-image of these covariances which is not a local minimum.
We will show that the extrema of the segment of local minima that we identified are not local minima.
Since all weights on the segment have the same covariances, it follows from Proposition 17 that if one of those points is not a local minimum, the covariances cannot be a local minimum of the reformulation.
Let us consider one of the extrema:
[Equation]
This extremum can be approached by the following weights as ϵ ↘
[Equation]
We simply need to show that for small enough ϵ , we have L λ ( W ϵ ) <
L λ ( W ) .
Let us first compute the activations
[Equation]
Therefore the cost L λ ( W ϵ ) takes the form
[Equation]
Clearly for small enough ϵ > 0 , we have L λ ( W ϵ ) <
L λ ( W ) =
L λ ( W ϵ =0 ) .
D Description of the Plateau
Proposition 20 (Proposition 8 of the main) .
Let ( K , Z L ) ∈ K
( X ) , then there are parameters W of a width n network with covariances and outputs K if and only if n ℓ ≥ Rank σ ( K ℓ , K σℓ ) for all ℓ = 1 , . . .
, L − 1 .
Proof.
To prove that the constraints n ℓ ≥ Rank σ ( K ℓ , K σℓ ) are sufficient, we construct the parameters
W recursively from the first layer to the last.
Since n 1 ≥ Rank σ ( K 1 , K σ 1 ) , there is a hidden representation Z 1 ∈ R n ℓ × N such that K ℓ = Z Tℓ Z ℓ and K σℓ =
( Z σℓ ) T Z σℓ (there is a representation of dimension Rank σ ( K 1 , K σ 1 ) × N , but one can add some zero lines to it to obtain Z 1 without changing the resulting K ℓ and K σℓ ).
Since Im Z 1 = Im K 1 ⊂
Im K σ
= Im Z σ 0 , we can choose the parameters of the first layer as W 1 =
Z 1 ( Z σ 0 ) + .
All other weight matrices W ℓ are then constructed in the same manner.
The fact that the constraints n ℓ ≥ Rank σ ( K ℓ , K σℓ ) are necessary follows from the fact that for any network of width n with parameters W we have that Rank σ ( K ℓ ( W ) , K σℓ ( W )) ≤ n ℓ since
K ℓ ( W ) =
( Z ℓ ( W ))
T Z ℓ ( W ) and K σℓ ( W ) =
( Z σℓ ( W ))
T Z σℓ ( W ) .
D.1 Tightness of the upper bound
Let us first prove the Proposition on the CP-rank of matrices resulting from graphs without cliques:
Proposition 21 (Proposition 13 of the main) .
Given a graph G with N vertices and k edges, consider the k × N matrix E with entries E ev = 1 if the vertex v is an endpoint of the edge e and E ev
=otherwise.
The matrix A =
E T E is completely positive and if the graph G contains no cliques ofor more vertices then Rank cp ( A ) = k .
Proof.
The fact that A = E T E implies Rank cp ( A ) ≤ k , we only need to show Rank cp ( A ) ≥ k .
Let assume that there is another decomposition E T E
= B T B for some m ′
× N matrix B with positive entries, we will now show that k ′ ≥ k .
First, we show that the absence of cliques of 3 or more vertices implies that each line B e has at most 2 non-zero entries.
The absence of cliques implies that for all sets Ω = { v 1 , . .
. , v r } of 3 or more vertices, there must be a pair of vertices v, w ∈ Ω which are not connected, i.e. ( E T E ) vw = 0 .
If one line B e contains more than two non-zero entries, corresponding to the vertices Ω = { v 1 , . .
. , v r } then for all v ̸ = w ∈ Ω , we have
[Equation]
Now if all lines B e have at most two non-zero entries it implies that B e B Te has at most two non-zero off-diagonal entries.
We know that E T E has 2 k non-zero off-diagonal entries.
Since
E T E = m ′ (cid:88) e =
B e B Te it follows that k ′ ≥ k , otherwise we could not recover all the off-diagonal entries.
We may now prove the tightness of the upper bound on the σ -rank of the hidden representation in shallow ReLU networks without bias:
Proposition 22 (Proposition 14 of the main) .
Consider a width- n shallow network ( L = 2 ) with
ReLU activation, no bias β = 0 , n 0 = N , n 1 ≥ N ( N + 1) , input dataset X N = I N , and any output dataset Y N such that (cid:0) Y TN Y N (cid:1) 12 is a completely positive matrix with CP-rank k .
At any global minimum of R n ( X N , Y N ) , we have Rank σ ( K 1 , K σ 1 ) =
k .
Furthermore for λ small enough, at any global minimum of L MSE λ, n ( W ) =
1 N ∥ Y ( X N ; W ) − Y N ∥ 2 F + λ ∥
W ∥ 2 , we have
Rank σ ( K 1 , K σ 1 ) ≥ k .
Proof.
The proof is in two steps, we first show that the minimizer K of the representation cost has rank k , and then use this to show that for small enough λ s the rank must be at least k .
Representation Cost: We first show that at a minimizer ( K 1 , K σ 1 ) of the cost
Tr [ K 1 ] +
Tr (cid:104) Y Y T ( K σ 1 ) + (cid:105) , we have K 1 =
K σ 1 .
This follows from the fact that if K 1 ̸ = K σ 1 , then the pair ( K σ 1 , K σ 1 ) has a strictly lower cost than the pair ( K 1 , K σ 1 ) : for any Z 1 such that K
= Z T 1 Z 1 and
K σ 1 = σ ( Z 1 ) T σ ( Z 1 ) , we have that Tr [ K ℓ ] =
∥
Z 1 ∥ 2 F ≥ ∥ σ ( Z 1 )
∥ 2 F =
Tr [ K σℓ ] and the inequality is strict if Z 1 ̸
= σ ( Z 1 ) (which happens iff K 1 ̸ = K σ 1 ).
The optimization of the previous cost over pairs ( K 1 , K σ 1 ) in S is therefore equivalent to the optimization of the cost K (cid:55)→
Tr [ K ]+Tr (cid:2) Y T Y K + (cid:3) over completely positive matrices K such that
Im Y ⊂
Im K .
If we remove the complete positiveness constraint on K , then the unique minimizer of the above is K = (cid:0) Y T Y (cid:1) 12 .
Now since (cid:0) Y T Y (cid:1) 12 is completely positive, it is also the unique minimizer over complete positive matrices.
We therefore have Rank σ ( K 1 , K σ 1 ) =
Rank cp (cid:16)(cid:0) Y T Y (cid:1) 12 (cid:17) =
k .
Regularized Loss: Let us consider the regularized loss
[Equation]
The minimizer K ( λ ) =
( K 1 ( λ ) , K σ 1 ( λ ) , Z 2 ( λ )) converges as λ ↘ 0 to the pair ( K 1 , K σ 1 , Y ) where
K 1 =
K σ 1 is the minimizer of the representation cost.
Let us now assume that there is no λ 0 such that for all λ < λ 0 , any minimizer K of the loss L λ satisfies Rank σ ( K 1 , K σ 1 ) ≥ k .
This would imply that there is a sequence λ 1 , λ 2 , . . .
of ridges with lim
n →∞ λ n = 0 and corresponding minimizers
K 1 , K 2 , . . .
(where K n is a minimizer of the loss
L λ n ) such that Rank σ (cid:0) K n, 1 , K σn, 1 (cid:1) <
k .
Now by Proposition 20 for all n there are parameters
W n of shallow ReLU network with n 1 = k − 1 neurons in the hidden layer with covariances equal K n .
The sequence W 1 , W 2 , . . .
is uniformly bounded in norm by the representation cost
R ( X N , Y N ) , there is therefore a converging subsequence W n 1 , W n 2 , . . .
which converges to some parameters W .
The covariances and outputs ( K 1 , K σ 1 , Y ) at these limiting parameters W must minimize the representation cost,
i.e. K 1 = K σ 1 = (cid:0) Y T Y (cid:1) 12 , but this yields a contradiction, since
Rank σ ( K 1 , K σ 1 ) =
k but W are parameters of network with n 1 = k − 1 neurons in the hidden layer, which would imply Rank σ ( K 1 , K σ 1 ) ≤ k − 1 .
To show the tightness (up to constant factor) of the upper bound, one can simply apply this proposition to the special case Y N =
E T E , where E is the edge-vertex incidence matrix of the complete bipartite graph, in which case k = N 2 4 .
We could also consider an output dataset Y N ∈ R n L × N whose lines are one-hot vectors, corresponding to a classification task.
If we reorder the training set by class, the covariance Y TN Y N is a block diagonal matrix, with all ones blocks corresponding to each class.
The square root (cid:0) Y T N Y N (cid:1)is also block-diagonal but the block of a class i has value 1 m i where m i is the number of datapoints in the class i .
The matrix (cid:0) Y TN Y N (cid:1) 12 is completely positive and has rank k equal to the number of classes.
This implies a much earlier plateau, which could explain why in real-world classification tasks, we observe a very early plateau.
Remark 23 .
The representation cost for Y =
E T E is 2 ∥ E ∥ 2 F = 4 N 2 4 = N 2 .
We can obtain an almost optimal representation with n 1 = N neurons by taking the weights W 1 = (cid:113) N 2 I and
W 2 = (cid:113) 2 N E T E , with norm (cid:13)(cid:13)(cid:13)(cid:113)
N 2 I (cid:13)(cid:13)(cid:13) 2 F +
[Equation]
N = N
[Equation]
N
[Equation]
D.2 One Dimensional Shallow Network
We now prove an upper bound on the start of the plateau for shallow networks with one-dimensional inputs and outputs:
Proposition 24 (Proposition 15 of the main) .
Consider shallow networks ( L = 2 ) with scalar inputs and outputs ( n 0 = n 2 = 1 ), a ReLU nonlinearity, and a dataset X, Y ∈ R 1 × N .
Both the representation cost R n ( X, Y ) and global minimum min W L λ, n ( W ) for any λ > 0 are constant as long as n 1 ≥ 4 N .
Proof.
We show that if there is a network with depth L = 2 and n 1 > 4 N hidden neurons, we can construct a network with strictly less neurons with the same outputs on the dataset and a smaller parameter norm.
The network function can be written in the form
f W ( x ) =
b + n 1 (cid:88) k
=
[Equation]
a k σ ( c k x + d
[Equation]
We may assume that for all neuron i , we have a 2 k =
c
2 k + d 2 k since if this is not the case, one can multiply a k by a scalar and divide c k and d k by the same scalar to satisfy this constraint while reducing the norm of the parameters.
For each neuron i , we define the cusp of the neuron the value − d k c k , which is the point where the neuron goes from dead to active.
If there are neurons that are inactive on the whole training set, they can simply be removed without changing the outputs and reducing the norm.
If there are more 4 N neurons, we either have:
There are more than 4 neurons whose cusp lies between two inputs x i and x i +
(w.l.o.g. we assume x 1 < · · · < x N ).
There are more than 2 neurons whose cusp lies to the left or right of the data.
We will now show how in the case 1, one can remove a neuron while keeping the same outputs on the training data and reducing the norm of the parameters.
The second case is analogous.
If there are five or more neurons with a cusp between x i and x i +1 , then two of those neurons k, m must have the same signs sign a k = sign a m and sign c k = sign c m (w.l.o.g.
we assume they are all positive).
We will replace these two neurons by a single neuron ˜ aσ (˜ cx + ˜ d ) where ˜ a, ˜ c, ˜ d are chosen as the unique positive values ( ˜ d may be negative) to satisfy
[Equation]
First note this new neurons contributes ˜ a 2 + ˜ c 2 + ˜ d 2 = 2˜ a 2 to the norm of the parameters which is less than the two previous neurons 2 a 2 k + 2 a 2 m , since
[Equation]
where the inequality follows from the convexity of the norm function ( c, d ) (cid:55)→ √ c
2 + d 2 .
For any x with x ≤ x i or x ≥ x i +1 , one can check that
[Equation]
which implies that replacement has not changed the values of the network on the training set.