Title: GRADIENT DESCENT ALIGNS THE LAYERS OF DEEP LINEAR NETWORKS

Abstract: This paper establishes risk convergence and asymptotic weight matrix alignment -a form of implicit regularization -of gradient flow and gradient descent when applied to deep linear networks on linearly separable data. In more detail, for gradient flow applied to strictly decreasing loss functions (with similar results for gradient descent with particular decreasing step sizes): (i) the risk converges to 0; (ii) the normalized i th weight matrix asymptotically equals its rank-1 approximation u i v i ; (iii) these rank-1 matrices are aligned across layers, meaning |v i+1 u i | → 1. In the case of the logistic loss (binary cross entropy), more can be said: the linear function induced by the network -the product of its weight matrices -converges to the same direction as the maximum margin solution. This last property was identified in prior work, but only under assumptions on gradient descent which here are implied by the alignment phenomenon.

1. INTRODUCTION:

Efforts to explain the effectiveness of gradient descent in deep learning have uncovered an exciting possibility: it not only finds solutions with low error, but also biases the search for low complexity solutions which generalize well (Zhang et al., 2017; Bartlett et al., 2017; Soudry et al., 2017; Gunasekar et al., 2018) . This paper analyzes the implicit regularization of gradient descent and gradient flow on deep linear networks and linearly separable data. For strictly decreasing losses, the optimum is at infinity, and we establish various alignment phenomena:

• For each weight matrix W i , the corresponding normalized weight matrix Wi / Wi F asymptotically equals its rank-1 approximation u i v i , where the Frobenius norm W i F satisfies W i F → ∞. In other words, Wi 2 / Wi F → 1, and asymptotically only the rank-1 approximation of W i contributes to the final predictor, a form of implicit regularization.

• Adjacent rank-1 weight matrix approximations are aligned: |v i+1 u i | → 1.

• For the logistic loss, the first right singular vector v 1 of W 1 is aligned with the data, meaning v 1 converges to the unique maximum margin predictor ū defined by the data. Moreover, the linear predictor induced by the network, w prod := W L • • • W 1 , is also aligned with the data, meaning w prod/ w prod → ū.

Simultaneously, this work proves that the risk is globally optimized: it asymptotes to 0. Alignment and risk convergence are proved simultaneously; the phenomena are coupled within the proofs.

Since the layers align, they can be viewed as a minimum norm solution: they do not "waste norm" on components which are killed off when the layers are multiplied together. Said another way, given data ((x i , y i )) n i=1 , the normalized matrices ( W1 / W1 F , . . . , W L / W L F ) asymptotically solve a maximum margin problem which demands all weight matrices be small, not merely their product: Figure 1 : Visualization of margin maximization and self-regularization of layers on synthetic data with a 4-layer linear network compared to a 1-layer network (a linear predictor). Figure 1a shows the convergence of 1-layer and 4-layer networks to the same margin-maximizing linear predictor on positive (blue) and negative (red) separable data. Figure 1b shows the convergence of W i 2 / W i F to 1 on each layer, plotted against the risk.

max W L ∈R 1×d L-1 W L F =1 • • • max W1∈R d 1 ×d 0 W1 F =1 min i y i (W L • • • W 1 )x i .

The paper is organized as follows. This introduction continues with related work, notation, and assumptions in Sections 1.1 and 1.2. The analysis of gradient flow is in Section 2, and gradient descent is analyzed in Section 3. The paper closes with future directions in Section 4; a particular highlight is a preliminary experiment on CIFAR-10 which establishes empirically that a form of the alignment phenomenon occurs on the standard nonlinear network AlexNet.

1.1. RELATED WORK:

On the implicit regularization of gradient descent, Soudry et al. (2017) show that for linear predictors and linearly separable data, the gradient descent iterates converge to the same direction as the maximum margin solution. Ji & Telgarsky (2018) further characterize such an implicit bias for general nonseparable data. Gunasekar et al. (2018) consider gradient descent on fully connected linear networks and linear convolutional networks. In particular, for the exponential loss, assuming the risk is minimized to 0 and the gradients converge in direction, they show that the whole network converges in direction to the maximum margin solution. These two assumptions are on the gradient descent process itself, and specifically the second one might be hard to interpret and justify. Compared with Gunasekar et al. (2018) , this paper proves that the risk converges to 0 and the weight matrices align; moreover the proof here proves the properties simultaneously, rather than assuming one and deriving the other. Lastly, Arora et al. (2018) show for deep linear networks (and later Du et al. (2018) for ReLU networks) that gradient flow does not change the difference between squared Frobenius norms of any two layers. We use a few of these tools in our proofs; please see Sections 2 and 3 for details.

For a smooth (nonconvex) function, Lee et al. (2016) show that any strict saddle can be avoided almost surely with small step sizes. If there are only countably many saddle points and they are all strict, and if gradient descent iterates converge, then this implies (almost surely) they converge to a local minimum. In the present work, since there is no finite local minimum, gradient descent will go to infinity and never converge, and thus these results of Lee et al. (2016) do not show that the risk converges to 0.

There has been a rich literature on linear networks. Saxe et al. (2013) analyze the learning dynamics of deep linear networks, showing that they exhibit some learning patterns similar to nonlinear networks, such as a long plateau followed by a rapid risk drop. Arora et al. (2018) show that depth can help accelerate optimization. On the landscape properties of deep linear networks, Lu & Kawaguchi (2017) ; Laurent & von Brecht (2017) show that under various structural assumptions, all local optima are global. Zhou & Liang (2018) give a necessary and sufficient characterization of critical points for deep linear networks. Figure 2 : A visualization of inter-layer alignment on data consisting of two well-separated circles with a 3-layer linear network. Figure 2a depicts, as in Figure 1a , that optimizing 1-and 3-layer linear networks finds the same maximum margin solution. The other three plots show the data as it is mapped through progressively more and more layers. Due to alignment, the product

W i • • • W 1 becomes u i ū

, where u i is the top left singular vector of W i , which means that asymptotically the mapped data will be well separated and lie along the span of u i , as depicted by the flattening in Figures 2b to 2d . Additionally, these three subfigures show that the top right singular vector v i+1 of the subsequent layer is aligned with this u i , which in these plots (with principal component axes) corresponds to following a horizontal line.

1.2. NOTATION, SETTING, AND ASSUMPTIONS:

Consider a data set {(x i , y i )} n i=1 , where x i ∈ R d , x i ≤ 1, and y i ∈ {-1, +1}. The data set is assumed to be linearly separable, i.e., there exists a unit vector u which correctly classifies every data point: for any 1 ≤ i ≤ n, y i u, x i > 0. Furthermore, let γ := max u =1 min 1≤i≤n y i u, x i > 0 denote the maximum margin, and ū := arg max u =1 min 1≤i≤n y i u, x i denote the maximum margin solution (the solution to the hard-margin SVM).

A linear network of depth L is parameterized by weight matrices W L , . . . , W 1 , where

W k ∈ R d k ×d k-1 , d 0 = d, and d L = 1. Let W = (W L , . . . , W 1

) denote all parameters of the network. The (empirical) risk induced by the network is given by

R(W ) = R (W L , . . . , W 1 ) = 1 n n i=1 (y i W L • • • W 1 x i ) = 1 n n i=1 w prod , z i ,

where

w prod := (W L • • • W 1 )

, and z i := y i x i .

The loss is assumed to be continuously differentiable, unbounded, and strictly decreasing to 0.

Examples include the exponential loss exp (x) = e -x and the logistic loss log (x) = ln 1 + e -x .

Assumption 1. < 0 is continuous, lim x→-∞ (x) = ∞ and lim x→∞ (x) = 0.

This paper considers gradient flow and gradient descent, where gradient flow W (t) t ≥ 0, t ∈ R can be interpreted as gradient descent with infinitesimal step sizes. It starts from some W (0) at t = 0, and proceeds as dW (t) dt = -∇R W (t) .

By contrast, gradient descent W (t) t ≥ 0, t ∈ Z is a discrete-time process given by

W (t + 1) = W (t) -η t ∇R W (t) ,

where η t is the step size at time t.

We assume that the initialization of the network is not a critical point and induces a risk no larger than the risk of the trivial linear predictor 0. Assumption 2. The initialization

W (0) satisfies ∇R W (0) = 0 and R W (0) ≤ R(0) = (0).

It is natural to require that the initialization is not a critical point, since otherwise gradient flow/descent will never make a progress. The requirement R W (0) ≤ R(0) can be easily satisfied, for example, by making W 1 (0) = 0 and W L (0)

• • • W 2 (0) = 0. On the other hand, if R W (0) > R(0)

, gradient flow/descent may never minimize the risk to 0. Proofs of those claims are given in Appendix A.

2. RESULTS FOR GRADIENT FLOW:

In this section, we consider gradient flow. Although impractical when compared with gradient descent, gradient flow can simplify the analysis and highlight proof ideas. For convenience, we usually use W , W k , and w prod , but they all change with (the continuous time) t. Only proof sketches are given here; detailed proofs are deferred to Appendix B.

2.1. RISK CONVERGENCE:

One key property of gradient flow is that it never increases the risk:

EQUATION

We now state the main result: under Assumptions 1 and 2, gradient flow minimizes the risk, W k and w prod all go to infinity, and the alignment phenomenon occurs. Theorem 1. Under Assumptions 1 and 2, gradient flow iterates satisfy the following properties:

• lim t→∞ R(W ) = 0. • For any 1 ≤ k ≤ L, lim t→∞ W k F = ∞. • For any 1 ≤ k ≤ L, letting (u k , v k ) denote the first left and right singular vectors of W k , lim t→∞ W k W k F -u k v k F = 0.

Moreover, for any

1 ≤ k < L, lim t→∞ v k+1 , u k = 1. As a result, lim t→∞ w prod L k=1 W k F , v 1 = 1,

and thus lim t→∞ w prod = ∞.

Theorem 1 is proved using two lemmas, which may be of independent interest. To show the ideas, let us first introduce a little more notation. Recall that R(W ) denotes the empirical risk induced by the deep linear network W . Abusing the notation a little, for any linear predictor w ∈ R d , we also use R(w) to denote the risk induced by w. With this notation, R(W ) = R(w prod ), while

∇R(w prod ) = 1 n n i=1 w prod , z i z i = 1 n n i=1 (W L • • • W 1 z i ) z i is in R d and different from ∇R(W ), which has L k=1 d k d k-1 entries, as given below: ∂R ∂W k = W k+1 • • • W L ∇R(w prod ) W 1 • • • W k-1 .

Furthermore, for any R > 0, let

B(R) = W max 1≤k≤L W k F ≤ R .

The first lemma shows that for any R > 0, the time spent by gradient flow in B(R) is finite. Lemma 1. Under Assumption 1 and 2, for any R > 0, there exists a constant (R) > 0, such that for any t ≥ 1 and any W ∈ B(R), ∂R/∂W 1 F ≥ (R). As a result, gradient flow spends a finite amount of time in B(R) for any R > 0, and max 1≤k≤L W k F is unbounded.

Here is the proof sketch. If W k F are bounded, then ∇R(w prod ) will be lower bounded by a positive constant, therefore if

∂R/∂W 1 F = W L • • • W 2 ∇R(w prod ) can be arbitrarily small, then W L • • • W 2

and w prod can also be arbitrarily small, and thus R(W ) can be arbitrarily close to R(0). This cannot happen after t = 1, otherwise it will contradict Assumption 2 and eq. ( 1).

To proceed, we need the following properties of linear networks from prior work (Arora et al., 2018; Du et al., 2018) . For any time t ≥ 0 and any

1 ≤ k < L, W k+1 (t)W k+1 (t) -W k+1 (0)W k+1 (0) = W k (t)W k (t) -W k (0)W k (0).

(2) To see this, just notice that

W k+1 ∂R ∂W k+1 = W k+1 • • • W L ∇R(w prod ) W 1 • • • W k = ∂R ∂W k W k .

Taking the trace on both sides of eq. ( 2), we have

W k+1 (t) 2 F -W k+1 (0) 2 F = W k (t) 2 F -W k (0) 2 F .

(3) In other words, the difference between the squares of Frobenius norms of any two layers remains a constant. Together with Lemma 1, it implies that all W k F are unbounded. However, even if W k F are large, it does not follow necessarily that w prod is also large. Lemma 2 shows that this is indeed true: for gradient flow, as W k F get larger, adjacent layers also get more aligned to each other, which ensures that their product also has a large norm.

For 1 ≤ k ≤ L, let σ k , u k , and v k denote the first singular value (the 2-norm), the first left singular vector, and the first right singular vector of W k , respectively. Furthermore, define

D := max 1≤k≤L W k (0) 2 F -W L (0) 2 F + L-1 k=1 W k (0)W k (0) -W k+1 (0)W k+1 (0) 2 ,

which depends only on the initialization. If for any

1 ≤ k < L, W k (0)W k (0) = W k+1 (0)W k+1 (0), then D = 0. Lemma 2.

The gradient flow iterates satisfy the following properties:

• For any 1 ≤ k ≤ L, W k 2 F -W k 2 2 ≤ D. • For any 1 ≤ k < L, v k+1 , u k 2 ≥ 1 -D+ W k+1 (0) 2 2 + W k (0) 2 2 / W k+1 2 2 . • Suppose max 1≤k≤L W k F → ∞, then w prod/ L k=1 W k F , v 1 → 1.

The proof is based on eq. ( 2) and eq. ( 3).

EQUATION

0), then eq. ( 2) gives that W k+1 and W k have the same singular values, and W k+1 's right singular vectors and W k 's left singular vectors are the same. If it is true for any two adjacent layers, since W L is a row vector, all layers have rank 1. With general initialization, we have similar results when W k F is large enough so that the initialization is negligible. Careful calculations give the exact results in Lemma 2.

An interesting point is that the implicit regularization result in Lemma 2 helps establish risk convergence in Theorem 1. Specifically, by Lemma 2, if all layers have large norms, W L • • • W 2 will be large. If the risk is not minimized to 0, ∇R(w prod ) will be lower bounded by a positive constant, and thus ∂R/∂W 1 F = W L • • • W 2 ∇R(w prod ) will be large. Invoking eq. ( 1), Lemma 1 and eq. ( 3) gives a contradiction. Since the risk has no finite optimum, W k F → ∞.

2.2. CONVERGENCE TO THE MAXIMUM MARGIN SOLUTION:

Here we focus on the exponential loss exp (x) = e -x and the logistic loss log (x) = ln(1 + e -x ).

In addition to risk convergence, these two losses also enable gradient descent to find the maximum margin solution.

To get such a strong convergence, we need one more assumption on the data set. Recall that γ = max u =1 min 1≤i≤n u, z i > 0 denotes the maximum margin, and ū denotes the unique maximum margin predictor which attains this margin γ. Those data points z i for which ū, z i = γ are called support vectors. Assumption 3. The support vectors span the whole space R d .

Assumption 3 appears in prior work Soudry et al. (2017) , and can be satisfied in many cases: for example, it is almost surely true if the number of support vectors is larger than or equal to d and the data set is sampled from some density w.r.t. the Lebesgue measure. It can also be relaxed to the situation that the support vectors and the whole data set span the same space; in this case ∇R(w prod ) will never leave this space, and we can always restrict our attention to this space.

With Assumption 3, we can state the main theorem. Theorem 2. Under Assumptions 2 and 3, for almost all data and for losses exp and log , then lim t→∞ v 1 , ū = 1, where v 1 is the first right singular vector of W 1 . As a result,

lim t→∞ w prod/ L k=1 W k F = ū.

Before summarizing the proof, we can simplify both theorems into the following minimum norm property mentioned in the introduction. Corollary 1. Under Assumptions 2 and 3, for almost all data and for losses exp and log ,

min i y i W L W L F • • • W 1 W 1 F x i ---→ t→∞ max A L ∈R 1×d L-1 A L F =1 • • • max A1∈R d 1 ×d 0 A1 F =1 min i y i (A L • • • A 1 ) x i .

Theorem 2 relies on two structural lemmas. The first one is based on a similar almost-all argument due to Soudry et al. (2017, Lemma 12) . Let S ⊂ {1, . . . , n} denote the set of indices of support vectors.

Lemma 3. Under Assumption 3, if the data set is sampled from some density w.r.t. the Lebesgue measure, then with probability 1,

α := min |ξ|=1,ξ⊥ū max i∈S ξ, z i > 0.

Let ū⊥ denote the orthogonal complement of span(ū), and let Π ⊥ denote the projection onto ū⊥ . We prove that if Π ⊥ w is large enough, gradient flow starting from w will tend to decrease Π ⊥ w . Lemma 4. Under Assumption 3, for almost all data, exp and log , and any w ∈ R d , if w, ū ≥ 0 and Π ⊥ w is larger than 1+ln(n) /α for exp or 2n /eα for log , then Π ⊥ w, ∇R(w) ≥ 0.

With Lemma 3 and Lemma 4 in hand, we can prove Theorem 2. Let Π ⊥ W 1 denote the projection of rows of W 1 onto ū⊥ . Notice that

Π ⊥ w prod = W L . . . W 2 (Π ⊥ W 1 ) and d Π ⊥ W 1 2 F dt = -2 Π ⊥ w prod , ∇R(w prod ) . If Π ⊥ W 1 F is large compared with W 1 F

, since layers become aligned, Π ⊥ w prod will also be large, and then Lemma 4 implies that Π ⊥ W 1 F will not increase. At the same time, W 1 F → ∞, and thus for large enough t, Π ⊥ W 1 F must be very small compared with W 1 F . Many details need to be handled to make this intuition exact; the proof is given in Appendix B.

3. RESULTS FOR GRADIENT DESCENT:

One key property of gradient flow which is used in the previous proofs is that it never increases the risk, which is not necessarily true for gradient descent. However, for smooth losses (i.e, with Lipschitz continuous derivatives), we can design some decaying step sizes, with which gradient descent never increases the risk, and basically the same results hold as in the gradient flow case. Deferred proofs are given in Appendix C.

We make the following additional assumption on the loss, which is satisfied by the logistic loss log . Assumption 4. is β-Lipschitz (i.e, is β-smooth), and | | ≤ G (i.e., is G-Lipschitz).

Under Assumption 4, the risk is also a smooth function of W , if all layers are bounded. Lemma 5. Suppose is

β-smooth. If R ≥ 1, then β(R) = 2L 2 R 2L-2 (β + G), and R(W ) is a β(R)-smooth function on the set B(R) = W W k F ≤ R, 1 ≤ k ≤ L .

Smoothness ensures that for any Bubeck et al. (2015) Lemma 3.4). In particular, if we choose some R and set a constant step size η t = 1/β(R), then as long as W (t + 1) and W (t) are both in B(R),

W, V ∈ B(R), R(W ) -R(V ) ≤ ∇R(V ), W -V + β(R) W -V 2 /2 (see

EQUATION

)

In other words, the risk does not increase at this step. However, similar to gradient flow, the gradient descent iterate will eventually escape B(R), which may increase the risk. Lemma 6. Under Assumption 1, 2 and 4, suppose gradient descent is run with a constant step size 1/β(R). Then there exists a time t when

W (t) ∈ B(R), in other words, max 1≤k≤L W k (t) F > R.

Fortunately, this issue can be handled by adaptively increasing R and correspondingly decreasing the step sizes, formalized in the following assumption. Assumption 5. The step size η t = min{1/β(R t ), 1}, where R t satisfies W (t) ∈ B(R t -1), and if

W (t + 1) ∈ B(R t -1), R t+1 = R t .

Assumption 5 can be satisfied by a line search, which ensures that the gradient descent update is not too aggressive and the boundary R is increased properly.

With the additional Assumptions 4 and 5, exactly the same theorems can be proved for gradient descent. We restate them briefly here. Theorem 3. Under Assumption 1, 2, 4, and 5, gradient descent satisfies

• lim t→∞ R W (t) = 0. • For any 1 ≤ k ≤ L, lim t→∞ W k (t) F = ∞. • lim t→∞ w prod (t) / L k=1 W k (t) F , v 1 (t) = 1, where v 1 (t)

is the first right singular vector of W 1 (t). Theorem 4. Under Assumptions 2, 3 and 5, for the logistic loss log and almost all data, lim t→∞ v 1 (t), ū = 1, and lim t→∞ w prod (t) / L k=1 W k (t) F = ū. Corollary 2. Under Assumptions 2, 3 and 5, for the logistic loss log and almost all data,

min i y i W L W L F • • • W 1 W 1 F x i ---→ t→∞ max A L ∈R 1×d L-1 A L F =1 • • • max A1∈R d 1 ×d 0 A1 F =1 min i y i (A L • • • A 1 ) x i .

Proofs of Theorem 3 and 4 are given in Appendix C, and are basically the same as the gradient flow proofs. The key difference is that an error of ∞ t=0 η 2 t ∇R(W (t)) 2 will be introduced in many parts of the proof. However, it is bounded in light of eq. ( 4):

∞ t=0 η 2 t ∇R W (t) 2 ≤ ∞ t=0 η t ∇R W (t) 2 ≤ 2R W (0) .

Since all weight matrices go to infinity, such a bounded error does not matter asymptotically, and thus proofs still go through. 

4. SUMMARY AND FUTURE DIRECTIONS:

This paper rigorously proves that, for deep linear networks on linearly separable data, gradient flow and gradient descent minimize the risk to 0, align adjacent weight matrices, and align the first right singular vector of the first layer to the maximum margin solution determined by the data. There are many potential future directions; a few are as follows.

Convergence rates and practical step sizes. This paper only proves asymptotic convergence, moreover for adaptive step sizes depending on the current weight matrix norms. A refined analysis with rates for practical step sizes (e.g., constant step sizes) would allow the algorithm to be compared to other methods which also globally optimize this objective, would suggest ways to improve step sizes and initialization, and ideally even exhibit a sensitivity to the network architecture and suggest how it could be improved.

Nonseparable data and nonlinear networks. Real-world data is generally not linearly separable, but nonlinear deep networks can reliably decrease the risk to 0, even with random labels (Zhang et al., 2017) . This seems to suggest that a nonlinear notion of separability is at play; is there some way to adapt the present analysis?

The present analysis is crucially tied to the alignment of weight matrices: alignment and risk are analyzed simultaneously. Motivated by this, consider a preliminary experiment, presented in Figure 3 , where stochastic gradient descent was used to minimize the risk of a standard AlexNet on CIFAR-10 ( Krizhevsky et al., 2012; Krizhevsky & Hinton, 2009) .

Even though there are ReLUs, max-pooling layers, and convolutional layers, the alignment phenomenon is occurring in a reduced form on the dense layers (the last three layers of the network). Specifically, despite these weight matrices having shape (1024, 4096), (4096, 4096), and (4096, 10) the key alignment ratios W i 2 / W i F are much larger than their respective lower bounds (1024 -1/2 , 4096 -1/2 , 10 -1/2 ). Two initializations were tried: default PyTorch initialization, and a Gaussian initialization forcing all initial Frobenius norms to be just 4, which is suggested by the norm preservation property in the analysis and removes noise in the weights.

A REGARDING ASSUMPTION 2

Suppose W 1 (0) = 0 while W L (0) • • • W 2 (0) = 0. First of all, W L (0) • • • W 1 (0) = 0 and thus R W (0) = R(0). Moreover, ∇R w prod (0) , ū = 1 n n i=1 (0) z i , ū ≤ (0)γ < 0, which implies ∇R w prod (0) = 0 and ∂R/∂W 1 = W L (0) • • • W 2 (0) ∇R w prod (0) = 0.

On the other hand, if R W (0) > R(0), gradient flow/descent may never minimize the risk to 0. For example, suppose the network has two layers, and both the input and output have dimension 1; the network just computes the dot product of two vectors w 1 and w

2 . Consider mini- mizing R(w 1 , w 2 ) = exp -w 1 , w 2 . If w 1 (0) = -w 2 (0) = 0, then R w 1 (0), w 2 (0) = exp w 1 2 > exp(0).

It is easy to verify that for any t, w 1 (t) = -w 2 (t), and R w 1 (t), w 2 (t) ≥ exp(0) > 0.

B OMITTED PROOFS FROM SECTION 2:

Proof of Lemma 1. Fix an arbitrary R > 0. If the claim is not true, then for any > 0, there exists some t ≥ 1 such that W k F ≤ R for all k while ∂R/∂W 1 2

F ≤ 2 , which means ∂R ∂W 1 2 F = W 2 • • • W L ∇R(w prod ) 2 F = W L • • • W 2 2 ∇R(w prod ) 2 ≤ 2 .

Since w prod ≤ R L , we have

∇R(w prod ), ū = 1 n n i=1 w prod , z i z i , ū ≤ 1 n n i=1 w prod , z i γ ≤ -M γ,

where -M = max -R L ≤x≤R L (x). Since is continuous and the domain is bounded, the maximum is attained and negative, and thus M > 0. Therefore ∇R(w prod ) ≥ M γ, and thus

W L • • • W 2 ≤ /M γ. Since W 1 F ≤ R, we further have w prod ≤ R/M γ.

In other words, after t = 1, w prod may be arbitrarily small, which implies R w prod can be arbitrarily close to R (0).

On the other hand, by Assumption 2, dR(W )/ dt = -∇R(W ) 2 < 0 at t = 0. This implies that R W (1) < R W (0) , and for any t

≥ 1, R W (t) ≤ R W (1) < R W (0) ≤ R(0), which is a contradiction.

Since the risk is always positive, we have

R W (0) ≥ ∞ t=0 L k=1 ∂R ∂W k 2 F dt ≥ ∞ t=0 ∂R ∂W 1 2 F dt ≥ ∞ t=0 ∂R ∂W 1 2 F 1 max 1≤k≤L W k F ≤ R dt ≥ ∞ t=1 ∂R ∂W 1 2 F 1 max 1≤k≤L W k F ≤ R dt ≥ (R) 2 ∞ t=1 1 max 1≤k≤L W k F ≤ R dt,

which implies gradient flow only spends a finite amount of time in W max 1≤k≤L W k F ≤ R . This directly implies that max 1≤k≤L W k F is unbounded.

Proof of Lemma 2. The first claim is true for k = L since W L is a row vector. For any 1 ≤ k < L, recall that Arora et al. (2018); Du et al. (2018) give the following relation:

W k+1 (t)W k+1 (t) -W k+1 (0)W k+1 (0) = W k (t)W k (t) -W k (0)W k (0). (5) Let A k,k+1 = W k (0)W k (0) -W k+1 (0)W k+1 (0)

. By eq. ( 5) and the definition of singular vectors and singular values, we have

EQUATION

)

Moreover, by taking the trace on both sides of eq. ( 5), we have

EQUATION

Summing eq. ( 6) and eq. ( 7) from k to L -1, we get

EQUATION

)

Next we prove that singular vectors get aligned. Consider u k W k+1 W k+1 u k . On one hand, similar to eq. ( 6), we can get that

EQUATION

)

On the other hand, it follows from the definition of singular vectors and eq. ( 8) that

EQUATION

)

Combining eq. ( 9) and eq. ( 10), we get

EQUATION

)

Similar to eq. ( 9), we can get

EQUATION

)

Combining eq. ( 11) and eq. ( 12), we finally get

u k , v k+1 2 ≥ 1 - D + W k (0) 2 2 + W k+1 (0) 2 2 σ 2 k+1 .

Regarding the last claim, first recall that since the difference between the squares of Frobenius norms of any two layers is a constant,

max 1≤k≤L W k F → ∞ implies W k F → ∞ for any k.

We further have the following.

• Since W k 2 F -W k 2 2 ≤ D, W k 2 → ∞ for any k, and W k / W k F → u k v k . • Since W k 2 → ∞, | u k , v k+1 | → 1.

As a result,

w prod L k=1 W k F , v 1 = L k=1 W k W k F , v 1 → L k=1 u i v i , v 1 → 1.

Proof of Theorem 1. Suppose for some > 0, R (W ) ≥ for any t. Then there exists some 1 ≤ j ≤ n such that w prod , z j ≥ , and thus w prod , z j ≤ -1 ( ). On the other hand, since R(W ) ≤ R(0) = (0), w prod , z j ≤ n (0), and thus w prod , z j ≥ -1 n (0) . Let -M = max -1 (n (0))≤x≤ -1 ( /n) (x) < 0, we have for any t,

∇R(w prod ), ū = 1 n n i=1 w prod , z i z i , ū ≤ 1 n n i=1 w prod , z i γ ≤ 1 n w prod , z j γ ≤ -M γ n < 0,

and thus ∇R(w prod ) ≥ M γ/n.

Similar to the proof of Lemma 2, we can show that if W k F → ∞,

(W L • • • W 2 ) W k F • • • W 2 F , v 2 → 1.

In other words, there exists some C > 0, such that when

min 1≤k≤L W k F > C, W L • • • W 2 ≥ W k F • • • W 2 F /2 > C L /2.

Lemma 1 shows that gradient flow spends a finite amount of time in W max 1≤k≤L W k F ≤ R for any R > 0. Since the difference between the squares of Frobenius norms of any two layers is a constant, gradient flow also spends a finite amount of time in

W min 1≤k≤L W k F ≤ C . Now we have R W (0) ≥ ∞ t=0 L k=1 ∂R ∂W k 2 F dt ≥ ∞ t=0 ∂R ∂W 1 2 F dt = ∞ t=0 W L • • • W 2 2 ∇R(w prod ) 2 dt ≥ ∞ t=0 W L • • • W 2 2 ∇R(w prod ) 2 1 W min 1≤k≤L W k F > C dt ≥ M γ n 2 C L 2 2 ∞ t=0 1 W min 1≤k≤L W k F > C dt = ∞,

which is a contradiction. Therefore R( ) → 0. This further implies W k F → ∞, since R(W ) has no finite optimum. Finally, invoking Lemma 2 proves the final claim of Theorem 1.

Proof of Lemma 3. Soudry et al. (2017) Lemma 12 proves that, with probability 1, there are at most d support vectors, and moreover, the i-th support vector z i has a positive dual variable α i , such that i∈S α i z i = ū. Suppose there exists some ξ ⊥ ū, such that max i∈S ξ, z i ≤ 0. Since

i∈S α i ξ, z i = ξ, i∈S α i z i = ξ, ū = 0,

we actually have ξ, z i = 0 for all i ∈ S. This is impossible under Assumption 3, since the support vectors span the whole space.

Proof of Lemma 4. For the sake of presentation, we leave out the subscript in z i and denote a data point by z generally. For any data point z and predictor w, let z ⊥ and w ⊥ denote their projection onto ū⊥ . Let z ∈ arg max i∈S -w ⊥ , z , and thus -w ⊥ , z ≥ α w ⊥ .

For exp , we have

EQUATION

The first part can be lower bounded as below (recall that -w ⊥ , z ⊥ = -w ⊥ , z ≥ α w ⊥ )

EQUATION

To bound the second part, first notice that since we assume w, ū ≥ 0, for any z,

EQUATION

)

The reason is that every data point has margin at least γ, and thus z -γ ū -z ⊥ = cū for some c ≥ 0. Using eq. ( 15), we can bound the second part of eq. ( 13).

EQUATION

On the third line eq. ( 15) is applied. The fourth line applies the property that f (x) = -xe -x ≥ -1/e when x ≥ 0.

Published as a conference paper at ICLR 2019 Combining eq. ( 13), eq. ( 14) and eq. ( 16), we get

w ⊥ , ∇R(w) ≥ exp -w, γ ū 1 n exp α w ⊥ α w ⊥ - 1 e .

As long as w ⊥ ≥ (1 + ln(n))/α, w ⊥ , ∇R(w) ≥ 0.

For log , similar to eq. ( 13), we have

EQUATION

The second part of eq. ( 17) can be bounded again by eq. ( 16). To bound the first part of eq. ( 17), first notice that (recall w, ū ≥ 0)

EQUATION

Using eq. ( 18), and recall that -w ⊥ , z ⊥ = -w ⊥ , z ≥ α w ⊥ ≥ 0, we can bound the first part of eq. ( 17) as below.

EQUATION

Combining eq. ( 17), eq. ( 19) and eq. ( 16), we get

w ⊥ , ∇R(w) ≥ exp -w, γ ū 1 2n α w ⊥ - 1 e .

As long as w ⊥ ≥ 2n/eα, w ⊥ , ∇R(w) ≥ 0.

Proof of Theorem 2. Recall that

dW 1 dt = - ∂R ∂W 1 = -W 2 • • • W L ∇R(w prod ) ,

and thus

EQUATION

Let Π ū denote the projection onto span(ū), and let Π ⊥ denote the projection onto ū⊥ . Also let Π ūW 1 and Π ⊥ W 1 denote the projection of rows of W 1 onto span(ū) and ū⊥ , respectively. Notice that

EQUATION

Let

W 1 = u 1 σ 1 v 1 + S. We have S 2 ≤ σ 1,2 ≤ σ 2 1,2 ≤ W 1 2 F -W 1 2 2 ≤ √ D,

where σ 1,2 is the second singular value of W 1 and D is the constant introduced in Lemma 2. Then

EQUATION

Π ⊥ W 1 F ≤ u 1 σ 1 (Π ⊥ v 1 ) F + Π ⊥ S F = σ 1 Π ⊥ v 1 + Π ⊥ S F ≤ σ 1 Π ⊥ v 1 + √ dD.

It follows that

EQUATION

)

Fix an arbitrary > 0. By Theorem 1, we can find some t 0 large enough such that for any t ≥ t 0 :

1.

√ dD/ W 1 2 ≤ /3. 2. w prod/ W L F ••• W1 F -v 1 ≤ /3, or w prod/ W L F ••• W1 F + v 1 ≤ /3. 3. W L F • • • W 1 F ≥ 3K/

, where K is the threshold given in Lemma 4, i.e., 1+ln(n) /α for exp , 2n /eα for log .

4. R(W ) ≤ (0)/n, which implies w prod , z i ≥ 0 for all 1 ≤ i ≤ n. By Lemma 3, there always exists a support vector z for which Π ⊥ w prod , z ≤ 0, and therefore w prod , ū ≥ 0.

Suppose for some t ≥ t 0 , Π ⊥ W 1 F / W 1 F ≥ . By eq. ( 22) and bullet 1 above,

Π ⊥ v 1 ≥ 2 /3. Bullet 2 above then gives Π ⊥ w prod/ W L F ••• W1 F ≥ /3

, which together with bullet 3 above implies Π ⊥ w prod ≥ K. Since also w prod , ū ≥ 0, we can apply Lemma 4 and get that Π ⊥ w prod , ∇R(w prod ) ≥ 0. In light of eq. ( 21), d Π ⊥ W 1 2 F / dt ≤ 0. On the other hand, since after t ≥ t 0 , w prod , z i ≥ 0, we have d W 1 2 F / dt ≥ 0 by eq. ( 20). Therefore Π ⊥ W 1 F / W 1 F will not increase, and since W 1 F → ∞, it will eventually drop below , and will never exceed again. Therefore,

lim sup t→∞ Π ⊥ W 1 F W 1 F ≤ .

Since is arbitrary, we have

lim sup t→∞ Π ⊥ W 1 F W 1 F = 0,

and thus lim t→∞ v 1 , ū = 1. An application of Theorem 1 gives the other part of Theorem 2.

Proof of Corollary 1. By Theorem 2,

min i y i W L W L F • • • W 1 W 1 F x i -→ min i y i ū x i .

Next, pick arbitrary unit vectors a i ∈ R di , and note max

A1∈R d 1 ×d 0 A1 F =1 • • • max A L ∈R 1×d L-1 A L F =1 min i y i (A L • • • A 1 ) x i ≥ min i y i (1a L-1 )(a L-1 a L-2 ) • • • (a 2 a 1 )(a 1 ū ) x i = min i y i ū x i .

On the other hand, if matrices (A L , . . . , A 1 ) are feasible, then

A L • • • A 1 2 ≤ A L 2 • • • A 2 2 A 1 F ≤ A L F • • • A 1 F ≤ 1, whereby min i y i (A L • • • A 1 )x i ≤ A L • • • A 1 2 min i y i A L • • • A 1 A L • • • A 1 2 x i ≤ 1 • max w 2=1 min i y i w x i = min i y i ū x i .

C OMITTED PROOFS FROM SECTION 3

Proof of Lemma 5. Given W, V ∈ B(R), we need to show that ∇R(W )-∇R(V ) ≤ β(R) W -V for some β(R).

EQUATION

Proceeding in this way, we can get

EQUATION

Since z i ≤ 1, is β-Lipschitz, we have

EQUATION

where the last inequality follows from a similar one-by-one replacement procedure as in eq. ( 23). Combining eq. ( 24) and eq. ( 25), we get for R ≥ 1,

∂R ∂W 1 - ∂R ∂V 1 ≤ (L -1)R L-2 G + βLR 2L-2 W -V ≤ 2LR 2L-2 (β + G) W -V .

The same procedure can be done for other layers, and together

∇R(W ) -∇R(V ) ≤ 2L 2 R 2L-2 (β + G) W -V .

Proof of Lemma 6. Recall that if W (t), W (t + 1) ∈ B(R) and η t = 1/β(R),

EQUATION

)

Suppose W (t) ∈ B(R) for all t. By Assumption 2 and eq. ( 26),

R W (1) ≤ R W (0) - 1 2β(R) ∇R W (0) 2 < R W (0) .

By eq. ( 26), gradient descent never increases the risk, and thus for all t ≥ 1, R W (t) ≤ R W (1) < R W (0) . In exactly the same way as in the proof of Lemma 1, one can show that there exists some constant (R) > 0, so that ∂R/∂W 1 (t) F ≥ (R) for all t. Invoking eq. ( 26) again, we will get

R W (0) ≥ ∞ t=0 1 2β(R) (R) 2 = ∞,

which is a contradiction. Therefore W (t) must go out of B(R) at some time.

Published as a conference paper at ICLR 2019 Next we prove Theorem 3 and 4. The proofs depend on several lemmas which are similar to the gradient flow ones. The following Lemma 7 is similar to Lemma 1. Lemma 7. Under Assumption 1, 2, 4, and 5, gradient descent ensures that

• max 1≤k≤L W k (t) F is unbounded. • ∞ t=0 η t = ∞. • For any R > 0, t:W (t)∈B(R) η t < ∞.

Proof. By Assumption 5, we always have that W

(t) ∈ B(R t ). Since β(R t ) = 2L 2 R 2L-2 t (β+G) ≥ R L-1 t G, we have for any 1 ≤ k ≤ L, W k (t + 1) F ≤ W k (t) F + η t ∂R ∂W k (t) F ≤ W k (t) F + 1 β(R t ) ∂R ∂W k (t) F ≤ W k (t) F + 1 β(R t ) R L-1 t G ≤ W k (t) F + 1. (27) Moreover, Lemma 6 shows that R t → ∞. Since R t+1 = R t as long as W (t + 1) ∈ B(R t -1), max 1≤k≤L W k (t) F is unbounded.

It then follows that for any t, by Cauchy-Schwarz,

  t-1 τ =0 η τ     t-1 τ =0 η τ ∇R W (τ ) 2   ≥   t-1 τ =0 η τ ∇R W (τ )   2 → ∞.

since by eq. ( 26),

t-1 τ =0 η τ ∇R W (τ ) 2 ≤ 2R W (0) -2R W (t) ≤ 2R W (0) ,

we have ∞ t=0 η t = ∞. Since under Assumptions 4 and 5 gradient descent never increases the risk, it can be shown in exactly the same as in the proof of Lemma 1 that, for W (t) ∈ B(R), ∂R/∂W 1 (t) F ≥ (R) for some constant (R) > 0. Invoking eq. ( 26) again, we get that t:W (t)∈B(R) η t < ∞.

The next lemma is an analogy to Lemma 2. Lemma 8. Under Assumption 1 and 4, the gradient descent iterates satisfy the following properties:

• For any 1 ≤ k ≤ L, W k 2 F -W k 2 2 ≤ D + 2R W (0) . • For any 1 ≤ k < L, v k+1 , u k 2 ≥ 1 -D+3R(W (0))+ W k+1 (0) 2 2 + W k (0) 2 2/ W k+1 2 2 . • Suppose max 1≤k≤L W k F → ∞, then w prod/ L k=1 W k F , v 1 → 1.

Proof. Recall that for any W ,

EQUATION

For gradient descent iterates, summing eq. ( 28) from 0 to t -1, we get

EQUATION

For any 1 ≤ k ≤ L and any t, let

EQUATION

Q k (t) = t-1 τ =0 η 2 τ ∂R ∂W k (τ ) ∂R ∂W k (τ )

.

We have

P k (t) 2 = Q k (t) 2 ≤ tr Q k (t) = tr P k (t)

. Moreover, invoking eq. ( 26),

EQUATION

Still let σ k (t), u k (t) and v k (t) denote the first singular value, left singular vector and right singular vector of W k (t). We can then proceed basically in the same way as in the proof of Lemma 2. For example, eq. ( 6) becomes

EQUATION

) while eq. ( 7) becomes

EQUATION

) Summing eq. ( 31) and eq. ( 32) from k to L -1, and invoke eq. ( 30), we get

W k (t) 2 F -W k (t) 2 2 ≤ D -tr P k (t) + tr Q L (t) + L-1 k =k tr P k (t) ≤ D + 2R W (0) .

To prove singular vectors get aligned, we can still proceed in nearly the same way as in the proof of Lemma 2. eq. ( 9) becomes

EQUATION

while eq. ( 10) becomes

EQUATION

)

Combining eq. ( 33) and eq. ( 34)

EQUATION

)

Similar to eq. ( 33), we can get

EQUATION

0) 2 2 -P k (t) 2 , and thus eq. ( 12) becomes

EQUATION

)

Combining eq. ( 35) and eq. ( 36), we get

u k , v k+1 2 ≥ 1 - D + W k (0) 2 2 + W k+1 (0) 2 2 + 3R W (0) σ 2 k+1 .

The final claim of Lemma 8 can be proved in exactly the same way as Lemma 2.

Proof of Theorem 3. Summing eq. ( 32), we know that for any two different layers j > k, W k (t) 2 F -W j (t) 2 F = W k (0) 2 F -W j (0) 2 F -tr P k (t) + tr Q j (t) . Recall eq. ( 30), we know that

EQUATION

In other words, the difference between the squares of Frobenius norms of any two layers is still bounded.

The proof then goes in the same way as the proof of Theorem 1. Suppose the risk is always above > 0. Then there exists some c( ) > 0 such that ∇R(w prod ) ≥ c( ). By Lemma 8, there exists some C such that if min 1≤k≤L W k (t) F > C, W L (t) • • • W 2 (t) ≥ C L /2. By eq. ( 37) and Lemma 7, t: W k (t) F ≤C for some k η t is finite. On the other hand, by Lemma 7, ∞ i=0 η t = ∞, and thus t: W k (t) F >C for all k η t = ∞. Therefore we have, by invoking eq. ( 26),

2R W (0) ≥ ∞ t=0 η t R W (t) 2 ≥ ∞ t=0 η t ∂R ∂W 1 (t) 2 ≥ c( ) C L 2 t: W k (t) F >C for all k η t = ∞,

which is a contradiction. Therefore R W (t) → 0, and since it has no finite optimum, W k F → ∞. The other results follow from Lemma 7.

Proof of Theorem 4. Recall that

∂R ∂W 1 = W 2 • • • W L ∇R(w prod ),

and thus . If w prod , z i ≥ 0 for all i, then W 1 (t + 1) F ≥ W 1 (t) F . Also recall that Π ⊥ W 1 (t) denote the projection of rows of W 1 (t) onto ū⊥ , the orthogonal complement of span(ū). We have (39)

W 1 (t + 1) 2 F = W 1 (t)

Π ⊥ W 1 (t + 1) 2 F ≤ Π ⊥ W 1 (t) 2 F -2η t Π ⊥ W 1 (t), ∂R ∂W 1 (t) + η 2 t ∂R ∂W 1 (t) 2 F = Π ⊥ W 1 (t)

The proof then goes in almost the same way as the proof of Theorem 2. For any > 0, we can find some large enough time t 0 , such that for any t ≥ t 0 , Let t 3 denote the smallest time after t 2 such that Π ⊥ W 1 (t 3 ) F / W 1 (t 3 ) F ≥ (if it exists).

Recall that W 1 (t + 1) F ≤ W 1 (t) F + 1 for any t ≥ 0, and W 1 (t + 1) F ≥ W 1 (t) F for any t ≥ t 0 , we have

Π ⊥ W 1 (t 3 ) F W 1 (t 3 ) F ≤ Π ⊥ W 1 (t 3 ) F W 1 (t 3 -1) F ≤ Π ⊥ W 1 (t 3 -1) F + 1 W 1 (t 3 -1) F < + 1 W 1 (t 3 -1) F .

After t 3 , Π ⊥ W 1 2 F will increase by at most 2R W (0) , and thus Π ⊥ W 1 F will increase by at most 2R W (0) . Therefore, for any t 4 ≥ t 3 , as long as Π ⊥ W 1 (t 4 ) F / W 1 (t 4 ) F ≥ , we have

Π ⊥ W 1 (t 4 ) F W 1 (t 4 ) F ≤ Π ⊥ W 1 (t 4 ) F W 1 (t 3 ) F ≤ Π ⊥ W 1 (t 3 ) F + 2R W (0) W 1 (t 3 ) F ≤ + 1 W 1 (t 3 -1) F + 2R W (0) W 1 (t 3 ) F ≤ 2 , since W 1 (t) F ≥ 1+

√ 2R(W (0)) / after t 0 . In other words,

lim sup t→∞ Π ⊥ W 1 F W 1 F ≤ 2 .

Since is arbitrary, we have

lim sup t→∞ Π ⊥ W 1 F W 1 F = 0,

and thus lim t→∞ v 1 , ū = 1.

Proof of Corollary 2. The proof is analogous to that of Corollary 1, except using Theorem 4 in place of Theorem 2.

:



Figures and Tables:

2 / ||W 1 || F ||W 2 || 2 / ||W 2 || F ||W 3 || 2 / ||W 3 || F ||W 4 || 2 / ||W 4 || F (b) Alignment and risk minimization.

Initialization with the same Frobenius norm.

Figure 3: Risk and alignment of dense layers (the ratio W i 2 / W i F ) of (nonlinear!) AlexNet on CIFAR-10. Figure 3a uses default PyTorch initialization, while Figure 3b forces initial Frobenius norms to be equal amongst dense layers.



W (t) -R W (t + 1) .

2 F -2η t W 1 (t), W 1 (t) 2 F -2η t w prod (t), ∇R w prod (t) + η 2

Table content: <table><tr><td>∂R ∂W 1 (t)</td><td>+ η 2 t</td><td>∂R ∂W 1 (t)</td><td>2 F</td></tr><tr><td/><td/><td/><td>∂R</td></tr><tr><td/><td/><td>t</td><td>∂W 1 (t)</td></tr></table>

2 F -2η t Π ⊥ w prod (t), ∇R w prod (t) + η 2

Table content: <table><tr><td/><td>t</td><td>∂R ∂W 1 (t)</td><td>2 F</td><td>.</td></tr><tr><td/><td/><td/><td colspan="2">(38)</td></tr><tr><td colspan="2">Invoking eq. (26) again gives</td><td/><td/></tr><tr><td>η 2 t</td><td>∂R ∂W 1 (t)</td><td/><td/></tr></table>

Peer review (iclr2019):
 Summary: This paper studies the properties of applying gradient flow and gradient descent to deep linear networks on linearly separable data. For strictly decreasing loss like the logistic loss, this paper shows 1) the loss goes to 0, 2) for every layer the normalized weight matrix converges to a rank-1 matrix 3) these rank-1 matrices are aligned. For the logistic loss, this paper further shows the linear function is the maximum margin solution. Comments: This paper discovers some interesting properties of deep linear networks, namely asymptotic rank-1, and the adjacent matrix alignment effect. These discoveries are very interesting and may be useful to guide future findings for deep non-linear networks. The analysis relies on many previous results in Du et al. 2018, Arora et al. 2018 and Soudry et al. 2017 authors did a good job in combing them and developed some techniques to give very interesting results. There are two weaknesses. First, there is no convergence rate. Second, the step size assumption (Assumption 5) is unnatural. If the step size is set proportional to 1/t or 1/t^2 does this setup satisfies this assumption? Overall I think there are some interesting findings for deep linear networks and some new analysis presented, so I think this paper is above the bar. However, I don*t think this is a strong theory people due to the two weakness I mentioned.