Identity Matters in Deep Learning

Moritz Hardt Google Brain. m@mrtz.org    Tengyu Ma Stanford University. tengyu@stanford.edu. Work performed at Google.
Abstract

An emerging design principle in deep learning is that each layer of a deep artificial neural network should be able to easily express the identity transformation. This idea not only motivated various normalization techniques, such as batch normalization, but was also key to the immense success of residual networks.

In this work, we put the principle of identity parameterization on a more solid theoretical footing alongside further empirical progress. We first give a strikingly simple proof that arbitrarily deep linear residual networks have no spurious local optima. The same result for linear feed-forward networks in their standard parameterization is substantially more delicate. Second, we show that residual networks with ReLu activations have universal finite-sample expressivity in the sense that the network can represent any function of its sample provided that the model has more parameters than the sample size.

Directly inspired by our theory, we experiment with a radically simple residual architecture consisting of only residual convolutional layers and ReLu activations, but no batch normalization, dropout, or max pool. Our model improves significantly on previous all-convolutional networks on the CIFAR10, CIFAR100, and ImageNet classification benchmarks.

1 Introduction

Traditional convolutional neural networks for image classification, such as AlexNet ([13]), are parameterized in such a way that when all trainable weights are 0, a convolutional layer represents the 0-mapping. Moreover, the weights are initialized symmetrically around 0. This standard parameterization makes it non-trivial for a convolutional layer trained with stochastic gradient methods to preserve features that were already good. Put differently, such convolutional layers cannot easily converge to the identity transformation at training time.

This shortcoming was observed and partially addressed by [9] through batch normalization, i.e., layer-wise whitening of the input with a learned mean and covariance. But the idea remained somewhat implicit until residual networks ([6]; [7]) explicitly introduced a reparameterization of the convolutional layers such that when all trainable weights are 0, the layer represents the identity function. Formally, for an input x, each residual layer has the form x+h(x), rather than h(x). This simple reparameterization allows for much deeper architectures largely avoiding the problem of vanishing (or exploding) gradients. Residual networks, and subsequent architectures that use the same parameterization, have since then consistently achieved state-of-the-art results on various computer vision benchmarks such as CIFAR10 and ImageNet.

1.1 Our contributions

In this work, we consider identity parameterizations from a theoretical perspective, while translating some of our theoretical insight back into experiments. Loosely speaking, our first result underlines how identity parameterizations make optimization easier, while our second result shows the same is true for representation.

Linear residual networks.

Since general non-linear neural networks, are beyond the reach of current theoretical methods in optimization, we consider the case of deep linear networks as a simplified model. A linear network represents an arbitrary linear map as a sequence of matrices AA2A1. The objective function is 𝔼yAA1x2, where y=Rx for some unknown linear transformation R and x is drawn from a distribution. Such linear networks have been studied actively in recent years as a stepping stone toward the general non-linear case (see Section 1.2). Even though AA1 is just a linear map, the optimization problem over the factored variables (A,,A1) is non-convex.

In analogy with residual networks, we will instead parameterize the objective function as

minA1,,A𝔼y(I+A)(I+A1)x2. (1.1)

To give some intuition, when the depth is large enough, we can hope that the target function R has a factored representation in which each matrix Ai has small norm. Any symmetric positive semidefinite matrix O can, for example, be written as a product O=OO1, where each Oi=O1/ is very close to the identity for large so that Ai=OiI has small spectral norm. We first prove that an analogous claim is true for all linear transformations R with positive determinant111As will be discussed below Theorem 2.1, it is without loss of generality to assume that the determinant of R is positive. . Specifically, we prove that for every linear transformation R with det(R)>0, there exists a global optimizer (A1,,A) of (1.1) such that for large enough depth ,

max1iAiO(1/). (1.2)

Here, A denotes the spectral norm of A. The constant factor depends on the conditioning of R. We give the formal statement in Theorem 2.1. The theorem has the interesting consequence that as the depth increases, smaller norm solutions exist and hence regularization may offset the increase in parameters.

Having established the existence of small norm solutions, our main result on linear residual networks shows that the objective function (1.1) is, in fact, easy to optimize when all matrices have sufficiently small norm. More formally, letting A=(A1,,A) and f(A) denote the objective function in (1.1), we can show that the gradients vanish only when f(A)=0 provided that maxiAiO(1/). See Theorem 2.2. This result implies that linear residual networks have no critical points other than the global optimum. In contrast, for standard linear neural networks we only know, by work of [12] that these networks don’t have local optima except the global optimum, but it doesn’t rule out other critical points. In fact, setting Ai=0 will always lead to a bad critical point in the standard parameterization.

Universal finite sample expressivity.

Going back to non-linear residual networks with ReLU activations, we can ask: How expressive are deep neural networks that are solely based on residual layers with ReLU activations? To answer this question, we give a very simple construction showing that such residual networks have perfect finite sample expressivity. In other words, a residual network with ReLU activations can easily express any functions of a sample of size n, provided that it has sufficiently more than n parameters. Note that this requirement is easily met in practice. On CIFAR 10 (n=50000), for example, successful residual networks often have more than 106 parameters. More formally, for a data set of size n with r classes, our construction requires O(nlogn+r2) parameters. Theorem 3.2 gives the formal statement.

Each residual layer in our construction is of the form x+VReLU(Ux), where U and V are linear transformations. These layers are significantly simpler than standard residual layers, which typically have two ReLU activations as well as two instances of batch normalization.

The power of all-convolutional residual networks.

Directly inspired by the simplicity of our expressivity result, we experiment with a very similar architecture on the CIFAR10, CIFAR100, and ImageNet data sets. Our architecture is merely a chain of convolutional residual layers each with a single ReLU activation, but without batch normalization, dropout, or max pooling as are common in standard architectures. The last layer is a fixed random projection that is not trained. In line with our theory, the convolutional weights are initialized near 0, using Gaussian noise mainly as a symmetry breaker. The only regularizer is standard weight decay (2-regularization) and there is no need for dropout. Despite its simplicity, our architecture reaches 6.38% top-1 classification error on the CIFAR10 benchmark (with standard data augmentation). This is competitive with the best residual network reported in [6], which achieved 6.43%. Moreover, it improves upon the performance of the previous best all-convolutional network, 7.25%, achieved by [15]. Unlike ours, this previous all-convolutional architecture additionally required dropout and a non-standard preprocessing (ZCA) of the entire data set. Our architecture also improves significantly upon [15] on both Cifar100 and ImageNet.

1.2 Related Work

Since the advent of residual networks ([6]; [7]), most state-of-the-art networks for image classification have adopted a residual parameterization of the convolutional layers. Further impressive improvements were reported by [8] with a variant of residual networks, called dense nets. Rather than adding the original input to the output of a convolutional layer, these networks preserve the original features directly by concatenation. In doing so, dense nets are also able to easily encode an identity embedding in a higher-dimensional space. It would be interesting to see if our theoretical results also apply to this variant of residual networks.

There has been recent progress on understanding the optimization landscape of neural networks, though a comprehensive answer remains elusive. Experiments in [5] and [4] suggest that the training objectives have a limited number of bad local minima with large function values. Work by [3] draws an analogy between the optimization landscape of neural nets and that of the spin glass model in physics ([1]). [14] showed that 2-layer neural networks have no bad differentiable local minima, but they didn’t prove that a good differentiable local minimum does exist. [2] and [12] show that linear neural networks have no bad local minima. In contrast, we show that the optimization landscape of deep linear residual networks has no bad critical point, which is a stronger and more desirable property. Our proof is also notably simpler illustrating the power of re-parametrization for optimization. Our results also indicate that deeper networks may have more desirable optimization landscapes compared with shallower ones.

2 Optimization landscape of linear residual networks

Consider the problem of learning a linear transformation R:dd from noisy measurements y=Rx+ξ, where ξ𝒩(0,Id) is a d-dimensional spherical Gaussian vector. Denoting by 𝒟 the distribution of the input data x, let Σ=𝔼x𝒟[xx] be its covariance matrix.

There are, of course, many ways to solve this classical problem, but our goal is to gain insights into the optimization landscape of neural nets, and in particular, residual networks. We therefore parameterize our learned model by a sequence of weight matrices A1,,Ad×d,

h0 =x,hj=hj1+Ajhj1,y^=h. (2.1)

Here h1,,h1 are the 1 hidden layers and y^=h are the predictions of the learned model on input x. More succinctly, we have

y^=(I+A)(I+A1)x.

It is easy to see that this model can express any linear transformation R. We will use A as a shorthand for all of the weight matrices, that is, the ×d×d-dimensional tensor that contains A1,,A as slices. Our objective function is the maximum likelihood estimator,

f(A,(x,y))=y^y2=(I+A)(I+A1)xRxξ2. (2.2)

We will analyze the landscape of the population risk, defined as,

f(A):=𝔼[f(A,(x,y))].

Recall that Ai is the spectral norm of Ai. We define the norm |||||| for the tensor A as the maximum of the spectral norms of its slices,

|A|:=max1iAi.

The first theorem of this section states that the objective function f has an optimal solution with small ||||||-norm, which is inversely proportional to the number of layers . Thus, when the architecture is deep, we can shoot for fairly small norm solutions. We define γ:=max{|logσmax(R)|,|logσmin(R)|}. Here σmin(),σmax() denote the least and largest singular values of R respectively.

Theorem 2.1.

Suppose 3γ and det(R)>0. Then, there exists a global optimum solution A of the population risk f() with norm

|A|(4π+3γ)/.

We first note that the condition det(R)>0 is without loss of generality in the following sense. Given any linear transformation R with negative determinant, we can effectively flip the determinant by augmenting the data and the label with an additional dimension: let x=[x,b] and y=[y,b] , where b is an independent random variable (say, from standard normal distribution), and let R=[R001]. Then, we have that y=Rx+ξ and det(R)=det(R)>0.222When the dimension is odd, there is an easier way to see this – flipping the label corresponds to flipping R, and we have det(R)=det(R).

Second, we note that here γ should be thought of as a constant since if R is too large (or too small), we can scale the data properly so that σmin(R)1σmax(R). Concretely, if σmax(R)/σmin(R)=κ, then we can scaling for the outputs properly so that σmin(R)=1/κ and σmax(R)=κ. In this case, we have γ=logκ, which will remain a small constant for fairly large condition number κ. We also point out that we made no attempt to optimize the constant factors here in the analysis. The proof of Theorem 2.1 is rather involved and is deferred to Section A.

Given the observation of Theorem 2.1, we restrict our attention to analyzing the landscape of f() in the set of A with ||||||-norm less than τ,

τ={A×d×d:|A|τ}.

Here using Theorem 2.1, the radius τ should be thought of as on the order of 1/. Our main theorem in this section claims that there is no bad critical point in the domain τ for any τ<1. Recall that a critical point has vanishing gradient.

Theorem 2.2.

For any τ<1, we have that any critical point A of the objective function f() inside the domain τ must also be a global minimum.

Theorem 2.2 suggests that it is sufficient for the optimizer to converge to critical points of the population risk, since all the critical points are also global minima.

Moreover, in addition to Theorem 2.2, we also have that any A inside the domain τ satisfies that

f(A)F24(1τ)22σmin(Σ)(f(A)Copt). (2.3)

Here Copt is the global minimal value of f() and f(A)F denotes the euclidean norm333That is, TF:=ijkTijk2. of the ×d×d-dimensional tensor f(A). Note that σmin(Σ) denote the minimum singular value of Σ.

Equation (2.3) says that the gradient has fairly large norm compared to the error, which guarantees convergence of the gradient descent to a global minimum ([11]) if the iterates stay inside the domain τ, which is not guaranteed by Theorem 2.2 by itself.

Towards proving Theorem 2.2, we start off with a simple claim that simplifies the population risk. We use F to denote the Frobenius norm of a matrix, and A,B denotes the inner product of A and B in the standard basis (that is, A,B=tr(AB) where tr() denotes the trace of a matrix.)

Claim 2.3.

In the setting of this section, we have,

f(A)=((I+A)(I+A1)R)Σ1/2F2+C. (2.4)

Here C is a constant that doesn’t depend on A, and Σ1/2 denote the square root of Σ, that is, the unique symmetric matrix B that satisfies B2=Σ.

Proof of Claim 2.3.

Let tr(A) denotes the trace of the matrix A. Let E=(I+A)(I+A1)R. Recalling the definition of f(A) and using equation (2.2), we have

f(A) =𝔼[Exξ2] (by equation (2.2) )
=𝔼[Ex2+ξ22Ex,ξ]
=𝔼[tr(ExxE)]+𝔼[ξ2] (since 𝔼[Ex,ξ]=𝔼[Ex,𝔼[ξ|x]]=0)
=tr(E𝔼[xx]E)+C (where C=𝔼[ξ2])
=tr(EΣE)+C=EΣ1/2F2+C. (since 𝔼[xx]=Σ)

Next we compute the gradients of the objective function f() from straightforward matrix calculus. We defer the full proof to Section A.

Lemma 2.4.

The gradients of f() can be written as,

fAi=2(I+Ai+1)(I+A)EΣ(I+A1)(I+Ai1), (2.5)

where E=(I+A)(I+A1)R .

Now we are ready to prove Theorem 2.2. The key observation is that each matric Aj has small norm and cannot cancel the identity matrix. Therefore, the gradients in equation (2.5) is a product of non-zero matrices, except for the error matrix E. Therefore, if the gradient vanishes, then the only possibility is that the matrix E vanishes, which in turns implies A is an optimal solution.

Proof of Theorem 2.2.

Using Lemma 2.4, we have,

fAiF =2(I+Ai+1)(I+A)EΣ(I+A1)(I+Ai1)F (by Lemma 2.4)
2jiσmin(I+Ai)σmin(Σ)EF (by Claim C.2)
2(1τ)1σmin(Σ1/2)EΣ1/2F. (since σmin(I+A)1A)

It follows that

f(A)F2 =i=1fAiF24(1τ)2(1)σmin(Σ)EΣ1/2F2
=4(1τ)2(1)σmin(Σ)(f(A)C) (by the definition of E and Claim 2.3)
4(1τ)2(1)σmin(Σ)(f(A)Copt).

Therefore we complete the proof of equation (2.3). Finally, if A is a critical point, namely, f(A)=0, then by equation (2.3) we have that f(A)=Copt. That is, A is a global minimum.

3 Representational Power of the Residual Networks

In this section we characterize the finite-sample expressivity of residual networks. We consider a residual layers with a single ReLU activation and no batch normalization. The basic residual building block is a function 𝒯U,V,s():kk that is parameterized by two weight matrices Uk×k,Vk×k and a bias vector sk,

𝒯U,V,s(h)=VReLu(Uh+s). (3.1)

A residual network is composed of a sequence of such residual blocks. In comparison with the full pre-activation architecture in [7], we remove two batch normalization layers and one ReLU layer in each building block.

We assume the data has r labels, encoded as r standard basis vectors in r, denoted by e1,,er. We have n training examples (x(1),y(1)),,(x(n),y(n)), where x(i)d denotes the i-th data and y(i){e1,,er} denotes the i-th label. Without loss of generality we assume the data are normalized so that x(i)=1. We also make the mild assumption that no two data points are very close to each other.

Assumption 3.1.

We assume that for every 1i<jn, we have x(i)x(j)2ρ for some absolute constant ρ>0.

Images, for example, can always be imperceptibly perturbed in pixel space so as to satisfy this assumption for a small but constant ρ.

Under this mild assumption, we prove that residual networks have the power to express any possible labeling of the data as long as the number of parameters is a logarithmic factor larger than n.

Theorem 3.2.

Suppose the training examples satisfy Assumption 3.1. Then, there exists a residual network N (specified below) with O(nlogn+r2) parameters that perfectly expresses the training data, i.e., for all i{1,,n}, the network N maps x(i) to y(i).

It is common in practice that n>r2, as is for example the case for the Imagenet data set where n>106 and r=1000.

We construct the following residual net using the building blocks of the form 𝒯U,V,s as defined in equation (3.1). The network consists of +1 hidden layers h0,,h, and the output is denoted by y^r. The first layer of weights matrices A0 maps the d-dimensional input to a k-dimensional hidden variable h0. Then we apply layers of building block 𝒯 with weight matrices Aj,Bjk×k. Finally, we apply another layer to map the hidden variable h to the label y^ in k. Mathematically, we have

h0 =A0x,
hj =hj1+𝒯Aj,Bj,bj(hj1),j{1,,}
y^ =𝒯A+1,B+1,s+1(h).

We note that here A+1k×r and B+1r×r so that the dimension is compatible. We assume the number of labels r and the input dimension d are both smaller than n, which is safely true in practical applications.444In computer vision, typically r is less than 103 and d is less than 105 while n is larger than 106 The hyperparameter k will be chosen to be O(logn) and the number of layers is chosen to be =n/k. Thus, the first layer has dk parameters, and each of the middle building blocks contains 2k2 parameters and the final building block has kr+r2 parameters. Hence, the total number of parameters is O(kd+k2+rk+r2)=O(nlogn+r2).

Towards constructing the network N of the form above that fits the data, we first take a random matrix A0k×d that maps all the data points x(i) to vectors h0(i):=A0x(i). Here we will use hj(i) to denote the j-th layer of hidden variable of the i-th example. By Johnson-Lindenstrauss Theorem ([10], or see [17]), with good probability, the resulting vectors h0(i)’s remain to satisfy Assumption 3.1 (with slightly different scaling and larger constant ρ), that is, any two vectors h0(i) and h0(j) are not very correlated.

Then we construct middle layers that maps h0(i) to h(i) for every i{1,,n}. These vectors h(i) will clustered into r groups according to the labels, though they are in the k instead of in r as desired. Concretely, we design this cluster centers by picking r random unit vectors q1,,qr in k. We view them as the surrogate label vectors in dimension k (note that k is potentially much smaller than r). In high dimensions (technically, if k>4logr) random unit vectors q1,,qr are pair-wise uncorrelated with inner product less than <0.5. We associate the i-th example with the target surrogate label vector v(i) defined as follows,

if y(i)=ej, then v(i)=qj. (3.2)

Then we will construct the matrices (A1,B1),,(A,B) such that the first layers of the network maps vector h0(i) to the surrogate label vector v(i). Mathematically, we will construct (A1,B1),,(A,B) such that

i{1,,n},h(i)=v(i). (3.3)

Finally we will construct the last layer 𝒯A+1,B+1,b+1 so that it maps the vectors q1,,qrk to e1,,err,

j{1,,r},𝒯A+1,B+1,b+1(qj)=ej. (3.4)

Putting these together, we have that by the definition (3.2) and equation (3.3), for every i, if the label is y(i) is ej, then h(i) will be qj. Then by equation (3.4), we have that y^(i)=𝒯A+1,B+1,b+1(qj)=ej. Hence we obtain that y^(i)=y(i). The key part of this plan is the construction of the middle layers of weight matrices so that h(i)=v(i). We encapsulate this into the following informal lemma. The formal statement and the full proof is deferred to Section B.

Lemma 3.3 (Informal version of Lemma B.2).

In the setting above, for (almost) arbitrary vectors h0(1),,h0(n) and v(1),,v(n){q1,,qr}, there exists weights matrices (A1,B1),,(A,B), such that,

i{1,,n},h(i)=v(i).

We briefly sketch the proof of the Lemma to provide intuitions, and defer the full proof to Section B. The operation that each residual block applies to the hidden variable can be abstractly written as,

h^h+𝒯U,V,s(h). (3.5)

where h corresponds to the hidden variable before the block and h^ corresponds to that after. We claim that for an (almost) arbitrary sequence of vectors h(1),,h(n), there exists 𝒯U,V,s() such that operation (3.5) transforms k vectors of h(i)’s to an arbitrary set of other k vectors that we can freely choose, and maintain the value of the rest of nk vectors. Concretely, for any subset S of size k, and any desired vector v(i)(iS), there exist U,V,s such that

v(i) =h(i)+𝒯U,V,s(h(i))iS
h(i) =h(i)+𝒯U,V,s(h(i))iS (3.6)

This claim is formalized in Lemma B.1. We can use it repeatedly to construct layers of building blocks, each of which transforms a subset of k vectors in {h0(1),,h0(n)} to the corresponding vectors in {v(1),,v(n)}, and maintains the values of the others. Recall that we have =n/k layers and therefore after layers, all the vectors h0(i)’s are transformed to v(i)’s, which complete the proof sketch.

4 Power of all-convolutional residual networks

Inspired by our theory, we experimented with all-convolutional residual networks on standard image classification benchmarks.

4.1 CIFAR10 and CIFAR100

Our architectures for CIFAR10 and CIFAR100 are identical except for the final dimension corresponding to the number of classes 10 and 100, respectively. In Table 1, we outline our architecture. Each residual block has the form x+C2(ReLU(C1x)), where C1,C2 are convolutions of the specified dimension (kernel width, kernel height, number of input channels, number of output channels). The second convolution in each block always has stride 1, while the first may have stride 2 where indicated. In cases where transformation is not dimensionality-preserving, the original input x is adjusted using averaging pooling and padding as is standard in residual layers.

We trained our models with the Tensorflow framework, using a momentum optimizer with momentum 0.9, and batch size is 128. All convolutional weights are trained with weight decay 0.0001. The initial learning rate is 0.05, which drops by a factor 10 and 30000 and 50000 steps. The model reaches peak performance at around 50k steps, which takes about 24h on a single NVIDIA Tesla K40 GPU. Our code can be easily derived from an open source implementation555https://github.com/tensorflow/models/tree/master/resnet by removing batch normalization, adjusting the residual components and model architecture. An important departure from the code is that we initialize a residual convolutional layer of kernel size k×k and c output channels using a random normal initializer of standard deviation σ=1/k2c, rather than 1/kc used for standard convolutional layers. This substantially smaller weight initialization helped training, while not affecting representation.

A notable difference from standard models is that the last layer is not trained, but simply a fixed random projection. On the one hand, this slightly improved test error (perhaps due to a regularizing effect). On the other hand, it means that the only trainable weights in our model are those of the convolutions, making our architecture “all-convolutional”.

Table 1: Architecture for CIFAR10/100 (55 convolutions, 13.5M parameters)
variable dimensions initial stride description
3×3×3×16 1 1 standard conv
3×3×16×64 1 9 residual blocks
3×3×64×128 2 9 residual blocks
3×3×128×256 2 9 residual blocks
8×8 global average pool
256×𝚗𝚞𝚖_𝚌𝚕𝚊𝚜𝚜𝚎𝚜 random projection (not trained)

An interesting aspect of our model is that despite its massive size of 13.59 million trainable parameters, the model does not seem to overfit too quickly even though the data set size is 50000. In contrast, we found it difficult to train a model with batch normalization of this size without significant overfitting on CIFAR10.

Refer to caption
Refer to caption
Figure 1: Convergence plots of best model for CIFAR10 (left) and CIFAR (100) right. One step is a gradient update with batch size 128.

Table 2 summarizes the top-1 classification error of our models compared with a non-exhaustive list of previous works, restricted to the best previous all-convolutional result by [15], the first residual results [6], and state-of-the-art results on CIFAR by [8]. All results are with standard data augmentation.

Table 2: Comparison of top-1 classification error on different benchmarks
Method CIFAR10 CIFAR100 ImageNet

remarks

All-CNN 7.25 32.39 41.2

all-convolutional, dropout
extra data processing

Ours 6.38 24.64 35.29

all-convolutional

ResNet 6.43 25.16 19.38
DenseNet 3.74 19.25 N/A

4.2 ImageNet

The ImageNet ILSVRC 2012 data set has 1,281,167 data points with 1000 classes. Each image is resized to 224×224 pixels with 3 channels. We experimented with an all-convolutional variant of the 34-layer network in [6]. The original model achieved 25.03% classification error. Our derived model has 35.7M trainable parameters. We trained the model with a momentum optimizer (with momentum 0.9) and a learning rate schedule that decays by a factor of 0.94 every two epochs, starting from the initial learning rate 0.1. Training was distributed across 6 machines updating asynchronously. Each machine was equipped with 8 GPUs (NVIDIA Tesla K40) and used batch size 256 split across the 8 GPUs so that each GPU updated with batches of size 32.

In contrast to the situation with CIFAR10 and CIFAR100, on ImageNet our all-convolutional model performed significantly worse than its original counterpart. Specifically, we experienced a significant amount of underfitting suggesting that a larger model would likely perform better.

Despite this issue, our model still reached 35.29% top-1 classification error on the test set (50000 data points), and 14.17% top-5 test error after 700,000 steps (about one week of training). While no longer state-of-the-art, this performance is significantly better than the 40.7% reported by [13], as well as the best all-convolutional architecture by [15]. We believe it is quite likely that a better learning rate schedule and hyperparameter settings of our model could substantially improve on the preliminary performance reported here.

5 Conclusion

Our theory underlines the importance of identity parameterizations when training deep artificial neural networks. An outstanding open problem is to extend our optimization result to the non-linear case where each residual has a single ReLU activiation as in our expressivity result. We conjecture that a result analogous to Theorem 2.2 is true for the general non-linear case. Unlike with the standard parameterization, we see no fundamental obstacle for such a result.

We hope our theory and experiments together help simplify the state of deep learning by aiming to explain its success with a few fundamental principles, rather than a multitude of tricks that need to be delicately combined. We believe that much of the advances in image recognition can be achieved with residual convolutional layers and ReLU activations alone. This could lead to extremely simple (albeit deep) architectures that match the state-of-the-art on all image classification benchmarks.

Acknowledgment: We thank Jason D. Lee, Qixing Huang, and Jonathan Shewchuk for helpful discussions and kindly pointing out errors in earlier versions of the paper. We also thank Jonathan Shewchuk for suggesting an improvement of equation (2.3) that is incorporated into the current version. Tengyu Ma would like to thank the support by Dodds Fellowship and Siebel Scholarship.

References

  • [1] Antonio Auffinger, Gérard Ben Arous, and Jiří Černỳ. Random matrices and complexity of spin glasses. Communications on Pure and Applied Mathematics, 66(2):165–201, 2013.
  • [2] P. Baldi and K. Hornik. Neural networks and principal component analysis: Learning from examples without local minima. Neural Netw., 2(1):53–58, January 1989.
  • [3] Anna Choromanska, Mikael Henaff, Michael Mathieu, Gérard Ben Arous, and Yann LeCun. The loss surfaces of multilayer networks. In AISTATS, 2015.
  • [4] Yann N Dauphin, Razvan Pascanu, Caglar Gulcehre, Kyunghyun Cho, Surya Ganguli, and Yoshua Bengio. Identifying and attacking the saddle point problem in high-dimensional non-convex optimization. In Advances in neural information processing systems, pages 2933–2941, 2014.
  • [5] I. J. Goodfellow, O. Vinyals, and A. M. Saxe. Qualitatively characterizing neural network optimization problems. ArXiv e-prints, December 2014.
  • [6] Kaiming He, Xiangyu Zhang, Shaoqing Ren, and Jian Sun. Deep residual learning for image recognition. In arXiv prepring arXiv:1506.01497, 2015.
  • [7] Kaiming He, Xiangyu Zhang, Shaoqing Ren, and Jian Sun. Identity mappings in deep residual networks. In Computer Vision - ECCV 2016 - 14th European Conference, Amsterdam, The Netherlands, October 11-14, 2016, Proceedings, Part IV, pages 630–645, 2016.
  • [8] Gao Huang, Zhuang Liu, and Kilian Q. Weinberger. Densely connected convolutional networks. CoRR, abs/1608.06993, 2016.
  • [9] Sergey Ioffe and Christian Szegedy. Batch normalization: Accelerating deep network training by reducing internal covariate shift. In Proceedings of the 32nd International Conference on Machine Learning, ICML 2015, Lille, France, 6-11 July 2015, pages 448–456, 2015.
  • [10] William B Johnson and Joram Lindenstrauss. Extensions of lipschitz mappings into a hilbert space. Contemporary mathematics, 26(189-206):1, 1984.
  • [11] H. Karimi, J. Nutini, and M. Schmidt. Linear Convergence of Gradient and Proximal-Gradient Methods Under the Polyak-\L{}ojasiewicz Condition. ArXiv e-prints, August 2016.
  • [12] K. Kawaguchi. Deep Learning without Poor Local Minima. ArXiv e-prints, May 2016.
  • [13] Alex Krizhevsky, Ilya Sutskever, and Geoffrey E Hinton. Imagenet classification with deep convolutional neural networks. In Advances in neural information processing systems, pages 1097–1105, 2012.
  • [14] D. Soudry and Y. Carmon. No bad local minima: Data independent training error guarantees for multilayer neural networks. ArXiv e-prints, May 2016.
  • [15] J. T. Springenberg, A. Dosovitskiy, T. Brox, and M. Riedmiller. Striving for Simplicity: The All Convolutional Net. ArXiv e-prints, December 2014.
  • [16] Eric W. Weisstein. Normal matrix, from mathworld–a wolfram web resource., 2016.
  • [17] Wikipedia. Johnson–lindenstrauss lemma — wikipedia, the free encyclopedia, 2016.

Appendix A Missing Proofs in Section 2

In this section, we give the complete proofs for Theorem 2.1 and Lemma 2.4, which are omitted in Section 2.

A.1 Proof of Theorem 2.1

It turns out the proof will be significantly easier if R is assumed to be a symmetric positive semidefinite (PSD) matrix, or if we allow the variables to be complex matrices. Here we first give a proof sketch for the first special case. The readers can skip it and jumps to the full proof below. We will also prove stronger results, namely, |A|3γ/, for the special case.

When R is PSD, it can be diagonalized by orthonormal matrix U in the sense that R=UZU, where Z=diag(z1,,zd) is a diagonal matrix with non-negative diagonal entries z1,,zd. Let A1==A=Udiag(zi1/)UI, then we have

(I+A)(I+A1) =(Udiag(zi1/)U)=Udiag(zi1/)U (since UU=I)
=UZU=R.

We see that the network defined by A reconstruct the transformation R, and therefore it’s a global minimum of the population risk (formally see Claim 2.3 below). Next, we verify that each of the Aj has small spectral norm:

Aj =IUdiag(zi1/)U)=U(Idiag(zi)1/)U=Idiag(zi)1/ (since U is orthonormal)
=maxi|zi1/1|. (A.1)

Since σmin(R)ziσmax(R), we have 3γ|logzi|. It follows that

|zi1/1|=|e(logzi)/1|3|(logzi)/|3γ/. (since |ex1|3|x| for all |x|1)

Then using equation (A.1) and the equation above, we have that |A|maxjAj3γ/, which completes the proof for the special case.

Towards fully proving the Theorem 2.1, we start with the following Claim:

Claim A.1.

Suppose Q2×2 is an orthonormal matrix. Then for any integer q, there exists matrix W1,,Wq2×2 and a diagonal matrix Λ satisfies that (a) Q=W1WqΛ and WjIπ/q, (b) Λ is an diagonal matrix with ±1 on the diagonal, and (c) If Q is a rotation then Λ=I.

Proof.

We first consider the case when Q is a rotation. Each rotation matrix can be written as T(θ):=[cosθsinθsinθcosθ]. Suppose Q=T(θ). Then we can take W1==Wq=T(θ/q) and Λ=I. We can verify that

WjIθ/q.

Next, we consider the case when Q is a reflection. Then we have that Q can be written as Q=T(θ)diag(1,1), where diag(1,1) is the reflection with respect to the y-axis. Then we can take W1==Wq=T(θ/q) and Λ=diag(1,1) and complete the proof.

Next we give the formal full proof of Theorem 2.1. The main idea is to reduce to the block diagonal situation and to apply the Claim above.

Proof of Theorem 2.1.

Let R=UKV be the singular value decomposition of R, where U,V are two orthonormal matrices and K is a diagonal matrix with nonnegative entries on the diagonal. Since det(R)=det(U)det(K)det(V)>0 and det(K)>0, we can flip U,V properly so that det(U)=det(V)=1. Since U is a normal matrix (that is, U satisfies that UU=UU), by Claim C.1, we have that U can be block-diagonalized by orthonormal matrix S into U=SDS1, where D=diag(D1,,Dm) is a real block diagonal matrix with each block Di being of size at most 2×2. Using Claim A.1, we have that for any Di, there exists Wi,1,,Wi,q,Λi such that

Di=Wi,1Wi,qΛi (A.2)

and Wi,jIπ/q. Let Λ=diag(Λ1,,Λm) and Wj=diag(W1,j,Wm,j). We can rewrite equation (A.2) as

D=W1WqΛ. (A.3)

Moreover, we have that Λ is a diagonal matrix with ±1 on the diagonal. Since Wi,j’s are orthonormal matrix with determinant 1, we have det(Λ)=det(D)=det(U)=1. That is, Λ has an even number of 1’s on the diagonal. Then we can group the 1’s into 2×2 blocks. Note that [1001] is the rotation matrix T(π). Thus we can write Λ as a concatenation of +1’s on the diagonal and block T(π). Then applying Claim A.1 (on each of the block T(π)), we obtain that there are W1,,Wq such that

Λ=W1Wq (A.4)

where WjIπ/q. Thus using equation (A.3) and (2.3), we obtain that

U=SDS1=SW1S1SWqS1SW1S1SWqS1.

Moreover, we have that for every j, SWjS1I=S(WjI)S1=WjIπ/q, because S is an orthonormal matrix. The same can be proved for Wj. Thus let Bj=SWjS1I for jq and Bj+q=SWjS1I, and we can rewrite,

U=(I+B1)(I+Bq).

We can deal with V similarly by decomposing V into 2q matrices that are π/q close to identity matrix,

V=(I+B1)(I+B2q).

Last, we deal with the diagonal matrix K. Let K=diag(ki). We have minki=σmin(R),maxki=σmax(R). Then, we can write K=(K)p where K=diag(ki1/p) and p is an integer to be chosen later. We have that KImax|ki1/p1|max|elogki1/p1|. When pγ=max{logmaxki,logminki}=max{logσmax(R),logσmin(R)}, we have that

KImax|elogki1/p1|3max|logki1/p|=3γ/p. (since |ex1|3|x| for |x|1)

Let B1′′==Bp′′=KI and then we have K=(I+Bp′′)(I+B1′′). Finally, we choose p=3γ4π+3γ and q=π4π+3γ, 666Here for notational convenience, p,q are not chosen to be integers. But rounding them to closest integer will change final bound of the norm by small constant factor. and let Ap+4q=B2q,=Ap+2q+1=B1,Ap+2q=Bp′′,,A2q+1=B1′′,A2q=B2q,,A1=B1. We have that 4q+p= and

R=UKV=(I+A)(I+A1).

Moreover, we have |||A|||max{Bj,Bj.Bj′′}max{π/q,3γ/p}4π+3γ, as desired.

A.2 Proof of Lemma 2.4

We compute the partial gradients by definition. Let Δjd×d be an infinitesimal change to Aj. Using Claim 2.3, consider the Taylor expansion of f(A1,,A+Δj,,A)

f(A1,,A+Δj,,A)
=((I+A)(I+Aj+Δj)(I+A1)R)Σ1/2F2
=((I+A)(I+A1)R)Σ1/2+(I+A)Δj(I+A1)Σ1/2F2
=((I+A)(I+A1)R)Σ1/2F2+
2((I+A)(I+A1)R)Σ1/2,(I+A)Δj(I+A1)Σ1/2+O(ΔjF2)
=f(A)+2(I+Aj+1)(I+A)EΣ(I+A1)(I+Aj1),Δj+O(ΔjF2).

By definition, this means that the fAj=2(I+A)(I+Aj+1)EΣ(I+Aj1)(I+A1).∎

Appendix B Missing Proofs in Section 3

In this section, we provide the full proof of Theorem 3.2. We start with the following Lemma that constructs a building block 𝒯 that transform k vectors of an arbitrary sequence of n vectors to any arbitrary set of vectors, and main the value of the others. For better abstraction we use α(i),β(i) to denote the sequence of vectors.

Lemma B.1.

Let S[n] be of size k. Suppose α(1),,α(n) is a sequences of n vectors satisfying a) for every 1in, we have 1ραi21+ρ, and b) if ij and S contains at least one of i,j, then α(i)α(j)3ρ. Let β(1),,β(n) be an arbitrary sequence of vectors. Then, there exists U,Vk×k,s such that for every iS, we have 𝒯U,V,s(α(i))=β(i)α(i), and moreover, for every i[n]\S we have 𝒯U,V,s(α(i))=0.

We can see that the conclusion implies

β(i) =α(i)+𝒯U,V,s(α(i))iS
α(i) =α(i)+𝒯U,V,s(α(i))iS

which is a different way of writing equation (3.6).

Proof of Lemma B.1.

Without loss of generality, suppose S={1,,k}. We construct U,V,s as follows. Let the i-th row of U be α(i) for i[k], and let s=(12ρ)𝟏 where 𝟏 denotes the all 1’s vector. Let the i-column of V be 1α(i)2(12ρ)(β(i)α(i)) for i[k]. Next we verify that the correctness of the construction. We first consider 1ik. We have that Uα(i) is a a vector with i-th coordinate equal to α(i)21ρ. The j-th coordinate of Uα(i) is equal to α(j),α(i), which can be upperbounded using the assumption of the Lemma by

α(j),α(i)=12(α(i)2+α(j)2)α(i)α(j)21+ρ3ρ12ρ. (B.1)

Therefore, this means Uα(i)(12ρ)𝟏contains a single positive entry (with value at least α(i)2(12ρ)ρ), and all other entries being non-positive. This means that ReLu(Uα(i)+b)=(α(i)2(12ρ))ei where ei is the i-th natural basis vector. It follows that VReLu(Uα(i)+b)=(α(i)2(12ρ))Vei=β(i)α(i). Finally, consider ni>k. Then similarly to the computation in equation (B.1), Uα(i) is a vector with all coordinates less than 12ρ. Therefore Uα(i)+b is a vector with negative entries. Hence we have ReLu(Uα(i)+b)=0, which implies VReLu(Uα(i)+b)=0.

Now we are ready to state the formal version of Lemma 3.3.

Lemma B.2.

Suppose a sequence of n vectors z(1),,z(n) satisfies a relaxed version of Assumption 3.1: a) for every i, 1ρz(i)21+ρ b) for every ij, we have z(i)z(j)2ρ;. Let v(1),,v(n) be defined above. Then there exists weigh matrices (A1,B1),,(A,B), such that given i,h0(i)=z(i), we have,

i{1,,n},h(i)=v(i).

We will use Lemma B.1 repeatedly to construct building blocks 𝒯Aj,Bk,sj(), and thus prove Lemma B.2. Each building block 𝒯Aj,Bk,sj() takes a subset of k vectors among {z(1),,z(n)} and convert them to v(i)’s, while maintaining all other vectors as fixed. Since they are totally n/k layers, we finally maps all the z(i)’s to the target vectors v(i)’s.

Proof of Lemma B.2.

We use Lemma B.1 repeatedly. Let S1=[1,,k]. Then using Lemma B.1 with α(i)=z(i) and β(i)=v(i) for i[n], we obtain that there exists A1,B1,b1 such that for ik, it holds that h1(i)=z(i)+𝒯A1,B1,b1(z(i))=v(i), and for ik, it holds that h1(i)=z(i)+𝒯A1,B1,b1(z(i))=z(i). Now we construct the other layers inductively. We will construct the layers such that the hidden variable at layer j satisfies hj(i)=v(i) for every 1ijk, and hj(i)=z(i) for every ni>jk. Assume that we have constructed the first j layer and next we use Lemma B.1 to construct the j+1 layer. Then we argue that the choice of α(1)=v(1),,α(jk)=v(jk), α(jk+1)=z(jk+1),,α(n)=z(n), and S={jk+1,,(j+1)k} satisfies the assumption of Lemma B.1. Indeed, because qi’s are chosen uniformly randomly, we have w.h.p for every s and i, qs,z(i)1ρ. Thus, since v(i){q1,,qr}, we have that v(i) also doesn’t correlate with any of the z(i). Then we apply Lemma B.1 and conclude that there exists Aj+1=U,Bj+1=V,bj+1=s such that 𝒯Aj+1,bj+1,bj+1(v(i))=0 for ijk, 𝒯Aj+1,bj+1,bj+1(z(i))=v(i)z(i) for jk<i(j+1)k, and 𝒯Aj+1,bj+1,bj+1(z(i))=0 for ni>(j+1)k. These imply that

hj+1(i) =hj(i)+𝒯Aj+1,bj+1,bj+1(v(i))=v(i)1ijk
hj+1(i) =hj(i)+𝒯Aj+1,bj+1,bj+1(z(i))=v(i)jk+1i(j+1)k
hj+1(i) =hj(i)+𝒯Aj+1,bj+1,bj+1(z(i))=z(i)(j+1)k<in

Therefore we constructed the j+1 layers that meets the inductive hypothesis for layer j+1. Therefore, by induction we get all the layers, and the last layer satisfies that h(i)=v(i) for every example i.

Now we ready to prove Theorem 3.2, following the general plan sketched in Section 3.

Proof of Theorem 3.2.

We use formalize the intuition discussed below Theorem 3.2. First, take k=c(logn)/ρ2 for sufficiently large absolute constant c (for example, c=10 works), by Johnson-Lindenstrauss Theorem ([10], or see [17]) we have that when A0 is a random matrix with standard normal entires, with high probability, all the pairwise distance between the the set of vectors {0,x(1),,x(n)} are preserved up to 1±ρ/3 factor. That is, we have that for every i, 1ρ/3A0x(i)1+ρ/3, and for every ij, A0x(i)A0x(j)ρ(1ρ/3)2ρ/3. Let z(i)=A0x(i) and ρ=ρ/3. Then we have z(i)’s satisfy the condition of Lemam B.2. We pick r random vectors q1,,qr in k. Let v(1),,v(n) be defined as in equation (3.2). Then by Lemma B.2, we can construct matrices (A1,B1),,(A,B) such that

h(i)=v(i). (B.2)

Note that v(i){q1,,qr}, and qi’s are random unit vector. Therefore, the choice of α(1)=q1,,α(r)=qr, β(1)=e1,,β(r)=er, and satisfies the condition of Lemma B.1, and using Lemma B.1 we conclude that there exists A+1,B+1,s+1 such that

ej=𝒯A+1,B+1,b+1(vj), for every j{1,,r}.. (B.3)

By the definition of v(i) in equation (3.2) and equation (B.2), we conclude that y^(i)=h(i)+𝒯A+1,B+1,b+1(h(i))=y(i)., which complete the proof.

Appendix C Toolbox

In this section, we state two folklore linear algebra statements. The following Claim should be known, but we can’t find it in the literature. We provide the proof here for completeness.

Claim C.1.

Let Ud×d be a real normal matrix (that is, it satisfies UU=UU). Then, there exists an orthonormal matrix Sd×d such that

U=SDS,

where D is a real block diagonal matrix that consists of blocks with size at most 2×2.

Proof.

Since U is a normal matrix, it is unitarily diagonalizable (see [16] for backgrounds). Therefore, there exists unitary matrix V in d×d and diagonal matrix in d×d such that U has eigen-decomposition U=VΛV*. Since U itself is a real matrix, we have that the eigenvalues (the diagonal entries of Λ) come as conjugate pairs, and so do the eigenvectors (which are the columns of V). That is, we can group the columns of V into pairs (v1,v¯1),,(vs,vs¯),vs+1,,vt, and let the corresponding eigenvalues be λ1,λ¯1,,λλs,λ¯s,λs+1,,λt. Here λs+1,,λt. Then we get that U=i=1s2(viλivi*)+i=s+1tviλivi. Let Qi=(viλivi*), then we have that Qi is a real matrix of rank-2. Let Sid×2 be a orthonormal basis of the column span of Qi and then we have that Qi can be written as Qi=SiDiSi where Di is a 2×2 matrix. Finally, let S=[S1,,Ss,vs+1,,vt], and D=diag(D1,,Ds,λs+1,,λt) we complete the proof.

The following Claim is used in the proof of Theorem 2.2. We provide a proof here for completeness.

Claim C.2 (folklore).

For any two matrices A,Bd×d, we have that

ABFσmin(A)BF.
Proof.

Since σmin(A)2 is the smallest eigenvalue of AA, we have that

BAABBσmin(A)2IB.

Therefore, it follows that

ABF2 =tr(BAAB)tr(Bσmin(A)2IB)
=σmin(A)2tr(BB)=σmin(A)2BF2.

Taking square root of both sides completes the proof.