E MPIRICAL S TUDIES ON THE P ROPERTIES OF L INEAR R EGIONS IN D EEP N EURAL N ETWORKS
A BSTRACT
A deep neural network (DNN) with piecewise linear activations can partition the input space into numerous small linear regions, where different linear functions are ﬁtted.
It is believed that the number of these regions represents the expressivity of the DNN.
This paper provides a novel and meticulous perspective to look into
DNNs: Instead of just counting the number of the linear regions, we study their local properties, such as the inspheres, the directions of the corresponding hyperplanes, the decision boundaries, and the relevance of the surrounding regions.
We empirically observed that different optimization techniques lead to completely different linear regions, even though they result in similar classiﬁcation accuracies.
We hope our study can inspire the design of novel optimization techniques, and help discover and analyze the behaviors of DNNs.
I NTRODUCTION
In the past few decades, deep neural networks (DNNs) have achieved remarkable success in various difﬁcult tasks of machine learning (Krizhevsky et al., 2012; Graves et al., 2013;
Goodfellow et al., 2014;
He et al., 2016; Silver et al., 2017; Devlin et al., 2019).
Albeit the great progress DNNs have made, there are still many problems which have not been thoroughly studied, such as the expressivity and optimization of DNNs.
High expressivity is believed to be one of the most important reasons for the success of DNNs.
It is well known that a standard deep feedforward network with piecewise linear activations can partition the input space into many linear regions, where different linear functions are ﬁtted ( Pascanu et al., 2014; Montufar et al., 2014).
More speciﬁcally, the activation states are in one-to-one correspondence with the linear regions, i.e., all points in the same linear region activate the same nodes of the DNN, and hence the hidden layers serve as a series of afﬁne transformations of these points.
As approximating a complex curvature usually requires many linear regions (Poole et al., 2016), the expressivity of a DNN is highly relevant to the number of the linear regions.
Studies have shown that the number of the linear regions increases more quickly with the depth of the
DNN than with the width (Montufar et al., 2014;
Poole et al., 2016; Arora et al., 2018).
Serra et al.
(2018) detailed the trade-off between the depth and the width, which depends on the number of neurons and the size of the input.
However, a deep network usually leads to difﬁculties in optimization, such as the vanishing/exploding gradient problem (Bengio et al., 1994; Hochreiter, 1998) and the shattered gradients problem (Balduzzi et al., 2017).
Batch normalization (BN) can alleviate these by repeatedly normalizing the outputs to zero-mean and unit standard deviation, so that the scale of the weights can no longer affect the gradients through the layers (Ioffe & Szegedy, 2015).
Another difﬁculty is that the high complexity caused by the depth can easily result in overﬁtting.
Srivastava et al.
(2014) proposed dropout to reduce overﬁtting, which allows a DNN to randomly drop some nodes during training and work like an ensemble of several thin networks during testing.
Despite the empirical beneﬁts of these techniques, their effects on the trained model and the reasons behind their success are still unclear.
Previous studies focused on explaining why these techniques can help the optimization during training (Wager et al., 2013; Santurkar et al., 2018; Bjorck et al., 2018).
Different from theirs, our study is trying to answer the following question:
What properties do these techniques introduce to the linear regions after training?
We present an intuitive view of different techniques’ effects on the linear regions in Figure 1.
We may observe that:
BN and dropout help the DNN partition the input space into many more linear regions than the vanilla DNN.
The linear regions resulted from the BN model are more uniform in size than those from the dropout DNN.
Many transition boundaries of the dropout DNN share similar norm directions, and concentrate around the decision boundaries.
Figure 1 illustrates that different optimization techniques can lead to completely different linear regions even using the same DNN architecture, which may inﬂuence the behaviors of the DNN, such as its adversarial robustness (Biggio et al., 2013; Szegedy et al., 2014) or some other undiscovered ones (Appendix A shows another example on a two-dimensional toy dataset).
Therefore, it is important to probe the properties of the linear regions introduced by these frequently-used optimization techniques, instead of just looking at the learning curves.
This paper introduces mathematical tools of polyhedral computation into linear region analysis, and systematically compares various properties of the linear regions after DNNs being trained with different optimization techniques (BN, dropout).
Though the models have similar classiﬁcation accuracies, we do observe signiﬁcant differences among their linear regions:
BN can help DNNs partition the input space into smaller linear regions, whereas dropout helps around the decision boundaries.
BN can make the norm directions of the hyperplanes orthogonal, whereas dropout the opposite.
Dropout makes regions in which data points lie less likely to contain the decision boundaries.
The gradient information of a linear region has high relevance to its surrounding regions; however, BN slightly reduces the relevance.
It should be noted that our approach can also be applied to analyzing the preferences introduced by other optimization techniques, such as different initialization approaches (Glorot & Bengio, 2010;
He et al., 2015), different optimizers (Duchi et al., 2011; Kingma & Ba, 2014), some widely-used operators like skip-connection (He et al., 2016), and even different hyperparameters.
Since training deep learning models is related to the complex interaction among the training dynamics, data manifold and model architectures, we believe it is better to decouple it into two subtasks: 1) ﬁgure out what kinds of linear regions can best approximate the data manifold ; and, 2) design optimization techniques to achieve such linear regions .
Our work provides tools to analyze the linear regions, which helps study both subtasks.
The remainder of the paper is organized as follows: Section 2 presents the details of the linear regions of DNNs with ReLU activation.
Section 3 shows how BN and dropout inﬂuence the linear regions.
Section 4 draws conclusions.
L INEAR R EGIONS
This section describes the detailed approach 1 for searching for the linear regions of a given input, and introduces some basic concepts of convex polytopes.
2. S EARCH FOR THE L INEAR R EGIONS
A linear region is the intersection of a ﬁnite number of halfspaces.
Therefore, to search for the linear region in which a given input point lies, we only need to search for its corresponding halfspaces, which are determined by the activation state of the DNN.
Let’s consider a vanilla fully-connected DNN with L hidden layers and ReLU activation.
Mathematically, let x ∈ R
d
denote the d -dimensional vectorized input, h l ( x ) the pre-activation outputs of the l -th hidden layer with n l nodes ( l = 1 , 2 , ..., L ), z ( x ) the logits of the output layer, and M the number of classes.
Given an input example x ∗ , because of the one-to-one correspondence relationship between a linear region and an activation state, its corresponding linear region is a set of inputs which lead to the same activation state of the DNN.
Let S l denote a set of the inputs whose activation states of the ﬁrst l hidden layers are the same as those of x ∗ .
Obviously, S l +1 ⊆
S l .
Consider the ﬁrst layer.
Since h 1 : R d → R n 1 is simply an afﬁne transform of x , according to the activation state, S 1 can be written as:
[Equation]
where
[Equation]
Next, we select the points from S 1 to construct S 2 , which activate the same nodes of the second layer as x ∗ does.
Recall that the points in S 1 lead to the same activation state of the ﬁrst layer, hence h 2 : S 1 → R n 2 is also an afﬁne transform of x .
Therefore, S 2 can be constructed by adding linear inequality constraints to S 1 , in the same way as (1).
Due to the linearity of h l : S l − 1 → R n l (where
S
= R d ) for all l , this procedure can be repeated till the last hidden layer.
The detailed deduction is presented in Appendix B, and the depth-wise exclusion process to search for a linear region of x ∗ is illustrated in Figure 2.
Let C
[Equation]
=
[Equation]
[Equation]
be the set of parameters of all the linear inequality constraints.
Then
S L , which is the linear region that x ∗ lies in, can be represented as the intersection of ∑ Ll =1 n l halfspaces:
[Equation]
where the DNN is a locally linear model, as z : S L → R M is an afﬁne transform of x .
Though we mainly discuss the standard fully-connected DNNs, the form to describe a linear region can be extended to other situations with little modiﬁcation.
For instance, BN is just a reparameterization of the weights, a convolutional neural network (CNN) can be viewed as a sparse fully-connected
DNN, and max-pooling is simply adding more linear inequalities to identify the maximum.
2. C ONVEX P OLYTOPES
A linear region can be represented as the set of solutions to a ﬁnite set of linear inequalities in (4), which is exactly the H-representation of a convex polyhedron.
With the natural bounds of the input value, these linear regions are convex polytopes 2 .
We omit the word convex in the rest of the paper to avoid repetition.
A polytope can also be represented as a convex hull of a ﬁnite set of points, which is known as the V-representation .
Different representations may lead to different complexities when dealing with the same problem; nevertheless, it is challenging to convert one representation into the other ( Toth et al., 2017).
As the dimensionality increases, it is even harder to calculate the number of vertices/facets with a single H-/V- representation ( Linial, 1986), or to verify the equivalence between an H-representation and a V-representation (Freund & Orlin, 1985).
More information about polyhedral computation can be found here 3 .
It should be noted that convex optimization is capable of probing the properties of the linear regions, because H-representation is a natural description of a convex feasible region, and a DNN’s behavior is completely linear in this feasible region.
P ROPERTIES OF THE L INEAR R EGIONS
This section presents various properties of the linear regions of DNNs, which were trained using different optimization settings.
3. M ODELS
We used a fully-connected DNN as our vanilla model, which consisted of three hidden layers with 1,024 rectiﬁed linear nodes in each.
The BN model was the vanilla model with BN added after the pre-activations of each hidden layer, and the dropout model added dropout after the activations.
We trained our models on the vectorized MNIST dataset, which were rescaled to [ − 1 , 1] .
All models were trained using Adam optimizer (Kingma & Ba, 2014) with the default setting ( β 1 = 0 .
9 , β 2 = 0 .
but different learning rates (1e-3 and 1e-4), and the batch size was 256.
We used the
Xavier uniform initializer for weight initialization, with biases set to zero (Glorot & Bengio, 2010).
Early stopping was used to reduce overﬁtting.
The classiﬁcation accuracies are shown in Table 1.
Since it is unlikely to explore the inﬂuence of all optimization settings, this paper emphasizes two optimization techniques, i.e., BN and dropout, and compares the inﬂuence of different learning rates.
[Table]
As shown in Section 2, the number of constraints in (4) equals the number of hidden nodes; hence, it is hard to handle the constraints as the scale of DNN increases, such as removing the redundant inequalities.
In our experiments, the number of constraints was 1 , 024 × 3 = 3 , 072 .
In addition to the natural bounds for the 28 × 28 = 784 pixel values (MIN x ≤ x ≤ MAX x ), each linear region is deﬁned by 3 , 072 + 784 × 2 = 4 , 640 linear inequalities.
Our analysis of CNNs trained on the CIFAR-10 dataset is presented in Appendix E.
3. T HE I NSPHERES
We ﬁrst probed the inspheres of the linear regions, which are highly related to the expressivity of a DNN.
Though we cannot make a deﬁnite statement that a small insphere always leads to a small linear region, it does indicate a region’s narrowness.
The insphere of a polytope can be found by solving the following convex optimization problem:
[Equation]
where x is the center of the insphere, r the inradius, and C ∗ the set of parameters of S L deﬁned in (4).
The main idea of the optimization is to ﬁnd a point in a polytope, whose distance to the nearest facet is the largest.
As shown in Figure 1, linear regions vary according to their closeness to the decision boundaries, hence we studied the inspheres of three different categories of regions 4 , which are deﬁned as follows:
Manifold region: The region in which the test points lie.
Decision region: The region which contains the normal decision boundaries .
We deﬁne a normal decision boundary as the classiﬁcation boundary between one test point and the mean point of another class.
When we test our models, the mean point of a class is classiﬁed into the same class for the MNIST dataset.
Adversarial region: The region which contains the adversarial decision boundaries .
We deﬁne the adversarial decision boundary as the classiﬁcation boundary between a test point and its adversarial example.
The adversarial examples were generated by the projected gradient descent (PGD) method (Madry et al
Linear interpolation was used to search for regions which contain the decision boundaries.
Let x test denote the test point, and x target the adversarial point or the mean point of another class.
We searched for the maximum α ∈ [0 , 1] which causes x (cid:11)
=
α · x target +(1 − α ) · x test to be classiﬁed into the same class as x test , and the region in which x (cid:11) lies contains the decision boundaries.
As shown in Figure 3, different optimization settings introduce signiﬁcantly different inradius distributions.
Compared with the vanilla models, BN leads to the smallest inradiuses of the linear regions, whereas dropout, as shown in the second column of Figure 3, makes the decision regions narrower.
It also shows that the inradius distributions of the adversarial regions are more similar to those of the manifold regions, which demonstrates the fundamental differences between the adversarial and the normal decision boundaries.
Comparing the two rows in Figure 3, we can observe that a larger learning rate increases the variance of the distributions.
However, BN seems to make the inradius distribution less sensitive to the learning rate, which is consistent with the observations in Bjorck et al.
(2018) that BN enables training with larger learning rates.
Comparing the ﬁrst two columns of Figure 3, we can also ﬁnd that the decision regions are usually narrower than the manifold regions, which was also observed by Novak et al.
(2018) that on-manifold regions are larger than off-manifold regions.
It is reasonable because decision boundary curves need more sophisticated approximation.
3. D IRECTIONS OF THE H YPERPLANES
Another observation is that BN makes the directions of the hyperplanes of a linear region orthogonal, whereas dropout the opposite.
Since it is time-consuming to eliminate the redundant hyperplanes, as explained in Appendix C, we calculated the angles using all hyperplanes.
The direction w of a hyperplane is pointing to the interior of the linear region, because all constraints are in the form of w T x + b ≥ 0 .
Figure 4 shows the angles between directions of every two different hyperplanes of a manifold region.
The directions of the hyperplanes become more consistent as the layer goes deeper.
Dropout and large learning rates amplify this trend, whereas BN makes the directions more orthogonal.
Though we only present one example here, the patterns can be observed for almost all manifold regions.
As shown in (2), the direction w is actually the gradient of the corresponding hidden node with respect to the input, hence the angle between the directions can be viewed as the correlation between the gradients.
However, it should be noted that the shattered gradients problem (Balduzzi et al., 2017) cannot explain the decorrelation characteristics of BN, though they look similar.
The shattered gradients problem studies the correlation between the gradients with respect to different inputs, whereas our observation is about the gradients of different hidden nodes with respect to a ﬁxed input.
We also observed an interesting phenomenon: the orthogonality of the weights vanished during training.
We tried to explicitly decorrelate the directions at initialization by introducing an orthogonal initializer ( Saxe et al., 2014), but the orthogonality was still broken after training.
It is interesting to see if the properties of initialization can be preserved in training, which is one of our future research directions.
3. D ECISION B OUNDARIES IN A M ANIFOLD R EGION
Adversarial examples are benign inputs with imperceptible perturbations, which can dramatically degrade the performance of a machine learning model (Biggio et al., 2013; Szegedy et al., 2014).
Adversarial attacks aim to push a benign input across the nearest decision boundary (Szegedy et al., 2014; Goodfellow et al., 2015; Moosavi-Dezfooli et al., 2016; Carlini & Wagner, 2017), hence it is important to study the decision boundaries in a manifold region.
The most important question we may ask is: Do decision boundaries exist in a manifold region?
To address this question, we seek the point x ∈ S L which has the maximum probability to be classiﬁed as Class t ∈ { 1 , 2 , ..., M } , by solving the following optimization problem:
[Equation]
where M is the number of classes, and z j ( x ) the j -th entry of the logits z ( x ) .
When x satisﬁes the constraints, i.e., x ∈ S L , z : S L → R M is an afﬁne function of x , hence
z j ( x ) can be rewritten as:
[Equation]
which implies that the optimization objective in (6) is concave.
The classiﬁcation region of Class t exists in S L if and only if x t is classiﬁed into Class t .
x t lies on the faces of the polytope in most cases, as shown in Appendix D. Since computing the volume of a polytope given by only the V-/H- representation is known as a #P-hard problem (Dyer & Frieze, 1988), the distance between x t and the original test point x ∗ , called distortion in this paper, is used to informally measure the size of a linear region:
[Equation]
We randomly selected 1000 test points to search for the classiﬁcation regions in their manifold regions.
The average number of classiﬁcation regions and the average distortions are shown in
Table 2.
The results show that a manifold region may contain several classiﬁcation regions, which contradicts the conjecture in Hanin & Rolnick (2019) that two points falling into the same linear region are unlikely to be classiﬁed differently.
We can also ﬁnd that training with a large learning rate, using dropout or BN can make the manifold regions less likely to contain decision boundaries.
However, this is not the case for BN in CNNs (see Appendix E for more information).
In addition,
BN can signiﬁcantly decrease the distortion of x t , which implies a smaller size of the linear regions.
Figure 5 shows a speciﬁc example of x t generated from models trained with different optimization techniques, which also demonstrates our observation.
[Table]
Probing boundaries from linear region perspective can bring many potential advantages for analysis.
Due to the linearity of the manifold regions, high-order adversaries are not guaranteed to be better than ﬁrst-order ones.
Besides, adding random noise may help generate adversarial examples since more linear regions can be included during searching, which may explain why PGD with random restarts is a powerful adversarial attack approach (Madry et al., 2018).
3. R ELEVANCE OF THE S URROUNDING R EGIONS
The expressivity of a DNN depends on the number of the linear regions, but it makes optimization challenging when the gradient information of the surrounding regions has little relevance.
Given an example x ∗ , we try to ﬁnd an x from a different region, with x − x ∗ parallel to all the decision boundaries of the region in which x ∗ lies, i.e., orthogonal to the directions of the decision boundaries.
Then we compare the gradient information between x and x ∗ .
As the classiﬁcation result of x is equal to arg max j = { 1 ; 2 ;:::;M } z j ( x ) , the directions of the decision boundaries can be written in the following form:
[Equation]
Therefore, to satisfy the orthogonality, we can sample an L 2 -normalized direction e from the nullspace of the matrix A =
[ ∇ x z 1 ( x ∗ ) , ∇ x z 2 ( x ∗ ) , ..., ∇ x z M ( x ∗ )] :
[Equation]
and then x can be written as:
[Equation]
so that
[Equation]
Our experiments were performed on 1000 randomly selected test points.
For each test point x ∗ , we randomly sampled 100 L 2 -normalized direction e ∈ N ( A ) .
As β varied from 0 to ϵ , x may belong to different regions.
We searched for the linear regions along these directions ( ϵ = 0 . 2 ) and counted the number of unique linear regions.
As shown in Figure 6(a), models using BN or trained with a smaller learning rate can usually partition the input space into more linear regions.
[Figure]
Next, we checked the relevance of these unique surrounding regions.
First, we chose an x = x ∗ + β e from each unique linear region and calculated g ( x ) as its decision direction:
[Equation]
13) where k 1 and k 2 are the indices of the two largest elements of logits.
We calculated the cosine similarity ρ =
[Equation]
) ∥ to measure the relevance of different linear regions.
As illustrated in
Figures 6(b) and 6(c), a linear region has high relevance to its surrounding regions, which demonstrates the linearity of DNNs.
It also shows that BN slightly reduces the relevance.
However, it was found that this relevance decreases rapidly with the depth of the DNN, resulting in gradients that resemble the white noise, which is known as the shattered gradients problem (Balduzzi et al., 2017).
The low relevance also makes it hard to perform adversarial attacks because of the limited information of the local gradients (Athalye et al., 2018).
D ISCUSSIONS AND C ONCLUSIONS
This paper proposes novel tools to analyze the linear regions of DNNs.
We explored the linear regions of models trained with different optimization settings, and observed signiﬁcant differences of their inspheres, directions of the hyperplanes, decision boundaries, and relevance of the surrounding regions.
Our empirical observations illustrated that different optimization techniques may introduce different properties of the linear regions, even though they have similar classiﬁcation accuracies.
This phenomenon indicates that a more meticulous perspective is needed to study the behaviors of
DNNs.
For DNNs with smooth nonlinear activations, it is still an open problem to deﬁne their linear regions with soft transition boundaries.
One way to address the problem is to approximate the activation function by a piecewise linear function, in which case our approaches can directly be utilized to analyze the linear regions.
By choosing a local linearity measure, like the one proposed by Qin et al.
(2019), a soft linear region may also be precisely described by a set of inequalities, which require that the local linearity of each neuron is larger than a certain threshold.
However, our approaches cannot be applied to these linear regions since their convexity is not guaranteed.
Our future research will reduce the high computational cost of our approach when applied to deeper and larger DNNs, and formulate a theoretical framework to explain why different optimization techniques can result in different properties of the linear regions.
Eventually, we will try to answer the following questions:
• What is the relationship between the properties of linear regions and the behaviors of a DNN?
• What kinds of linear regions can best approximate the data manifold?
• How to design novel optimization techniques to achieve such linear regions?
A CKNOWLEDGMENTS
This research was supported by the National Natural Science Foundation of China under Grant 61873321 and Hubei Technology Innovation Platform under Grant 2019AEA171.
The authors would like to thank Guang-He Lee from MIT for pointing out the connection of our paper to theirs.
A I LLUSTRATION ON A T OY D ATASET
Figure 1 shows a two-dimensional slice of a high-dimensional input space, which may not be convincing enough to describe the properties of linear regions through the entire input space.
To address the problem, we trained three models (vanilla, BN, dropout) on a two-dimensional toy dataset to see if the properties still remain.
Figure 7 visualizes the toy dataset we constructed, which consists of two separate spirals, representing two different classes.
The vanilla model used here was a fully-connected DNN which consisted of three hidden layers with 10 rectiﬁed linear nodes in each.
The BN model was the vanilla model with BN added after the pre-activations of each hidden layer, and the dropout model added dropout after the activations (the drop rate was 0.2).
The models were trained with Adam optimizer (LR=1e3, β 1 =0.9, β 2 =0.999).
[Figure]
The test accuracies for the three models were all 100%.
Figure 8 plots linear regions and classiﬁcation regions in the input space, illustrating the same properties as Figure 1 shows.
B C ALCULATE P ARAMETERS OF THE I NEQUALITIES
As mentioned in Section 2.1, the ﬁrst l − 1 hidden layers serve as an afﬁne transformation of x ∈ S l − 1 .
Besides, the pre-activation outputs of the l -th hidden layer h l ( x ) are also an afﬁne transformation of the activation outputs of the ( l − 1) -th layer, hence h l ( x ) is a linear function of x ∈ S l − 1 , which means h ln ( x ) =
w Tn x + b n , where n denotes a node of the l -th layer.
So, we have:
[Equation] [Equation]
[Equation]
Recall that according to the deﬁnition of S l − 1 , x ∗ shares the same linear function as other x ∈ S l − 1 , therefore we have:
[Equation]
[Equation]
Then we should select x from S l − 1 to construct S l , which means x satisﬁes sgn ( h ln ( x ∗ ))
h ln ( x ) ≥ 0 , i.e., x has the same activation state of Node n as x ∗ .
For convenience, w n and b n are directly multiplied by sgn ( h ln ( x ∗ )) to obtain the form in (4).
C R EMOVE R EDUNDANT I NEQUALITIES
Every constraint in S L represents a halfspace, but some of them are redundant, i.e., they are completely overrode by others.
To eliminate the redundant constraints, we need to successively solve the following linear programming problem for each untested constraint and sequentially remove the redundant constraint from C ∗ :
[Equation]
[Equation]
The constraint w Tk x + b k ≥ 0 is redundant if and only if y ≥ 0 .
Note that each and every constraint needs to be tested sequentially, resulting in very heavy computational cost when dealing with thousands of constraints.
D x t L IES ON THE F ACES OF THE L INEAR R EGION IN M OST C ASES
Proposition 1 x t deﬁned in Section 3.4 lies on the faces of its linear region in most cases.
Proof Let M denote the number of classes, x ∗ ∈ R
d
a given point lying in the bounded linear region S , ∂S the faces of S .
Recall that the function ﬁtted in a linear region is completely linear, hence the j -th logit
z
j
( x ) can be rewritten as:
[Equation]
As deﬁned in (6), let p t ( x ) =
exp( w Tt x + b t )
∑ j
[Equation]
( w Tj x + b j ) , then x t = arg max x ∈ S log p t ( x ) .
If x t ∈ S \ ∂S , x t must be a maximum, which means:
[Equation]
Therefore, w
[Equation]
Recall that w i ∈ R d and d ≫ M , hence in most cases { w i } Mi =1 are linear independent, which means w t cannot be represented as the linear combination of { w i ̸
= t } Mi =1 .
Since 0 < p t ( x t ) < 1 , there is no { p i ( x t ) } M i =1 satisfying (21).
Therefore, x t ∈ ∂S .
E E XPERIMENTS ON THE CIFAR-10 D ATASET
We also analyzed simple CNN models trained on the CIFAR-10 dataset.
The results are presented in this Appendix.
E. M ODELS
The base architecture of the CNN models is shown in Table 3.
To simplify the analysis, the convolutional layers were not padded, and large strides were used to replace the max-pooling layers.
For the BN model, BN was added before ReLU activations.
For the dropout model, dropout layers were added after ReLU activations.
[Table]
The models were trained with Adam optimizer (learning rate 1e-3, β 1 =0.9, β 2 =0.999) on the CIFAR10 dataset without data augumentation.
The pixel values were rescaled to [-1, 1].
The batch size was 256, and early stopping was used to reduce overﬁtting.
After training, the accuracies on the test set of the vanilla, BN and dropout models were 68.2%, 70.1% and 69.2%, respectively.
Since the goal of this paper is to show that different optimization techniques can result in models with similar classiﬁcation accuracies but signiﬁcantly different linear regions, we only trained our models with one learning rate (1e-3), because other learning rates (1e-2, 1e-4) led to models with signiﬁcantly different classiﬁcation accuracies.
E. P ROPERTIES
As we have claimed in Section 2, a CNN model can be regarded as a highly sparse fully-connected
DNN, which means we can analyze the properties of its linear regions in the same way.
However, a convolutional layer may introduce some other properties into the linear regions.
For example, considering the sparsity of the weights, a node of a convolutional layer can only partition a subspace into linear regions (instead of the whole input space, like a node in fully-connected DNNs does).
Therefore, the partition of the linear regions are relatively independent for the nodes in a CNN, as most subspaces do not intersect.
A direct consequence of their independency is that the properties of the linear regions in a CNN are more stable than those in a fully-connected DNN, which will be shown in the following experiments.
We randomly selected 1000 test points to perform the analysis.
The inspheres of the linear regions in the CNNs are shown in Figure 9.
Compared with the MNIST dataset, the CIFAR-10 dataset is more complicated and the mean point of a class is no longer classiﬁed into the same class, hence we randomly sampled a point from another class to replace the mean point described in Sectionwhen constructing the decision regions.
The experimental results show that both BN and dropout can narrow the linear regions.
For dropout, the effect is more obvious on the decision boundaries than on the manifold regions.
Figure 10 shows the angles between different hyperplanes of a linear region.
According to the architecture of the models, the ﬁrst 15 × 15 × 32 + 7 × 7 × 64 + 3 × 3 × 128 = 11 , 488 hyperplanes were provided by the convolutional layers, and the last 1 , 024 by the fully-connected hidden layer.
Since a node in a convolutional layer only partitions a certain subspace into regions, most of the pixel values are 0 in Figure 10 because there is no intersection between two subspaces.
However, we can still observe that BN can orthogonalize the directions of the hyperplanes, whereas dropout the opposite.
[Figure]
[Figure] [Figure]
Decision boundaries in the manifold regions of the CNNs seem less likely to be eliminated, compared with the fully-connected DNNs.
As shown in Table 4, dropout can eliminate the decision boundaries in the manifold regions of CNNs, but BN did not work anymore.
However, according to the distortions of the three models, BN still showed its ability to reduce the size of the manifold regions.
Figure 11 shows a speciﬁc example of x t , whose original point was classiﬁed as automobile .
x t of the BN model had smaller distortion, which was also observed in fully-connected DNNs.
[Table]
The numbers of unique surrounding regions of a manifold region are shown in Figure 12(a).
Though
BN showed its strength in increasing the number of the linear regions, the effect was less obvious compared with those in Figure 6(a) for fully-connected DNNs.
As we have pointed out before, the sparsity of the weights in the convolutional layers contributes to the stability of the properties of the linear regions.
The relevance of the surrounding regions shown in Figure 12(b) was similar to fully-connected DNNs.
BN still shattered the decision directions, as well as dropout, which was slightly different from the results for fully-connected DNNs.
[Figure]