D EMYSTIFYING B ATCH N ORMALIZATION IN R E LU N ETWORKS : E QUIVALENT C ONVEX O PTIMIZATION M ODELS AND I MPLICIT R EGULARIZATION
Anonymous authors
Paper under double-blind review
A BSTRACT
Batch Normalization (BN) is a commonly used technique to accelerate and stabilize training of deep neural networks.
Despite its empirical success, a full theoretical understanding of BN is yet to be developed.
In this work, we analyze BN through the lens of convex optimization.
We introduce an analytic framework based on convex duality to obtain exact convex representations of weight-decay regularized
ReLU networks with BN, which can be trained in polynomial-time.
Our analyses also show that optimal layer weights can be obtained as simple closed-form formulas in the high-dimensional and/or overparameterized regimes.
Furthermore, we ﬁnd that Gradient Descent provides an algorithmic bias effect on the standard non-convex BN network, and we design an approach to explicitly encode this implicit regularization into the convex objective.
Experiments with CIFAR image classiﬁcation highlight the effectiveness of this explicit regularization for mimicking and substantially improving the performance of standard BN networks.
I NTRODUCTION
Deep neural networks have achieved dramatic progress in the past decade.
This dramatic progress largely hinged on improvements in terms of optimization techniques.
One of the most prominent recent optimization techniques is Batch Normalization (BN) (Ioffe & Szegedy, 2015).
BN is an operation that can be introduced in between layers to normalize the output of each layer and it has been shown to be extremely effective in stabilizing and accelerating training of deep neural networks.
Hence, it became standard in numerous state-of-the-art architectures, e.g., ResNets (He et al., 2016).
Despite its empirical success, it is still theoretically elusive why BN is extremely effective for training deep neural networks.
Therefore, we investigate the mechanisms behind the success of BN through convex duality.
1. R ELATED W ORK Batch
Normalization: One line of research has focused particularly on alternatives to BN, such as Layer Normalization (Ba et al., 2016), Instance Normalization (Ulyanov et al., 2016), Weight
Normalization (Salimans & Kingma, 2016), and Group Normalization (Wu & He, 2018).
Although these techniques achieved performance competitive with BN, they do not provide any theoretical insight about its empirical success.
Another line of research studied the effects of BN on neural network training and identiﬁed several beneﬁts.
For example, Im et al.
(2016) showed that training deep networks with BN reduces dependence on the parameter initialization.
Wei et al.
(2019) analyzed BN via mean-ﬁeld theory to quantify its impact on the geometry of the optimization landscape.
They reported that BN ﬂattens the optimization landscape so that it enables the use of larger learning rates.
In addition, Bjorck et al.
Santurkar et al. Arora et al. (2018) showed that networks trained with BN achieve faster convergence and generalize better.
Furthermore, Daneshmand et al.
(2020) proved that BN avoids rank collapse so that gradient-based algorithms, e.g., Stochastic Gradient Descent (SGD), are able to effectively train deep networks.
Even though these studies are important to understand the beneﬁts of BN, they fail to provide a theoretically complete characterization for training deep networks with BN.
Convex Neural Networks:
Recently, a series of papers (Pilanci & Ergen, 2020; Ergen & Pilanci, 2021;
Sahiner et al., 2021a;b) studied ReLU networks through the lens of convex optimization theory.
Particularly, Pilanci & Ergen (2020) introduced exact convex representations for two-layer ReLU networks, which can be trained in polynomial-time via standard convex solvers.
However, this work is restricted to two-layer fully connected networks with scalar outputs.
Later on, Ergen & Pilanci (2021) ﬁrst extended this approach to two-layer scalar output Convolutional Neural Networks (CNNs) with average and max pooling and provided further improvements on the training complexity.
These results were extended to two-layer fully convolutional networks and two-layer networks with vector outputs (Sahiner et al., 2021a;b).
However, these convex approaches are restricted to two-layer ReLU networks without BN, thus, do not reﬂect the exact training framework in practice, i.e., regularized deep ReLU networks with BN.
Unlike these prior works, we not only analyze training problems with batch normalization but also extend the analysis to deeper architectures in Section 4.
Furthermore, we prove that the optimal layer weight can be obtained as closed-form solutions in the high-dimensional and/or overparameterized regimes (see Theorem 2.1, 2.4, 4.1, 4.2, G.2).
1. O UR C ONTRIBUTIONS
• We introduce an exact convex framework to explicitly characterize optimal solutions to ReLU network training problems with weight-decay regularization and BN.
Thus, we obtain closed-form solutions for the optimal layer weights in the high-dimensional and overparameterized regime.
• We prove that regularized ReLU network training problems with BN can be equivalently stated as a ﬁnite-dimensional convex problem.
As a corollary, we also show that the equivalent convex problems involve whitened data matrices unlike the original non-convex training problem.
Hence, using convex optimization, we reveal an implicit whitening effect introduced by BN.
• We demonstrate that GD applied to BN networks provides an implicit regularization effect by learning high singular value directions of the training data more aggressively, whereas this regularization is absent for GD applied to the equivalent whitened data formulation.
We propose techniques to explicitly regularize BN networks to capture this implicit regularization effect.
• Unlike previous studies, our derivations extend to deep ReLU networks with BN, CNNs, BN after ReLU 1 , vector output networks, and arbitrary convex loss functions.
1. P RELIMINARIES
Notation: We denote matrices and vectors as uppercase and lowercase bold letters, respectively, where a subscript indicates a certain element or column.
We use 0 (or 1 ) to denote a vector or matrix of zeros (or ones), where the sizes are appropriately chosen depending on the context.
We also use I n to denote the identity matrix of size n .
To represent Euclidean, Frobenius, and nuclear norms, we use (cid:107) · (cid:107) 2 , (cid:107) · (cid:107) F , and (cid:107) · (cid:107) ∗ , respectively.
Lastly, we denote the elementwise 0-1 valued indicator function and ReLU activation as 1 [ x ≥ 0] and ( x ) + = max { x, 0 } , respectively.
We 2 consider an L -layer ReLU network with
layer weights W ( l ) ∈ R m l − 1 × m l , where m 0 =
d and m L = C are the input and output dimensions, respectively.
Given a training data X ∈ R n × d and a label matrix Y ∈ R n × C , we particularly focus on the following regularized training problem
[Equation]
where we compactly represent the parameters as θ := { W ( l ) , γ l , α l } Ll =1 and the corresponding parameter space as Θ := {{ W ( l ) , γ ( l ) , α ( l ) } Ll =1 :
W ( l ) ∈ R m l − 1 × m l , γ l ∈ R m l , α l ∈ R m l , ∀ l ∈
[ L ] } .
We note that γ l and α l are the parameters of the BN operator, for which we discuss the details below.
In addition, L ( · , · ) is an arbitrary convex loss function, including squared, hinge, and cross entropy loss, and R ( · ) is the regularization function for the layer weights with the tuning parameter β > 0 .
We also compactly deﬁne the network output as
[Equation]
we denote the l th layer activations as A ( l ) ∈ R n × m l , and A (0) =
X .
Here, BN γ,α ( · ) represents the
BN operation introduced in Ioffe & Szegedy (2015) and applies matrices columnwise.
All the proofs and some extensions are presented in Appendix.
Remark 1.1.
Note that above we use BN before ReLU activations, which is common practice and consistent with the way introduced in Ioffe & Szegedy (2015).
However, BN can be placed after
ReLU as well, e.g., Chen et al.
(2019), and thus in Section G of Appendix, we will also consider architectures where BN layers are placed after ReLU.
For a layer with weight matrix W ( l ) ∈ R m l − 1 × m l and arbitrary batch of activations denoted as
A ( l − 1) b ∈ R s × m l − 1 , BN applies to each column j independently as follows
[Equation]
where γ ( l ) and α ( l ) are trainable parameters that scale and shift the normalized value.
In this work, we focus on the full-batch case, i.e, A ( l − 1) b
= A ( l − 1) ∈ R n × m l .
This corresponds to training the network with GD as opposed to mini-batch SGD.
We note that our empirical ﬁndings with GD indicate identical if not better performance compared to the mini-batch case, which is also consistent with the previous studies Lian & Liu (2019);
Summers & Dinneen (2020).
Throughout the paper, we consider a regression framework with squared loss and standard weightdecay regularization.
Extensions to general convex loss functions are presented in Appendix B.1.
Moreover, below, we ﬁrst focus on scalar outputs i.e. C = 1 , and then extend it to vector outputs.
1. O VERVIEW OF O UR R ESULTS
Here, we provide an overview of our main results.
To simplify the notation, we consider L -layer
ReLU networks with scalar outputs, i.e., m L = C = 1 thus the label vector is y ∈ R n , and extend the analysis to vector output networks with the label matrix Y ∈ R n × C in the next sections.
The regularized training problems for an L -layer network with scalar output and BN is given by
[Equation]
where we use γ ( L )
=
α ( L ) = 0 as dummy variables for notational simplicity.
Lemma 1.1.
The problem in (3) is equivalent to the following optimization problem
[Equation]
where Θ s := { θ ∈ Θ : γ ( L − 1)
j
[Equation]
Using the equivalence in Lemma 1.1, we now take dual of (4) with respect to the output layer weights w ( L ) to obtain
[Equation]
[Table]
Since the original formulation in (3) is a non-convex optimization problem, any solution v in the dual domain yields a lower bound for the primal problem, i.e., p ∗ L ≥ d ∗ L .
In this paper, we ﬁrst show that strong duality holds in this case, i.e., p ∗ L = d ∗ L , and then derive an exact equivalent convex formulation for the non-convex problem (3).
Furthermore, we even obtain closed-form solutions for the layer weights in some cases so that there is no need to train a network in an end-to-end manner.
T WO - LAYER N ETWORKS
In this section, we analyze two-layer networks.
Particularly, we ﬁrst consider a high-dimensional regime, where n ≤ d , and then extend the analysis to arbitrary data matrices by deriving an equivalent convex program.
We also extend the derivations to vector output networks.
We now consider the regularized training problem for a two-layer network with scalar output and BN.
Using the equivalence in Lemma 1.1, the problem can be stated as
[Equation]
We then take dual of (6) with respect to the output weights w (2) to obtain the following dual problem [Equation]
[Equation]
where Θ s = { θ ∈ Θ : w (1) ∈ R d , γ (1)2 + α (1)2 = 1 } .
Notice that here we drop the hidden neuron index j ∈ [ m 1 ] since the dual constraint scans all possible parameters in the continuous set Θ s .
H IGH - DIMENSIONAL R EGIME ( n ≤ d )
In the sequel, we prove that the aforementioned dual problem is further simpliﬁed such that one can ﬁnd an optimal solution (6) in closed-form as follows.
Theorem 2.1.
Suppose n ≤ d and X is full row-rank, then an optimal solution to (6) is
[Equation]
[Table]
for j = 1 , 2 .
Therefore, strong duality holds, p ∗ 2 = d ∗ 2 .
2. E XACT C ONVEX F ORMULATION
In order to obtain an equivalent convex formulation to (6) in the general case, we ﬁrst introduce a notion of hyperplane arrangements; see also Pilanci & Ergen (2020).
We ﬁrst deﬁne a diagonal matrix as D := diag ( 1 [ Xw ≥ 0]) for an arbitrary w ∈ R d .
Therefore, the output of a ReLU activation can be equivalently written as ( Xw ) + = DXw provided that DXw ≥ 0 and ( I n − D )
Xw ≤are satisﬁed.
We can deﬁne these two constraints more compactly as (2 D − I n )
Xw ≥ 0 .
We now denote the cardinality of the set of all possible diagonal matrices as P , and obtain the following upperbound P ≤ O (2 r ( e ( n − 1) /r ) r ) , where r := rank ( X ) ≤ min( n, d ) .
For the rest of the paper, we enumerate all possible diagonal matrices (or hyperplane arrangements) in an arbitrary order and denote them as { D i } Pi =
Based on the notion of hyperplane arrangement, we now introduce an equivalent convex formulation for (6) without an assumption on the data matrix as in the previous section.
Theorem 2.2.
For any data matrix X , the non-convex training problem in (6) can be equivalently stated as the following ﬁnite-dimensional convex program min s i , s
[Equation]
i [Equation] where U , U (cid:48) are computed via the compact SVD of the zero-mean data matrix, namely ( I n − 1 n 11 T ) X :
= UΣV T and U (cid:48) :
= (cid:104) U
[Equation]
Notice that (8) is a convex program with 2 Pr variables and 2 Pn constraints, and thus can be globally optimized via interior-point solvers with O ( r 6 (cid:0) nr (cid:1) 3 r ) complexity.
Remark 2.1.
Theorem 2.2 shows that a classical ReLU network with BN can be equivalently described as a convex combination of linear models { U (cid:48)
s i } Pi =1 and { U (cid:48) s (cid:48)
i } Pi =1 multiplied with ﬁxed hyperplane arrangement matrices { D i } P i =1 .
Therefore, this result shows that optimal ReLU networks with BN are sparse piecewise linear functions, where sparsity is enforced via the group lasso regularization in (8) .
The convex program also reveals an implicit mechanism behind BN.
Particularly, comparing (8) with the one without BN (see eqn.
(8) in Pilanci & Ergen (2020)), we observe that the data matrix for the convex program is whitened, i.e., U (cid:48)
T U (cid:48)
=
I r +1 .
2. V ECTOR O UTPUT N ETWORKS
Here, we analyze networks with vector outputs, i
[Equation]
e., Y ∈ R n × C , trained via the following problem
[Equation]
Lemma 2.1.
The problem in (9) is equivalent to the following optimization problem
[Equation]
where Θ s := { θ ∈ Θ : γ (1)
j
+ α (1) j 2 = 1 , ∀ j ∈ [ m 1 ] } .
Using the equivalence in Lemma 2.
[Equation]
we then take dual of (10) with respect to the output layer weights W (2) to obtain the following dual problem
[Equation]
Theorem 2.3.
The non-convex training problem (9) can be cast as the following convex program
[Equation]
for convex sets K
[Equation]
1 } , where conv {·} denotes the convex hull of its argument and U (cid:48)
=
(cid:104) U 1 √ n
[Equation]
as in Theorem 2.2.
Remark 2.2.
We note that similar to the scalar output case, vector output BN networks training problem involves a whitened data matrix.
Furthermore, unlike (8) , the nuclear norm regularization in (12) encourages a low rank piecewise linear function at the network output.
The above problem can be solved in O (( n/d ) d ) time in the worst case (Sahiner et al., 2021a), which is polynomial for ﬁxed d .
We note that the problem in (12) is similar to convex semi non-negative matrix factorizations (Ding et al., 2008).
Moreover, in certain practically relevant cases, (12) can be signiﬁcantly simpliﬁed so that one can even obtain closed-form solutions as demonstrated below.
Theorem 2.4.
Let Y be a one-hot encoded label matrix, and X be a full row-rank data matrix with n ≤ d , then an optimal solution to (10) admits
[Equation]
w
[Equation]
∀ j ∈ [ C ] , where e j is the j th ordinary basis vector.
C ONVOLUTIONAL N EURAL N ETWORKS
In this section, we extend our analysis to CNNs.
Thus, instead of X , we operate on the patch matrices that are subsets of columns extracted from X and we denote them as X k ∈ R n × h , where h is the ﬁlter size and k is the patch index.
With this notation, a convolution operation between the data matrix X and an arbitrary ﬁlter z ∈ R h can be represented as { X k z } Kk =1 .
Therefore, given patch matrices { X k } Kk =1 , regularized training problem with BN can be formulated as follows
[Equation]
where given µ j = 1 nK (cid:80) Kk
[Equation]
[Equation] X k z j , BN is deﬁned as BN Cγ,α ( X k z j ) :=
[Equation]
nK
[Equation]
Using Lemma 1.1, the dual problem with respect to w (2) is
[Equation] [Equation]
Next, we state the equivalent convex program for CNNs.
Theorem 3.1.
The non-convex training problem in (13) can be cast as a convex program
[Equation]
where we ﬁrst deﬁne a new matrix M =
[ X 1 ; X 2 ; . . .
X K ] ∈ R nK × h and then use the following notations: the compact SVD of the zero mean form of this matrix is ( I nK − 1 nK 11 T ) M :
= U M Σ M V TM , and U (cid:48)
M := (cid:104)
U M
[Equation]
Theorem 3.1 proves that (13) can be equivalently stated as a ﬁnite-dimensional convex program with 2 r c P c variables (see Remark 3.1 for the deﬁnitions) and 2 nP c K constraints.
Since P c is polynomial in n and d as detailed in the remark below, we can solve (15) in polynomial-time.
Remark 3.1.
The number of hyperplane arrangements for CNNs rely on the rank of the patch matrices instead of X .
Particularly, the number of hyperplane arrangements for M , i.e., denoted as
P c , is upperbounded as P c ≤ O (2 r c ( e ( n − 1) /r
c ) r c ) , where r c := rank( M ) ≤ h (cid:28) d .
Therefore, given a ﬁxed ﬁlter size h , P c is polynomial in n and d even when X is full rank (see Ergen & Pilanci (2021) for more details).  D EEP N ETWORKS
We now analyze L -layer neural networks trained via the non-convex optimization problem in (3).
Below, we provide an explicit formulation for the last two layers’ weights. Theorem 4.1. Suppose the network is overparameterized such that the range of A ( L − 2) is R n . Then an optimal solution for the last two layer weights in (4) admits
[Equation]
for j = 1 , 2 .
Thus, strong duality holds, i.e., p ∗ L = d ∗ L .
4. V ECTOR O UTPUT N ETWORKS
Vector output deep networks are commonly used for multi-class classiﬁcation problems, where one-hot encoding is a prevalent strategy to convert categorical variables into a binary representation that can be processed by neural networks.
Although empirical evidence, e.g., Papyan et al.
(2020), shows that deep neural networks trained with one-hot encoded labels exhibit some common patterns among classes, it is still theoretically elusive how these patterns emerge.
Therefore, in this section, we analyze vector output deep networks trained using one-hot labels via our advocated convex duality.
The following theorem presents a complete characterization for the last two layers’ weights.
Theorem 4.2.
Let Y be a one-hot encoded label matrix and the network be overparameterized such that the range of A ( L − 2) is R n , then an optimal solution to (3) can be found in closed-form as
[Equation]
∀ j ∈ [ C ] , where e j is the j th ordinary basis vector.
[Figure] Here, we the training the BN model (9) to the equivalent whitened model (16), noting that the BN model ﬁts high singular value directions of the data ﬁrst, while the whitened model all directions equally, thereby overﬁtting to non-robust features. This shows implicit regularization effect of SGD  I MPLICIT R EGULARIZATION OF GD FOR BN
We ﬁrst note that proposed convex formulations, e.g., (8), (12) and (15), utilize whitened data matrices.
Thus, when we train them via a standard ﬁrst order optimizers such as GD/SGD, the optimizer might follow an unfavorable optimization path that leads to slower convergence and worse generalization properties throughout the training.
Based on this, we ﬁrst analyze the impact of utilizing a whitened data matrix for the non-convex problem in (9) trained with GD.
Then, we characterize this impact as an implicit regularization due to the choice of optimizer.
Finally, we propose an approach to explicitly incorporate this benign implicit regularization into both convex (8) and non-convex (9) training objectives.
5. E VIDENCE OF I MPLICIT R EGULARIZATION
Lemma 5.1.
The non-convex problem (9) is equivalent to the following problem (i.e., p ∗ v 2 = p ∗ v 2 b )
[Equation]
[Table]
[Table]
(16) is equivalent to a problem with new data matrix U and weight normalization (Salimans & Kingma, 2016).
The identity in Lemma 5.1 is achieved by substituting the transformation q j = ΣV (cid:62) w (1) j .
While (9) and (16) have identical global optima, in practice, GD behaves quite differently when applied to the two problems.
Furthermore, these differences extend to the convex formulations in (8), (12), and (15).
In particular, while these programs are adept at ﬁnding the global optimum, they generalize quite poorly when trained with local search algorithms such as GD.
This suggests an implicit regularization effect of GD, the form of which is demonstrated in the following theorem.
Theorem 5.1.
Consider (9) and (16) with corresponding models f v 2 ( X ) and f v 2 b ( U ) .
At iteration k of GD, assume that f kv 2 ( X ) =
f kv 2 b ( U ) , i.e. both models have identical weights, besides q ( k ) j = ΣV (cid:62) w (1) j
( k ) .
Then, the subsequent GD updates to model weights are identical, besides those to w (1) j and q j .
In q j -space, the updates ∆ ( k ) v 2 ,j and ∆ ( k ) v 2 b,j , respectively, admit
[Equation]
Remark 5.1.
Theorem 5.1 indicates that when solving (16) , GD will ﬁt directions corresponding to higher singular values of data much slower relative to other directions compared to (9) .
By ﬁtting these directions more aggressively, GD applied to (9) provides an implicit regularization effect that ﬁts to more robust features.
We also note that although our analysis holds only for GD, we empirically observe and validate the emergence of this phenomenon for networks trained with SGD as well.
To verify this intuition, in Figure 2, we compare the training and test loss curves of solving both (9) and (16) with mini-batch SGD applied to CIFAR-10 (Krizhevsky et al., 2014), demonstrating that
SGD applied to (9) generalizes much better than (16).
In Figure 1, we plot the cosine similarity of the weights of both networks compared to their initialization in each singular value direction.
Our results conﬁrm that the BN model ﬁts high singular value directions much faster than low ones, and in fact the lower-singular value directions almost do not move at all from their initialization.
In contrast, the whitened model ﬁts all singular value directions roughly equally, meaning that it overﬁts to less robust components of the data.
These experiments conﬁrm our theoretical intuition that SGD applied to BN networks has an implicit regularization effect.
5. M AKING I MPLICIT R EGULARIZATION E XPLICIT
Since the convex programs (8), (12), and (15) rely on the whitened data matrix U , they lack the regularization necessary for generalization when optimized with GD.
Thus, we aim to impose an explicit regularizer which does not hamper the performance of standard BN networks, but can improve the generalization of the equivalent programs trained using ﬁrst-order optimizers such as GD.
One simple idea to prevent the whitened model from ﬁtting low singular value directions is to obtain a low-rank approximation of the data by ﬁltering its singular values:
[Equation]
with T k ( Σ ) ii :
= σ i 1 { i ≥ k } , which takes the k ≤ r top singular values and removes the rest.
We can then solve (1) using f θ,L ( g ( X )) as the network output, to form what we denote as the truncated problem.
This can also reduce the problem dimension in the whitened-data case since one can simply omit the columns of U .
We ﬁnd this low-rank approximation to be effective, which can even improve the generalization of GD applied to BN networks.
N UMERICAL E XPERIMENTS
Here 5 , we present experiments to verify our theory.
Throughout this section, we denote the baseline model (3) and our non-convex model with truncation as “SGD” and “SGD-Truncated”, respectively.
Likewise, the proposed convex models are denoted as “Convex” and “Convex-Truncated”.
Closed-Form Solutions: We ﬁrst verify Theorem 2.4.
We consider a three-class classiﬁcation task with the CIFAR-100 image classiﬁcation dataset (Krizhevsky et al., 2014) trained with squared loss and one-hot encoded labels, while we set ( n, d, m 1 , β ) =
(1500 , 3072 , 1000 , 1) , where bs denotes the batch size.
In Figure 4, we compare the objective values achieved by the closed-form solution and the classical network (6).
We observe that our formula is computationally light-weight and can quickly ﬁnd a global optimum that cannot be achieved with GD even after convergence.
Convex Formulation and Implicit Regularization: We now demonstrate the effectiveness of our convex formulation to solve (9) on CIFAR-10 and CIFAR-100 (Krizhevsky et al., 2014).
Here, instead of enumerating all hyperplane arrangements, we randomly sample via randomly generated
Gaussian vectors such that m 1 = P .
We compare the results of training with and without the explicit regularizer (17) for both cases.
We particularly choose k such that singular values explain 95% of the variance in the training data.
Then, we consider two-layer networks for image classiﬁcation on CIFAR-10 with ( n, d, m 1 , β, bs , k, C )=(5 x 10 4 , 3072 , 4096 , 10 − 4 , 10 3 , 215 , 10) and CIFARwith ( n, d, m 1 , β, bs , k, C )=(5 x 10 4 , 3072 , 1024 , 10 − 4 , 10 3 , 200 , 100) .
In Figure 3, we observe that
Convex generalizes poorly (as expected with our results in Section 5.1).
After the singular value truncation, SGD, SGD-Truncated, and Convex-Truncated generalize equally well for CIFAR-10,
[Figure]
and Convex-Truncated in fact generalizes better for CIFAR-100.
This shows that the optimizer beneﬁts from the convex landscape of the proposed formulation (8).
Furthermore, truncation actually improves the performance of SGD in the case of CIFAR-100, suggesting this is a good regularizer to use.
C ONCLUDING R EMARKS
In this paper [Figure] we studied training of deep weight-decay regularized ReLU networks with BN, and introduced a convex analytic framework to characterize an optimal solution to the training problem.
Using this framework, we proved that the non-convex training problem can be equivalently cast as a convex optimization problem that can be trained in polynomial-time.
Moreover, the convex equivalents involve whitened data matrix in contrast to the original non-convex problem using the raw data, which reveals a whitening effect induced by BN.
We also extended this approach to analyze different architectures, e.g., CNNs and networks with BN placed after ReLU.
In the high dimensional and/or overparameterized regime, our characterization further simpliﬁes the equivalent convex representations such that closed-form solutions for optimal parameters can be obtained.
Therefore, in these regimes, there is no need to train a network in an end-toend manner.
In the light of our results, we also unveiled an implicit regularization effect of GD on non-convex
ReLU networks with BN, which prioritizes learning high singular-value directions of the training data.
We also proposed a technique to incorporate this regularization to the training problem explicitly, which is numerically veriﬁed to be effective for image classiﬁcation problems.
E THICS AND R EPRODUCIBILITY S TATEMENTS
This paper aims to provide a solid theoretical explanation for a common heuristic approach which improves the training and generalization of deep neural networks.
Therefore, we believe that there aren’t any ethical concerns regarding our paper.
For the sake of reproducibility, we provide all the experimental details (including preprocessing, hyperparameter optimization, extensive ablation studies, hardware requirements, and all other implementation details) in Appendix A as well as the source (attached as a supplementary material) to reproduce the experiments in the paper.
Similarly, all the proofs and explanations regarding our theoretical analysis can be found in Appendix B, C, D, E, F, G.
Appendix Table of Contents A Additional Details and Numerical Experiments
A.1 Inference in BN models . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
A.2 Additional Experiment: Batch Sizes for SGD . . . . . . . . . . . . . . . . . . .
A.3 Additional Experiment: Singular Value Truncation Ablation . . . . . . . . . . .
A.4 Additional Experiment: Convolutional Architectures . . . . . . . . . . . . . . .
A.5 Experiments from Section 5.1–Evidence of Implicit Regularization . . . . . . .
A.6 Veriﬁcation of Closed-Form Solutions . . . . . . . . . . . . . . . . . . . . . . .
A.7 Exact Convex Formulation and Implicit Regularization . . . . . . . . . . . . . .
B Additional Theoretical Results
B.1 Extensions to Arbitrary Convex Loss Functions . . . . . . . . . . . . . . . . . .
B.2 Proof of Lemma 1.1 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
B.3 Derivation of the Dual Problem in (5) . . . . . . . . . . . . . . . . . . . . . . .
B.4 Hyperplane Arrangements . .
C Two-Layer Networks
C.1 Closed-Form Solution to the Dual Problem in (7) . . . . . . . . . . . . . . . . .
C.2 Proof of Theorem 2.1 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
C.3 Proof of Theorem 2.2 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
C.4 Proof of Lemma 2.1 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
C.5 Proof of Theorem 2.3 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
C.6 Proof of Theorem 2.4 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
D Convolutional Neural Networks
D.1 Proof of Theorem 3.1 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
E The Implicit Regularization Effect of SGD on BN Networks
E.1 Proof of Lemma 5.1 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
E.2 Proof of Theorem 5.1 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
F Deep Networks
F.1 Proof of Theorem 4.1 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
F.2 Proof of Theorem 4.2 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
G BN after ReLU
G.1 Proof of Theorem G.2 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
G.2 Proof of Theorem G.1 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
A A DDITIONAL D ETAILS AND N UMERICAL E XPERIMENTS
In this section, we present the details about our experimental setup in the main paper and provide new numerical experiments.
We ﬁrst note that since we derive exact convex formulations in Theorem 2.2, 2.3, 3.1, we can use solver such as CVX (Grant & Boyd, 2014) and CVXPY (Diamond & Boyd, 2016; Agrawal et al., 2018) with the SDPT3 solver (Tütüncü et al., 2001) to train regularized ReLU networks training problems with BN.
Although these solvers ensure quite fast convergence rates to a global minimum, they do not scale to moderately large datasets, e.g., CIFAR-10.
Therefore, in our main experiments, we use an equivalent unconstrained form for the constrained convex optimization problems such that it can be simply trained via SGD.
Particularly, let us consider the constrained convex optimization problem in (8), for which the constraints can be incorporated into the objective as follows
[Equation]
[Table]
[Equation]
[Table]
[Equation]
[Table]
[Equation]
[Table]
[Equation]
[Table]
[Equation]
where ρ> 0 is a hyper-parameter to penalize the violating constraints.
Therefore, using the unconstrained form above, we are able to use SGD or other standard ﬁrst-order optimizers to optimize the constrained convex optimization problem in (8).
Unless otherwise stated, all problems are run on a single Titan Xp GPU with 12 GB of RAM, with the Pytorch deep learning library (Paszke et al., 2019).
All SGD models use a momentum parameter of 0.9.
All baseline models are trained with standard weight-decay regularization as outlined in (3).
All batch-norm models are initialized with scale γ ( l ) j =1 and bias α ( l ) j =0 , and all other non-convex model weights are initialized with standard Kaiming uniform initialization (He
et al., 2015).
For the convex program, we simply initialize all weights to zero.
A. I NFERENCE IN BN MODELS
For the non-convex standard BN network, we perform inference in the traditional way.
All BN problems with SGD take an exponential moving average of the mini-batch mean and standard deviation with a momentum of 0.1, as is used as a default in deep learning packages, except in the case of full-batch GD, in which case a momentum value of 1 is used.
In truncated variants, while the training data is truncated with the explicit regularizer g ( X ) , for test data
ˆ X , we compute the standard forward pass f θ,L ( ˆ X ), i.e. without changing the test data in any fashion, and removing the training-data mean and normalizing by the training-data standard deviation as found with the exponential moving average method described above.
For the convex program, we can form the weights to the non-convex standard BN network from the convex program weights, and compute the test-set predictions with the non-convex standard BN network.
A. A DDITIONAL E XPERIMENT : B ATCH S IZES FOR SGD
The model of BN we present in this paper is with the model with GD without mini-batching.
In this section, we demonstrate that mini-batching does not change the training or generalization performance of BN networks in any signiﬁcant manner.
Our observations also align with previous work examining this subject, such as Lian & Liu (2019);
Summers & Dinneen (2020).
In particular, we compare the effect of different batch sizes using a four layer CNN, where the ﬁrst three layers are convolutional, followed by BN, ReLU, and average pooling, and the ﬁnal layer is a fully-connected layer.
Each CNN layer has 1000 ﬁlters with kernel size 3 × 3 and padding of 1.
We take the ﬁrst two classes from CIFAR-100 to perform a binary classiﬁcation task with
X ∈ R 1000 × 3072 and y ∈ R 1000 .
For ( lr , β )=(10 − 6 , 10 − 4 ) , where lr denotes the learning rate, and weight-decay is applied to all parameters.
We compare the effect of using a batch size of 50 , 100 , 500 , and 1000.
We run the batch size 1000 case for 501 epochs, and then train the other batch size cases such that the training time is roughly matched.
Due to memory constraints, the full-batch form of
SGD does not ﬁt on a standard GPU–thus, all models are trained with a standard CPU with 256 GB of RAM.
We compare the train and test accuracy curves in Figure 5, where we see that all batch sizes perform roughly equivalently in both test and training performance.
This demonstrates that our full-batch model for BN accurately captures the same dynamics as BN as used in the mini-batch case.
We note that we also perform an ablation study on batch sizes for the nonconvex programs in Section 6 in Appendix A.7.2, and ﬁnd the same conclusion.
A. A DDITIONAL E XPERIMENT : S INGULAR V ALUE T RUNCATION A BLATION
In order to make clear the effect of the singular value truncation as proposed in Section 5.2 on generalization performance, we include an additional ablation study on a new dataset to verify our intuition.
In particular, we evaluated the proposed methods on the CNAE-9 dataset (Ciarelli &
Oliveira, 2009), a dataset of 1080 emails with 856 text features over 9 classes.
Following Ciarelli &
Oliveira (2009), the ﬁrst 900 samples were used as the training set, while the ﬁnal 180 samples are used as the test set in this experiment, to obtain X ∈ R 900 × 856 , y ∈ R 900 × 9 .
We evaluated the proposed approaches with ( m 1 , β, bs )=(10000 , 10 − 2 , 900) , comparing the baseline non-convex SGD approach to the convex truncated formulation for k ∈{ 10 , 100 , 200 , 400 , 856 } , where k is the index for which all smaller singular values are truncated from the training dataset.
We trained each model for roughly an equal amount of time (15 seconds).
For all architectures, a learning rate of 10 − 5 was ﬁxed.
We ﬁnd in Figure 6, that as expected, singular value truncation can effectively match the training and test performance of the SGD BN baseline, but only in a certain range of k .
When k is too low, such as k =10 , valuable features of the data are eliminated and the convex program underﬁts, whereas when k is too large, such as k =856 , the convex program overﬁts and does not generalize well.
Values of k =100 and k =200 generalize the best for this problem, and their corresponding truncations preserve 80% and 91% of the training data respectively.
The exact value of k which is optimal for generalization is a hyper-parameter that can be tuned, though it is clear that a large range of values can often work well.
This ablation lends additional support to the truncation approach proposed in Section 5.2.
[Figure]
[Table]
A. A DDITIONAL E XPERIMENT : C ONVOLUTIONAL A RCHITECTURES
To demonstrate the effectiveness of the convex formulation in convolutional settings, we provide an additional experiment to show the success of this approach.
In particular, as the baseline architecture, we consider a two-layer network which consists of a convolutional layer, followed by a channel-wise BN, followed by a ReLU activation, then subsequently followed by an average pooling operation, ﬂattening, and a fully-connected layer.
To use our convex formulation (e.g. (15)) for such an architecture, we can split an input image into spatial blocks (each block corresponds to a region whose outputs will be averaged), and apply a global-average pooling model as in (15) to each spatial block separately and combine the predictions from each spatial block together to obtain one prediction.
This sufﬁces as a relaxation of the baseline convolutional architecture.
To this end, we implement the non-convex and convex architectures on CIFAR-10 with the
AdamW optimizer for 50 epochs.
The convolution is with a 3 × 3 kernel with padding of 2 and stride of 3, with average pooling to a spatial dimension of 4 × 4 .
The parameters chosen for this model are given by ( n, m 1 , β, bs , k, C, lr )=(5 × 10 4 , 1024 , 5 × 10 − 4 , 250 , 22 , 10 , 10 − 2 ) .
We compare the results of the baseline, baseline-truncated, convex, and convex-truncated approaches.
In Table 1, we see that the accuracy of this CNN approach is higher than the fully-connected methods we reported in our paper, and as expected, there is a strong correspondence between the performance of the convex and baseline models, again reiterating our strong theoretical results, even in the case of this convex relaxation.
As illustrated in Table 1, truncation enables the convex approach to obtain equivalent or higher test accuracy than its non-convex counterparts, while obtaining similar training accuracy.
However, notice that the accuracy improvement provided by truncation is considerably less than the ones for fully-connected layers (e.g. Figure 3a).
This phenomenon is essentially due the distribution of the singular values of the data matrix.
Particularly, for fully connected layers, we have U ∈ R n × d , and therefore the dimension we truncate has d =3072 features.
In this case, the distribution of singular values follows an exponentially decaying pattern such that the ratio of maximal and minimum singular values, also known as the condition number of the data, is quite large ( σ max /σ min =5892 .
On the contrary, for CNNs, we operate on the patch matrices so that U mk ∈ R n × h , where h =27 is the size of each convolutional ﬁlter.
Since the data matrix is much more well conditioned ( σ max /σ min =271 . 2 ) and has a signiﬁcantly smaller feature dimension, the impact of truncation is less emphasized in our experiment.
A. E XPERIMENTS FROM S ECTION 5.1–E VIDENCE OF I MPLICIT R EGULARIZATION
As described in the main paper, for both the standard BN architecture and whitened architecture, we use the parameters ( n, d, m 1 , β, bs , lr )=(50000 , 3072 , 1000 , 10 − 4 , 1000 , 10 − 4 ) , where bs stands for batch size and lr stands for learning rate.
Both models were trained with SGD for 501 epochs, and the learning rate was decayed by a factor of 2 in the case of a training loss plateau.
We now expand on the deﬁnition of cosine similarity to clarify Figure 1 (in the main paper).
For weights ( W , W (cid:48) ) , we deﬁne the distance measure
[Equation]
(18) where v i are the columns of V from the SVD of the zero-mean data ( I n − 1 n 11 (cid:62) )
X .
This distance metric thus computes the cosine similarity between W and W (cid:48) after being projected to the right singular subspace v i .
For the same networks trained in Figure 2 (in the main paper), we compute { d X ,i ( W (1)( k ) , W (1)(0) ) } di =1 for the BN model (9), and { d U ,i ( Q ( k ) , Q (0) ) } di =1 for the equivalent whitened model (16), for each epoch k .
We display these in Figure 1 (in the main paper).
These correspond to a measure of how far the hidden-layer weights move from their initial values over time in the right singular subspace of the data, with lower values indicating that the weights have moved further from their initialization.
A. V ERIFICATION OF C LOSED -F ORM S OLUTIONS
See Figure 4 for the results of this experiment.
The GD baseline model is trained with a learning rate of 10 − 5 , and the learning rate was decayed by a factor of 2 in the case of a training loss plateau.
The closed-form solution takes only 0.578 seconds to compute, whereas we run the GD baseline model for 40001 epochs, which takes approximately 50 minutes to run per trial.
Each trial behaves slightly differently due to the randomness of the initialization of each network.
In terms of the generalization performance, the closed-form expression obtains a test threeclass classiﬁcation accuracy of 47.7%, whereas the baseline GD networks achieve an average of 60.1% ﬁnal test accuracy, again indicating the implicit regularization effect imposed by GD applied to BN networks.
A. E XACT C ONVEX F ORMULATION AND I MPLICIT R EGULARIZATION
In this section, we describe additional details about our main experimental results of the main paper.
In particular, we show the effect of training all models for a longer duration than displayed in the main paper, the different learning rates considered, the different batch sizes considered, along with the effect of using Adam as opposed to SGD, and comparison to a non-BN architecture.
For these experiments, we trained each model (SGD, SGD-Truncated, Convex, ConvexTruncated) for roughly the same amount of time, and considered a range of learning rates for each problem.
In particular, for CIFAR-10, we considered the learning rates { 10 − 5 , 5 × 10 − 5 , 10 − 4 } , and trained the SGD, SGD-Truncated, Convex, and Convex-Truncated models for 501, 501, 51, andepochs respectively, and each model was trained for roughly 700 seconds.
In contrast, for CIFAR-100, we considered the learning rates { 10 − 5 , 5 × 10 − 5 , 10 − 4 } , and trained the SGD, SGD-Truncated,
Convex, and Convex-Truncated models for 621,1001,41, and 251 epochs respectively, and each model was trained for roughly 800 seconds.
The range of learning rates was chosen such that all models reached their peak test accuracy within the allotted time, and the learning rate with the best ﬁnal test accuracy was chosen for each model.
In particular for CIFAR-10, the chosen learning rates for the SGD, SGD-Truncated,
Convex, and Convex-Truncated models were 10 − 5 , 10 − 5 , 5 × 10 − 5 , and 10 − 4 , respectively.
In contrast, for CIFAR-100 the chosen learning rates for the SGD, SGD-Truncated, Convex, and
Convex-Truncated models were 5 × 10 − 5 , 10 − 4 , 10 − 4 , and 5 × 10 − 4 , respectively.
For our CIFAR-10 experiments in this section, we always use ( m 1 , β, bs )=(4096 , 10 − 4 , 10 3 ) , while for CIFAR-100, we used ( m 1 , β, bs )=(1024 , 10 − 4 , 10 3 ) , where bs stands for batch size, as described in the main paper.
The only exception is during our batch size ablation study in Section
A.7.2, in which case the batch size is varied.
All models are trained with SGD, except in Section
A.7.4.
[Figure] [Figure]
A.7. T RAINING C URVES AND O VERFITTING
To make more robust our claims in the main paper
[Figure]
we consider training each network for a longer duration, such that each network can near 100% training accuracy.
We plot the results of both training and test accuracy for CIFAR-10 and CIFAR-100 in Figure 7.
We note that extending training for longer only seems to increase over-ﬁtting, and increasing train accuracy to 100% does not improve model performance.
Therefore, the results of our main paper, which display the curves for a shorter duration, represent the peak performance of all algorithms before they begin to overﬁt.
A.7. I MPACT OF D IFFERENT B ATCH S IZES
To further bolster our claim that taking the convex dual form from a full-batch case of SGD is sufﬁcient for capturing the performance of standard BN networks, we compare the performance of Convex and Convex-Truncated with SGD with different batch sizes, namely bs ∈{ 100 , 500 } .
In
Figure 8, we show that different batch sizes do not improve the generalization performance of BN networks, thereby validating that the convex dual derived from the full-batch model is accurate at representing BN networks when trained with mini-batch SGD.
Therefore, for all of our other experiments, we use bs =1000 .
A.7. I MPACT OF D IFFERENT L EARNING R ATES
We plot test curves for all considered learning rates for each program for the baseline program for
CIFAR-10 and CIFAR-100 in Figure 9.
We see that the different learning rates considered do not signiﬁcantly change the peak performance, with higher learning rates simply overﬁtting earlier.
[Figure] [Figure]
A.7. I MPACT OF D IFFERENT O PTIMIZERS
[Figure]
test accuracies and all problems are solved with Adam.
We see that these results mirror those with SGD, where Convex-Truncated performs equally well as or outperforms the baseline.
We also consider training both the standard non-convex and our convex formulations with the Adam optimizer (Kingma & Ba, 2014).
Not surprisingly, we see a similar implicit regularization effect when applied to BN networks.
For the Adam experiments, we consider the same set of learning rates as
[Figure] [Figure]
We choose a learning rate of 10 − 5 for Adam and Convex-Truncated, and a learning rate of 10 − 4 for
Adam-Truncated for the CIFAR-100 experiment in Figure 10b.
the SGD experiments, and ﬁx hyper-parameters ( β 1 , β 2 , (cid:15) )=(0 .
999 , 10 − 8 ) , as are the standard default values.
We run each program for the number of epochs as the SGD experiments, and consider the same learning rates as the SGD experiments.
For CIFAR-10, the chosen learning rates for all the models was 10 − 5 .
For CIFAR-100, the chosen learning rates for the Adam, Adam-Truncated,
Convex, and Convex-Truncated models were 10 − 5 , 10 − 4 , 5 × 10 − 5 , and
We plot the results of the test curves in Figure 10, and plots of longer trained curves in
Figure 11, as well as the effect of different learning rates in Figure 12.
We ﬁnd that with Adam, the
[Figure]
results mirror that of SGD.
For the best learning rate chosen for each method, the truncated convex formulation performs the best, followed by the truncated non-convex and standard non-convex formulations followed by the standard convex formulation.
We can conclude that our results are robust to the choice of optimizer.
A.7. C OMPARISON OF BN TO NON -BN T WO -L AYER A RCHITECTURES
One might speculate what the impact of adding BN to a two-layer network can have, compared to a simple standard fully-connected architecture.
In this section, we compare the standard two-layer network in both its primal and convex dual form, as ﬁrst presented in Pilanci & Ergen (2020), to the
BN networks described in this paper.
We let all parameters, i.e. ( n, d, m 1 , β, bs , C ) be identical to the setting of the main paper, and again consider a sweep of learning rates as was done for the BN experiments.
For the non-convex primal no BN form, the best performance came from a learning rate of 5 × 10 − 7 on CIFAR-10 and 10 − 5 for CIFAR-100, while for the convex no BN problem, the best performance was with a learning rate of 5 × 10 − 10 on CIFAR-10 and 5 × 10 − 9 for CIFAR-100.
We then compare the best results of each method in Figure 13.
We see that for both CIFAR-10 and
CIFAR-100, introducing a BN layer can signiﬁcantly improve the performance of the two-layer network architecture, both when compared to the result found with SGD, and the equivalent convex formulation.
B A DDITIONAL T HEORETICAL R ESULTS
In this section, we present additional theoretical results that are not included in the main paper due to the page limit.
B. E XTENSIONS TO A RBITRARY C ONVEX L OSS F UNCTIONS
In this section, we prove that our convex characterization holds for arbitrary convex loss functions including cross entropy and hinge loss.
We ﬁrst restate two-layer training problem with arbitrary convex loss functions after the resealing in Lemma 1.
[Equation]
(19) where L ( · , y ) is a convex loss function.
Then, the dual of (19) is given by
[Equation]
where L ∗ is the Fenchel conjugate function deﬁned as Boyd & Vandenberghe (2004)
[Equation]
The analysis above proves that our convex characterization in the main paper applies to arbitrary loss function.
Therefore, optimal parameters for (3) are a subset of the set that includes the extreme points of the dual constraint in (5) independent of loss function.
B. P ROOF OF L EMMA 1.
Here, we ﬁrst prove that regularizing the intermediate BN parameters and hidden layer weights don’t affect the optimization problem therefore the set of optimal solutions for the problems in (20) and (22) are the same.
Then, we show that (22) can also be cast as an optimization problem with (cid:96) 1 norm regularization penalty on the output layer weights w L .
B.2. E FFECTIVE R EGULARIZATION IN (3)
Here, we prove our claim about the effective regularization.
Let us restate the training problem as follows
[Equation]
where we use γ ( L )
=
α ( L ) = 0 as dummy variables for notational simplicity.
Now, let us rewrite (20) as p ∗
Lr =min t ≥ 0 min θ ∈ Θ
[Equation]
s.t.
[Equation]
After applying the scaling in Lemma 1.1, we then take the dual with respect to w ( L ) as in the main paper to obtain the following problem
[Equation] [Equation]
where Θ sr := { θ ∈ Θ: γ ( L − 1)
j
+ α ( L − 1)
j
[Equation]
=1 , ∀ j ∈ [ m L − 1 ] , (cid:80) L − 2 l =1 (cid:16)(cid:13)(cid:13) γ
[Equation]
(cid:13)(cid:13)
[Equation]
+
[Equation]
α
[Equation]
l
[Equation]
+
[Equation]
W
[Equation]
l )
[Equation]
F
[Equation]
+ (cid:13)(cid:13) W
( L − 1) (cid:13)(cid:13) 2 F ≤ t } .
Since
BN
[Equation]
where θ (cid:48) denotes all the parameters except γ ( L − 1) , α ( L − 1) , w ( L ) .
Then, independent of the value t , h ( θ (cid:48) ) is always a unit norm vector.
Therefore, the maximization constraint in (21) is independent of the norms of the parameters in θ (cid:48) .
Consequently, regularizing the weights in θ (cid:48) does not affect the dual characterization in (21).
Based on this observation, (20) can be equivalently stated as
[Equation]
B.2. R ESCALING FOR (cid:96) 1 NORM R EGULARIZATION IN (4)
We ﬁrst note that similar approaches are also presented in Neyshabur et al.
Savarese et al.
; Pilanci & Ergen (2020); Ergen & Pilanci (2020).
For any θ ∈ Θ
[Equation]
we can rescale the parameters as ¯ γ ( L − 1)
j = η j γ ( L − 1) j , ¯ α
( L − 1)
j = η
j α ( L − 1) j and ¯ w ( L ) j = w ( L ) j /η j , for any η j > 0 .
Then, the network output becomes
[Equation]
= f θ,L ( X ) , which proves f θ, 2 ( X )=
f ¯ θ, 2 ( X ) .
Moreover
[Equation]
we use the following inequality
[Equation]
where the equality is achieved when
[Equation]
is used.
Since this scaling does not alter the right-hand side of the inequality, without loss of generality, we can set (cid:113) γ ( L − 1)
j
[Equation] [Equation]
L − 1 ] .
Therefore, the right-hand side becomes (cid:107) w ( L ) (cid:107)and (22) is equivalent to
[Equation]
where Θ s := { θ ∈ Θ: γ ( L − 1)
j
[Equation]
+ α ( L −
[Equation]
B. D ERIVATION OF THE D UAL P ROBLEM IN (5)
Let us start with reparameterizing the scaled primal problem in (4) as p
[Equation]
L =
[Equation] [Equation]
where Θ s := { θ ∈ Θ: γ ( L − 1)
j
[Equation]
=1 , ∀ j ∈ [ m L − 1 ] } .
We now form the following Lagrangian
[Equation]
Then, the corresponding dual function is
[Equation]
Hence
[Equation]
the dual of (23) with respect to ˆ y and w ( L ) is
[Equation]
We then change the order of min-max to obtain the following lower bound
[Equation]
B. H YPERPLANE A RRANGEMENTS
We ﬁrst deﬁne the set of all hyperplane arrangements for the data matrix X as
[Equation]
where |H|≤ 2 n .
We now deﬁne a new set to denote the indices with positive signs for each element in the set H as S :
= (cid:8) {∪ h i =1 { i }} : h ∈H (cid:9) .
With this deﬁnition, we note that given an element
S ∈S , one can introduce a diagonal matrix D ( S ) ∈ R n × n deﬁned as D ( S ) ii :
= 1 [ i ∈ S ] .
Therefore, the output of ReLU activation can be equivalently written as ( Xw ) + = D ( S )
Xw provided that
D ( S )
Xw ≥
and ( I n − D ( S ))
Xw ≤ 0 are satisﬁed.
One can deﬁne more compactly these two constraints as (2 D ( S ) − I n )
Xw ≥ 0 .
We now denote the cardinality of S as P , and obtain the following upperbound
[Equation]
where r := rank ( X ) ≤ min( n, d ) (Ojha, 2000; Stanley et al., 2004; Winder, 1966; Cover, 1965).
For the rest of the paper, we enumerate all possible hyperplane arrangements in an arbitrary order and denote them as { D i } Pi =1 .
C T WO -L AYER N ETWORKS C. C LOSED -F ORM S OLUTION TO THE D UAL P ROBLEM IN (7)
Lemma C.1.
Suppose n ≤ d and X is full row-rank, then an optimal solution to (7) is
[Equation]
Proof.
Since n ≤ d and X is full row-rank, we have
[Equation]
where s = (cid:2) γ (1) α (1) (cid:3) T and the equality is achieved when
[Equation]
Thus
[Equation]
the dual problem (7) can be reformulated as
[Equation]
The problem above can be maximized using the following optimal dual parameter
[Equation]
C. P ROOF OF T HEOREM 2.
For the solution in Lemma C.
[Equation]
the corresponding extreme points for the two-sided constraint are
[Equation]
and
[Equation]
We now substitute these solutions into the primal problem (6) and then take the derivative with respect to the output layer weights w (2) .
Since the primal problem is linear and convex provided that the ﬁrst layer weights are ﬁxed as W (1) ∗ , we obtain the following closed-form solutions for the output layer weights
[Equation]
( − y )
+ (cid:107).
These set of weights, { W (1) ∗ , γ (1) ∗ , α (1) ∗ , w (2) ∗ } , achieves p ∗
= d ∗ 2 , therefore, strong duality holds.
C. P ROOF OF T HEOREM 2.
We ﬁrst note that if the number of neurons satisﬁes m 1 ≥ m ∗ for some m ∗ ∈ N , where m ∗ ≤ n + 1 , then strong duality holds,
i
[Equation]
e., p ∗ 2 = d ∗ 2 (see Section 2 of Pilanci & Ergen (2020)).
Following the steps in Pilanci & Ergen (2020), we ﬁrst focus on the dual constraint in (7)
[Equation]
D i − I n ) U (cid:48) s (cid:48) ≥(cid:12)(cid:12) v T D
i U (cid:48) s (cid:48) (cid:12)(cid:12) , where q :
= ΣV T w (1) / (cid:13)(cid:13)
ΣV T w (1) (cid:13)(cid:13) 2 , s := (cid:2) γ (1) α (1) (cid:3) T , s (cid:48) :
= (cid:2) γ (1) q T α (1) (cid:3) T , and U (cid:48) :
= (cid:104) U 1 √ n (cid:105) .
Now, let us consider the single side of this constraint and introduce a dual variable ρ for the constraint as follows
[Equation]
Therefore
[Equation]
we have
[Equation]
Similar arguments also hold for the negative side of the absolute value constraint.
Therefore, we can reformulate (7) as a convex optimization problem with variables v , ρ i , ρ (cid:48)
i ∈ R n , ∀
i ∈ [ P ] and 2 P constraints as follows [Equation] As noted in Pilanci & Ergen (2020)
[Equation]
since the problem in (24) is strictly feasible for the particular choice of parameters v = ρ i = ρ (cid:48) i = 0 , ∀∈ [ P ] [Equation] Slater’s condition and therefore strong duality holds (Boyd & Vandenberghe, 2004)
[Equation]
We now write (24) in a Lagrangian form with the parameters λ , λ (cid:48)
∈ R P as
[Equation] [Equation] We next introduce additional variables r i , r (cid:48) i ∈ R
d , ∀ i ∈
[ P ] to represent (25) as
[Equation]
Now, we remark that the objective function in (26) is concave in v , ρ i , ρ (cid:48) i and convex in r i , r (cid:48) i , ∀ i ∈ [ P ] .
In addition, the constraint set for the additional variables, i.e., (cid:107) r i (cid:107) 2 , (cid:107) r (cid:48) i (cid:107) 2 ≤ 1 , are convex and compact.
Then, we use Sion’s minimax theorem (Sion, 1958) to change the order of the inner max-min problems as
[Equation]
Thus
[Equation]
we can now perform the maximization over the variables v , ρ i , ρ (cid:48)
i to simplify (27) into the following form
[Equation]
We then apply a set variable changes as s i
= λ i r i and s (cid:48) i = λ (cid:48) i r
[Equation]
i , ∀ i ∈ [ P ] to obtain the following problem
[Equation]
Finally, since the optimality conditions require (cid:107) s i
[Equation]
= λ i and
[Equation]
s [Equation] , ∀ i ∈ [ P ] [Equation]
we write (29) as a single convex minimization problem as
[Equation]
Constructing
an
optimal solution to the primal problem
One can also construct an optimal solution to the non-convex training problem in (6) as follows
[Equation]
where { s ∗ i
[Equation]
s (cid:48) ∗ i } Pi =1 are the optimal solutions to (8) and and j si ∈ [ |J s | ] given the deﬁnitions J 1 :
= { i : s ∗
i (cid:54) =0 } and J 2 :=
{ i : s (cid:48) ∗ i (cid:54) =0 } .
Thus, we have m ∗
[Equation]
C. P ROOF OF L EMMA 2.
We note that similar approaches are also presented in Sahiner et al.
(2021a)
; Ergen & Pilanci (2020).
For any θ ∈ Θ , we can rescale the parameters as ¯ γ (1) j = η
j γ (1) j , ¯ α (1) j = η
j α (1) j and ¯ w (2)
j = w (2) j /η j , for any η j > 0 .
Then, the network output becomes
[Equation]
which proves f θ
[Equation]
2 ( X )=
f ¯ θ, 2 ( X ) . Moreover
[Equation]
we use the following inequality
[Equation]
where the equality is achieved when
[Equation]
is used.
Since this scaling does not alter the right-hand side of the inequality, without loss of generality, we can set (cid:113) γ (1) j 2 + α (1) j 2 =1 , ∀ j ∈ [ m 1 ] .
Therefore, the right-hand side becomes (cid:80) m 1 j =1 (cid:107) w (2) j (cid:107) 2 .
We then note that due to the arguments in Appendix B.2.1, we can remove the regularization on w (1) j without loss of generality.
Therefore, the ﬁnal optimization problem is as follows
[Equation]
where Θ s := { θ ∈ Θ: γ (1)
j
+ α (1) j 2 =1 , ∀ j ∈ [ m 1 ] } .
C. P ROOF OF T HEOREM 2.
We ﬁrst note that if the number of neurons satisﬁes m 1 ≥ m ∗ for some m ∗ ∈ N , where m ∗ ≤ nC + 1 , then strong duality holds, i.e., p ∗ 2 v =
d ∗ 2 v , (see Section A.3.1 of Sahiner et al.
(2021a) for details).
Following the steps in Sahiner et al.
(2021a)
and Theorem 2.2, we again focus on the dual constraint in (11)
[Equation]
where s (cid:48) = (cid:2) γ q T α (cid:3) T , U (cid:48)
= (cid:104) U 1 √ n (cid:105) , and K i :=conv { s (cid:48)
g T :(2 D
i − I n ) U
[Equation]
s
[Equation]
≥ 0 , (cid:107) g (cid:107) 2 ≤ 1 } .
Thus, we have max θ ∈ Θ s (cid:13)(cid:13)(cid:13)(cid:13)(cid:13)
[Equation]
Similar arguments also hold for the negative side of the absolute value constraint.
We then directly follow the steps in Sahiner et al.
(2021a)
and achieve the following convex program
[Equation]
C. P ROOF OF T HEOREM 2.
We ﬁrst restate the dual problem as
[Equation]
where we use the results from Theorem 2.3 to modify the dual constraint.
Since Y is one-hot encoded, (30) can be rewritten as
[Equation]
This problem has the following closed-form solution
[Equation]
and the corresponding ﬁrst layer weights in (31) are
[Equation]
Now let us ﬁrst denote the set of indices that achieves the extreme point of the dual constraint as
E :=
{ j : β ≤(cid:107)
y j (cid:107) 2 , j ∈
[ C ] } .
Then the dual objective in (31) using the optimal dual parameter in (32)
[Equation]
We next restate the scaled primal problem
[Equation]
[Equation] and then obtain the optimal primal objective using the hidden layer weights in (33)
[Equation]
which yields the following optimal solution
[Equation]
We now evaluate the primal problem objective with the parameters in (36)
[Equation]
which yields p
[Equation]
= 1 2 (cid:13)(cid:13)(cid:13)(cid:13)(cid:13)(cid:13)
C (cid:88)
[Equation]
w (2) j ∗ (cid:13)(cid:13)(cid:13) =
(cid:13)(cid:13) (cid:13) (cid:13)(cid:13)(cid:13) (cid:88)
j ∈E ( (cid:107) y j (cid:107) 2 − β ) y j (cid:107) y j (cid:107) 2 e T j − Y (cid:13)(cid:13) (cid:13) (cid:13)(cid:13)(cid:13)
F + β (cid:88)
{+j ∈E ( (cid:107) y j (cid:107) 2 − β ) = (cid:88) j ∈E (cid:13)(cid:13)(cid:13)(cid:13) β y j (cid:107) y j (cid:107) 
 e+}
Tj
(cid:13)(cid:13)(cid:13)(cid:13)
F + (cid:88) j/ ∈E (cid:107) y
j e Tj (cid:107) 2 F + β (cid:88)
j ∈E (cid:107) y j (cid:107) 2 − β 2 |E| =
− 1 2 β 2 |E| + 1 2 (cid:88) j/ ∈E (cid:107) y j (cid:107) 22 + β (cid:88)
j ∈E (cid:107) y j (cid:107) 2 , (37) which is the same with (34).
Therefore, strong duality holds, i.e., p ∗ 2 v =
d ∗ 2 v , and the layer weights in (36) are optimal for the primal problem (35).
D C ONVOLUTIONAL N EURAL N ETWORKS D. P ROOF OF T HEOREM 3.
Following the arguments in Theorem 2.2 and Ergen & Pilanci (2021), strong duality holds for the
CNN training problem in (13), i.e., p ∗ 2 c
= d ∗ 2 c , and the dual constraint can be equivalently written as
[Table]
[Equation]
where C := 1 TK ⊗ I n , M =[ X 1 ; X 2 ; .
X K ] , and we use the following variable changes q := Σ M V TM z , s := (cid:2) γ (1) α (1) (cid:3) T , s (cid:48) :
= (cid:2) γ (1) q T α (1) (cid:3) T , and
U (cid:48)
M :=
[Equation]
U
[Equation]
(cid:105) =
[ U (cid:48)
M 1 ; U (cid:48)
M 2 ; .
U (cid:48) MK ] .
Then, following the steps in Theorem 2.2 and Ergen & Pilanci (2021), the equivalent convex program for (13) is
[Equation]
+ β
P c (cid:88) i
=
( (cid:107) q
i (cid:107) 2 + (cid:107) q (cid:48) i (cid:107) 2 ) s.t.
(2 D ik − I n ) U (cid:48)
Mk q i ≥ 0 , (2 D ik − I n ) U (cid:48)
Mk q (cid:48)
i ≥ 0 ,
∀ i ∈
[ P c ] , ∀ k ∈ [ K ] .
E T HE I MPLICIT R EGULARIZATION E FFECT OF SGD ON BN N ETWORKS E. P ROOF OF L EMMA 5.
We start with the following non-convex training problem
[Equation]
(cid:13) (cid:13)(cid:13)(cid:13)(cid:13)(cid:13)
F
[Equation]
where we note that hidden layer weights are not regularized without loss of generality due to the arguments in Appendix B.2.1.
Now, consider the SVD of the zero mean form of the data matrix ( I n − 1 n 11 (cid:62) )
X
= UΣV (cid:62) .
We can thus equivalently write the problem as
[Equation]
(cid:18)
[Equation]
[Equation] [Equation] (cid:13)(cid:13)(cid:13) w (2) j (cid:13)(cid:13)(cid:13) (cid:19) ,
Now, simply let q j = ΣV (cid:62) w (1) j .
Noting that (cid:107)
Uq j (cid:107) 2 = (cid:107) q j (cid:107) 2 , we arrive at p ∗ v 2 =
p ∗ v 2 b :=min θ ∈ Θ 1 2 (cid:13)(cid:13)(cid:13)(cid:13)(cid:13)(cid:13)
[Equation]
(cid:88) [Equation] (cid:13)(cid:13)(cid:13)(cid:13)(cid:13)(cid:13)
[Equation]
(cid:88)
[Equation]
γ
[Equation]
1) j
[Equation]
1) j
[Equation]
(cid:13)(cid:13)(cid:13)
[Equation]
(2) j (cid:13)(cid:13)(cid:13) (cid:19) ,
E. P ROOF OF T HEOREM 5.
When solving (9) with GD, we have the updates
[Equation]
Now
[Equation]
let D ( k ) j
=diag
[Equation] [Equation]
the residual at step k
[Equation]
and X 0 =( I n − 1 n 11 (cid:62) )
X .
Then, with squared loss L
[Equation]
we have the following:
[Equation]
To express the updates in q j -space for w (1)
j
[Equation]
we can compute
[Equation]
Now, we consider solving (16) with GD.
We assume that all weights are equivalent to those in (9),
i
[Equation]
e. f kv 2 b ( X )=
f kv 2 ( X ) , and q ( k ) j = ΣV (cid:62) w (1) j
( k ) .
In this case, the gradients are given by:
[Equation]
Simplifying
[Equation]
we have
[Equation]
Now, noting that X 0 w (1) j ( k ) =
Uq j ( k ) , and thus that (cid:107) X 0 w (1) j ( k ) (cid:107) 2 = (cid:107) q j
[Equation]
k )
[Equation]
2 , we can ﬁnd that, as desired,
[Equation]
F D EEP N ETWORKS F. P ROOF OF T HEOREM 4.
Applying the same steps in Theorem 2.1 for the data matrix A ( L − 2) , i.e., replacing X with A ( L − 2) , yields the following optimal parameters
[Equation]
(1)1 ∗ α (1)1 ∗ (cid:35) =
(cid:107) ( y )
+ (cid:107)(cid:20) (cid:107) ( y )
+ − 1 n 11 T ( y )
+ (cid:107) 2√ n 1 T ( y )
+ (cid:21) (cid:34) γ
(1)2 ∗ α (1)2 ∗ (cid:35) =
(cid:107) ( − y )
+ (cid:107)(cid:20) (cid:107) ( − y )
+ − 1 n 11 T ( − y )
+ (cid:107) 2√ n 1 T ( − y )
+ (cid:21) w (2) ∗ =
  (cid:20) (cid:107) ( y ) + (cid:107) 2 − β −(cid:107) ( − y )
+ (cid:107)
+ β (cid:21) if β ≤(cid:107) ( y )
+ (cid:107) 2 , β ≤(cid:107) ( − y )
+ (cid:107)−(cid:107) ( − y )
+ (cid:107)
+ β if β > (cid:107) ( y ) + (cid:107) 2 , β ≤(cid:107) ( − y )
+ (cid:107)(cid:107) ( y )
+ (cid:107) 2 − β if β ≤(cid:107)
( y )
+ (cid:107) 2 , β > (cid:107) ( − y )
+ (cid:107) if β > (cid:107) ( y ) + (cid:107) 2 , β > (cid:107) ( − y )
+ (cid:107)v ∗ =
  β
( y )
[Equation]
(cid:107) ( y )
[Equation]
(cid:107) 2 − β
− y )
[Equation]
(cid:107) ( − y )
+ (cid:107)if β ≤(cid:107) ( y ) + (cid:107) 2 , β ≤(cid:107)
[Equation]
We now substitute these parameters into the primal (3) and the dual (5) to prove that strong duality holds.
For presentation simplicity, we only consider the ﬁrst case,
i
[Equation]
e., β ≤(cid:107) ( y ) + (cid:107) 2 , β ≤(cid:107) ( − y )
+ (cid:107)and note that the same derivations apply to the other cases as well.
We ﬁrst evaluate the primal objective with these parameters as follows
[Equation]
=
[Equation] [Equation]
We then evaluate the dual objective as follows
[Equation]
By (38) and (39)
[Equation]
the set of parameters { W ( L − 1) ∗ , γ ( L − 1) ∗ , α ( L − 1) ∗ , w ( L ) ∗ } achieves p ∗ L = d ∗ L , therefore, strong duality holds.
F. P ROOF OF T HEOREM 4.
Applying the same steps in Theorem 2.4 for the data matrix
A ( L − 2) , i.e., replacing X with A ( L − 2) , yields the following set of parameters
[Equation]
otherwise
[Equation]
G BN AFTER R E LU
Despite the common practice for BN, i.e., placing BN layers before activation functions, some recent studies show that applying BN after activation function might be more effective (Chen et al., 2019).
Thus, we analyze the effects of BN when it is employed after ReLU activations.
After applying the scaling in Lemma 1.1, the primal training problem is as follows
[Equation]
In the sequel, we repeat the same analysis in Section 2.
Theorem G.1.
For any data matrix X , the non-convex training problem in (40) can be equivalently stated as the following ﬁnite-dimensional convex program min
[Equation]
i
[Equation]
[Equation]
provided that ( I n − 1 n 11 T ) D i X :=
U i Σ
i V Ti , U (cid:48)
i := (cid:104) U
i 1 √ n [Equation] (cid:105) , r i
[Equation]
=rank(
[Equation]
I n − 1 n 11 T ) D i X ) , and s i, 1: r i − 1 denotes all the entries of s i except the last one.
Theorem G.2.
Suppose n ≤ d and X is full row-rank, then an optimal solution to (40) is given as
[Equation]
These results indicate that applying BN after ReLU leads to a completely different phenomena.
Speciﬁcally, Theorem G.1 shows that the hyperplane arrangement matrices D i
X are de-meaned and whitened via SVD, namely ( I n − 1 n 11 T ) D i X
=
U i
Σ
i V Ti .
This renders whitened features
U (cid:48) i = (cid:2) U i 1 / √ n (cid:3) appearing in the convex model.
This is in contrast with applying BN before the
ReLU layer, which directly operates on the data matrix X .
Theorem G.2 shows that an optimal solution can be found in closed-form in the high-dimensional regime n ≤ d when X is full row-rank, which is typically satisﬁed in sample-limited scenarios.
Surprisingly, a single neuron optimizes the training cost, which corresponds to a single non-zero block in the group (cid:96) 1 penalized program (41).
G. P ROOF OF T HEOREM G.
Applying the approach in Lemma C.1 to the following constraint
[Equation]
yields
[Equation]
Then, the rest of proof is to verify the solutions by substituting them into the primal and dual problems as in Theorem 2.1.
G. P ROOF OF T HEOREM G.
We ﬁrst focus on the dual constraint as follows
[Equation]
[Table]
Then, the rest of the proof directly follow from Theorem 2.2.