V ECTOR - OUTPUT R E LU N EURAL N ETWORK P ROBLEMS ARE C OPOSITIVE P ROGRAMS : C ONVEX A NALYSIS OF T WO L AYER N ETWORKS AND P OLYNOMIALTIME A LGORITHMS
Anonymous authors
Paper under double-blind review
A BSTRACT
We describe the convex semi-inﬁnite dual of the two-layer vector-output ReLU neural network training problem.
This semi-inﬁnite dual admits a ﬁnite dimensional representation, but its support is over a convex set which is difﬁcult to characterize.
In particular, we demonstrate that the non-convex neural network training problem is equivalent to a ﬁnite-dimensional convex copositive program.
Our work is the ﬁrst to identify this strong connection between the global optima of neural networks and those of copositive programs.
We thus demonstrate how neural networks implicitly attempt to solve copositive programs via semi-nonnegative matrix factorization, and draw key insights from this formulation.
We describe the ﬁrst algorithms for provably ﬁnding the global minimum of the vector output neural network training problem, which are polynomial in the number of samples for a ﬁxed data rank, yet exponential in the dimension.
However, in the case of convolutional architectures, the computational complexity is exponential in only the ﬁlter size and polynomial in all other parameters.
We describe the circumstances in which we can ﬁnd the global optimum of this neural network training problem exactly with soft-thresholded SVD, and provide a copositive relaxation which is guaranteed to be exact for certain classes of problems, and which corresponds with the solution of Stochastic Gradient Descent in practice.
I NTRODUCTION
In this paper, we analyze vector-output two-layer ReLU neural networks from an optimization perspective.
These networks, while simple, are the building blocks of deep networks which have been found to perform tremendously well for a variety of tasks.
We ﬁnd that vector-output networks regularized with standard weight-decay have a convex semi-inﬁnite strong dual–a convex program with inﬁnitely many constraints.
However, this strong dual has a ﬁnite parameterization, though expressing this parameterization is non-trivial.
In particular, we ﬁnd that expressing a vector-output neural network as a convex program requires taking the convex hull of completely positive matrices.
Thus, we ﬁnd an intimate, novel connection between neural network training and copositive programs, i.e. programs over the set of completely positive matrices (Anjos & Lasserre, 2011).
We describe algorithms which can be used to ﬁnd the global minimum of the neural network training problem in polynomial time for data matrices of ﬁxed rank, which holds for convolutional architectures.
We also demonstrate under certain conditions that we can provably ﬁnd the optimal solution to the neural network training problem using soft-thresholded Singular Value Decomposition (SVD).
In the general case, we introduce a relaxation to parameterize the neural network training problem, which in practice we ﬁnd to be tight in many circumstances.
1. R ELATED WORK
Our analysis focuses on the optima of ﬁnite-width neural networks.
This approach contrasts with certain approaches which have attempted to analyze inﬁnite-width neural networks, such as the
Neural Tangent Kernel (Jacot et al., 2018).
Despite advancements in this direction, inﬁnite-width neural networks do not exactly correspond to their ﬁnite-width counterparts, and thus this method of analysis is insufﬁcient for fully explaining their success (Arora et al., 2019). Other works may attempt to optimize neural networks with assumptions on the data distribution.
Of particular interest is (Ge et al., 2018), which demonstrates that a polynomial number of samples generated from a planted neural network model is sufﬁcient for globally optimizing a two-layer ReLU network, assuming the inputs are drawn from a symmetric distribution.
If the input distribution to a simple convolutional neural network is Gaussian, it has also been shown that gradient descent can ﬁnd the global optimum in polynomial time (Brutzkus & Globerson, 2017). In contrast to these works, we seek to ﬁnd general principles for learning two-layer ReLU networks, regardless of the data distribution. Another line of work aims to understand the success of neural networks via implicit regularization, which analyzes how models trained with Stochastic Gradient Descent (SGD) ﬁnd solutions which generalize well, even without explicit control of the optimization objective (Gunasekar et al., 2017; Neyshabur et al., 2014).
In contrast, we consider the setting of explicit regularization, which is often used in practice in the form of weight-decay, which regularizes the sum of squared norms of the network weights with a single regularization parameter β , which can be critical for neural network performance (Golatkar et al., 2019).
Our approach of analyzing ﬁnite-width neural networks with a ﬁxed training dataset has been explored for networks with a scalar output (Pilanci & Ergen, 2020).
In fact, our work here can be considered a generalization of these results.
We consider a ReLU-activation two-layer network f : R d → R c with m neurons:
[Equation]
where the function ( · ) + = max(0 , · ) denotes the ReLU activation, { u j ∈ R d } mj =1 are the ﬁrst-layer weights of the network, and { v j ∈ R c } mj =1 are the second-layer weights.
In the scalar-output case, the weights v j are scalars, i.e. c = 1 .
Pilanci & Ergen (2020) ﬁnd that the neural network training problem in this setting corresponds to a ﬁnite-dimensional convex program.
However, the setting of scalar-output networks is limited.
In particular, this setting cannot account for tasks such as multi-class classiﬁcation or multi-dimensional regression, which are some of the most common uses of neural networks.
In contrast, the vector-output setting is quite general, and even greedily training and stacking such shallow vector-output networks can match or even exceed the performance of deeper networks on large datasets for classiﬁcation tasks (Belilovsky et al., 2019).
We ﬁnd that this important task of extending the scalar case to the vector-output case is an exceedingly non-trivial task, which generates novel insights.
Thus, generalizing the results of Pilanci & Ergen (2020) is an important task for a more complete knowledge of the behavior of neural networks in practice.
Certain works have also considered technical problems which arise in our analysis, though in application they are entirely different.
Among these is analysis into cone-constrained PCA, as explored by Deshpande et al.
(2014) and Asteris et al.
They consider the following optimization problem
[Equation]
This problem is in general considered NP-hard.
Asteris et al.
(2014) provide an exponential algorithm which runs in O ( n d ) time to ﬁnd the exact solution to (2), where X ∈ R n × d and R ∈ S d is a symmetric matrix.
We leverage this result to show that the optimal value of the vector-output neural network training problem can be found in the worst case in exponential time with respect to r := rank ( X ) , while in the case of a ﬁxed-rank data matrix our algorithm is polynomial-time.
In particular, convolutional networks with ﬁxed ﬁlter sizes (e.g., 3 × 3 × m convolutional kernels) correspond to the ﬁxed-rank data case (e.g., r = 9 ).
In search of a polynomial-time approximation to (2), Deshpande et al.
(2014) evaluate a relaxation of the above problem, given as
[Equation]
While the relaxation not tight in all cases, the authors ﬁnd that in practice it works quite well for approximating the solution to the original optimization problem.
This relaxation, in particular, corresponds to what we call a copositive relaxation , because it consists of a relaxation of the set
C PCA = { uu (cid:62) : (cid:107) u (cid:107) 2 = 1 , Xu ≥ 0 } .
When X =
I and the norm constraint is removed, C PCA is the set of completely positive matrices (D¨ur, 2010).
Optimizing over the set of completely positive matrices is NP-hard, as is optimizing over its convex hull:
[Equation]
Thus, optimizing over C is a convex optimization problem which is nevertheless NP-hard.
Various relaxations to C have been proposed, such as the copositive relaxation used by (Deshpande et al., 2014) above:
[Equation]
In fact, this relaxation is tight, given that u ∈ R d and d ≤ 4 (Burer, 2015; Kogan & Berman, 1993).
However, C ⊂ ˜ C for d ≥ 5 , so the copositive relaxation provides a lower bound in the general case.
These theoretical results prove insightful for understanding the neural network training objective.
1. C ONTRIBUTIONS
• We ﬁnd the semi-inﬁnite convex strong dual for the vector-output two-layer ReLU neural network training problem, and prove that it has a ﬁnite-dimensional exact convex optimization representation.
• We establish a new connection between vector-output neural networks, copositive programs and cone-constrained PCA problems, yielding new insights into the nature of vector-output neural network training, which extend upon the results of the scalar-output case.
• We provide methods that globally solve the vector-output neural network training problem in polynomial time for data matrices of a ﬁxed rank, but for the full-rank case, the complexity is necessarily exponential in d assuming P (cid:54) =
NP .
• We provide conditions on the training data and labels with which we can ﬁnd a closedform expression for the optimal weights of a vector-output ReLU neural network using soft-thresholded SVD.
• We propose a copositive relaxation to establish a heuristic for solving the neural network training problem.
This copositive relaxation is often tight in practice.
P RELIMINARIES
In this work [Equation] we consider ﬁtting labels Y ∈ R n × c from inputs X ∈ R n × d with a two layer neural network with ReLU activation and m neurons in the hidden layer.
This network is trained with weight decay regularization on all of its weights, with associated parameter β > 0 .
For some general loss function (cid:96) ( f ( X ) , Y ) , this gives us the non-convex primal optimization problem
[Equation]
In the simplest case, with a fully-connected network trained with squared loss 1 , this becomes:
[Equation]
[Equation]
However, alternative models can be considered.
In particular, for example, Ergen & Pilanci (2020b) consider two-layer CNNs with global average pooling, for which we can deﬁne the patch matrices { X k } Kk =1 , which deﬁne the patches which individual convolutions operate upon.
Then, the vectoroutput neural network training problem with global average pooling becomes
[Equation]
We will show that in this convolutional setting, because the rank of the set of patches
M :=
[ X 1 , X 2 , · · · X K ] (cid:62) cannot exceed the ﬁlter size of the convolutions, there exists an algorithm which is polynomial in all problem dimensions to ﬁnd the global optimum of this problem.
We note that such matrices typically exhibit rapid singular value decay due to spatial correlations, which may also motivate replacing it with an approximation of much smaller rank.
In the following section, we will demonstrate how the vector-output neural network problem has a convex semi-inﬁnite strong dual.
To understand how to parameterize this semi-inﬁnite dual in a ﬁnite fashion, we must introduce the concept of hyper-plane arrangements.
We consider the set of diagonal matrices
[Equation]
This is a ﬁnite set of diagonal matrices, dependent on the data matrix X , which indicate the set of possible arrangement activation patterns for the ReLU non-linearity, where a value of 1 indicates that the neuron is active, while 0 indicates that the neuron is inactive.
In particular, we can enumerate the set of sign patterns as D =
{ D i } Pi =1 , where P depends on X but is in general bounded by
[Equation]
for r := rank ( X ) (Pilanci & Ergen, 2020; Stanley et al., 2004).
Note that for a ﬁxed rank r , such as in the convolutional case above, P is polynomial in n .
Using these sign patterns, we can completely characterize the range space of the ﬁrst layer after the ReLU:
[Equation]
We also introduce a class of data matrices X for which the analysis of scalar-output neural networks simpliﬁes greatly, as shown in (Ergen & Pilanci, 2020a).
These matrices are called spike-free matrices.
In particular, a matrix X is called spike-free if it holds that
[Equation]
When X is spike-free, then, the set of sign patterns D reduces to a single sign pattern: D = { I } .
The set of spike-free matrices includes (but is not limited to) diagonal matrices and whitened matrices for which n ≤ d , such as the output of Zero-phase Component Analysis (ZCA) whitening.
The setting of whitening the data matrix has been shown to improve the performance of neural networks, even in deeper settings where the whitening transformation is applied to batches of data at each layer (Huang et al., 2018).
For scalar-output ReLU networks, if the data matrix X is spike-free, there exists a polynomial-time algorithm for ﬁnding the global optimum of the neural network training problem in both n and d (Ergen & Pilanci, 2020a).
As we will soon show, even in this restricted data setting, the same does not hold true for vector-output networks.
However, with a stricter condition, we can ﬁnd the solution of vector-output neural networks in closed form.
We are now ready present our main result.
S TRONG D UALITY 3. C ONVEX S EMI - INFINITE DUALITY
Theorem 1 There exists an m ∗ ≤ nc + 1 such that if m ≥ m ∗ , for all β > 0 , the neural network training problem (5) has a convex semi-inﬁnite strong dual, given by
[Equation]
Furthermore, the neural network training problem has a convex, ﬁnite-dimensional strong bi-dual, given by
[Equation]
for convex sets K
i
[Equation]
The strong dual given in (8) is convex, albeit with inﬁnitely many constraints.
In contrast, (9) is a convex problem has ﬁnitely many constraints.
This convex model learns a sparse set of locally linear models V i which are constrained to be in a convex set, for which group sparsity and low-rankness over hyperplane arrangements is induced by the sum of nuclear-norms penalty.
The emergence of the nuclear norm penalty is particularly interesting, since similar norms have also been used for rank minimization problems (Cand`es & Tao, 2010; Recht et al., 2010), proposed as implicit regularizers for matrix factorization models (Gunasekar et al., 2017), and draws similarities to nuclear norm regularization in multitask learning (Argyriou et al., 2008; Abernethy et al., 2009), and trace Lasso (Grave et al., 2011).
We note the similarity of this result to that from Pilanci & Ergen (2020), whose formulation is a special case of this result with c = 1 , where K i reduce to
[Equation]
from which we can obtain the convex program presented by Pilanci & Ergen (2020).
Further, this result extends to CNNs with global average pooling, which is discussed in Appendix A.3.2.
Remark 1.1 It is interesting to observe that the convex program (9) can be interpreted as a piecewise low-rank model that is partitioned according to the set of hyperplane arrangements of the data matrix.
In other words, a two-layer ReLU network with vector output is precisely a linear learner over the features [ D 1 X , · · · D P X ] , where convex constraints and group nuclear norm regularization (cid:80) Pi =1 (cid:107) V i (cid:107) ∗ is applied to the linear model weights.
In the case of the CNNs, the piecewise low-rank model is over the smaller dimensional patch matrices { X k } Kk =1 , which result in signiﬁcantly fewer hyperplane arrangements, and therefore, fewer local low-rank models.
3. P ROVABLY S OLVING THE N EURAL N ETWORK T RAINING P ROBLEM
In this section, we present a procedure for minimizing the convex program as presented in (9) for general output dimension c .
This procedure relies on Algorithm 5 for cone-constrained PCA from (Asteris et al., 2014), and the Frank-Wolfe algorithm for constrained convex optimization (Frank et al., 1956).
Unlike SGD, which is a heuristic method applied to a non-convex training problem, this approach is built upon results of convex optimization and provably ﬁnds the global minimum of the objective.
In particular, we can solve the problem in epigraph form,
[Equation]
where we can perform bisection over t in an outer loop to determine the overall optimal value of (9).
Then, we have the following algorithm to solve the inner minimization problem of (11):
Algorithm 1:
Initialize { V (0) i } Pi =1 = 0 .
For steps k : (a)
For each i ∈
[ P ] solve the following subproblem:
[Equation]
And deﬁne the pairs { ( u i , g i ) } Pi =1 to be the argmaxes of the above subproblems.
This is is a form of semi-nonnegative matrix factorization (semi-NMF) on the residual at step k
(Ding et al., 2008).
It can be solved via cone-constrained PCA in O ( n r ) time where r = rank ( X ) .
[Equation]
[Equation]
[Equation]
The derivations for the method and complexity of Algorithm 1 are found in Appendix A.4.
We have thus described a Frank-Wolfe algorithm which provably minimizes the convex dual problem, where each step requires a semi-NMF operation, which can be performed in O ( n r ) time.
3. S PIKE - FREE D ATA M ATRICES AND C LOSED -F ORM S OLUTIONS
As discussed in Section 2, if X is spike-free, the set of sign partitions is reduced to the single partition D
=
I .
Then, the convex program (9) becomes
[Equation]
This problem can also be solved with Algorithm 1.
However, the asymptotic complexity of this algorithm is unchanged, due to the cone-constrained PCA step.
If the constraint on V were removed, (12) would be identical to optimizing a linear-activation network. However, additional cone constraint on V allows for a more complex representation, which demonstrates that even in the spike-free case, a ReLU-activation network is quite different from a linear-activation network. Recalling that whitened data matrices where n ≤ d are spike-free, for a further simpliﬁed class of data and label matrices, we can ﬁnd a closed-form expression for the optimal weights.
Theorem 2 Consider a whitened data matrix X ∈ R n × d where n ≤ d , and labels Y with SVD of
X (cid:62) Y =
(cid:80) ci =
1 σ i a i b (cid:62) i .
If the left-singular vectors of X (cid:62) Y satisfy Xa i ≥ 0 ∀ i ∈ { i : σ i > β } , there exists a closed-form solution for the optimal V ∗ to problem (12), given by
[Equation]
The resulting model is a soft-thresholded SVD of X (cid:62) Y , which arises as the solution of maximummargin matrix factorization (Srebro et al., 2005).
The scenario that all the left singular vectors of
X (cid:62) Y satisfy the afﬁne constraints
Xa i ≥
∀ i occurs when the all of the left singular vectors Y are nonnegative, which is the case for example when Y is a one-hot-encoded matrix.
In this scenario where the left-singular vectors of X (cid:62) Y satisfy Xa i ≥ 0 ∀ i ∈ { i : σ i > β } , we note that the ReLU constraint on V ∗ is not active, and therefore, the solution of the ReLU-activation network training problem is identical to that of the linear-activation network.
This linear-activation setting has been well-studied, such as in matrix factorization models by (Cabral et al., 2013; Li et al., 2017), and in the context of implicit bias of dropout by (Mianjy et al., 2018; Mianjy & Arora, 2019).
This theorem thus provides a setting in which the ReLU-activation neural network performs identically to a linear-activation network.
N EURAL NETWORKS AND COPOSITIVE PROGRAMS 4. A N EQUIVALENT COPOSITIVE PROGRAM
We now present an alternative representation of the neural network training problem with squared loss, which has ties to copositive programming.
Theorem 3 For all β > 0 , the neural network training problem (5) has a convex strong dual, given by
[Equation]
for convex sets C i , given by
[Equation]
This is a minimization problem with a convex objective over P sets of convex, completely positive cones–a copositive program, which is NP-hard.
There exists a cutting plane algorithm solves this problem in O ( n r ) , which is polynomial in n for data matrices of rank r (see Appendix A.5).
This formulation provides a framework for viewing ReLU neural networks as implicit copositive programs, and we can ﬁnd conditions during which certain relaxations can provide optimal solutions.
4. A COPOSITIVE RELAXATION
We consider the copositive relaxation of the sets C i from (14).
We denote this set
[Equation]
In general, C i ⊆ ˜ C i , with equality when d ≤ 4 (Kogan & Berman, 1993; Dickinson, 2013).
We deﬁne the relaxed program as
[Equation]
Because of the enumeration over sign-patterns, this relaxed program still has a complexity of O ( n r ) to solve, and thus does not improve upon the asymptotic complexity presented in Section 3.
4. S PIKE - FREE DATA MATRICES
If X is restricted to be spike-free, the convex program (16) becomes
[Equation]
With spike-free data matrices, the copositive relaxation presents a heuristic algorithm for the neural network training problem which is polynomial in both n and d .
This contrasts with the exact formulations of (9) and (14), for which the neural network training problem is exponential even for a spike-free X .
Table 1 summarizes the complexities of the neural network training problem.
[Table]
E XPERIMENTS 5. D OES SGD ALWAYS FIND THE GLOBAL OPTIMUM FOR NEURAL NETWORKS ?
While SGD applied to the non-convex neural network training objective is a heuristic which works quite well in many cases, there may exist pathological cases where SGD fails to ﬁnd the global minimum.
Using Algorithm 1, we can now verify whether SGD ﬁnd the global optimum.
In this experiment, we present one such case where SGD has trouble ﬁnding the optimal solution in certain circumstances.
In particular, we generate random inputs X ∈ R 25 × 2 , where the elements of X are drawn from an i.i.d standard Gaussian distribution: X i,j ∼ N (0 , 1) .
We then randomly initialize a data-generator neural network f with 100 hidden neurons and and an output dimension of 5, and generate labels Y =
f ( X ) ∈ R 25 × 5 using this model.
We then attempt to ﬁt these labels using a neural network and squared loss, with β = 10 − 2 .
We compare the results of training this network for 5 trials with 10 and 50 neurons to the global optimum found by Algorithm 1.
In this circumstance, with 10 neurons, none of the realizations of SGD converge to the global optimum as found by
Algorithm 1, but with 50 neurons, the loss is nearly identical to that found by Algorithm 1.
[Figure]
5. M AXIMUM -M ARGIN M ATRIX F ACTORIZATION
In this section, we evaluate the performance of the soft-thresholded SVD closed-form solution presented in Theorem 2.
In order to evaluate this method, we take a subset of 3000 points from the
CIFAR-10 and CIFAR-100 datasets (Krizhevsky et al., 2009).
For each dataset, we ﬁrst de-mean the data matrix X ∈ R 3000 × 3072 , then whiten the data-matrix using ZCA whitening.
We seek to ﬁt one-hot-encoded labels representing the class labels from these datasets.
We compare the results of our algorithm from Theorem 2 and that of SGD in Fig.
As we can see, in both cases, the soft-thresholded SVD solution ﬁnds the same value as SGD, yet in far shorter time.
Appendix A.1.4 contains further details about this experiment, including test accuracy plots.
[Figure]
5. E FFECTIVENESS OF THE C OPOSITIVE P ROGRAM
In this section, we compare the objective values obtained by SGD, Algorithm 1, and the copositive program deﬁned in (14).
We use an artiﬁcially-generated spiral dataset, with X ∈ R 60 × 2 andclasses (see Fig. 3(a) for an illustration).
In this case, since d ≤ 4 , we note that the copositive relaxation in (16) is tight.
Across different values of β , we compare the solutions found by these three methods.
As shown in Fig.
3, the copositive relaxation, the solution found by SGD, and the solution found by Algorithm 1 all coincide with the same loss across various values of β .
This veriﬁes our theoretical proofs of equivalence of (5), (9), and (16).
[Figure]
C ONCLUSION
We studied the vector-output ReLU neural network training problem, and designed the ﬁrst algorithms for ﬁnding the global optimum of this problem, which are polynomial-time in the number of samples for a ﬁxed data rank.
We found novel connections between this vector-output ReLU neural network problem and a variety of other problems, including semi-NMF, cone-constrained
PCA, soft-thresholded SVD, and copositive programming.
These connections yield insights into the neural network training problem and open room for more exploration.
Of particular interest is extending these results to deeper networks, which would further explain the performance of neural networks as they are often used in practice.
One such method to extend the results in this paper to deeper networks is to greedily train and stack two-layer networks to create one deeper network, which has shown to mimic the performance of deep networks trained end-to-end.
An alternative approach would be to analyze deeper networks directly, which would require a hierarchical representation of sign patterns at each hidden layer, which would complicate our analysis signiﬁcantly.
Future works can explore these interesting and novel directions.
A A PPENDIX A. A DDITIONAL EXPERIMENTAL DETAILS
All neural networks in the experiments were trained using the Pytorch deep learning library (Paszke et al., 2019), using a single NVIDIA GeForce GTX 1080 Ti GPU.
Algorithm 1 was trained using a CPU with 256 GB of RAM, as was the maximum-margin matrix factorization.
Unless otherwise stated, the Frank-Wolfe method from Algorithm 1 used a step size of α ( k )
= 22+ k , and all methods were trained to minimize squared loss.
Unless otherwise stated, the neural networks were trained until full training loss convergence with SGD with a momentum parameter of 0.95 and a batch size the size of the training set (i.e. full-batch gradient descent), and the learning rate was decremented by a factor of 2 whenever the training loss reached a plateau.
The initial learning rate was set as high as possible without causing the training to diverge.
All neural networks were initialized with Kaiming uniform initialization (He et al., 2015).
A.1. A DDITIONAL E XPERIMENT : C OPOSITIVE RELAXATION WHEN d ≥
The copositive relaxation for the neural network training problem described in (16) is not guaranteed to exactly correspond to the objective when d ≥ 4 .
However, we ﬁnd that in practice, this relaxation is tight even in such settings.
To demonstrate such an instance, we consider the problem of generating images from noise.
In particular, we initialize X element-wise from an i.i.d standard Gaussian distribution.
To analyze the spike-free setting, we whitened X using ZCA whitening.
Then, we attempted to ﬁt images Y from the MNIST handwritten digits dataset (LeCun et al., 1998) and CIFAR-10 dataset (Krizhevsky et al., 2009) respectively.
From each dataset, we select 100 random images with 10 samples from each class and ﬂatten them into vectors, to form Y MNIST ∈ Y 100 × 784 and
Y CIFAR ∈ Y 100 × 3072 .
We allow the noise inputs to have the same shape as the output.
Clearly, in these cases, with d = 784 and d = 3072 respectively, the copositive relaxation (17) is not guaranteed to correspond exactly to the neural network training optimum.
However, we ﬁnd across a variety of regularization parameters β , that the solution found by
SGD and this copositive relaxation exactly correspond, as demonstrated in Figure 4.
[Figure]
While for the lowest value of β , the copositive relaxation does not exactly correspond with the value obtained by SGD, we note that we showed the objective value of the copositive relaxation to be a lower bound of the neural network training objective–meaning that the differences seen in this plot are likely due to a numerical optimization issue, rather than a fundamental one.
Non-convex
SGD was trained for 60,000 epochs with 1000 neurons with a learning rate of 5 × 10 − 5 , while the copositive relaxation was trained using Adam (Kingma & Ba, 2014) with the Geotorch library for constrained optimization and manifold optimization for deep learning in PyTorch, which allowed us to express the PSD constraint, with an additional hinge loss to penalize the violations of the afﬁne constraints.
This copositive relaxation was trained for 60,000 epochs with a learning rate of 10 −for CIFAR-10 and 4 × 10 − 2 for MNIST, and β 1 = 0 .
9 , β 2 = 0 .
999 and (cid:15) =
10 − 8 as parameters for
Adam.
A.1. A DDITIONAL E XPERIMENT : C OMPARING R E LU A CTIVATION TO L INEAR A CTIVATION IN THE C ASE OF S PIKE -F REE M ATRICES
[Figure] As discussed in Section 3.3., if the data matrix X is spike-free, the resulting convex ReLU model (12) is similar to a linear-activation network, with the only difference being an additional cone constraint on the weight matrix V . It stands to wonder whether in the case of spike-free data matrices, the use of a ReLU network is necessary at all, and whether a linear-activation network would perform equally well.
In this experiment, we compare the performance of a ReLU-activation network to a linearactivation one, and demonstrate that even in the spike-free case, there exist instances in which the
ReLU-activation network would be preferred.
In particular, we take as our training data 3000 demeaned and ZCA-whitened images from the CIFAR-10 dataset to form our spike-free training data
X ∈ R 3000 × 3072 .
We then generate continuous labels Y ∈ R 3000 × 10 from a randomly-initialized
ReLU two-layer network with 4000 hidden units.
We use this same label-generating neural network to generate labels for images from the full 10,000-sample test set of CIFAR-10 as well, after the test images are pre-processed with the same whitening transformation used on the training data.
Across different values of β , we measured the training and generalization performance of both ReLU-activation and linear-activation two-layer neural networks trained with SGD on this dataset.
Both networks used 4000 hidden units, and were trained for 400 epochs with a learning rate of 10 − 2 and momentum of 0 .
Our results are displayed in Figure 5.
As we can see, for all values of β , while the linear-activation network has equal or lesser training loss than the ReLU-activation network, the ReLU-activation network generalizes signiﬁcantly better, achieving orders of magnitude better test loss.
We should note that for values of β = 1 . 0 and above, both networks learn the zero network (i.e. all weights at optimum are zero), so both their training and test loss are identical to each other.
We can also observe that the best-case test loss for the linear-activation network is to simply learn the zero network, whereas for a value of β = 10 − 2 the ReLU-activation network can learn to generalize better than the zero network (achieving a test loss of 63038, compared to a test loss of 125383 of the zero-network).
These results demonstrate that even for spike-free data matrices, there are reasons to prefer a ReLU-activation network to a linear-activation network.
In particular, because of the cone- constraint on the dual weights V , the ReLU network is induced to learn a more complex representation than the linear network, which would explain its better generalization performance.
The CIFAR-10 dataset consists of 50,000 training images and 10,000 test images of 32 ×for 3 RGB channels, with 10 classes (Krizhevsky et al., 2009).
These images were normalized by the per-channel training set mean and standard deviation.
To form our training set, selected 3, training images from these datasets at random, where each class was equally represented.
This data was then feature-wise de-meaned and transformed using ZCA.
This same training class mean and
ZCA transformation was also then used on the 10,000 testing points for evaluation.
A.1. D OES SGD ALWAYS FIND THE GLOBAL OPTIMUM FOR NEURAL NETWORKS ?
For these experiments, SGD was trained with an initial learning rate of 4 × 10 − 5 for 20,000 epochs.
We used a regularization penalty value of β = 10 − 2 .
The value for t for Algorithm 1 was found by ﬁrst starting at the value of regularization penalty 12 (cid:80) mj
=1 (cid:107) u j (cid:107)
+ (cid:107) v j (cid:107) 22 from the solution from
SGD, then reﬁning this value using manual tuning.
A ﬁnal value of t = 1 . 495 was chosen.
For this experiment, there were P = 50 sign patterns.
Algorithm 1 was run for 30,000 iterations, and took
X seconds to solve.
A.1. M AXIMUM -M ARGIN M ATRIX F ACTORIZATION
The CIFAR-10 and CIFAR-100 datasets consist of 50,000 training images and 10,000 test images of 32 × 32 for 3 RGB channels, with 10 and 100 classes respectively (Krizhevsky et al., 2009).
These images were normalized by the per-channel training set mean and standard deviation.
To form our training set, selected 3,000 training images from these datasets at random, where each class was equally represented.
This data was then feature-wise de-meaned and transformed using
ZCA.
This same training class mean and ZCA transformation was also then used on the 10, testing points for evaluation.
For CIFAR-10, we used a regularization parameter value of β = 1 . 0 , whereas for CIFAR-100, we used a value of β = 5 . 0 .
SGD was trained for 400 epochs with a learning rate of 10 − 2 with 1000 neurons, trained with one-hot encoded labels and squared loss.
Figure 6 displays the test accuracy of the learned networks.
Surprisingly the whitened classiﬁcation from only 3,000 images generalizes quite well in both circumstances, far exceeding performance of the null classiﬁer.
For the CIFAR-10 experiments, the algorithm from Theorem 2 took only 0.018 seconds to solve, whereas for CIFAR-100 it took 0.36 seconds to solve.
[Figure]
A.1. E FFECTIVENESS OF THE C OPOSITIVE P ROGRAM
For this classiﬁcation problem, we use one-hot encoded labels and squared loss.
For β < 1 , SGD used a learning rate of 10 − 3 , and otherwise used a learning rate of 2 × 10 − 3 .
SGD was trained for 8,000 epochs with 1000 neurons, while Algorithm 1 ran for 1,000 iterations.
The copositive relaxation was optimized with CVXPY with a ﬁrst-order solver on a CPU with 256 GB of RAM (Diamond & Boyd, 2016).
The ﬁrst-order convex solver for the copositive relaxation used a maximum of 20,000 iterations.
This dataset had P = 114 sign patterns.
The value of t for Algorithmwas chosen as the regularization penalty β 2 (cid:80) mj
=1 (cid:107) u j (cid:107)
+ (cid:107) v j (cid:107) 22 from the solution of SGD.
A. N OTE ON D ATA MATRICES OF A F IXED R ANK
Consider the neural network training problem
[Equation]
Let X = UDV (cid:62) be the compact SVD of X with rank r , where U ∈ R n × r , D ∈ R r × r and
V ∈ R d × r .
Let u (cid:48)
j = V (cid:62) u
j and u ⊥ j = V (cid:62)⊥ u j .
We note that Xu j = XV u (cid:48)
j and (cid:107) u j (cid:107) 22 = u (cid:62)
j
( V V (cid:62) + V ⊥ V (cid:62)⊥ ) u
j = (cid:107) u (cid:48)
{+j (cid:107) 
+}
+ (cid:107) u ⊥ j (cid:107) 22 .
Then, we can re-parameterize the problem as
[Equation]
We note that u ⊥ j only appears in the regularization term.
Minimizing over u ⊥ j thus means simply setting it to 0.
Then, we have
[Equation]
We note that XV = UD ∈ R n × r and u (cid:48)
j ∈ R r .
Thus, for X of rank r , we can effectively reduce the dimension of the neural network training problem without loss of generality.
This thus holds for all results concerning the complexity of the neural network training problem with data matrices of a ﬁxed rank [Equation]
A. P ROOFS A.3. P ROOF OF T HEOREM
We begin with the primal problem (5), repeated here for convenience:
[Equation]
We start by re-scaling the weights in order to obtain a slightly different, equivalent objective
[Equation]
which has been performed previously in (Pilanci & Ergen, 2020; Savarese et al., 2019).
Lemma
The primal problem is equivalent to the following optimization problem
[Equation]
Proof: Note that for any γ > 0 , we can re-scale the parameters ¯ u j = γ j u j , ¯ v j = v j /γ j .
Noting that the network output is unchanged by this re-scaling scheme, we have the equivalent problem
[Equation]
Minimizing with respect to γ j , we thus end up with
[Equation]
We can thus set (cid:107) u j (cid:107) 2 = 1 without loss of generality.
Further, relaxing this constraint to (cid:107) u j (cid:107) 2 ≤does not change the optimal solution.
In particular, for the problem
[Equation]
the constraint (cid:107) u j (cid:107) 2 = 1 will be active for all non-zero v j .
Thus, relaxing the constraint will not change the objective.
This proves the Lemma.
Now, we are ready to prove the ﬁrst part of Theorem 1, i.e. the equivalence to the semi-inﬁnite program (8).
Lemma
For all β > 0 primal neural network training problem (22) has a strong dual, in the form of
[Equation]
Proof: We ﬁrst form the Lagrangian of the primal problem, by ﬁrst-reparameterizing the problem as
[Equation]
and then forming the Lagrangian as
[Equation]
By Sion’s minimax theorem [Equation] we can switch the inner maximum and minimum [Equation]
and minimize over v j and R .
This produces the following problem:
[Equation]
We then simply need to interchange max and min to obtain the desired form.
Note that this interchange does not change the objective value due to semi-inﬁnite strong duality.
In particular, for any β > 0 , this problem is strictly feasible (simply let Z = 0 ) and the objective value is bounded by 12 (cid:107) Y (cid:107) 2 F .
Then, by Theorem 2.2 of (Shapiro, 2009), we know that strong duality holds
[Equation]
and
[Equation]
as desired.
Furthermore, by (Shapiro, 2009), for a signed measure µ , we obtain the following strong dual of the dual program (8):
[Equation]
where B 2 deﬁnes the unit (cid:96) 2 -ball.
By discretization arguments in Section 3 of (Shapiro, 2009) [Equation] and by Helly’s theorem [Equation]
there exists some m ∗ ≤ nc + 1 such that this is equivalent to
[Equation]
Minimizing with respect to Z [Equation] we obtain
[Equation]
which we can minimize with respect to µ to obtain the ﬁnite parameterization
[Equation]
This proves that the semi-inﬁnite dual provides a ﬁnite support with at most m ∗ ≤ nc + 1 non-zero neurons.
Thus, if the number of neurons of the primal problem m ≥ m ∗ , strong duality holds.
Now, we seek to show the second part of Theorem 1, namely the equivalence to (9).
Starting from (8), we have that the dual constraint is given by
[Equation]
[Equation]
Using the concept of dual norm, we can introduce variable g to further re-express this constraint as
[Equation]
Then, enumerating over sign patterns { D i (cid:107) P i =1 , we have
[Equation]
Now, we express this in terms of an inner product.
[Equation]
Letting V = ug (cid:62) : [Equation] [Equation] [Equation]
[Equation]
Now
[Equation]
we can take the convex hull of the constraint set, noting that since the objective is afﬁne, this does not change the objective value.
[Equation]
Thus, the dual problem is given by
[Equation]
We now form the Lagrangian,
[Equation]
We note that by Sion’s minimax theorem, we can switch the max and min
[Equation]
and then minimize over
Z .
Following this, we obtain
[Equation]
We can re-scale our variables to obtain
[Equation]
And now minimize over λ to obtain the desired result:
[Equation]
Remark 5.
Given the optimal solution (9), it is natural to wonder how these dual variables relate to the optimal neurons of the neural network training problem (5).
Given an optimal { V ∗ i } Pi =1 , we simply need to factor them into V ∗ i
= (cid:80) cj
=1 h ∗ ij g ∗ ij (cid:62) , where (2 D i − I )
Xh ∗ ij ≥ 0 .
This is similar in ﬂavor to semi-NMF.
Since V ∗ i is in the cone K i , exact semi-NMF factorization can be performed in polynomial time (Gillis & Kumar, 2015).
Once this factorization is obtained, assuming without loss of generality that (cid:107) g ∗ ij (cid:107)
= 1 , the optimal neurons are given by
[Equation]
[Equation] Thus, given a solution to (9), a polynomial-time algorithm exists for reconstructing weights of the original neural network training algorithm.
A.3. A COROLLARY FOR CNN S WITH AVERAGE POOLING
We ﬁrst introduce additional notation for CNNs with average pooling.
In particular, following Ergen & Pilanci (2020b), we use the set of patch matrices { X k } Kk =1 to deﬁne a new data matrix as M :=
[ X 1 , X 2 , · · · X K ] (cid:62) ∈ R nK × h , where h is the convolutional ﬁlter size.
This matrix thus has a set of sign patterns, which we deﬁne as
[Equation]
where r c = rank ( M ) ≤ h .
We then can enumerate the set of patch matrices
[Equation]
Corollary 5.
In the case of a two-layer CNN with global average pooling as in (6), the strong dual of the neural network training problem
[Equation]
for convex sets K i , given by
[Equation] [Equation]
This strong dual is convex.
For a ﬁxed kernel-size, K and r c are ﬁxed, and the problem is polynomial in n , i.e. of complexity proportional O ( n r c ) .
Since in practice, M is a tall matrix with relatively few columns, it is almost always full-rank, in which case the computational complexity of solving the strong dual is O ( n h ) .
This problem can be solved with the same Frank-Wolfe algorithm as presented in Algorithm 1.
A.
P ROOF OF T HEOREM
We note that whitened data matrices such that n ≤ d satisfy XX (cid:62) =
I .
Then, we can solve the modiﬁed problem
[Equation]
This is simply by noting that left-multiplying by X (cid:62) does not change the norm.
Now, note that
[Equation]
The relaxed problem on the right-hand side is given exactly by maximum-margin matrix factorization (Srebro et al., 2005), i.e. can be expressed as
[Equation]
Furthermore, this has a closed-form solution, given by soft-thresholding the singular values of X (cid:62) Y (Hastie et al., 2015).
Thus, we have the solution of the relaxed problem as
[Equation]
Noting that Xa
i ≥
for all i ∈ { i : σ i > β i } by assumption, this solution is feasible for the original problem.
Thus, because the optimal value obtained by the solution to the relaxed problem was a lower bound to (12), it must be the optimal solution to (12).
Remark 5.2 It is interesting to note that when Y is one-hot encoded,
[Equation]
where n ( i ) refers to the number of instances in class i , and µ ( i ) refers to the mean of all data points belonging to class i .
In this scenario, then, the optimal neural network weights, V ∗ , are found via the maximum-margin factorization of this matrix.
Further, if Y Y (cid:62) is element-wise non-negative, by Perron-Frobenius theorem, its maximal left singular is non-negative.
For such data matrices, if β is chosen to be larger than the second largest singular value of Y , the solution in (13) is guaranteed to be exact.
A.3. P ROOF OF T HEOREM
Start with (8):
[Equation]
We can express this as
[Equation]
Enumerating over all possible sign patterns
i ∈
[ P ] , and noting that (cid:107) Z (cid:62) D i Xu (cid:107)
= tr (cid:16) Z (cid:62) D i Xuu (cid:62) X (cid:62) D
i Z (cid:17) , we have
[Equation]
Noting the maximization constraint is linear in uu (cid:62) , we can take the convex hull of the constraint set and not change the optimal value.
Thus,
[Equation] [Equation]
Which is then equivalent to
[Equation]
We thus have a problem with a convex objective and P constraints, so we can take the Lagrangian
[Equation]
Noting that this function is convex over Z , afﬁne over λ
[Equation]
and concave over U
i
[Equation]
and the constraint set is convex, by Sion’s minimax theorem we can change max and min without changing the objective.
Thus,
[Equation]
Solving for Z and re-substituting
[Equation]
we thus have
[Equation]
as in the proof of Theorem
[Equation]
we easily re-scale this to obtain the desired objective:
[Equation]
A. N OTES ON THE F RANK -W OLFE M ETHOD A PPLIED TO (9) A.4. D ERIVATION OF THE F RANK -W OLFE A LGORITHM
In general, the Frank-Wolfe algorithm (Frank et al., 1956) aims to solve the problem [Equation] [Equation]
for some convex function f and convex set D .
It does so in the following iterative steps k = 1 , · · · , K with step sizes α ( k ) and an initial point x (1)
(LMO step) Solve the problem [Equation] [Equation]
(Update step) Update the decision variable
[Equation]
[Equation]
We will now apply the Frank-Wolfe problem to the inner minimization of (11),
i
[Equation]
e., for a ﬁxed value of t , solving
[Equation]
In particular the LMO step becomes:
[Equation]
Note that the objective value in the optimization problem of the LMO step is afﬁne with respect to the variables S i .
Thus, the optimal value occurs at an extreme point of the feasible set.
Thus, only one of { M i } Pi =1 is active at optimum at index i
= i ∗ , and moreover this M i ∗ occurs at an extreme point of K i ∗ , i.e M i ∗ ∈
¯ K i ∗ .
All other M i where i (cid:54)
=
i ∗ are zero at optimum.
Thus, we can re-write this problem as
[Equation]
Recalling that K i := conv { ug (cid:62) : (2 D i − I )
Xu ≥ 0 , (cid:107) g (cid:107) 2 ≤ 1 } boundary of K i is simple to express, leaving us with M i ∗ =
u i ∗ g (cid:62) i ∗ , where
[Equation]
Note that we can change the constraint (cid:107) u (cid:107) 2 ≤ t to (cid:107) u (cid:107) 2 ≤ 1 and simply multiply by a factor of t to the solution afterwards.
We can thus write the key Frank-Wolfe LMO step subproblem as
[Equation]
as desired.
For each i ∈ [ P ] , we thus solve the problem
[Equation]
and store the arg maxes ( u i , g i ) for each i .
Then, from the index which attains the maximum i ∗ := arg max i s ( k ) i , form M ( k ) i ∗ =
u i ∗ g (cid:62) i ∗ .
For all other i (cid:54) = i ∗ , as stated previously, M ( k ) i = 0 .
Then, we must re-multiply by the factor t which was removed in (68) to obtain the update rule for all i ∈
[ P ] :
[Equation]
We discuss here how to solve the subproblem
[Equation]
using cone-constrained PCA.
In particular, note that for a ﬁxed u , we can solve for g in closed form.
Let R ( k ) =
Y − (cid:80) Pj =1 D i XV ( k ) i .
Then, we have
[Equation]
Then, re-substituting this back into the objective, we have
[Equation]
Without loss of generality, we can square the objective, since objective only takes on non-negative values.
The LMO step of the Frank-Wolfe algorithm is thus identical to the cone-constrained PCA problem
[Equation]
This problem, via Lemma 7 of Asteris et al.
(2014), can be performed in O ( n d ) time.
However, we note that because we can reduce the dimension of the problem to r without loss of generality (see Appendix A.2), this thus simpliﬁes to O ( n r ) .
We perform P of such maximization problems per iteration of Frank-Wolfe.
A. A CUTTING PLANE METHOD FOR SOLVING (14)
Consider the dual problem
[Equation]
Enumerating over sets of hyperplanes, we have
[Equation]
We can express the dual constraint as
[Equation]
where M i = X (cid:62) D i ZZ (cid:62) D i X ∈ R d × d .
For each i , this is a cone-constrained PCA problem in dimension d with n linear inequality constraints.
Using Lemma 7 of (Asteris et al., 2014), there exists an algorithm which solves the cone-constrained PCA problem in O ( n r ) time.
Thus, solving the optimization problem in the dual constraint (72) is O ( Pn r ) time.
For a ﬁxed rank r , P has order O ( n r ) , but otherwise P is O ( n d ) as well.
Thus, determining the feasibility of a dual variable
Z from (72) has complexity O ( n d ) in the general case, and O ( n r ) in the rank- r case.
Now, using the Analytic Center Cutting Plane Method (ACCPM), the cone-constrained PCA procedure above provides an oracle for the feasibility of a dual variable Z .
Using this oracle,
ACCPM solves the convex problem (70) in polynomial steps in terms of the dimension of Z , i.e. poly ( nc ) steps.
Thus, the overall complexity of the cutting plane method is O ( n d poly ( nc )) in the general case, and O ( n r poly ( nc )) in the rank- r case, which is polynomial for a ﬁxed r .
We note that while this is similar in complexity to the results of (Pilanci & Ergen, 2020), there are a few subtle differences.
In particular, there are additional terms polynomial in c which do not appear in their work.
However, the broader picture of the analyses align–for full-rank matrices, solving the convex dual of the neural network training problem is NP-hard, while for matrices of a ﬁxed rank, a polynomial time algorithm exists.
A. E XTENSIONS TO GENERAL CONVEX LOSS FUNCTIONS
This follows closely from a similar discussion by Pilanci & Ergen (2020).
Consider the objective of the neural network training problem with a general convex loss function (cid:96) , given by
[Equation]
Then [Equation] we can follow the same proof of Theorem 1 exactly, instead substituting the Fenchel dual of (cid:96) , deﬁned as
[Equation]
Then, we have the dual objective analog of (8):
[Equation]
We can further elucidate the convex constraint on dual variable Z as done in the proof of Theorem 1.
Then, we can follow the same steps from this previous proof, noting that by Fenchel–Moreau
Theorem, (cid:96) ∗∗ = (cid:96) (Borwein & Lewis, 2010).
Thus, the ﬁnite-dimensional convex strong dual is given by
[Equation]
as desired.
We note that the Frank-Wolfe method in Algorithm 1 holds for general convex (cid:96) as well, with a small modiﬁcation corresponding to the gradient of the loss function.