U NDERSTANDING A RCHITECTURES L EARNT BY C ELL - BASED N EURAL A RCHITECTURE S EARCH
Anonymous authors
Paper under double-blind review
A BSTRACT
Neural architecture search (NAS) searches architectures automatically for given tasks, e.g., image classiﬁcation and language modeling.
Improving the search efﬁciency and effectiveness have attracted increasing attention in recent years.
However few efforts have been devoted to understanding the generated architectures.
In this paper we ﬁrst reveal that the popular NAS algorithms (i.e., DARTS, ENAS) tend to select architectures with wide and shallow cells.
We empirically and theoretically show that the architectures with wide and shallow cells enjoy smoother loss landscape and more accurate gradient information.
As a consequence, these architectures converge faster and therefore are selected by NAS algorithms.
Nonetheless, empirical results reveal that these selected architectures may not necessarily lead to a better generalization performance compared with other candidate architectures in the same search space and therefore further improvement is possible by revising existing NAS algorithms.
I NTRODUCTION
Over the past decades, various neural network architectures (Krizhevsky et al., 2012; Simonyan &
Zisserman, 2015; He et al., 2016; Huang et al., 2017) have been proposed, achieving superhuman performance for a wide range of tasks.
Designing these neural networks typically takes substantial efforts from domain experts by trial and error.
Recently, there is a growing interest in neural architecture search (NAS), which automatically searches for high-performance architectures for the given task.
The searched NAS architectures (Zoph et al., 2018; Real et al., 2018;
Pham et al., 2018; Liu et al., 2018; Xie et al., 2018; Luo et al., 2018; Cai et al., 2019; Akimoto et al., 2019; Nayman et al., 2019) have outperformed best expert-designed architectures on many computer vision and natural language processing tasks.
Mainstream NAS algorithms typically search for the connection topology and transforming operation accompanying each connection from a predeﬁned search space.
Tremendous efforts have been exerted to develop efﬁcient and effective NAS algorithms (Liu et al., 2018; Xie et al., 2018;
Luo et al., 2018; Akimoto et al., 2019; Nayman et al., 2019).
However, less attention has been paid to these searched architectures for further insight.
To our best knowledge, there is no related work in the literature examining whether these NAS architectures share any pattern, and why the pattern matters for the architecture search.
The two questions are fundamental to understand and improve existing NAS algorithms.
In this paper, we endeavor to address the questions by examining the popular NAS architectures 1 .
The recent work (Xie et al., 2019) shows that the architectures with random connection topologies can achieve competitive performance on various datasets.
Inspired by this result, we examine the connection topologies of the architectures generated by popular NAS algorithms.
In particular, we ﬁnd a connection pattern of the popular NAS architectures that these architectures favor wide and shallow cells, where the majority of intermediate nodes are connected to the input nodes.
To appreciate this particular connection pattern, we ﬁrst visualize the training process of the popular
NAS architectures and their randomly connected variants.
Faster and more stable convergence is observed for the architectures with wide and shallow cells, leading to the selection of these architectures during the search.
We further empirically and theoretically show that the popular wider and shallower architectures consistently enjoy a smoother loss landscape and smaller gradient variance than their random variants, which explains the better convergence behavior and thus the selection of these NAS architectures.
We ﬁnally evaluate the generalization performance of the popular NAS architectures.
Although the architectures with wide and shallow cells consistently converge faster, they may not generalize better than other candidate architectures.
We therefore believe that re-thinking NAS from the perspective of the true generalization performance rather than the convergence of candidate architectures should potentially help obtain signiﬁcantly better architectures.
R ELATED W ORKS
Neural Architecture Search Neural architecture search (NAS) searches for best-performing architectures automatically for a given task.
It has received increasing attention in recent years due to its outstanding performance and the demand for automated machine learning (AutoML).
There are three major components in NAS as summarized by Elsken et al.
namely search space, search policy (or strategy, algorithm), and performance evaluation (or estimation).
The prior knowledge extracted from expert-designed architectures is exploited to deﬁne the search space.
Different search policies are proposed to improve the search effectiveness (Zoph et al., 2018;
Real et al., 2018;
Pham et al., 2018;
Cai et al., 2019) and the search efﬁciency (Liu et al., 2018; Xie et al., 2018;
Luo et al., 2018; Nayman et al., 2019; Akimoto et al., 2019).
Some search policies (Tan et al., 2018) also consider the inference time of the generated architectures.
However, few efforts have been devoted to understanding the best architectures generated by various NAS approaches.
Detailed analysis of these architectures could give further insights into what the NAS algorithms are learning and why they prefer these speciﬁc architectures.
Evaluation of NAS algorithms
Recent works evaluate NAS algorithms by comparing them with random search methods.
Li & Talwalkar (2019) and Sciuto et al.
(2019) compare the general- ization performance of architectures generated from random search and existing NAS algorithms
Interestingly, the random search can ﬁnd architectures with comparable or even better generalization performance.
Sciuto et al.
(2019) empirically show that the ineffectiveness of some NAS algorithms (Pham et al., 2018) could be the consequence of the weight sharing mechanism during architecture search.
Xie et al.
(2019) generate several architectures with random connections and identical operations, which achieves compelling performance on various tasks.
While these evaluations on NAS algorithms help understand their disadvantages, what NAS algorithms are learning and why they learn these speciﬁc architectures are still not well understood.
T HE C ONNECTION P ATTERN OF P OPULAR NAS C ELLS
Mainstream NAS algorithms (Zoph et al., 2018; Real et al., 2018;
Pham et al., 2018; Liu et al., 2018;
Xie et al., 2018;
Luo et al., 2018) typically search for the cell structure, including the connection topology and the corresponding operation (transformation) coupling each connection.
The generated cell is then replicated to construct the entire neural network.
We therefore mainly focus on the study of these cell-based NAS architectures.
In this section, we ﬁrst introduce the commonly adopted cell representation, which is useful to understand the connection and computation in a cell space.
We then sketch the connection topologies of popular cell-based NAS architectures to investigate their connection patterns.
By the comparison, we reveal that there is a common connection pattern among cells learned by different NAS algorithms, that is those cells tend to be wide and shallow.
3. C ELL R EPRESENTATION
Following DARTS (Liu et al., 2018), we represent the cell topology as a directed acyclic graph (DAG) consisting of N nodes, including M input nodes, one output node and ( N − M − 1) intermediate nodes.
Each node forms a latent representation of the input instance.
The input nodes are the outputs from M preceding cells.
And the output node aggregates (e.g., concatenate) the representations from all intermediate nodes.
Moreover, each intermediate node is connected to M
[Figure]
[Figure]
increasing and decreasing respectively from left to right.
Namely, the original DARTS cell C darts is the widest and shallowest one among these cells.
proceeding nodes in the same cell.
Each connection transforms the representation from a node via an operation from a predeﬁned operation set, including 3 × 3 convolution, 3 × 3 max pooling, etc.
The target of NAS algorithm is to search for the best M source nodes that each intermediate node is connected to and the operation coupling each connection.
In the literature, this searched cell is then replicated by L times to build the entire neural network architecture 2 .
We abuse the notation C to denote a cell and the neural network architecture built with the cell in the following sections.
Besides, we shall use C A to denote the best architecture (or cell) searched from the NAS algorithm A (i.e., DARTS (Liu et al., 2018), ENAS (Pham et al., 2018), etc.).
The details on how to build the entire architectures with given cells are described in Appendix A.3.
3. T HE C OMMON C ONNECTION P ATTERN
Recently, Xie et al.
(2019) have shown that neural networks constructed by cells with random connections can achieve compelling performance on multiple tasks.
Taking this step further, we wonder whether the popular NAS cells share any common connection patterns, which may explain why these cells are chosen during the architecture search.
To investigate the connection patterns, we sketch the topologies of the popular NAS cells by omitting the coupling operations.
Figure 1 illustrates the topologies of 5 popular NAS cells 3 .
To examine the connection pattern precisely, we introduce the concept of the depth and the width for a cell.
The depth of a cell is deﬁned as the number of connections on the longest path from input nodes to the output node.
The width of a cell is deﬁned as the summation of the width of the intermediate nodes that are directly connected to the input nodes.
Speciﬁcally, if some intermediate nodes are partially connected to input nodes
(i.e., have connections to other intermediate nodes), their width within the cell is deducted by the percentages of the intermediate nodes that they are connected to.
The width of a node is the number of channels if it is the output from a convolution operation; if the node is the output of the linear operation, its width is the dimension of the features.
Supposing the width of each intermediate node is c , as shown in Figure 1, the width and depth of the DARTS (Liu et al., 2018) cell are 3 . 5 c and 3 respectively, and the width and depth of the AmoebaNet (Real et al., 2018) cell are 4 c andcorrespondingly.
Following the above deﬁnitions, the smallest depth and largest width for a 7-node cell with 2-node inputs are 2 and 4 c respectively.
Similarly, for an 8-node with the same setting, the smallest depth and largest width of a cell are 2 and 5 c respectively.
In Figure 1, we can observe that cells from popular NAS architectures tend to be widest and shallowest (with width close to 4 c/ 5 c and depth close to 2 ) among all candidate cells in the same search space.
Taking it as the common connection pattern, we achieve the following observation:
Observation 3.1 (The Common Connection Pattern) NAS architectures generated by popular
NAS algorithms tend to have the widest and shallowest cells among all candidate cells in the same search space.
T HE I MPACTS OF C ELL W IDTH AND D EPTH ON O PTIMIZATION
Given that popular NAS cells share the common connection pattern, we then explore the impacts of this common connection pattern from the optimization perspective to answer the question: why the wide and shallow cells are selected during architecture search?
We sample and train variants of popular NAS architectures with random connections.
Comparing randomly connected variants and the popular NAS architectures, we ﬁnd that architectures with wider and shallower cells indeed converge faster so as to be chosen by NAS algorithms (in Section 4.1).
To understand why the wider and shallower cell contributes to faster convergence, we further investigate the loss landscape and gradient variance of popular NAS architectures and their variants via both empirical experiments (in Section 4.2) and theoretical analysis (in Section 4.3).
4. C ONVERGENCE
Popular NAS algorithms conventionally evaluate the performance of a candidate architecture prematurely without waiting for fully converged model parameters during the search.
For instance,
DARTS (Liu et al., 2018), SNAS (Xie et al., 2018) and ENAS (Pham et al., 2018) optimize hyperparameters of architectures and model parameters concurrently.
The training time of each candidate architecture therefore is short, which is far from the requirement for full convergence.
Meanwhile,
AmoebaNet (Real et al., 2018) obtains the performance of candidate architectures trained with only a few epochs.
In other words, these candidate architectures are not compared based on their generalization performance at convergence.
Consequently, architectures with faster convergence rates are more likely to be selected because their validation performance is higher, given the same number of training epochs.
We therefore achieve the hypothesis that the popular NAS architectures have a faster convergence than other candidate architectures, which shall explain why there are selected during the search.
To validate the hypothesis above, we compare the convergence of original NAS architectures and their variants with random connections via empirical studies.
We ﬁrst sample variants of popular NAS cells following the sampling method in Appendix A.2.
Then, we train original NAS architectures and their random variants on CIFAR-10 and CIFAR-100 following the training details in Appendix A.3.
During training, we evaluate the testing loss and accuracy of these architectures.
Since the convergence is also related to the optimization settings, we also evaluate their convergence performance under different learning rates.
Take DARTS (Liu et al., 2018) for example, Figure 2 shows the connection topology of the original
DARTS cell and its random variants.
Figure 3 reports the test loss and accuracy curves of these architectures during training.
As illustrated in Figure 3, the original cell C darts , known as the widest and shallowest cell, has the fastest and most stable convergence compared with its variants.
Furthermore, with increasing width and decreasing depth of a cell (from C 1 to C 4 ), the convergence of [Figure]
[Figure] random variants becomes faster. The results of other popular NAS architectures and their randomly connected variants are reported in Appendix B.2.
Figure 4 further validates the difference of convergence under different learning rates.
The original cell C darts enjoys the fastest and the most stable convergence among these cells under various learning rate.
The difference in terms of convergence rate and stability is more obvious between C darts and its variants with a larger learning rate as shown in Figure 4.
Interestingly, C dartscompletely fail to converge on both CIFAR-10 and CIFAR-100 with a larger learning rate of 0.25.
While there is only minor difference among these cells with a smaller learning rate of 0.0025, we still ﬁnd that there is a decreasing performance of convergence (i.e., convergence rate and stability) from C darts , C dartsto C darts.
Overall, the observations are consistent with the results in Figure 3.
We have also compared the convergence of popular NAS architectures and their random variants of operations. Similarly, we sample and train the random variants of operations for popular NAS architectures following the details in Appendix A.2 and Appendix A.3. Figure 5 illustrates the convergence of these architectures.
Surprisingly, with the same connection topologies as the popular NAS cells but distinguished operations, all random variants achieve nearly the same convergence as these popular NAS architectures.
Consistent results can be found in Figure 12 of Appendix B.2. We therefore believe that the types of operations have limited impacts on the convergence of NAS architectures and the connection topologies affect their convergence more signiﬁcantly. Combining with all these observations, we conclude that the popular NAS architectures with wider and shallower cells indeed converge faster and more stably, which explains why these popular NAS cells are selected during architecture search.
The next question is then why the wider and shallower cell leads to a faster and more stable convergence?
4. E MPIRICAL S TUDY OF F ACTORS A FFECTING C ONVERGENCE
Since wide and shallow cell is related to fast convergence, we refer to the theoretical convergence analysis to investigate the cause of fast convergence.
In this section, we ﬁrst introduce the convergence analysis (i.e., Theorem 4.1) of non-convex optimization with the randomized stochastic gradient method (Ghadimi & Lan, 2013).
Based on the analysis, we introduce the possible factors [Figure] related to the common connection pattern that may affect the convergence.
We then examine these factors empirically in the following subsections.
Theorem 4.1 (Ghadimi & Lan, 2013) Let f be L -smooth and non-convex function, and let f ∗ be the minimal.
Given repeated, independent accesses to stochastic gradients with variance bound σfor f ( w ) , SGD with initial w 0 , total iterations N > 0 and learning rate γ k < 1 L achieves the following convergence by randomly choosing w k as the ﬁnal output w R with probability γ k H where
[Equation] [Equation]
In this paper, f and w denote the objective (loss) function and model parameters respectively.
Based on the theorem, Lipschitz smoothness L and gradient variance σ 2 signiﬁcantly affect the convergence, including the rate and the stability of convergence.
Particularly, given a speciﬁc number of iterations, a smaller Lipschitz constant L or smaller gradient variance σ 2 would lead to a smaller convergence error and less damped oscillations, which indicates a faster and more stable convergence.
Since the Lipschitz constant L and gradient variance σ 2 are highly related to the objective function, various NAS architectures result in different L and σ 2 .
In the following subsections, we therefore conduct both empirical and theoretical analysis for the impacts of the cell with and depth on the Lipschitz smoothness and gradient variance.
4.2. L OSS L ANDSCAPE
The constant L of Lipschitz smoothness is closely correlated with the Hessian matrix of the objective function as shown by Nesterov (2004), which requires substantial computation and can only represent the global smoothness.
The loss contour, which has been widely adopted to visualize the loss landscape of neural networks by Goodfellow & Vinyals (2015); Li et al.
(2018), is instead computationally efﬁcient and is able to report the local smoothness of the objective function.
We therefore extend the method in Li et al.
(2018) to plot the loss contour of function s ( α, β ) =
E i ∼ P [ f i ( w ∗
+ α w 1 + β w 2 )] to explore the loss landscape of popular NAS architectures.
The notation f i ( · ) denotes the loss evaluated at i th instance in the dataset and P denotes the distribution of dataset.
The notation w ∗ , w 1 and w 2 denote the (local) optimal and two direction vectors randomly sampled from Gaussian distribution respectively.
And α , β , which are x and y axis of the plots, denote the step sizes to perturb w ∗ .
To study the impact of cell width and depth on Lipschitz smoothness, we compare the loss landscape between popular NAS architectures and their randomly connected variants trained in Section 4.1 on CIFAR-10 and CIFAR-100.
Due to the space limitation, we only plot the loss landscape of DARTS (Liu et al., 2018) and its randomly connected variants in Figure 6.
We observe that the connection topology has a signiﬁcant inﬂuence on the smoothness of the loss landscape.
With the widest and shallowest cell, C darts has a fairly benign and smooth landscape along with the widest near-convex region around the optimal.
With a deeper and narrower cell, C dartsand C dartshave a more agitated loss landscape compared with C darts .
Furthermore, C darts, with the smallest width and largest depth among these cells, has the most complicated loss landscape and the narrowest [Table] 600 7 . 100 7 .8 .8 .9 .9 .(b) C darts1.00 0.75 0.50 0.25 0.00 0.25 0.50 0.75 1.00 1.00 0.
[Table]
100 8 .9 .9 .(e)
C darts
[Figure]
and steepest near-convex region around the optimum.
The largest eigenvalue of the Hessian matrix, which indicates the maximum curvature of the objective function, is positively correlated with Lipschitz constant as shown by Nesterov (2004). A smoother loss landscape therefore corresponds to a smaller Lipschitz constant L .
C darts then achieve the smallest Lipschitz constant among these cells.
Consistent results can be found in Appendix B.3 for the loss landscape of other popular NAS cells and their variants.
Based on these results, we conclude that increasing the width and decreasing the depth of a cell widens the near-convex region around the optimal and smooths the loss landscape.
The constant L of Lipschitz smoothness therefore becomes smaller locally and globally.
Following
Theorem 4.1, architectures with wider and shallower cells shall converge faster and more stably.
4.2. G RADIENT V ARIANCE
The gradient variance indicates the noise level of gradient by randomly selecting training instances in stochastic gradient descent (SGD) method.
Large gradient variance indicates large noise in the gradient, which typically results in unstable updating of model parameters.
Following Ghadimi &
Lan (2013), gradient variance is deﬁned as Var( ∇ f i ( w )) in this paper.
Similar to the visualization of loss landscape in Section 4.2.1, we visualize the gradient variance by g ( α, β ) =
Var( ∇ f i ( w ∗ + α w 1 + β w 2 )) .
All notations follow the same meanings as in Section 4.2.1.
To study the impact of the width and depth of a cell on the gradient variance, we compare the gradient variance between popular NAS architectures and their randomly connected variants trained in Section 4.1 on CIFAR-10 and CIFAR-100.
We visualize the gradient variance of DARTS (Liu et al., 2018) and its randomly connected variants in Figure 7 and Figure 8.
For better visualization, we plot the ﬁgures using the standard deviation, i.e., (cid:112) g
( α, β ) , to avoid extremely large values for the results of DARTS. Obviously, with the width of a cell decreasing and the depth increasing (i.e., from C darts to C darts), the region with relatively small gradient variance becomes smaller
[Figure]
as shown in Figure 7.
Moreover, the gradient variance generally shows an increasing trend from
C to C darts in Figure 8.
Consequently, the gradient becomes noisier in the neighborhood of the optimal, which typically make the optimization harder and unstable.
The training of C darts therefore shall be the fastest and most stable one among these random cells based on Theorem 4.1.
Similar results from other popular NAS architectures and their random variants are provided in Appendix B.4.
Based on these results, we conclude that the increase of width and the decreasing of the depth of a cell result in a smaller gradient variance, which makes the optimization process less noisy and more efﬁcient.
The convergence of wide and shallow cells therefore shall be fast and stable following Theorem 4.1.
4. T HEORETICAL A NALYSIS OF F ACTORS A FFECTING C ONVERGENCE
Our empirical study so far suggests that larger cell width and smaller cell depth smooths the loss landscape and decreases the gradient variance.
Popular NAS architectures therefore converge fast.
In this section, we explain the impacts of the width and depth of a cell on Lipschitz smoothness and gradient variance from a theoretical perspective.
All proofs can be found in Appendix C.
4.3. S ETUP
We analyze the impact of cell width and depth by comparing the Lipschitz smoothness and gradient variance between the architecture with the widest cell and the architecture with the narrowest cell as shown in Figure 25 of Appendix C. To simplify the analysis, the cells we investigate contain only one input node x and one output node represented as vectors.
The input node can be training instances or output node from any proceeding cell.
Moreover, all operations in the cell are linear operations without any non-linear activation function.
Suppose there are n intermediate nodes in a cell, the i th intermediate node and its associated weight matrix are denoted as y ( i ) and W ( i ) ( i = 1 , · · · , n ) respectively.
The output node z denotes the concatenation of all intermediate nodes.
Both cells have the same arbitrary objective function f following the output node, which shall consist of the arbitrary number of activation functions and cells.
For clarity, we refer to the objective function, intermediate nodes and output node of the architecture with the narrowest cell as (cid:98) f ,
(cid:98) y
( i ) and (cid:98) z respectively.
As shown in Figure 25, the intermediate node y ( i ) and (cid:98) y
( i ) can be computed by y ( i )
=
W ( i ) x and (cid:98) y
( i ) =
(cid:81)
ik =1 W ( k ) x respectively.
Particularly, we set (cid:81) ik =1 W ( k )
=
W ( i ) W ( i − 1) · · · W (1) in this paper.
4.3. T HEORETICAL R ESULTS
Due to the complexity of the standard Lipschitz smoothness, we instead investigate the block-wise
Lipschitz smoothness (Beck & Tetruashvili, 2013) of the two cases shown in Figure 25.
In Theorem 4.2, we show that the block-wise Lipschitz constant of the narrowest cell is scaled by the largest eigenvalues of the model parameters (i.e., W ( i ) ( i = 1 , · · · , n ) ).
Notably, the Lipschitz constant of the narrowest cell can be signiﬁcantly larger than the one of the widest cell while most of the largest eigenvalues are larger than 1, which slows down the convergence substantially.
The empirical study in Section 4.2.1 has validated the results.
Theorem 4.2 (The impact of cell width and depth on block-wise Lipschitz smoothness ) Let λ ( i ) be the largest eigenvalue of W ( i ) .
Given the widest cell with objective function f and the narrowest cell with objective function (cid:98) f , by assuming the block-wise Lipschitz smoothness of the widest cell as (cid:13)(cid:13)(cid:13)(cid:13)
∂f ∂W ( i ) 1 − ∂f ∂W ( i ) 2 (cid:13)(cid:13)(cid:13)(cid:13) ≤
L ( i ) (cid:13)(cid:13)(cid:13) W ( i ) 1 − W ( i ) 2 (cid:13)(cid:13)(cid:13) for any W ( i )and W ( i ) 2 , the block-wise
Lipschitz smoothness of the narrowest cell then can be represented as
[Equation]
We then compare the gradient variance of the two cases shown in Figure 25.
Interestingly, gradient variance suggests a similar but more signiﬁcant difference between the two cases compared with their difference in Lipschitz smoothness.
As shown in Theorem 4.3, the gradient variance of the narrowest cell is not only scaled by the square of the largest eigenvalue of the weight matrix but also scaled by the number of intermediate nodes.
Moreover, the upper bound of its gradient variance has numbers of additional terms, leading to a signiﬁcantly larger gradient variance.
The empirical study in Section 4.2.2 has conﬁrmed the results.
Theorem 4.3 (The impact of cell width and depth on gradient variance ) Let λ ( i ) be the largest eigenvalue of W ( i ) .
Given the widest cell with objective function f and the narrowest cell with objective function (cid:98) f , by assuming the gradient variance of the widest cell as E (cid:13)(cid:13)(cid:13)
∂f ∂W ( i ) − E ∂f ∂W ( i ) (cid:13)(cid:13)(cid:13) 2 ≤ ( σ ( i ) ) 2 for any W ( i ) , the gradient variance of the narrowest cell is then bounded by
[Equation]
G ENERALIZATION BEYOND THE C OMMON C ONNECTIONS
Our empirical and theoretical results so far have demonstrated that the common connection pattern helps to smooth loss landscape and make gradient more accurate.
Popular NAS architectures with wider and shallower cells therefore converge faster, which explains why popular NAS architectures are selected by the NAS algorithms.
Nonetheless, we have ignored the generalization performance obtained by popular NAS architectures and their random variants.
We therefore wonder whether popular NAS architectures with wide and shallow cells generalize better .
In Figure 9, we visualize the test accuracy of popular NAS architectures and their randomly connected variants trained in Section 4.1.
Notably, the popular NAS architectures can achieve competitive accuracy compared with most of the random variants.
However, there are some random variants, which achieve higher accuracy than the popular architectures except for C amoeba .
Interestingly, there seems to be an optimal trade-off between depth and width of a cell to achieve higher test accuracy (i.e., C 7 for DARTS and C 4 for ENAS).
Popular NAS architectures with wide and shallow cells therefore are not guaranteed to generalize better, although they typically converge faster than other random variants.
To further validate the above claim, we adapt the connections of popular NAS architectures to obtain the widest and shallowest cells in their original search space.
The adaption is possible due to the fact that the cells (including normal cell and reduction cell) of popular NAS architectures are generally not widest and narrowest as shown in Figure 1.
While there are various widest and shallowest cells, we follow the connection pattern of SNAS cell shown in Figure 1(e) to obtain the widest and shallowest cells.
The adapted topologies are shown in Figure 24 of Appendix B.5.
Table 1 illustrates the comparison of the test accuracy between our adapted NAS architectures and the original ones.
As shown in Table 1, the adapted architectures achieve smaller test error on CIFAR-100.
Nevertheless, most of the adapted architectures, obtain larger test error than the original NAS architectures on both CIFAR-10 and Tiny-ImageNet-200 4 .
The results again suggest that the [Figure] [Table] widest and shallowest cells may not help architectures generalize better, while these architectures typically achieve competitive generalization performance.
The results above have revealed that the architectures with wide and shallow cells may not generalize better despite their fast convergence.
To improve current NAS algorithms, we therefore need to re-think the evaluation of the performance of candidate architectures during architecture search since the current NAS algorithms are not based on the generalization performance at convergence as mentioned in Section 4.1.
Nonetheless, architectures with the wide and shallow cells usually guarantee a stable and fast convergence along with competitive generalization performance, which shall be good prior knowledge for designing architectures and NAS algorithms.
C ONCLUSION AND D ISCUSSION
While recent works are concentrating on the design and evaluation of NAS algorithms, we are ﬁrst to investigate on the NAS architectures selected by the various popular NAS algorithms.
Our study beneﬁts the understanding of what kind of architectures has been selected by current NAS algorithms, why they select these architectures, and why these architectures and algorithms may not be good enough. More speciﬁcally, we reveal that popular NAS algorithms favor architectures with wide and shallow cells, which typically converge fast and therefore are easier to be selected during the search.
Nonetheless, these architectures may not generalize better than others with narrow and deep cells.
Therefore, to further improve the generalization performance of the selected NAS architectures, one promising direction for the research on NAS is to estimate the generalization performance of candidate architectures more accurately. While popular NAS architectures appreciate fast and stable convergence along with competitive generalization performance, we believe that the wide and shallow cells are good prior knowledge for the design of future search space. More importantly, we hope this work can encourage more attention to the interpretation and understanding of recent popular NAS algorithms.
A PPENDIX A E XPERIMENTAL S ETUP A. D ATA P RE - PROCESSING AND A UGMENTATION
Our experiments are conducted on CIFAR-10/100 (Krizhevsky et al., 2009) and Tiny-ImageNet-200. CIFAR-10/100 contain 50,000 training images and 10,000 test images of 32 × 32 pixels in 10 and 100 classes respectively.
Tiny-ImageNet-200 consists of 100,000 training images, 10,000 validation images and 10,000 test images 5 in 200 classes.
We adopt exactly the same data pre-processing and argumentation as described in DARTS (Liu et al., 2018): zero padding the training images with 4 pixels on each side and then randomly cropping them back to 32 × 32 on CIFAR-10/ and 64 × 64 on Tiny-ImageNet-200; randomly ﬂipping training images horizontally; normalizing training images with the means and standard deviations along the channel dimension.
A. S AMPLING OF R ANDOM V ARIANTS
For a N -node NAS cell, there are ( N − 2)!
( M − 1)!
possible connections with M input nodes and one output node.
There are therefore hundreds to thousands of possible randomly connected variants for each popular NAS cell.
Due to the prohibitive cost of comparing popular NAS cell with all variants, we randomly sample some variants to understand why the popular NAS cells are selected.
Given a NAS cell C , we ﬁx the partial order of intermediate nodes and their accompanying operations.
We then replace the source node of their associated operations by uniformly randomly sampling a node from their proceeding nodes in the same cell to get their randomly connected variants.
Figure 2 has shown some random connected cells derived from DARTS (Liu et al., 2018).
Randomly connected variants of other popular NAS cells are shown in Appendix B.1.
Similarly, given a NAS cell C , we ﬁx the partial order of intermediate nodes and their connection topologies.
We then replace the operations couping each connection by uniformly randomly sampling candidate operations to get their random variants of operations.
A. A RCHITECTURES AND T RAINING D ETAILS
For experiments on CIFAR-10/100 and Tiny-ImageNet-200, the neural network architectures are constructed by stacking L = 20 cells.
Feature maps are down-sampled at the L/ 3 -th and 2 L/ 3 -th cell of the entire architecture with stride 2.
For Tiny-ImageNet-200, the stride of the ﬁrst convolutional layer is adapted to 2 to reduce the input resolution from 64 × 64 to 32 × 32 .
A more detailed building scheme can be found in DARTS (Liu et al., 2018).
In the default training setting, we apply stochastic gradient descent (SGD) with learning rate 0.025, momentum 0.9, weight decay 3 × 10 − 4 and batch size 80 to train the models for 600 epochs on CIFAR10/100 and 300 epochs on Tiny-ImageNet-200 to ensure the convergence.
The learning rate is gradually annealed to zero following the standard cosine annealing schedule.
To compare the convergence under different learning rates in Section 4.1, we change the initial learning rate from 0.025 to 0.25 and 0.0025 respectively.
A. R EGULARIZATION
Since regularization mechanisms shall affect the convergence (Zhou et al., 2015), architectures are trained without regularization for a neat empirical study in Section 4.
The regularization mechanisms are only used in Section 5 to get the converged generalization performance of the original and adapted NAS architectures on CIFAR-10/100 and Tiny-ImageNet-200, shown in Table 1.
There are three adopted regularization mechanisms on CIFAR-10/100 and Tiny-ImageNet-200 in this paper: cutout (Devries & Taylor, 2017), auxiliary tower (Szegedy et al., 2015) and drop path (Larsson et al., 2017).
We apply standard cutout regularization with cutout length 16.
Moreover, the auxiliary tower is located at 2 L/ 3 -th cell of the entire architecture with weight 0.4.
We apply the same linearly-increased drop path schedule as in NASNet (Zoph et al., 2018) with the maximum probability of 0.2.
A PPENDIX B M ORE R ESULTS B. NAS ARCHITECTURES AND T HEIR V ARIANTS
We compare the width and depth of popular NAS architectures and their variants of random connections, as shown in Table 2.
The random variants are sampled following the method in Appendix A.2.
We further show the connection topologies of popular NAS and their partial random variants of connections in Figure10 and Figure
[Table]
[Table]
,3 . 5 c, 4 3 . 5 c, 3 NASNet ( 5 c, 2 ) 1 . 5 c, 6 1 . 5 c,2 c,2 c,2 .
5 c, 5 2 .
5 c,3 c,3 c,3 . 5 c, 5 3 . 5 c, 4 3 . 5 c, 4 3 .
{+5 c, 3 3 . 
 c,𝑥+} # 𝑥 $ 𝑥 % 𝑥 & 𝑥 ’ 𝑥 ( 𝑥 ) 𝑥
* (a) 3 .
5 c ,𝑥 # 𝑥 $ 𝑥 % 𝑥 & 𝑥 ’ 𝑥 ( 𝑥 ) 𝑥
* (b) 3 .
5 c ,𝑥 # 𝑥 $ 𝑥 % 𝑥 & 𝑥 ’ 𝑥 ( 𝑥 ) 𝑥
* (c) 3 c ,𝑥 # 𝑥 $ 𝑥 % 𝑥 & 𝑥 ’ 𝑥 ( 𝑥 ) 𝑥 * (d) 2 .
5 c ,𝑥 # 𝑥 $ 𝑥 % 𝑥 & 𝑥 ’ 𝑥 ( 𝑥 ) 𝑥
* (e) 2 c , 𝑥 # 𝑥 $ 𝑥 % 𝑥 & 𝑥 ’ 𝑥 ( 𝑥 ) (a) 4 c ,𝑥 # 𝑥 $ 𝑥 𝑥 & 𝑥 ’ 𝑥 ( 𝑥 ) (b) 3 .
5 c ,𝑥 # 𝑥 $ 𝑥 % 𝑥 & 𝑥 ’ 𝑥 ( 𝑥 ) (c) 3 c ,𝑥 # 𝑥 $ 𝑥 % 𝑥 & 𝑥 ’ 𝑥 ( 𝑥 ) (d) 2 .
5 c ,𝑥 # 𝑥
[Figure]
[Figure] [Table]
B. C ONVERGENCE
In this section
[Figure]
we plot more test loss curves on CIFAR-10 (Krizhevsky et al., 2009) for original popular NAS architectures and their (12) randomly connected variants, as shown in Figure 13, Figure 14 and Figure 15.
The depth and width of these 12 randomly connected variants can be found in Table 2.
Notably, the width and depth of random variants (from C 1 to C 12 ) are in ascending and descending order respectively.
Moreover, the popular NAS architectures achieve the largest width and nearly the smallest depth among all the variants.
Consistent with Section 4.1, the popular NAS cells, with larger width and smaller depth, typically achieve faster and more stable convergence than the random variants.
Furthermore, with the increasing with and decreasing depth, the convergence of random variants gets more similar to the original NAS architecture
[Figure]
[Figure]
[Figure]
B. L OSS L ANDSCAPE
In this section
[Figure]
we visualize loss landscapes for popular NAS architectures and their randomly connected variants.
The depth and width of a cell are highly correlated.
For example, the depth and width cannot reach their maximum simultaneously.
We therefore only group the results based on the width of cells for a better visualization while ignoring the difference of depth among random variants.
Notably, the architectures with wider cells have a smoother and benigner loss landscape, as shown in Figure [Figure] Figure 17, Figure 18 and Figure
[Figure] which further supports the results in Section 4.2.1. [Figure]
[Table] [Figure] 600 9 .(c) 3 c 1.00 0.75 0.50 0.25 0.00 0.25 0.50 0.75 1.00 1.00 0.
.7 .7 .7 .7 .7 .7 .7 .8 .8 .8 .8 .8 .8 .8 .8 .9 .9 .9 .9 .9 .9 .9 .9 .(d) 5 c [Figure] [Table]
[Table]
[Table] [Figure] 67 .8 .8 .8 .8 .8 .8 .8 .8 .9 .9 .9 .9 .9 .9 .(c) 5 c 1.00 0.75 0.50 0.25 0.00 0.25 0.50 0.
[Table] [Figure]
68 .8 .9 .9 .9 .9 .9 .9 .9 .9 .(d) 3 c 1.00 0.75 0.50 0.25 0.00 0.25 0.50 0.75 1.00 1.00 0. .(e) 3 . 5 c
[Table]
100 9 .9 .(b) 2 c 1.00 0.75 0.50 0.25 0.00 0.25 0.50 0.75 1.00 1.00 0. .7 .7 .7 .8 .8 .8 .9 .9 .9 .9 .9 .9 .(c)
5 c 1.00 0.75 0.50 0.25 0.00 0.25 0.50 0.75 1.00 1.00 0.
600 9 .9 .(d)
3 c 1.00 0.75 0.50 0.25 0.00 0.25 0.50 0.75 1.00 1.00 0. [Figure] [Figure] [Figure]
[Figure]
[Table]
[Table]
[Table] .9 .(d)
3 c 1.00 0.75 0.50 0.25 0.00 0.25 0.50 0.75 1.00 1.00 0.
100 7 .7 .7 .7 .8 .8 .8 .8 .8 .8 .9 .9 .9 .9 .9 .9 .9 .(e) 3 . 5 c B. G RADIENT V ARIANCE In this section, we visualize the gradient variance (i.e., g ( α, β ) as deﬁned in Section 4.2.2) for more popular NAS architectures as well as their variants with random connection, such as AmoebaNet in
Figure 20, DARTS in Figure 21, ENAS in Figure 22 and NASNet in Figure 22.
Similarly, we group the results based on the width of cells. Notably, architectures with wider cells achieve relatively smaller gradient variance, which further conﬁrms the results in Section 4.2.
[Figure]
[Table] [Figure] [Figure] [Figure]
In this section, we visualize the adapted architectures (in Figure 24) we investigate on in Section 5. Notably, The adapted connection topologies are not only applied in the normal cell but also the reduction cell.
The adapted architectures are compared with popular NAS architectures to examine the impacts of the common connection pattern on generalization.
[Figure]
[Figure] [Figure] [Figure] 𝑥 $ 𝑥 % 𝑥 & 𝑥 ’ 𝑥 ( 𝑥 )
[Figure] [Figure]
𝑥 # 𝑥 $ 𝑥 % 𝑥 & 𝑥 ’ 𝑥 ( 𝑥 ) 𝑥 * (c) ENAS, 5 c ,𝑥 # 𝑥 $ 𝑥 % 𝑥 & 𝑥 ’ 𝑥 ( 𝑥 ) (d) DARTS, 4 c ,𝑥 # 𝑥 $ 𝑥 % 𝑥 & 𝑥 ’ 𝑥 ( 𝑥 ) (e) SNAS, 4 c ,
A PPENDIX C T HEORETICAL A NALYSIS
C. [Figure] ETUP
[Figure] %) 𝑦 (’) 𝑦 (() ⋮ 𝑧 𝑙 𝑊 (%) 𝑊 (’)
[Figure]
(() 𝑓
[Figure]
$ (&) 𝑦$ (() 𝑦$ ())
⋮ 𝑧̂
𝑙.
[Figure]
f evaluated at input x respectively.
C. B ASICS
We ﬁrstly compare the gradient of case I and case II shown in Figure 25.
For case I, since y ( i ) =
W ( i ) x , the gradient to each weight matrix W
( i ) is denoted by
[Equation]
Similarly, since (cid:98) y ( i ) = (cid:81)
ik =1 W ( k ) x for the case II, the gradient to each weight matrix W
( i ) is denoted by
[Equation]
Exploring the fact that ∂ (cid:98) f ∂ (cid:98) y ( i ) =
∂f∂ y ( i ) , we get (4) by inserting (1) into (3).
C. P ROOF OF T HEOREM 4.
Due to the complexity of comparing the standard Lipschitz constant of the smoothness for these two cases, we instead investigate the block-wise Lipschitz constant (Beck & Tetruashvili, 2013).
In other words, we evaluate the Lipschitz constant for each weight matrix W
( i ) while ﬁxing all other matrices.
Formally, we assume the block-wise Lipschitz smoothness of case I as
[Equation]
The default matrix norm we adopted is 2-norm.
And W ( i ) 1 , W ( i )denote possible assignments for
W ( i ) .
Denoting that λ ( i ) =
(cid:13)(cid:13) W ( i ) (cid:13)(cid:13) , which is the largest eigenvalue of matrix W ( i ) , we can get the smoothness of case II as
[Equation]
[Equation]
We get the equality in (6) since j > i and W ( j ) keeps the same for the computation of block-wise
Lipschitz constant of W ( i ) .
Based on the triangle inequality of norm, we get (7) from (6).
We get (8) from (7) based on the inequality (cid:107) WV (cid:107) ≤ (cid:107) W (cid:107) (cid:107) V (cid:107) and the assumption of the smoothness for case
I in (5).
Finally, since we are evaluating the block-wise Lipschitz constant for W ( i ) , W ( k )
=
W ( k )while k (cid:54) =
i , which leads to the ﬁnal inequality (9).
C. P ROOF OF T HEOREM 4.
Similarly, we assume the gradient variance of case I is bounded as
[Equation]
[Equation]
[Equation]
We get (12) from (11) based on Cauchy-Schwarz inequality.
Based on the inequality (cid:107) WV (cid:107) ≤ (cid:107) W (cid:107) (cid:107) V (cid:107) and the assumption of bounded gradient variance for case I in (10), we get the ﬁnal inequality.