Title: THE LOSS SURFACE AND EXPRESSIVITY OF DEEP CONVOLUTIONAL NEURAL NETWORKS

Abstract: We analyze the expressiveness and loss surface of practical deep convolutional neural networks (CNNs) with shared weights and max pooling layers. We show that such CNNs produce linearly independent features at a "wide" layer which has more neurons than the number of training samples. This condition holds e.g. for the VGG network. Furthermore, we provide for such wide CNNs necessary and sufficient conditions for global minima with zero training error. For the case where the wide layer is followed by a fully connected layer we show that almost every critical point of the empirical loss is a global minimum with zero training error. Our analysis suggests that both depth and width are very important in deep learning. While depth brings more representational power and allows the network to learn high level features, width smoothes the optimization landscape of the loss function in the sense that a sufficiently wide network has a well-behaved loss surface with almost no bad local minima.

1. INTRODUCTION:

It is well known that the optimization problem for training neural networks can have exponentially many local minima (Auer et al., 1996; Safran & Shamir, 2016) and NP-hardness has been shown in many cases (Blum & Rivest., 1989; Sima, 2002; Livni et al., 2014; Shamir, 2017; Shalev-Shwartz et al., 2017) . However, it has been empirically observed (Dauphin et al., 2014; Goodfellow et al., 2015) that the training of state-of-the-art deep CNNs (LeCun et al., 1990; Krizhevsky et al., 2012) , which are often overparameterized, is not hampered by suboptimal local minima.

In order to explain the apparent gap between hardness results and practical performance, many interesting theoretical results have been recently developed (Andoni et al., 2014; Sedghi & Anandkumar, 2015; Janzamin et al., 2016; Haeffele & Vidal, 2015; Gautier et al., 2016; Brutzkus & Globerson, 2017; Soltanolkotabi, 2017; Soudry & Hoffer, 2017; Goel & Klivans, 2017; Du et al., 2017; Zhong et al., 2017; Tian, 2017; Li & Yuan, 2017) in order to identify conditions under which one can guarantee that local search algorithms like gradient descent converge to the globally optimal solution. However, it turns out that these approaches are either not practical as they require e.g. knowledge about the data generating measure, or a modification of network structure and objective, or they are for quite restricted network structures, mostly one hidden layer networks, and thus are not able to explain the success of deep networks in general. For deep linear networks one has achieved a quite complete picture of the loss surface as it has been shown that every local minimum is a global minimum (Baldi & Hornik, 1988; Kawaguchi, 2016; Freeman & Bruna, 2017; Hardt & Ma, 2017; Yun et al., 2017) . By randomizing the nonlinear part of a feedforward network with ReLU activation function and making some additional simplifying assumptions, Choromanska et al. (2015a) can relate the loss surface of neural networks to a certain spin glass model. In this model the objective of local minima is close to the global optimum and the number of bad local minima decreases quickly with the distance to the global optimum. This is a very interesting result but is based on a number of unrealistic assumptions (Choromanska et al., 2015b) . More recently, Nguyen & Hein (2017) have analyzed deep fully connected networks with general activation functions and could show that almost every critical point is a global minimum if one layer has more neurons than the number of training points. While this result holds for networks in practice, it requires a quite extensively overparameterized network.

In this paper we overcome the restriction of previous work in several ways. This paper is one of the first ones, which theoretically analyzes deep CNNs. CNNs are of high practical interest as they learn very useful representations (Zeiler & Fergus, 2014; Mahendran & Vedaldi, 2015; Yosinski et al., 2015) with a small number of parameters. We are only aware of Cohen & Shashua (2016) who study the expressiveness of CNNs with max-pooling layer and ReLU activation but with rather unrealistic filters (just 1 × 1) and no shared weights. In our setting we allow as well max pooling and general activation functions. Moreover, we can have an arbitrary number of filters and we study general convolutions as the filters need not be applied to regular structures like 3 × 3 but can be patch-based where the only condition is that all the patches have the size of the filter. Convolutional layers, fully connected layers and max-pooling layers can be combined in almost arbitrary order. We study in this paper the expressiveness and loss surface of such a CNN where one layer is wide, in the sense that it has more neurons than the number of training points. While this assumption sounds at first quite strong, we want to emphasize that the VGG network (Simonyan & Zisserman, 2015) and other CNNs, see Table 3 , fulfill this condition. We show that such wide CNNs produce linearly independent feature representations at the wide layer and thus are able to fit the training data exactly (universal finite sample expressivity). This is even true with probability one when all the parameters of the bottom layers (from input to the wide layer) are chosen randomly1 . We think that this explains partially the results of Zhang et al. (2017) where they show experimentally for several CNNs that they are able to fit random labels. Moreover, we provide necessary and sufficient conditions for global minima with zero squared loss and show for a particular class of CNNs that almost all critical points are globally optimal, which to some extent explains why such wide CNNs can be optimized so efficiently.

2. DEEP CONVOLUTIONAL NEURAL NETWORKS:

We first introduce our notation and definition of CNNs. Let N be the number of training samples and denote by X = [x 1 , . . . , x N ] T ∈ R N ×d , Y = [y 1 , . . . , y N ] T ∈ R N ×m the input resp. output matrix for the training data (x i , y i ) N i=1 , where d is the input dimension and m the number of classes. Let L be the number of layers of the network, where each layer is either a convolutional, maxpooling or fully connected layer. The layers are indexed from k = 0, 1, . . . , L which corresponds to input layer, 1st hidden layer, . . ., and output layer. Let n k be the width of layer k and f k : R d → R n k the function that computes for every input its feature vector at layer k.

The convolutional layer consists of a set of patches of equal length where every patch is a subset of neurons from the same layer. Throughout this paper, we assume that the patches of every layer cover the whole layer, i.e. every neuron belongs to at least one of the patches, and that there are no patches that contain exactly the same subset of neurons. This means that if one patch covers the whole layer then it must be the only patch of the layer. Let P k and l k be the number of patches resp. the size of each patch at layer k for every 0 ≤ k < L. For every input x ∈ R d , let x 1 , . . . , x P0 ∈ R l0 denote the set of patches at the input layer and f 1 k (x), . . . , f P k k (x) ∈ R l k the set of patches at layer k. Each filter of the layer consists of the same set of patches. We denote by T k the number of convolutional filters and by

W k = [w 1 k , . . . , w T k k ] ∈ R l k-1

×T k the corresponding parameter matrix of the convolutional layer k for every 1 ≤ k < L. Each column of W k corresponds to one filter. Furthermore, b k ∈ R n k denotes the bias vector and σ k : R → R the activation function for each layer. Note that one can use the same activation function for all layers but we use the general form to highlight the role of different layers. In this paper, all functions are applied componentwise, and we denote by [a] the set of integers {1, 2, . . . , a} and by [a, b] the set of integers from a to b.

Definition 2.1 (Convolutional layer) A layer k is called a convolutional layer if its output f k (x) ∈ R n k is defined for every x ∈ R d as f k (x) h = σ k w t k , f p k-1 (x) + (b k ) h (1) for every p ∈ [P k-1 ], t ∈ [T k ], h := (p -1)T k + t.

The value of each neuron at layer k is computed by first taking the inner product between a filter of layer k and a patch at layer k -1, adding the bias and then applying the activation function.

The number of neurons at layer k is thus n k = T k P k-1 , which we denote as the width of layer k.

Our definition of a convolutional layer is quite general as every patch can be an arbitrary subset of neurons of the same layer and thus covers most of existing variants in practice.

Definition 2.1 includes the fully connected layer as a special case by using

P k-1 = 1, l k-1 = n k-1 , f 1 k-1 (x) = f k-1 (x) ∈ R n k-1 , T k = n k , W k ∈ R n k-1 ×n k , b k ∈ R n k .

Thus we have only one patch which is the whole feature vector at this layer.

Definition 2.2 (Fully connected layer) A layer k is called a fully connected layer if its output

EQUATION

For some results we also allow max-pooling layers.

EQUATION

A max-pooling layer just computes the maximum element of every patch from the previous layer.

Since there are P k-1 patches at layer k -1, the number of output neurons at layer k is

n k = P k-1 .

Reformulation of Convolutional Layers: For each convolutional or fully connected layer, we denote by M k : R l k-1 ×T k → R n k-1 ×n k the linear map that returns for every parameter matrix

W k ∈ R l k-1 ×T k the corresponding full weight matrix U k = M k (W k ) ∈ R n k-1 ×n k .

For convolutional layers, U k can be seen as the counterpart of the weight matrix W k in fully connected layers. We define

U k = M k (W k ) = W k if layer k is fully connected.

Note that the mapping M k depends on the patch structure of each convolutional layer k. For example, suppose that layer k has two filters of length 3, that is,

W k = [w 1 k , w 2 k ] = a d b e c f

, and n k-1 = 5 and patches given by a 1D-convolution with stride 1 and no padding then:

U T k = M k (W k ) T =        a b c 0 0 d e f 0 0 0 a b c 0 0 d e f 0 0 0 a b c 0 0 d e f        ,

The above ordering of the rows of U T k of a convolutional layer is determined by Equation (1), in particular, the row index h of U T k is calculated as h = (p -1)T k + t, which means for every given patch p one has to loop over all the filters t and compute the corresponding value of the output unit by taking the inner product of the h-th row of U T k with the whole feature vector of the previous layer. We assume throughout this paper that that there is no non-linearity at the output layer. By ignoring max-pooling layers for the moment, the feature maps f k : R d → R n k can be written as

f 0 (x) = x, f k (x) = σ k g k (x) , where g k (x) = U T k f k-1 (x) + b k , ∀ 1 ≤ k ≤ L -1 f L (x) = g L (x) = U T L f L-1 (x) + b L , where g k : R d → R n k

is the pre-activation output at layer k. By stacking the feature vectors of layer k of all training samples, before and after applying the activation function, into a matrix, we define:

F k = [f k (x 1 ), . . . , f k (x N )] T ∈ R N ×n k , and G k = [g k (x 1 ), . . . , g k (x N )] T ∈ R N ×n k .

In this paper, we refer to F k as the output matrix at layer k. It follows from above that

EQUATION

EQUATION

In this paper, we assume the following general condition on the structure of convolutional layers.

Assumption 2.4 (Convolutional Structure) For every convolutional layer k, there exists at least one parameter matrix W k ∈ R l k-1 ×T k for which the corresponding weight matrix

U k = M k (W k ) ∈ R n k-1 ×n k has full rank.

It is straightforward to see that Assumption 2.4 is satisfied if every neuron of a convolutional layer belongs to at least one patch and there are no identical patches.

Lemma 2.5 If Assumption 2.4 holds, then for every convolutional layer k, the set of

W k ∈ R l k-1 ×T k for which U k = M k (W k ) ∈ R n k-1 ×n k does not have full rank has Lebesgue measure zero. Proof: Since U k = M k (W k ) ∈ R n k-1

×n k and M k is a linear map, every entry of U k is a linear function of the entries of W k . Let m = min(n k-1 , n k ), then the set of low rank matrices U k is characterized by a system of equations where the max(n k-1 ,n k ) m determinants of all m × m sub-matrices of U k are zero. As the determinant is a polynomial in the entries of the matrix and thus a real analytic function, and the composition of analytic functions is again analytic, we get that each determinant is a real analytic function of W k . By Assumption 2.4, there exists at least one W k such that one of these determinants is non-zero. Thus by Lemma A.2, the set of W k where this determinant is zero has Lebesgue measure zero. As all the submatrices need to have low rank in order that U k has low rank, we get that the set of W k where U k has low rank has Lebesgue measure zero.

3. WIDE CNNS CAN LEARN LINEARLY INDEPENDENT FEATURES:

In this section, we show that a class of standard CNN architectures with convolutional layers, fully connected layers and max-pooling layers plus standard activation functions like ReLU, sigmoid, softplus, etc are able to learn linearly independent features at any hidden layer if that layer has more neurons than the number of training samples. Our assumption on training data is the following.

Assumption 3.1 (Training data):

The patches of different training samples are non-identical, that is, x p i = x q j for every p, q ∈ [P 0 ], i, j ∈ [N ], i = j.

Assumption 3.1 is quite weak, especially if the size of the input patches is larger. If the assumption does not hold, one can add a small perturbation to the training samples:

{x 1 + 1 , . . . , x N + N } . The set of { i } N i=1

where Assumption 3.1 is not fulfilled for the new dataset has measure zero. Moreover, { i } N i=1 can be chosen arbitrarily small so that the influence of the perturbation is negligible. Our main assumptions on the activation function of the hidden layers is the following.

Assumption 3.2 (Activation function):

The activation function σ is continuous, non-constant, and satisfies one of the following conditions:

• ∃µ + , µ -∈ R s.t. lim t→-∞ σ k (t) = µ -and lim t→∞ σ k (t) = µ + and µ + µ -= 0 • ∃ρ 1 , ρ 2 , ρ 3 , ρ 4 ∈ R + s.t. |σ(t)| ≤ ρ 1 e ρ2t for t < 0 and |σ(t)| ≤ ρ 3 t + ρ 4 for t ≥ 0

Assumption 3.2 covers several standard activation functions.

Lemma 3.3 The following activation functions satisfy Assumption 3.2:

ReLU: σ(t) = max(0, t), Sigmoid: σ(t) = 1 1 + e -t , Softplus: σ α (t) = 1 α ln(1 + e αt ) for α > 0.

The softplus function is a smooth approximation of ReLU. It holds:

EQUATION

The first main result of this paper is the following.

Theorem 3.4 (Linearly Independent Features) Let Assumption 3.1 hold for the training sample. Consider a deep CNN architecture for which there exists some layer 1 ≤ k ≤ L -1 such that 1. Layer 1 and layer k are convolutional or fully connected while all the other layers can be convolutional, fully connected or max-pooling 2. The width of layer k is larger than the number of training samples,

n k = T k P k-1 ≥ N 3. (σ 1 , . . . , σ k ) satisfy Assumption 3.2

Then there exist a set of parameters of the first k layers (W l , b l ) k l=1 such that the set of feature vectors {f k (x 1 ), . . . , f k (x N )} are linearly independent. Moreover, (W l , b l ) k l=1 can be chosen in such a way that all the weight matrices U l = M l (W l ) have full rank for every 1 ≤ l ≤ k.

Theorem 3.4 implies that a large class of CNNs employed in practice with convolutional, fully connected and max-pooling layers and standard activation functions like ReLU, sigmoid or softplus can produce linearly independent features at any hidden layer if its width is larger than the number of training samples. Figure 1 shows an example of a CNN architecture that satisfies the conditions of Theorem 3.4 at the first convolutional layer (i.e. k = 1). Note that if a set of vectors is linearly independent then they are also linearly separable. In this sense, Theorem 3.4 suggests that deep and wide CNNs can produce linearly separable features at every wide hidden layer.

Linear separability in neural networks has been recently studied by An et al. (2015) , where the authors show that a two-hidden-layer fully connected network with ReLU activation function can transform any training set to be linearly separable while approximately preserving the distances of the training data at the output layer. Compared to An et al. (2015) our Theorem 3.4 is derived for CNNs with a wider range of activation functions. Moreover, our result shows even linear independence of features which is stronger than linear separability. Recently, Nguyen & Hein (2017) have shown a similar result for deep fully connected networks and analytic activation functions.

We note that, in contrast to fully connected networks, for CNNs the condition n k ≥ N of Theorem 3.4 does not necessarily imply that the network has a huge number of parameters as the layers k and k + 1 can be chosen to be convolutional. In particular, the condition n k = T k P k-1 ≥ N can be fulfilled by increasing the number of filters T k or by using a large number of patches P k-1 (however P k-1 is upper bounded by n k ), which is however only possible if l k-1 is small as otherwise our condition on the patches cannot be fulfilled. Interestingly, such a architecture has been used in the VGG-Net (Simonyan & Zisserman, 2015) , where they use small 3 × 3 filters and minimal stride 1 in the first layer and thus they fulfill the condition n k ≥ N for k = 1, see Table 3 , for ImageNet. Also note that other state-of-the-art-networks fulfill the condition in Table 3 . Overall, Theorem 3.4 can be seen as a theoretical support for the usage of small filters and strides in practical CNN architectures as it increases the chance of achieving linear separability at early hidden layers in the network and also reduces the total number of training parameters. The reason why linear separability helps will be discussed in Section 4 when we analyze the loss surface of the CNNs. Note also that the condition n k ≥ N is a sufficient condition but not necessary to prove our results. In particular, we conjecture that linear separability might hold with far less number of neurons in practical applications.

One might ask now how difficult it is to find such parameters which generate linearly independent features at a hidden layer? Our next result shows that once analytic2 activation functions, e.g. sigmoid or softplus, are used at the first k hidden layers of the network, the linear independence of features at layer k holds with probability 1 even if one draws the parameters of the first k layers (W l , b l ) k randomly for any probability measure on the parameter space which has a density with respect to the Lebesgue measure.

Theorem 3.5 Let Assumption 3.1 hold for the training samples. Consider a deep CNN for which there exists some layer 1 ≤ k ≤ L -1 such that 1. Every layer from 1 to k is convolutional or fully connected 2. The width of layer k is larger than number of training samples, that is, n k = T k P k-1 ≥ N 3. (σ 1 , . . . , σ k ) are real analytic functions and satisfy Assumption 3.2.

Table 1 : The smallest singular value σ min (F 1 ) of the feature matrix F 1 of the first convolutional layer (similar σ min (F 3 ) for the feature matrix F 3 of the second convolutional layer) of the trained network in Figure 1 are shown for varying number of convolutional filters T 1 . The rank of a matrix A ∈ R m×n is estimated (see Chapter 2.6.1 in Press (2007) ) by computing the singular value decomposition of A and counting the singular values which exceed the threshold

1 2 √ m + n + 1 σ max (A) ,

where is machine precision. For all filter sizes the feature matrices F 1 have full rank. Then the set of parameters of the first k layers (W l , b l ) k l=1 for which the set of feature vectors {f k (x 1 ), . . . , f k (x N )} of layer k are not linearly independent has Lebesgue measure zero.

T 1 size(F 1 ) rank(F 1 ) σ min (F 1 ) size(F 3 ) rank(F 3 ) σ min (F

Note that Theorem 3.5 is a much stronger statement than Theorem 3.4, as it shows that for almost all weight configurations one gets linearly independent features at the wide layer. While Theorem 3.5 does not hold for the ReLU activation function as it is not an analytic function, we want to note again that one can approximate the ReLU function arbitrarily well using the softplus function (see Equation 6), which is an analytic function for any α > 0 and thus Theorem 3.5 applies. It is an open question if the result holds also for the ReLU activation function itself.

To illustrate Theorem 3.5 we plot the rank of the feature matrices of the network in Figure 1 . We use the standard benchmark MNIST dataset with N = 60000 training samples and 10000 test samples. First, we add small Gaussian noise N (0, 10 -5 ) to every training sample so that Assumption 3.1 is fulfilled. We then vary the number of convolutional filters T 1 of the first layer from 10 to 100 and train the corresponding network with squared loss and sigmoid activation function using Adam (Kingma & Ba, 2015) with default hyperparameters and decaying learning rate for 2000 epochs. We present the smallest singular value of the feature matrices in Table 1 and the corresponding training loss, training error and test error in Table 2 . If number of convolutional filters is large enough (i.e. T 1 ≥ 89) it holds that n 1 = 26×26×T 1 ≥ N = 60000, and the second condition of Theorem 3.5 is satisfied for k = 1. Table 1 shows that the feature matrices F 1 have full rank in all cases (and F 3 in almost all cases), in particular for T 1 ≥ 89 as shown in Theorem 3.5. As expected when the training samples are linearly independent after the first layer (F 1 has rank 60000 for T ≥ 89) the training error is zero and the training loss is close to zero (note that the GPU uses single precision). However, note that linear independence is much stronger than linear separability and thus even for T < 89 one can achieve already zero training error and loss and thus much smaller number of neurons suffice.

It is very interesting to note that Theorem 3.5 explains previous empirical observations. In particular, Czarnecki et al. (2017) have shown empirically that linear separability is often obtained already in the first few hidden layers of the trained networks. This is done by attaching a linear classifier probe (Alain & Bengio, 2016) to every hidden layer in the network after training the whole network with backpropagation. The fact that Theorem 3.5 holds even if the parameters of the bottom layers up to the wide layer k are chosen randomly is also in line with recent empirical observations for CNN architectures that one has little loss in performance if the weights of the initial layers are chosen randomly without training (Jarrett et al., 2009; Saxe et al., 2011; Yosinski et al., 2014 ).

An application of Theorem 3.4 yields the following universal finite sample expressivity for CNNs. In particular, a deep CNN architecture with scalar output can perfectly express the values of any scalar-valued function over a finite number of inputs as long as the width of the last hidden layer is larger than the number of training samples.

Corollary 3.6 (Universal Finite Sample Expressivity) Let Assumption 3.1 hold for the training samples. Consider a standard CNN with scalar output which satisfies the conditions of Theorem 3.4 at the last hidden layer k = L -1. Let f L : R d → R be the output of the network given as

f L (x) = m j=1 λ j f (L-1)j (x) ∀x ∈ R d

where λ ∈ R n L-1 is the weight vector of the last layer. Then for every target output y ∈ R N , there exists λ,

(W l , b l ) L-1 l=1 so that it holds f L (x i ) = y i for every i ∈ [N ].

Proof: Since the network satisfies the conditions of Theorem 3.4 for k = L -1, there exists a set of parameters

(W l , b l ) L-1 l=1 such that rank(F L-1 ) = N. Let F L = [f L (x 1 ), . . . , f L (x N )] T ∈ R N then it follows that F L = F L-1 λ. Pick λ = F T L-1 (F L-1 F T L-1 ) -1 y then it holds F L = F L-1 λ = y.

The expressivity of neural networks has been well-studied in the literature, in particular in the universal approximation theorems for one hidden layer networks (Cybenko, 1989; Hornik et al., 1989) . Recently, many results have be shown why deep networks are superior to shallow networks in terms of expressiveness (Delalleau & Bengio, 2011; Telgarsky, 2016; 2015; Eldan & Shamir, 2016; Safran & Shamir, 2017; Yarotsky, 2016; Poggio et al., 2016; Liang & Srikant, 2017; Mhaskar & Poggio, 2016; Montufar et al., 2014; Pascanu et al., 2014; Raghu et al., 2017) . While most of these results are derived for fully connected networks, it seems that Cohen & Shashua (2016) are the first ones who study expressivity of CNNs. In particular, they show that CNNs with max-pooling and ReLU units are universal in the sense that they can approximate any given function if the size of the networks is unlimited. However, the number of convolutional filters in this result has to grow exponentially with the number of patches and they do not allow shared weights in their result, which is a standard feature of CNNs. Our Corollary 3.6 shows universal finite sample expressivity, instead of universal function approximation, even for L = 2 and k = 1, that is a single convolutional layer network can perfectly fit the training data as long as the number of hidden units is not smaller than the number of samples. To the best of our knowledge, this is the first result on universal finite sample expressivity for a large class of practical CNNs.

For fully connected networks, universal finite sample expressivity has been studied by Zhang et al. (2017) ; Nguyen & Hein (2017) ; Hardt & Ma (2017) . They show that a network with a single hidden layer with N hidden units can express any training set of size N . While the number of training parameters of a single hidden layer CNN with N hidden units and scalar output is just 2N + T 1 l 0 , where T 1 is the number of convolutional filters and l 0 is the length of each filter, it is N d + 2N for fully connected networks. If we set the width of the hidden layer of the CNN as n 1 = T 1 P 0 = N in order to fulfill the condition of Corollary 3.6, then the number of training parameters of the CNN becomes 2N + N l 0 /P 0 , which is less than 3N if l 0 ≤ P 0 compared to (d + 2)N for the fully connected case. In practice one almost always has l 0 ≤ P 0 as l 0 is typically a small integer and P 0 is on the order of the dimension of the input. Thus, the number of parameters of the CNN to achieve universal finite sample expressivity is significantly smaller than that of fully connected networks.

Obviously, in practice it is more important that the network generalizes rather than just fitting the training data. By using shared weights and sparsity structure, CNNs seem to implicitly regularize the model class in order to achieve good generalization performance. Thus even though they can fit also random labels or noise (Zhang et al., 2017) due to the universal finite sample expressivity shown in Corollary 3.6, they seem still to be able to generalize well (Zhang et al., 2017) . Table 3 : The width of the first convolutional layer (n 1 ) and the maximum width of all the hidden layers (max 1≤k≤L-1 n k ) of state-of-the-art CNN architectures in comparison with the size of ImageNet (N ≈ 1200K). All numbers are lower bounds on the true width. (Szegedy et al., 2015b) 700K 1300K InceptionV4 (Szegedy et al., 2016) 700K 1300K SqueezeNet (Iandola et al., 2016) 1180K 1180K Enet (Paszke et al., 2016) 1000K 1000K GoogLeNet (Szegedy et al., 2015a) 800K 800K ResNet (He et al., 2016) 800K 800K Xception (Chollet, 2016) 700K 700K

CNN Architecture:

n 1 max k n k VGG(A-E) (Simonyan & Zisserman, 2015) 3000K 3000K InceptionV3

4. THE LOSS SURFACE OF CONVOLUTIONAL NEURAL NETWORKS:

In this section, we restrict our analysis to the use of least squares loss. However, as we show later that the network can produce exactly the target output (i.e. F L = Y ) for some choice of parameters, all our results can also be extended to any other loss function where the global minimum is attained at F L = Y , for instance the squared Hinge-loss analyzed in Nguyen & Hein (2017) . Let P denote the space of all parameters of the network. The final training objective Φ : P → R is given as

Φ (W l , b l ) L l=1 = 1 2 F L -Y 2 F (7)

where F L is defined as in ( 5), which is also the same as

F L = σ L-1 (. . . σ 1 (XU 1 + 1 N b T 1 ) . . .)U L + 1 N b T L , where U l = M l (W l ) for every 1 ≤ l ≤ L.

Our assumptions on the architecture of CNNs is given below.

Assumption 4.1 (CNN Architecture) Every layer in the network is a convolutional layer or fully connected layer and the output layer is fully connected. Moreover, there exists some hidden layer 1 ≤ k ≤ L -1 such that the following holds:

• The width of layer k is larger than number of training samples, that is,

n k = T k P k-1 ≥ N

• All the activation functions of the hidden layers (σ 1 , . . . , σ L-1 ) satisfy Assumption 3.2

• (σ k+1 , . . . , σ L-1 ) are strictly increasing or strictly decreasing, and differentiable

• The network is pyramidal from layer k + 1 till the output layer, that is, n k+1 ≥ . . . ≥ n L A typical example that satisfies Assumption 4.1 is the following (see Figure 1 for an illustration):

• The first layer is a convolutional layer with n 1 = T 1 P 0 ≥ N • Every layer from layer 2 till the output layer is convolutional or fully connected • (σ 1 , . . . , σ k ) can be ReLU, sigmoid or softplus • (σ k+1 , . . . , σ L-1 ) can be sigmoid or softplus

• n 2 ≥ n 3 ≥ . . . ≥ n L

One can easily check that the above example satisfies Assumption 4.1 for k = 1.

In the following, let us define for every 1 ≤ k ≤ L -1 the subset S k ⊆ P such that

S k := (W l , b l ) L l=1 rank(F k ) = N and U l has full rank for every l ∈ [k + 2, L] .

The set S k is the set of parameters where the feature vectors at layer k are linearly independent and all the weight matrices from layer k + 2 till the output layer have full rank. In the following, we examine conditions for global optimality in S k . It is important to note that S k covers almost the whole parameter space under an additional mild condition on the activation function.

Lemma 4.2 Let Assumption 3.1 hold for the training sample and let the CNN architecture satisfy Assumption 4.1 for some layer 1 ≤ k ≤ L -1. We assume further that the activation functions of the first k layers (σ 1 , . . . , σ k ) are real analytic. Then the set P \ S k has Lebesgue measure zero.

Proof: One can see that

P \ S k ⊆ (W l , b l ) L l=1 rank(F k ) < N ∪ (W l , b l ) L l=1

U l has low rank for some layer l .

By Theorem 3.5, it holds that the set (W l , b l ) L l=1 rank(F k ) < N has Lebesgue measure zero. Moreover, it follows from Lemma 2.5 that the set (W l , b l ) L l=1 U l has low rank for some layer l also has measure zero. Thus, P \ S k has Lebesgue measure zero.

In the next key lemma, we bound the objective function in terms of its gradient magnitude w.r.t. the weight matrix of layer k for which n k ≥ N. For every matrix A ∈ R m×n , let σ min (A) and σ max (A) denote the smallest and largest singular value of A.

Let A F = i,j A 2 ij , A min := min i,j |A ij | and A max := max i,j |A ij |.

From Equations (4), ( 5) and ( 7), it follows that Φ can be seen as a function of (U l , b l ) L l=1 , and thus we can use

∇ U k Φ. If layer k is fully connected then U k = M k (W k ) = W k and thus ∇ U k Φ = ∇ W k Φ.

Otherwise, if layer k is convolutional then we note that ∇ U k Φ is "not" the true gradient of the training objective because U k is not the true optimization parameter but W k . In this case, the true gradient of Φ w.r.t. to the true parameter matrix W k which consists of convolutional filters can be computed via chain rule as

∂Φ ∂(W k ) rs = i,j ∂Φ ∂(U k ) ij ∂(U k ) ij ∂(W k ) rs

Please note that even though we write the partial derivatives with respect to the matrix elements, ∇ W k Φ resp. ∇ U k Φ are the matrices of the same dimension as W k resp. U k in the following.

Lemma 4.3 Consider a standard deep CNN which satisfies Assumption 4.1 for some hidden layer

1 ≤ k ≤ L -1. Then it holds ∇ U k+1 Φ F ≥ σ min (F k ) L-1 l=k+1 σ min (U l+1 ) σ l (G l ) min F L -Y F and ∇ U k+1 Φ F ≤ σ max (F k ) L-1 l=k+1 σ max (U l+1 ) σ l (G l ) max F L -Y F .

Our next main result is motivated by the fact that empirically when training over-parameterized neural networks with shared weights and sparsity structure like CNNs, there seem to be no problems with sub-optimal local minima. In many cases, even when training labels are completely random, local search algorithms like stochastic gradient descent can converge to a solution with almost zero training error (Zhang et al., 2017) . To understand better this phenomenon, we first characterize in the following Theorem 4.4 the set of points in parameter space with zero loss, and then analyze in Theorem 4.5 the loss surface for a special case of the network. We emphasize that our results hold for standard deep CNNs with convolutional layers with shared weights and fully connected layers. Theorem 4.5 (Loss Surface of CNNs) Let (X, Y, Z) be a training set for which Assumption 3.1 holds, the CNN architecture satisfies Assumption 4.1 for some hidden layer 1 ≤ k ≤ L -1, and layer k + 1 is fully connected. Let Φ : P → R be defined as in (7). Then

• Every critical point (W l , b l ) L l=1 ∈ S k is a global minimum with Φ (W l , b l ) L l=1 = 0 • There exist infinitely many global minima (W l , b l ) L l=1 ∈ S k with Φ (W l , b l ) L l=1 = 0

Theorem 4.5 indicates that the loss surface for this type of CNNs has a rather simple structure in the sense that almost every critical point is a global minimum with zero training error. It remains an interesting open problem if this result can be transferred to the case where layer k + 1 is also convolutional. In any case whether layer k + 1 is fully connected or not, one might still assume that a solution with zero training error still exists. However, note that Theorem 4.4 shows that at those points where the loss is zero, the gradient of Φ w.r.t. U k+1 must be zero as well. An interesting special case of Theorem 4.5 is when the network is fully connected, in which case all the results of Theorem 4.5 hold without any modifications.

Corollary 4.6 (Loss Surface of Fully Connected Nets) Let (X, Y, Z) be a training set with nonidentical training samples, i.e. x i = x j for every i = j and the fully connected network satisfies Assumption 4.1 for some layer 1 ≤ k ≤ L -1. Let Φ : P → R be defined as in (7). Then the following holds

• Every critical point (W l , b l ) L l=1 ∈ S k is a global minimum with Φ (W l , b l ) L l=1 = 0

• There exist infinitely many global minima

(W l , b l ) L l=1 ∈ S k with Φ (W l , b l ) L l=1 = 0

Corollary 4.6 can be seen as a formal proof for the implicit assumption used in the recent work (Nguyen & Hein, 2017 ) that there exists a global minimum with zero training error for the class of fully connected, deep and wide networks.

5. CONCLUSION:

We have analyzed the expressiveness and loss surface of CNNs in realistic and practically relevant settings. As state-of-the-art networks fulfill exactly or approximately the condition to have a sufficiently wide convolutional layer, we think that our results help to understand why current CNNs can be trained so effectively. It would be interesting to discuss the loss surface for cross-entropy loss, which currently does not fit into our analysis as the global minimum does not exist when the data is linearly separable.

J. Yosinski, J. Clune, A. A MISSING PROOFS OF SECTION 3

A.1 PROOF OF LEMMA 3.3

• ReLU: It holds for every t < 0 that σ(t) = max(0, t) = 0 < e t , and for t ≥ 0 that σ(t) = t < t + 1. Thus ReLU satisfies the second condition of Assumption 3.2.

• Sigmoid: It holds that

lim t→-∞ 1 1 + e -t = 0, lim t→∞ 1 1 + e -t = 1.

Thus σ satisfies the first condition of Assumption 3.2.

• Softplus: Since 1 + e αt ≤ 2e αt for every t ≥ 0, it holds for every t ≥ 0 that

0 ≤ σ α (t) = 1 α log(1 + e αt ) ≤ 1 α log(2e αt ) = log(2) α + t.

Moreover, since log(1 + t) ≤ t for t > 0, it holds log(1 + e αt ) ≤ e αt for every t ∈ R. Thus it holds that 0 ≤ σ α (t) ≤ e αt α for every t < 0. Therefore σ α satisfies the second condition of Assumption 3.2 for ρ 1 = 1/α, ρ 2 = α, ρ 3 = 1, ρ 4 = log(2)/α.

A.2 PROOF OF THEOREM 3.4:

To prove Theorem 3.4, we first show that Assumption 3.1 can be transported from the input to the output layer. 

(W l , b l ) k l=1 such that it holds f p k (x i ) = f q k (x j ) for every p, q ∈ [P k ], i, j ∈ [N ], i = j. Moreover, (W l , b l ) k

l=1 can be chosen in such a way that, except for max-pooling layers, all the weight matrices U l = M l (W l ) have full rank for every 1 ≤ l ≤ k.

Proof: Since Assumption 3.1 holds for the training inputs, one can first pick (W 1 , b 1 ) such that Assumption 3.1 holds at the first layer. Then given that Assumption 3.1 is satisfied at the first layer, the selection of the parameters of the higher layers can be done similarly.

Since our definition of a convolutional layer includes fully connected layer as a special case, it is sufficient to prove the result for the general convolutional structure. Since the first layer is a convolutional layer by our assumption, we denote by Q = [a 1 , . . . , a T1 ] ∈ R l0×T1 a matrix that contains the set of convolutional filters of the first layer. Note here that there are T 1 filters, namely a 1 , . . . , a T1 , where each filter a t ∈ R l0 for every t ∈ [T 1 ]. Let us define the set

S := Q ∈ R l0×T1 M 1 (Q) has low rank ∪ i =j p,q∈[P0] t,t ∈[T1] Q ∈ R l0×T1 a t , x p i -a t , x q j = 0 .

Basically, S is the set of "true" parameter matrices of the first layer where the corresponding weight matrix M 1 (Q) has low rank or there exists two patches of two different training samples that have the same inner product with some corresponding two filters. By Assumption 3.1 it holds that x p i = x q j for every p, q ∈ [P 0 ], i = j, and thus the right hand side in the above formula of S is just the union of a finite number of hyperplanes which has Lebesgue measure zero. For the left hand side, it follows from Lemma 2.5 that the set of Q for which M 1 (Q) does not have full rank has measure zero. Thus the left hand side of S is a set of measure zero. Since S is the union of two measure zero sets, it has also measure zero, and thus the complementary set R l0×T1 \ S must be non-empty and we choose

W 1 ∈ R l0×T1 \ S.

Since σ 1 is a continuous and non-constant function, there exists an interval (µ 1 , µ 2 ) such that σ 1 is bijective on (µ 1 , µ 2 ). We select and fix some matrix Q = [a 1 , . . . , a T1 ] ∈ R l0×T1 \ S and select some β ∈ (µ 1 , µ 2 ). Let α > 0 be a free variable and W 1 = [w 1 1 , . . . , w T1 1 ] where w t 1 denotes the t-th filter of the first layer. Let us pick

w t 1 = αQ :t = αa t , (b 1 ) h = β, ∀t ∈ [T 1 ], h ∈ [n 1 ]. It follows that W 1 = αQ and thus M 1 (W 1 ) = M 1 (αQ) = αM 1 (Q) as M 1

is a linear map by our definition. Since Q / ∈ S by construction, it holds that M 1 (W 1 ) has full rank for every α = 0. By Definition 2.1, it holds for every i ∈

[N ], p ∈ [P 0 ], t ∈ [T 1 ], h = (p -1)T 1 + t that f 1 (x i ) h = σ 1 ( w t 1 , x p i + (b 1 ) h ) = σ 1 (α a t , x p i + β). Since β ∈ (µ 1 , µ 2 ), one can choose a sufficiently small positive α such that it holds α a, x p i + β ∈ (µ 1 , µ 2 ) for every i ∈ [N ], p ∈ [P 0 ], t ∈ [T 1 ].

Under this construction, we will show that every entry of f 1 (x i ) must be different from every entry of f 1 (x j ) for i = j. Indeed, let us compare f 1 (x i ) h and f 1 (x j ) v for some h = (p -1)T 1 + t, v = (q -1)T 1 + t and i = j. It holds for sufficient small α > 0 that

f 1 (x i ) h -f 1 (x j ) v = σ 1 α a t , x p i + β -σ 1 α a t , x q j + β = 0 (8)

where the last inequality follows from three facts. First, it holds a t , x p i = a t , x q j since Q / ∈ S.

Second, for the chosen α the values of the arguments of the activation function σ 1 lie within (µ 1 , µ 2 ). Third, since σ 1 is bijective on (µ 1 , µ 2 ), it maps different inputs to different outputs. Now, since the entries of f 1 (x i ) and that of f 1 (x j ) are already pairwise different from each other, their corresponding patches must be also different from each other no matter how the patches are organized in the architecture, that is,

f p 1 (x i ) = f q 1 (x j ) ∀p, q ∈ [P 1 ], i, j ∈ [N ], i = j. Now, if

the network has only one layer, i.e. L = 1, then we are done. Otherwise, we will prove via induction that this property can be translated to any higher layer. In particular, suppose that one has already constructed (W l , b l ) k l=1 so that it holds

EQUATION

)

This is true for k = 1 due to (8). We will show below that (9) can also hold at layer k + 1.

1. Case 1: Layer k + 1 is convolutional or fully connected. Since (9) holds for k by our induction assumption, it must hold that

f p k (x i ) = f q k (x j ) ∀p, q ∈ [P k ], i, j ∈ [N ], i = j.

which means Assumption 3.1 also holds for the set of features at layer k. Thus one can follows the similar construction as done for layer 1 above by considering the output of layer k as input to layer k + 1. Then one obtains that there exist (W k+1 , b k+1 ) where U k+1 = M k+1 (W k+1 ) has full rank so that the similar inequality (8) now holds for layer k + 1, which thus implies (9) holds for k + 1.

2.. Case 2: layer k + 1 is max-pooling:

By Definition 2.3, it holds n k+1 = P k and one has for every p ∈

[P k ] f k+1 (x) p = max (f p k (x)) 1 , . . . , (f p k (x)) l k .

Since (9) holds at layer k by our induction assumption, every entry of every patch of f k (x i ) must be different from every entry of every patch of f k (x j ) for every i = j, that is,

(f p k (x i )) r = (f q k (x j )) s for every r, s ∈ [l k ], p, q ∈ [P k ], i = j.

Therefore, their maximum elements cannot be the same, that is,

f k+1 (x i ) p = f k+1 (x j ) q ∀p, q ∈ [n k+1 ], i, j ∈ [N ], i = j.

which proves (9) for layer k + 1.

So far, we have proved that (9) holds for every 1 ≤ k ≤ L. Thus it follows that for every layer k, there exists a set of parameters of the first k layers for which the patches at layer k of different training samples are pairwise different from each other, that is, f p k (x i ) = f q k (x j ) for every p, q ∈ [P k ], i = j. Moreover, except for max-pooling layers, all the weight matrices up to layer k have been chosen to have full rank.

Proof of Theorem 3.4 Let:

A = F k = [f k (x 1 ) T , . . . , f k (x N ) T ] ∈ R N ×n k .

Since our definition of a convolutional layer includes fully connected layer as a special case, it is sufficient to prove the result for convolutional structure. By Theorem's assumption, layer k is convolutional and thus it holds by Definition 2.1 that

A ij = f k (x i ) j = σ w t k , f p k-1 (x i ) + (b k ) j for every i ∈ [N ], t ∈ [T k ], p ∈ [P k-1 ] and j = (p, t) := (p -1)T k + t ∈ [n k ].

In the following, we show that there exists a set of parameters of the network such that rank(A) = N and all the weight matrices U l = M l (W l ) have full rank.

First, one observes that the subnetwork consisting of all the layers from the input layer till layer k -1 satisfies the conditions of Lemma A.1. Thus by applying Lemma A.1 to this subnetwork, one obtains that there exist (W l , b l ) k-1 l=1 for which all the matrices (U l ) k-1 l=1 , except for max-pooling layers, have full rank and it holds that f p k-1 (x i ) = f q k-1 (x j ) for every p, q ∈ [P k-1 ], i = j. The main idea now is to fix the parameters of these layers and pick

(W k , b k ) such that U k = M k (W k )

has full rank and it holds rank(A) = N . Let us define the set

S = i =j p∈[P k-1 ] a ∈ R l k-1 a, f p k-1 (x i ) -f p k-1 (x j ) = 0 .

From the above construction, it holds that

f p k-1 (x i ) = f p k-1 (x j ) for every p ∈ [P k-1 ], i = j

, and thus S is the union of a finite number of hyperplanes which thus has measure zero. Let us denote by

Q = [a 1 , . . . , a T k ] ∈ R l k-1 ×T k a parameter matrix that contains all the convolutional filters of layer k in its columns. Pick a t ∈ R l k-1 \ S for every t ∈ [T k ], so that it holds that U k = M k (Q) has full rank.

Note here that such matrix Q always exists. Indeed, Q is chosen from a positive measure set as its columns (i.e. a t ) are picked from a positive measure set. Moreover, the set of matrices Q for which M k (Q) has low rank has just measure zero due to Lemma 2.5. Thus there always exists at least one matrix Q so that all of its columns do not belong to S and that M k (Q) has full rank. In the rest of the proof, the value of matrix Q is fixed. Let α ∈ R be a free parameter. Since σ k is a continuous and non-constant function, there exist a β ∈ R such that σ k (β) = 0. Let the value of β be fixed as well. We construct the convolutional filters

W k = [w 1 k , . . . , w T k k ] and the biases b k ∈ R n k of layer k as follows. For every p ∈ [P k-1 ], t ∈ [T k ], j = (p, t), we define w t k = -αa t , (b k ) j = α a t , f p k-1 (x j ) + β. It follows that W k = -αQ and thus U k = M k (W k ) = -αM k (Q) as M k is a linear map.

Moreover, since M k (Q) has full rank by construction, it holds that U k has full rank for every α = 0. As α varies, we get a family of matrices A(α) ∈ R N ×n k where it holds for every i ∈

EQUATION

Note that each row of A(α) corresponds to one training sample and that permutations of the rows of A(α) do not change the rank of A(α). We construct a permutation γ of {1, 2, . . . , N } as follows.

For every j = 1, 2, . . . , N , let (p, t) be the tuple determined by j (the inverse transformation for

given j ∈ [n k ] is p = j T k and t = j - j T k -1 T k ) and define γ(j) = arg min i∈{1,2,...,N } \ {γ(1),...,γ(j-1)} a t , f p k-1 (x i ) .

Note that γ(j) is unique for every 1 ≤ j ≤ N since a t / ∈ S. It is clear that γ constructed as above is a permutation of {1, 2, . . . , N } since every time a different element is taken from the index set [N ] .

From the definition of γ(j), it holds that for every j = (p, t)

∈ [N ], i ∈ [N ], i > j that a t , f p k-1 (x γ(j) ) < a t , f p k-1 (x γ(i)

) . We can relabel the training data according to the permutation so that w.l.o.g we can assume that γ is the identity permutation, that is, γ(j) = j for every j ∈ [N ], in which case it holds for every

EQUATION

Under the above construction of (W l , b l ) k l=1 , we are ready to show that there exist α for which rank(A(α)) = N. Since σ k satisfies Assumption 3.2, we consider the following cases.

1.. Case 1: There:

are finite constants µ + , µ -∈ R s.t. lim t→-∞ σ k (t) = µ -and lim t→∞ σ k (t) = µ + and µ + µ -= 0.

Let us consider the first case where µ -= 0. From (10) and (11) one obtains

EQUATION

where η ij is given for every i < j where j = (p, t) as

η ij = µ -, a t , f p k-1 (x j ) -f p k-1 (x i ) < 0 µ + , a t , f p k-1 (x j ) -f p k-1 (x i ) > 0 Note that η ij cannot be zero for i = j because a t / ∈ S.

In the following, let us denote A(α) 1:N,1:N as a sub-matrix of A(α) that consists of the first N rows and columns. By the Leibniz-formula one has

EQUATION

)

where S N is the set of all N ! permutations of the set {1, . . . , N } and γ is the identity permutation. Now, one observes that for every permutation π = γ, there always exists at least one component j where π(j) > j in which case it follows from (12) that

lim α→∞ N j=1

A(α) π(j)j = 0.

Since there are only finitely many such terms in (13), one obtains

lim α→∞ det(A(α) 1:N,1:N ) = σ k (β) N = 0

where the last inequality follows from our choice of β. Since det(A(α) 1:N,1:N ) is a continuous function of α, there exists α 0 ∈ R such that for every α ≥ α 0 it holds det(A(α) 1:N,1:N ) = 0 and thus rank(A(α) 1:N,1:N ) = N which further implies rank(A(α)) = N. Thus the corresponding set of feature vectors {f k (x 1 ), . . . , f k (x N )} are linearly independent.

For the case where µ + = 0, one can argue similarly. The only difference is that one considers now the limit for α → -∞. In particular, ( 10) and ( 11) lead to

lim α→-∞ A(α) ij =    σ k (β) i = j µ + = 0 i > j η ij = 0 i < j.

For every permutation π = γ there always exists at least one component j where π(j) > j, in which case it holds that

lim α→-∞ N j=1 A(α) π(j)j = 0.

and thus it follows from the Leibniz formula that

lim α→-∞ det(A(α) 1:N,1:N ) = σ k (β) N = 0.

Since det(A(α) 1:N,1:N ) is a continuous function of α, there exists α 0 ∈ R such that for every α ≤ α 0 it holds det(A(α) 1:N,1:N ) = 0 and thus rank(A(α) 1:N,1:N ) = N which further implies rank(A(α)) = N. Thus the set of feature vectors at layer k are linearly independent. 2. Case 2: There are positive constants ρ 1 , ρ 2 , ρ 3 , ρ 4 s.t. |σ k (t)| ≤ ρ 1 e ρ2t for t < 0 and |σ k (t)| ≤ ρ 3 t + ρ 4 for t ≥ 0.

Our proof strategy is essentially similar to the previous case. Indeed, for every permutation π = γ there always exist at least one component j = (p, t) ∈ [N ] where π(j) > j in which case δ j := a t , f p k-1 (x j ) -f p k-1 (x π(j) ) < 0 due to (11). For sufficiently large α > 0, it holds that αδ j + β < 0 and thus one obtains from (10) that

|A(α) π(j)j | = |σ k (αδ j + β)| ≤ ρ 1 e ρ2β e -αρ2|δj | .

If π(j) = j then |A(α) π(j)j | = |σ k (β)| which is a constant. For π(j) < j, one notices that δ j := a t , f p k-1 (x j ) -f p k-1 (x π(j) ) can only be either positive or negative as a t / ∈ S. In this case, if δ j < 0 then it can be bounded by the similar exponential term as above for sufficiently large α. Otherwise it holds αδ j + β > 0 for sufficiently large α > 0 and we get

|A(α) π(j)j | = |σ(αδ j + β)| ≤ ρ 3 δ j α + ρ 3 β + ρ 4 .

Overall, for sufficiently large α > 0, there must exist positive constants P, Q, R, S, T such that it holds for every π ∈ S N \ {γ} that

N j=1 A(α) π(j)j ≤ R(P α + Q) S e -αT .

The upper bound goes to zero as α goes to ∞. This combined with the Leibniz formula from (13), we get lim α→∞ det(A(α) 1:N,1:N ) = σ k (β) N = 0. Since det(A(α) 1:N,1:N ) is a continuous function of α, there exists α 0 ∈ R such that for every α ≥ α 0 it holds det(A(α) 1:N,1:N ) = 0 and thus rank(A(α) 1:N,1:N ) = N which implies rank(A(α)) = N. Thus the set of feature vectors at layer k are linearly independent.

Overall, we have shown that there always exist (W l , b l ) k l=1 such that the set of feature vectors {f k (x 1 ), . . . , f k (x N )} at layer k are linearly independent. Moreover, (W l , b l ) k l=1 have been chosen so that all the weight matrices U l = M l (W l ), except for max-pooling layers, have full rank for every 1 ≤ l ≤ k.

A.3 PROOF OF THEOREM 3.5:

To prove Theorem 3.5, the following key property of real analytic functions is required.

Lemma A.2 Nguyen (2015) ; Mityagin (2015) If f : R n → R is a real analytic function which is not identically zero then the set {x ∈ R n | f (x) = 0} has Lebesgue measure zero.

Any linear function is real analytic and the set of real analytic functions is closed under addition, multiplication and composition, see e.g. Prop. 2.2.2 and Prop. 2.2.8 in Krantz & Parks (2002) . As we assume that all the activation functions of the first k layers are real analytic, we get that the function f k is a real analytic function of (W l , b l ) k l=1 as it is the composition of real analytic functions. Now, we recall from our definition that F k = [f k (x 1 ), . . . , f k (x N )] T ∈ R N ×n k is the output matrix at layer k for all training samples. One observes that the set of low rank matrices F k can be characterized by a system of equations such that all the n k N determinants of all N × N sub-matrices of F k are zero. As the determinant is a polynomial in the entries of the matrix and thus an analytic function of the entries and composition of analytic functions are again analytic, we conclude that each determinant is an analytic function of the network parameters of the first k layers. By Theorem 3.4, there exists at least one set of parameters of the first k layers such that one of these determinant functions is not identically zero and thus by Lemma A.2, the set of network parameters where this determinant is zero has Lebesgue measure zero. But as all submatrices need to have low rank in order that rank(F k ) < N , it follows that the set of parameters where rank(F k ) < N has Lebesgue measure zero.

B MISSING PROOFS OF SECTION 4 B.1 PROOF OF LEMMA 4.3:

To prove Lemma 4.3, we first derive standard backpropagation in Lemma B.1. In the following we use the Hadamard product •, which for A, B ∈ R m×n is defined as xi) be the derivative of Φ w.r.t. the value of unit j at layer k evaluated at a single sample x i . We arrange these vectors for all training samples into a single matrix

A • B ∈ R m×n with (A • B) ij = A ij B ij . Let δ kj (x i ) = ∂Φ ∂g kj (

∆ k = [δ k: (x 1 ), . . . , δ k: (x N )] T ∈ R N ×n k .

The following lemma is a slight modification of Lemma 2.1 in (Nguyen & Hein, 2017) for which we provide the proof for completeness.

Lemma B.1 Given some hidden layer 1 ≤ k ≤ L -1. Let (σ k+1 , . . . , σ L-1 ) be differentiable. Then the following hold:

1. ∆ l = F L -Y, l = L (∆ l+1 U T l+1 ) • σ l (G l ), k + 1 ≤ l ≤ L -1 2. ∇ U l Φ = F T l-1 ∆ l , ∀ k + 1 ≤ l ≤ L Proof: 1. By definition, it holds for every i ∈ [N ], j ∈ [n L ] that (∆ L ) ij = δ Lj (x i ) = ∂Φ ∂g Lj (x i ) = f Lj (x i ) -y ij and hence, ∆ L = F L -Y.

For every k + 1 ≤ l ≤ L -1, the output of the network for a single training sample can be written as the composition of differentiable functions (i.e. the outputs of all layers from l + 1 till the output layer), and thus the chain rule yields for every i ∈

[N ], j ∈ [n l ] that (∆ l ) ij = δ lj (x i ) = ∂Φ ∂g lj (x i ) = n l+1 s=1 ∂Φ ∂g (l+1)s (x i ) ∂g (l+1)s (x i ) ∂f lj (x i ) ∂f lj (x i ) ∂g lj (x i ) = n l+1 s=1 δ (l+1)s (x i )(U l+1 ) js σ (g lj (x i )) = n l+1 s=1 (∆ (l+1) ) is (U l+1 ) T sj σ ((G l ) ij ) and hence ∆ l = (∆ l+1 U T l+1 ) • σ (G l ).

2.. For every:

k + 1 ≤ l ≤ L -1, r ∈ [n l-1 ], s ∈ [n l ], one has ∂Φ ∂(U l ) rs = N i=1 ∂Φ ∂g ls (x i ) ∂g ls (x i ) ∂(U l ) rs = N i=1 δ ls (x i )f (l-1)r (x i ) = N i=1 (F T l-1 ) ri (∆ l ) is = F T l-1 ∆ l rs and hence ∇ U l Φ = F T l-1 ∆ l .

The following straightforward inequalities are also helpful to prove Lemma 4.3. Let λ min (•) and λ max (•) denotes the smallest and largest eigenvalue of a matrix.

Lemma B.2 Let A ∈ R m×n with m ≥ n. Then it holds σ max (A) x 2 ≥ Ax 2 ≥ σ min (A) x 2 for every x ∈ R n . Proof: Since m ≥ n, it holds that σ min (A) = λ min (A T A) = min x T A T Ax x T x = min Ax 2 x 2 and thus σ min (A) ≤ Ax 2 x 2 for every x ∈ R n . Similarly, it holds σ max (A) = λ max (A T A) = max x T A T Ax x T x = max Ax 2 x 2 and thus σ max (A) ≥ Ax 2 x 2 for every x ∈ R n . Lemma B.3 Let A ∈ R m×n , B ∈ R n×p with m ≥ n. Then it holds σ max (A) B F ≥ AB F ≥ σ min (A) B F . Proof: Since m ≥ n, it holds that λ min (A T A) = σ min (A) 2 and λ max (A T A) = σ max (A) 2 . Thus we have AB 2 F = tr(B T A T AB) ≥ λ min (A T A) tr(B T B) = σ min (A) 2 B 2 F . Similarly, it holds AB 2 F = tr(B T A T AB) ≤ λ max (A T A) tr(B T B) = σ max (A) 2 B 2 F .

Proof of Lemma 4.3 We first prove the lower bound. Let I m denotes an m-by-m identity matrix and ⊗ the Kronecker product. From Lemma B.1 it holds ∇ U k+1 Φ = F T L ∆ k+1 and thus vec(∇

EQUATION

where the inequality follows from Lemma B.2 for the matrix

(I n k+1 ⊗ F T k ) ∈ R n k n k+1 ×N n k+1 with n k ≥ N by Assumption 4.1. Using Lemma B.1 again, one has ∆ k+1 F = (∆ k+2 U T k+2 ) • σ k+1 (G k+1 ) F ≥ σ k+1 (G k+1 ) min ∆ k+2 U T k+2 F = σ k+1 (G k+1 ) min U k+2 ∆ T k+2 F ≥ σ k+1 (G k+1 ) min σ min (U k+2 ) ∆ k+2 F

where the last inequality follows from Lemma B.3 for the matrices U k+2 ∈ R n k+1 ×n k+2 and ∆ T k+2 with n k+1 ≥ n k+2 by Assumption 4.1. By repeating this for ∆ k+2 F , . . . , ∆ L-1 F , one gets

∆ k+1 F ≥ L-1 l=k+1 σ l (G l ) min σ min (U l+1 ) ∆ L F = L-1 l=k+1 σ l (G l ) min σ min (U l+1 ) F L -Y F (15)

From ( 14), (15), one obtains

∇ U k+1 Φ F ≥ σ min (F k ) L-1 l=k+1 σ l (G l ) min σ min (U l+1 ) F L -Y F

which proves the lower bound.

The proof for upper bound is similar. Indeed one has

EQUATION

)

where the inequality follows from Lemma B.2 Now, one has

∆ k+1 F = (∆ k+2 U T k+2 ) • σ k+1 (G k+1 ) F ≤ σ k+1 (G k+1 ) max ∆ k+2 U T k+2 F = σ k+1 (G k+1 ) max U k+2 ∆ T k+2 F ≤ σ k+1 (G k+1 ) max σ max (U k+2 ) ∆ k+2 F

where the last inequality follows from Lemma B.3. By repeating this chain of inequalities for ∆ k+2 F , . . . , ∆ L-1 F , one obtains:

EQUATION

From ( 16), ( 17), one obtains that

∇ U k+1 Φ F ≤ σ max (F k ) L-1 l=k+1 σ l (G l ) max σ max (U l+1 ) F L -Y F

which proves the upper bound. B.2 PROOF OF THEOREM 4.5 1. Since layer k + 1 is fully connected, it holds at every critical point in S k that ∇ W k+1 Φ = 0 = ∇ U k+1 Φ. This combined with Theorem 4.4 yields the result.

2. One basically needs to show that there exist (W l , b l ) L l=1 such that it holds:

Φ (W l , b l ) L l=1 = 0, rank(F k ) = N and U l = M l (W l ) has full rank ∀l ∈ [k + 2, L]

Note that the last two conditions are fulfilled by the fact that (W l , b l ) L l=1 ∈ S k . By Assumption 4.1, the subnetwork consisting of the first k layers satisfies the condition of Theorem 3.4. Thus by applying Theorem 3.4 to this subnetwork, one obtains that there exist (W l , b l ) k l=1 such that rank(F k ) = N . In the following, we fix these layers and show how to pick (W l , b l ) L l=k+1 such that F L = Y. The main idea now is to make the output of all the training samples of the same class become identical at layer k + 1 and thus they will have the same network output. Since there are only m classes, there would be only m distinct outputs for all the training samples at layer L -1. Thus if one can make these m distinct outputs become linearly independent at layer L-1 then there always exists a weight matrix W L that realizes the target output Y as the last layer is just a linear map by assumption. Moreover, we will show that, except for max-pooling layers, all the parameters of other layers in the network can be chosen in such a way that all the weight matrices (U l ) L l=k+2 achieve full rank. Our proof details are as follows. Case 2: k = L -2 It holds rank(F L-2 ) = N. Let A ∈ R m×n L-1 be a full row rank matrix such that A ij ∈ range(σ L-1 ). Note that n L-1 ≥ n L = m due to Assumption 4.1. Let D ∈ R N ×n L-1 be a matrix satisfying D i: = A j: whenever x i belongs to class j for every i ∈ [N ], j ∈ [m]. By construction, F L-2 has full row rank, thus we can pick b L-1 = 0, W L-1 = F T L-2 (F L-2 F T L-2 ) -1 σ -1 L-1 (D). Since layer L -1 is fully connected by assumption, it follows from Definition 2.2 that F L-1 = σ L-1 (F L-2 W L-1 + 1 N b T L-1 ) = D and thus (F L-1 ) i: = D i: = A j: whenever x i belongs to class j. So far, our construction of the first L -1 layers has led to the fact that all the training samples belonging to the same class will have identical output at layer L -1. Since A has full row rank by construction, we can pick for the last layer b L = 0, W L = A T (AA T ) -1 Z where Z ∈ R m×m is our class embedding matrix with rank(Z) = m. One can easily check that AW L = Z and that F L = F L-1 W L + 1 N b T L = F L-1 W L where the later follows from Definition 2.2 as the output layer is fully connected. Now one can verify that F L = Y. Indeed, whenever x i belongs to class j one has ) and E ip = E jq for every 1 ≤ i = j ≤ N, 1 ≤ p, q ≤ n k+1 . Let D ∈ R N ×n k+1 satisfies D i: = E j: for every x i from class j. Pick b k+1 = 0, W k+1 = F T k (F k F T k ) -1 σ -1 k+1 (D). Note that the matrix is invertible as F k has been chosen to have full row rank. Since layer k + 1 is fully connected by our assumption, it follows from Definition 2.2 that F k+1 = σ k+1 (F k W k+1 + 1 N b T k+1 ) = σ k+1 (F k W k+1 ) = D and thus it holds

EQUATION

for every x i from class j. So far, our construction has led to the fact that all training samples belonging to the same class have identical output at layer k + 1. The idea now is to see E as a new training data matrix of a subnetwork consisting of all layers from k + 1 till the output layer L. In particular, layer k + 1 can be seen as the input layer of this subnetwork and similarly, layer L can be seen as the output layer. Moreover, every row of E ∈ R m×n k+1 can be seen as a new training sample to this subnetwork. One can see that this subnet together with the training data matrix E satisfy the conditions of Theorem 3.4 at the last hidden layer L -1.

In particular, it holds that

• The rows of E ∈ R m×n k+1 are componentwise different from each other, and thus the input patches must be also different from each other, and thus E satisfies Assumption 3.1 • Every layer from k +1 till L-1 is convolutional or fully connected due to Assumption 4.1 • The width of layer L -1 is larger than the number of samples due to Assumption 4.1, that is, n L-1 ≥ n L = m • (σ k+2 , . . . , σ L-1 ) satisfy Assumption 3.2 due to Assumption 4.1 By applying Theorem 3.4 to this subnetwork and training data E, we obtain that there must exist (W l , b l ) L-1 l=k+2 for which all the weight matrices (U l ) L-1 l=k+2 have full rank such that the set of corresponding m outputs at layer L -1 are linearly independent. In particular, let A ∈ R m×n L-1 be the corresponding outputs of E through this subnetwork then it holds that rank(A) = m. Intuitively, if one feeds E j: as an input at layer k + 1 then one would get A j: as an output at layer L -1. This combined with (18) leads to the fact that if one now feeds (F k+1 ) i: = E j: as an input at layer k + 1 then one would get at layer L -1 the output (F L-1 ) i: = A j: whenever x i belongs to class j. Last, we pick b L = 0, W L = A T (AA T ) -1 Z. It follows that AW L = Z. Since the output layer L is fully connected, it holds from Definition 2.2 that

F L = F L-1 W L + 1 N b T L = F L-1 W L .

One can verify now that F L = Y. Indeed, for every sample x i from class j it holds that (F L ) i: = (F L-1 ) T i: W L = A T j: W L = Z j: = Y i: .

Overall, we have shown that Φ = 0. In addition, it holds rank(F k ) = N from the construction of the first k layers. All the matrices (U l ) L-1 l=k+2 have full rank by the construction of the subnetwork from k + 1 till L. Moreover, U L = W L also has full rank since rank(W L ) = rank(A T (AA T ) -1 Z) = m. Therefore it holds (W l , b l ) L l=1 ∈ S k .

B.3 PROOF OF COROLLARY 4.6

It is clear that the network structure satisfies the conditions of Theorem 4.4 as every layer is fully connected. Moreover, the input patches also satisfy Assumption 3.1 because every input patch is simply one training sample in this case but since there are no identical training samples, one derives that the input patches must be different from each other.

Since all the conditions of Theorem 4.4 are met, the application of Theorem 4.4 yields the result.

:

for any probability measure on the parameter space which has a density with respect to the Lebesgue measure

A function σ : R → R is real analytic if its Taylor series about x0 converges to σ(x0) on some neighborhood of x0 for every x0 ∈ R(Krantz & Parks, 2002).

Figures and Tables:

Figure 1: An example of CNN for a given training set of size N ≤ 100 × 26 × 26 = 67600. The width of each layer is d = n 0 = 784, n 1 = 67600, n 2 = 16900, n 3 = 2880, n 4 = 720, n 5 = 100, n 6 = m = 10. One can see that n 1 ≥ N and the network has pyramidal structure from layer 2 till the output layer, that is, n 2 ≥ . . . ≥ n 6 .

Theorem 4.4 (Necessary and Sufficient Condition for Zero Training Error) Let Assumption 3.1 hold for the training sample and suppose that the CNN architecture satisfies Assumption 4.1 for some hidden layer 1 ≤ k ≤ L -1. Let Φ : P → R be defined as in(7). Given any point(W l , b l ) L l=1 ∈ S k . Then it holds that Φ (W l , b l ) L l=1 = 0 if and only if ∇ U k+1 Φ (W l ,b l ) If Φ (W l , b l ) L l=1 = 0 then it follows from the upper bound of Lemma 4.3 that ∇ U k+1 Φ = 0. Now, we suppose that ∇ U k+1 Φ = 0. Since (W l , b l ) L l=1 ∈ S k it holds rank(F k ) = N and U l has full rank for every l ∈ [k + 2, L]. Thus it holds σ min (F k ) > 0 and σ min (U l ) > 0 for every l ∈ [k + 2, L].Moreover, (σ k+1 , . . . , σ L-1 ) have non-zero derivative by Assumption 4.1 and thus σ l (G l ) min > 0 for every l ∈ [k + 1, L -1]. This combined with the lower bound in Lemma 4.3 leads to F L -Y F = 0 and thus Φ W l , b l ) L l=1 = 0. Lemma 4.2 shows that the set of points which are not covered by Theorem 4.4 has just measure zero under a mild condition. The necessary and sufficient condition of Theorem 4.4 is rather intuitive as it requires the gradient of the training objective to vanish w.r.t. the full weight matrix of layer k + 1 regardless of the architecture of this layer. It turns out that if layer k + 1 is fully connected, then this condition is always satisfied at a critical point, in which case we obtain that every critical point in S k is a global minimum with exact zero training error. This is shown in the next Theorem 4.5, where we consider a classification task with m classes. Z ∈ R m×m is the full rank class encoding matrix e.g. the identity matrix and (X, Y ) the training sample such that Y i: = Z j: whenever x i belongs to class j for every i ∈ [N ], j ∈ [m].

Let Assumption 3.1 hold for the training sample. Consider a standard deep CNN architecture which satisfies the following 1. The first layer is either convolutional or fully connected while all the other layers can be convolutional, fully connected or max-pooling 2. (σ 1 , . . . , σ L ) are continuous and non-constant activation functions Then for every layer 1 ≤ k ≤ L, there exist a set of parameters of the first k layers

Case 1: k = L -1 It holds rank(F L-1 ) = N. Pick b L = 0 and W L = F T L-1 (F L-1 F T L-1 ) -1 Y . Since the output layer is fully connected, it follows from Definition 2.2 that F L = F L-1 W L + 1 N b T L = Y.Since rank(F k ) = N and the full rank condition on (W l ) L l=k+2 is not active when k = L -1, it holds that (W l , b l ) L l=1 ∈ S k which finishes the proof.

L ) i: = (F L-1 ) T i: W L = (A) T j: W L = Z j: = Y i: . Moreover, since rank(F k ) = N and rank(W L ) = rank(A T (AA T ) -1 Z) = m, it holds that (W l , b l ) L l=1 ∈ S k . Therefore, there exists (W l , b l ) L l=1 ∈ S k with Φ (W l , b l ) L l=1 = 0. Case 3: k ≤ L -3 It holds rank(F k ) = N. Let E ∈ R m×n k+1be any matrix such that E ij ∈ range(σ k+1

The loss and the number of misclassified training and test samples (train/test errors) of the corresponding trained networks in Table1. Zero training error is attained for T 1 ≥ 30.

Table content: <table><tr><td>T 1</td><td>10</td><td>20</td><td>30</td><td>40</td><td>50</td><td>60</td><td>70</td><td>80</td><td>89</td><td>100</td></tr><tr><td colspan="11">Train loss (×10 -5 ) 2.4 1.2 0.24 0.62 0.02 0.57 0.12 0.11 0.35 0.04</td></tr><tr><td>Train error</td><td>8</td><td>1</td><td>0</td><td>0</td><td>0</td><td>0</td><td>0</td><td>0</td><td>0</td><td>0</td></tr><tr><td>Test error</td><td colspan="3">151 132 174</td><td>124</td><td>143</td><td>141</td><td>120</td><td>140</td><td>117</td><td>139</td></tr></table>

Nguyen, T. Fuchs, and H. Lipson.  Understanding neural networks through deep visualization. In ICML, 2015.

Table content: <table><tr><td>C. Yun, S. Sra, and A. Jadbabaie. Global optimality conditions for deep neural networks, 2017.</td></tr><tr><td>arXiv:1707.02444.</td></tr><tr><td>M. D. Zeiler and R. Fergus. Visualizing and understanding convolutional networks. In ECCV, 2014.</td></tr><tr><td>C. Zhang, S. Bengio, M. Hardt, B. Recht, and Oriol Vinyals. Understanding deep learning requires</td></tr><tr><td>re-thinking generalization. In ICLR, 2017.</td></tr><tr><td>K. Zhong, Z. Song, P. Jain, P. Bartlett, and I. Dhillon. Recovery guarantees for one-hidden-layer</td></tr><tr><td>neural networks. In ICML, 2017.</td></tr></table>

Peer review (iclr2018):
 This paper analyzes the loss function and properties of CNNs with one "wide" layer, i.e., a layer with number of neurons greater than the train sample size. Under this and some additional technique conditions, the paper shows that this layer can extract linearly independent features and all critical points are local minimums. I like the presentation and writing of this paper. However, I find it uneasy to fully evaluate the merit of this paper, mainly because the "wide"-layer assumption seems somewhat artificial and makes the corresponding results somewhat expected. The mathematical intuition is that the severe overfitting induced by the wide layer essentially lifts the loss surface to be extremely flat so training to zero/small error becomes easy. This is not surprising. It would be interesting to make the results more quantitive, e.g., to quantify the tradeoff between having local minimums and having nonzero training error.