E FFICIENT M ULTI - OBJECTIVE N EURAL A RCHITECTURE S EARCH VIA L AMARCKIAN E VOLUTION
Anonymous authors
Paper under double-blind review
A
BSTRACT
Neural Architecture Search aims at automatically ﬁnding neural architectures that are competitive with architectures designed by human experts.
While recent approaches have achieved state-of-the-art predictive performance for image recognition, they are problematic under resource constraints for two reasons: (1) the neural architectures found are solely optimized for high predictive performance, without penalizing excessive resource consumption; (2) most architecture search methods require vast computational resources.
We address the ﬁrst shortcoming by proposing LEMONADE , an evolutionary algorithm for multi-objective architecture search that allows approximating the entire Pareto-front of architectures under multiple objectives, such as predictive performance and number of parameters, in a single run of the method.
We address the second shortcoming by proposing a Lamarckian inheritance mechanism for LEMONADE which generates children networks that are warmstarted with the predictive performance of their trained parents.
This is accomplished by using (approximate) network morphism operators for generating children.
The combination of these two contributions allows ﬁnding models that are on par or even outperform both hand-crafted as well as automatically-designed networks.
I NTRODUCTION
Deep learning has enabled remarkable progress on a variety of perceptual tasks, such as image recognition (Krizhevsky et al., 2012), speech recognition (Hinton et al., 2012), and machine translation (Bahdanau et al., 2015).
One crucial aspect for this progress are novel neural architectures (Szegedy et al., 2016;
He et al., 2016; Huang et al., 2017b).
Currently employed architectures have mostly been developed manually by human experts, which is a time-consuming and error-prone process.
Because of this, there is growing interest in automatic architecture search methods (Baker et al., 2017a; Zoph & Le, 2017; Real et al., 2017).
Some of the architectures found in an automated way have already achieved similar predictive performance as the best manually-designed ones; however, current algorithms for ﬁnding these architectures require enormous computational resources often in the range of thousands of GPU days.
Prior work on architecture search has typically framed the problem as a single-objective optimization problem.
However, most applications of deep learning do not only require high predictive performance on unseen data but also low resource-consumption in terms of, e.g., inference time, model size or energy.
Moreover, there is typically an implicit trade-off between predictive performance and consumption of resources.
Recently, several architectures have been manually designed that aim at reducing resource-consumption while retaining high predictive performance (Iandola et al., 2016;
Howard et al., 2017; Sandler et al., 2018).
Automatically-found neural architectures have also been down-scaled to reduce resource consumption (Zoph et al., 2018).
However, very little previous work has taken the trade-off between resource-consumption and predictive performance into account during automatic architecture search.
In this work, we make the following two main contributions:
To overcome the need for thousands of GPU days (Zoph & Le, 2017; Zoph et al., 2018; Real et al., 2018), we make use of operators acting on the space of neural network architectures that preserve the function a network represents, dubbed network morphisms (Chen et al., 2015; Wei et al., 2016), obviating training from scratch and thereby substantially reducing the required training time per network.
This mechanism can be interpreted as Lamarckian inheritance in the context of evolutionary algorithms, where Lamarckism refers to a mechanism which allows passing
skills acquired during an individual’s lifetime (e.g., by means of learning), on to children by means of inheritance.
Since network morphisms are limited to solely increasing a network’s size (and therefore likely also resource consumption), we introduce approximate network morphisms (Section 3.2) to also allow shrinking networks, which is essential in the context of multi-objective search.
The proposed Lamarckian inheritance mechanism could in principle be combined with any evolutionary algorithm for architecture search, or any other method using (a combination of) localized changes in architecture space
We propose a multi-objective evolutionary algorithm for neural architecture search (NAS), dubbed LEMONADE , Section 4, which is suited for the joint optimization of several objectives, such as predictive performance, inference time, or number of parameters.
LEMONADE maintains a population of networks on an approximation of the Pareto front of the multiple objectives.
In contrast to generic multi-objective algorithms, LEMONADE exploits that evaluating certain objectives (such as an architecture’s number of parameters) is cheap while evaluating the predictive performance on validation data is expensive (since it requires training the model ﬁrst).
Thus, LEMONADE handles its various objectives differently:
it ﬁrst selects a subset of architectures, assigning higher probability to architectures that would ﬁll gaps on the Pareto front for the “cheap” objectives; then, it trains and evaluates only this subset, further reducing the computational resource requirements during architecture search.
In contrast to other multi-objective architecture search methods, LEMONADE (i) does not require to deﬁne a trade-off between performance and other objectives a-priori (e
g., by weighting objectives when using scalarization methods) but rather returns a set of architectures, which allows the user to select a suitable model a-posteriori; (ii) LEMONADE does not require to be initialized with well performing architectures; it can be initialized with trivial architectures and hence requires less prior knowledge.
Also, LEMONADE can handle various search spaces, including complex topologies with multiple branches and skip connections.
We evaluate LEMONADE on two different search spaces for image classiﬁcation: (i) non-modularized architectures and (ii) cells that are used as repeatable building blocks within an architecture (Zoph et al., 2018; Zhong et al., 2018) and also allow transfer to other datasets.
In both cases, LEMONADE returns a population of CNNs covering architectures with 10 000 to 10 000 000 parameters.
Within only one week on eight GPUs, LEMONADE discovers architectures that are competitive in terms of predictive performance and resource consumption with hand-designed networks, such as
MobileNet V1, V2 (Howard et al., 2017; Sandler et al., 2018), as well as architectures that were automatically designed using 40x greater resources (Zoph et al., 2018) and other multi-objective methods (Dong et al., 2018).
B ACKGROUND AND R ELATED W ORK
Multi-objective Optimization Multi-objective optimization (Miettinen, 1999) deals with problems that have multiple, complementary objective functions f 1 , . . .
, f n .
Let N be the space of feasible solutions N (in our case the space of feasible neural architectures).
In general, multi-objective optimization deals with ﬁnding N ∗ ∈ N that minimizes the objectives f 1 , . . .
, f n .
However, typically there is no single N ∗ that minimizes all objectives at the same time.
In contrast, there are multiple Pareto-optimal solutions that are optimal in the sense that one cannot reduce any f i without increasing at least one f j .
More formally, a solution N (1) Pareto-dominates another solution
N (2) if ∀ i ∈ 1 , . . . , n : f i ( N (1) ) ≤ f i ( N (2) ) and ∃ j ∈ 1 , . . . , n : f j ( N (1) ) <
f j ( N (2) ) .
The
Pareto-optimal solutions N ∗ are exactly those solutions that are not dominated by any other N ∈ N .
The set of Pareto optimal N ∗ is the so-called Pareto-front .
Neural Architecture Search Recently, NAS was framed as a reinforcement learning (RL) problem, where the reward of the RL agent is based on the validation performance of the trained architecture (Baker et al., 2017a;
Zoph & Le, 2017; Zhong et al., 2018; Pham et al., 2018).
Zoph & Le (2017) use a recurrent neural network to generate a string representing the neural architecture.
In a follow-up work, Zoph et al.
(2018) search for cells , which are repeated according to a ﬁxed meta architecture to generate the eventual architecture.
Deﬁning the architecture based on a cell simpliﬁes the search space.
An alternative to using RL are neuro-evolutionary approaches that use genetic algorithms for optimizing the neural architecture (Stanley & Miikkulainen, 2002;
Liu et al., 2018a; Real et al., 2018;
Miikkulainen et al., 2017; Xie & Yuille, 2017).
In contrast to these works, our proposed method is applicable for multi-objective optimization and employs Lamarckian inheritance, i.e, learned parameters are passed on to a network’s offspring.
Unfortunately, most of the aforementioned approaches require vast computational resources since they need to train and validate thousands of neural architectures; e.g., Zoph & Le (2017) trained over 10.000 neural architectures, requiring thousands of GPU days.
One way of speeding up evaluation is to predict performance of a (partially) trained model (Domhan et al., 2015; Baker et al., 2017b; Klein et al., 2017; Liu et al., 2017).
Works on performance prediction are complementary to our work and could be incorporated in the future.
One-Shot Architecture Search is another promising approach for speeding up performance estimation, which treats all architectures as different subgraphs of a supergraph (the one-shot model) and shares weights between architectures Saxena & Verbeek (2016);
Brock et al.
; Pham et al.
; Liu et al.
(2018b)
; Bender et al.
Only the weights of a single one-shot model need to be trained, and architectures (which are just subgraphs of the one-shot model) can then be evaluated without any separate training.
However, a general limitation of one-shot NAS is that the supergraph deﬁned a-priori restricts the search space to its subgraphs.
Moreover, approaches which require that the entire supergraph resides in GPU memory during architecture search will be restricted to relatively small supergraphs.
LEMONADE does not suffer from any of these disadvantages; it can handle arbitrary large, unconstrained search spaces while still being efﬁcient.
Elsken et al.
; Cai et al.
(2018a) proposed to employ the concept of network morphisms (see
Section 3.1).
The basic idea is to initialize weights of newly generated neural architectures based on weights of similar, already trained architectures so that they have the same accuracy.
This pretrained initialization allows reducing the large cost of training all architectures from scratch.
Our work extends this approach by introducing approximate network morphisms , making the use of such operators suitable for multi-objective optimization.
We refer to Elsken et al.
(2018) for a comprehensive survey on Neural Architecture Search.
Multi-objective Neural Architecture Search Very recently, there has also been some work on multi-objective neural architecture search (Kim et al., 2017;
Dong et al., 2018; Tan et al., 2018) with the goal of not solely optimizing the accuracy on a given task but also considering resource consumption.
Kim et al.
(2017) parameterize an architecture by a ﬁxed-length vector describing, which limits the architecture search space drastically.
Dong et al.
(2018) (which is parallel independent work to ours) extend PNAS (Liu et al., 2017) by considering multiple objective during the model selection step.
However, they employ CondenseNet (Huang et al., 2017a) as a base network and solely optimize building blocks within the network which makes the search less interesting as (i) the base network is by default already well performing and (ii) the search space is again limited.
Tan et al.
(2018) use a weighted product method (Deb & Kalyanmoy, 2001) to obtain a scalarized objective.
However, this scalarization comes with the drawback of weighting the objectives a-priori , which might not be suitable for certain applications.
In contrast to all mentioned work, LEMONADE (i) does not require a complex meta architecture but rather can start from trivial initial networks, (ii) can handle arbitrary search spaces, (iii) does not require to deﬁne hard constraints or weights on objectives a-priori.
N ETWORK OPERATORS
Let N ( X ) denote a space of neural networks, where each element N ∈ N ( X ) is a mapping from X ⊂ R n to some other space, e.g., mapping images to labels.
A network operator T : N ( X ) × R k → N ( X ) ×
R j maps a neural network N w ∈ N ( X ) with parameters w ∈ R k to another neural network ( TN ) ˜ w ∈ N ( X ) , ˜ w ∈ R j .
We now discuss two speciﬁc classes of network operators, namely network morphisms and approximate network morphirms . Operators from these two classes will later on serve as mutations in our evolutionary algorithm.
Chen et al. (2015) introduced two function-preserving operators for deepening and widening a neural network.
Wei et al. (2016) built up on this work, dubbing function-preserving operators on neural network network morphisms .
Formally, a network morphism is a network operator satisfying N w ( x ) =
( TN )
˜ w ( x ) for every x ∈ X , i.e., N w and ( TN ) ˜ w represent the same function.
This can be achieved by properly initializing ˜ w .
We now describe the operators used in LEMONADE and how they can be formulated as a network morphism.
We refer to Appendix A.0.1 for details.
Inserting a Conv-BatchNorm-ReLU block.
We
initialize the convolution to be an
identity
mapping, as
done by Chen et al.
”Net2DeeperNet”).
Offset and scale
of
BatchNormalization are
initialized to
be the (moving) batch mean and (
moving batch variance hence initially again
an identity mapping.
Since the
ReLU
activation is
idempotent, i.e., ReLU ( ReLU ( x ))
=
ReLU ( x )
, we can add it on top of the previous two operations without any further changes.
Increase the number of ﬁlters of a convolution.
This operator requires the layer to be changed to have a subsequent convolutional layer, whose parameters are padded with 0’s.
Alternatively, one could use the ”Net2WiderNet” operator by Chen et al.
Add a skip connection.
We allow skip connection either by concatenation (Huang et al., 2017b) or by addition (He et al., 2016).
In the former case, we again use zero-padding in sub-sequential convolutional layers.
In the latter case, we do not simply add two outputs x and y but rather use a convex combination (1 − λ ) x
+ λy , with a learnable parameter λ initialized as 0 (assuming x is the original output and y the output of an earlier layer).
A PPROXIMATE
N ETWORK M ORPHISMS
Unfortunately, network morphism have one thing in common: they increase the capacity of the network 1 .
This may be a reasonable property if one solely aims at ﬁnding a neural architecture with maximal accuracy, but not if one also aims at neural architectures with low resource requirements.
Also, decisions once made can not be reverted.
Operators like removing a layer could considerably decrease the resources required by the model while (potentially) preserving its performance.
Hence, we now generalize the concept of network morphisms to also cover operators that reduce the capacity of a neural architecture.
We say an operator T is an approximate network morphism (ANM) with respect to a neural network N w with parameters w if N w ( x ) ≈ ( TN )
˜ w ( x ) for every x ∈ X .
We refer to Appendix A.1 for a formal deﬁnition.
In practice we simply determine ˜ w so that ˜ N approximates N by using knowledge distillation (Hinton et al., 2015).
In our experiments, we employ the following ANM’s: (i) remove a randomly chosen layer or a skip connection, (ii) prune a randomly chosen convolutional layer (i.e., remove 1 / 2 or 1 / 4 of its ﬁlters), and (iii) substitute a randomly chosen convolution by a depthwise separable convolution.
Note that these operators could easily be extended by sophisticated methods for compressing neural networks (Han et al., 2016; Cheng et al., 2018).
LEMONADE : M ULTI -O BJECTIVE N EURAL A RCHITECTURE S EARCH
In this section, we propose a L amarckian E volutionary algorithm for M ulti-
O bjective N eural
A rchitecture DE sign, dubbed LEMONADE .
We refer to Figure 1 for an illustration as well as Algorithm 1 for pseudo code.
LEMONADE aims at solving the multi-objective optimization problem min N ∈N f ( N ) with a suitable space of neural networks N and the m + n dimensional objective function f ( N ) =
( f exp ( N ) , f cheap ( N )) (cid:62) ∈
R m × R n , whose ﬁrst component f exp ( N ) ∈ R m denotes expensive-to-evaluate objectives (such as the validation error or a measure of compatibility with respect to speciﬁcy hardware only be obtainable by expensive simulation) and its other components f cheap ( N ) ∈
R n denote cheap-to-evaluate objectives (such as model size) that one also tries to minimize.
LEMONADE maintains a population P of parent networks, which we choose to comprise [Figure] r c e R equ i r e m en t s NM
NM
[Figure] Children Generation [Figure] Children
Density
PopulationdensityParentprobability
Low
[Figure]
Training and Evaluation
New Pareto
[Figure] front Rejected Children Accepted Children Trained Children New Population
Density
ChildrendensityAcceptanceprobability all non-dominated networks with respect to f , i.e., the current approximation of the Pareto front 2 .
In every iteration of LEMONADE , we sample parent networks with respect to some distribution on the population and generate child networks by applying network operators (described in Section 3).
In a second sampling stage, we sample a subset children and solely this subset is evaluate on the expensive objectives.
We exploit that f cheap is cheap to evaluate in order to bias both sampling processes towards areas of f cheap that are sparsely populated.
We thereby evaluate f cheap many times in order to end up with a diverse set of children in sparsely crowded regions, but evaluate f exp only a few times.
Algorithm
1: input: P 0 , f , n gen , n pc , n ac 2: P ← P3: for i ← 1 , . . . , n gen do 4: p KDE ← KDE (cid:0) { f cheap ( N ) | N ∈ P} (cid:1) 5: Compute parent distribution p P (Eq. 1) 6: N cpc ← GenerateChildren ( P , p P , n pc ) 7:
Compute child distribution p child (Eq. 2) 8:
N cac ← AcceptSubSet ( N cpc , p child , n ac ) 9:
Evaluate f exp for N c ∈ N cac 10: P ← ParetoFrontier ( P ∪ N cac , f ) 11: end for 12: return P More speciﬁcally, LEMONADE ﬁrst computes a density estimator p KDE (e.g., in our case, a kernel density estimator) on the cheap objective values of the current population, { f cheap ( N ) | N ∈ P} .
Note that we explicitly only compute the
KDE with respect to f cheap rather than f as this allows to evaluate p KDE ( f cheap ( N )) very quickly. Then, larger number n pc of proposal children N cpc = { N c 1 , . . . , N cn pc } is generated by applying network operators, where the parent N for each child is sampled according to a distribution inversely proportional to p KDE , p [Equation]
with a normalization constant c = (cid:0) (cid:80)
N
[Equation] /p [Equation] f cheap
[Equation] N )) [Equation] Since children have similar objective values as their parents (network morphisms do not change architectures drastically), this sampling distribution of the parents is more likely to also generate children in less dense regions of f cheap .
Afterwards, we again employ p KDE to sample a subset of n ac accepted children N cac ⊂ N cpc .
The probably of a children being accepted is [Equation]
with ˆ c being another normalization constant. Only these accepted children are evaluated according to f exp .
By this two-stage sampling strategy we generate and evaluate more children that have the potential to ﬁll gaps in f . We refer to Appendix A.2 for an empirical comparison of this sampling [Figure] N u m b e r o f
P a r a m e t e r s
Generation [Figure] strategy to uniform sampling. Finally, LEMONADE computes the Pareto front from the current generation and the generated children, yielding the next generation.
The described procedure is repeated until a maximum number of generation is reached (100 in our experiments).
E XPERIMENTS
We present results for LEMONADE on searching neural architectures for CIFAR-10 in Section 5.1.
In
Section 5.2, we empirically evaluate the quality of convolutional cells discovered by LEMONADE for
CIFAR-10 on a different dataset, namely ImageNet64x64 (Chrabaszcz et al., 2017).
5. E XPERIMENTS ON CIFAR-
We aim at solving the following multi-objective problem: beside validation error as ﬁrst objective to be minimized, we use f cheap ( N ) = log(# params ( N )) as a second objective as a proxy for memory consumption.
Note that one could also easily use additional objectives, such as inference time or multiply-add operations, we refer to Appendix A.3 for an experiment with 5 objectives.
The set of operators T we consider in the experiments are the three network morphism operators (insert convolution, insert skip connection, increase number of ﬁlters), as well as the three approximate network morphism operators (remove layer, prune ﬁlters, replace layer) described in Appendix A.0.
and Section 3.2, respectively.
The operators are sampled uniformly at random to generate children.
We evaluate LEMONADE with two different search spaces.
For both spaces, LEMONADE was run for 100 generations, which took approximately seven days on eight GPUs in a straight-forward parallel asynchronous fashion.
In every generation, 200 children were proposed and 40 of them accepted.
In total, 4000 = 100 · 40 models were trained and evaluated during the evolutionary process.
The search spaces are described below.
Search Space I (SS-I)
This search space corresponds to searching for an entire architecture (rather than cells).
We chose the number of operators that are applied to generate children uniformly from {1,2,3}.
LEMONADE ’s
Pareto front was initialized to contain four simple convolutional networks with 15 000 to 400 000 parameters and relatively large validation errors of 30 − 50% ; see Appendix A. for details.
LEMONADE natively handles this unconstrained, arbitrary large search space, whereas other methods are by design restricted a-priori to relativly small search spaces (Bender et al., 2018;
Liu et al., 2018b) or are initialized with already well-performing networks (Cai et al., 2018b; Dong et al., 2018).
The progress of LEMONADE for this search space is visualized in Figure 2.
The Pareto-front improves over time, reducing the validation error while covering a regime where the number of parameters is between 10 000 and 10 000 000.
Search Space II (SS-II)
We use LEMONADE for discovering convolutional cells that can also be transferred to other datasets as proposed by Zoph et al.
We use the same scheme for building architectures from cells as Liu et al.
During architecture search, our models consist of 8 cells, the number of ﬁlters in the last block is ﬁxed as F ∈ { 128 , 256 } .
We only choose a single operator to generate children, but the operator is applied to all 8 occurrences of the cell in the parent architecture.
The Pareto Front was again initialized with four trivial cells; see Appendix A.4 for details.
We selected 5 out of 21 cells from the Pareto-front for further experiments, covering the whole range of different-sized cells.
These cells are ordered by size, i.e., Cell 0 denotes the largest cell, while
Cell 21 denotes the smallest.
We refer to Appendix A.6 for an illustration of the different cells.
We highlight: in contrast to Zoph et al.
(2018), we do not constrain the size and structure of the cells as doing so introduces additional hyperparameters and restricts the search space.
As a consequence, our cells could in principle become as complex as a whole architecture.
Results under identical training condition We compare the performance of the discovered architectures and cells with the following baselines:
Different-sized versions of MobileNet V1,V2 ( Howard et al Sandler et al ), adapted for CIFAR-10 3 ; these are manually designed architecture aiming for small resource-consumption while retaining high predictive performance.
Different-sized NASNets (Zoph et al., 2018)
; NASNets are the result of neural architecture search by reinforcement learning and previously achieved state-of-the-art performance on CIFAR-10.
A random search baseline, where we generated random networks, trained and evaluated them and computed the resulting Pareto front (with respect to the validation data).
The number and parameter range of these random networks as well as the training time (for evaluating validation performance) was exactly the same as for LEMONADE to guarantee a fair comparison.
Networks from generation 1 of LEMONADE .
One could argue that the progress in Figure 2 is mostly due to pretrained models being trained further.
To show that this is not the case, we also evaluated all models from generation 1.
We evaluated MobileNets V1, V2 with different width multiplier α and NASNets with different number of cells per block and different number of ﬁlters (details in Appendix A.4).
We apply model augmentation (Real et al., 2018;
Zoph et al., 2018) to scale up the size of models by varying the number of cells per block and the number of ﬁlters in the last block.
[Table]
In order to ensure that differences in test error are actually caused by differences in the discovered architectures rather than different training conditions, we retrained all architectures from scratch using exactly the same optimization pipeline with the same hyperparameters, which is described in detail in Appendix A.4.
We do not use stochastic regularization techniques, such as ShakeShake (Gastaldi, 2017) or
ScheduledDropPath (Zoph et al., 2018) in this experiment as they are not applicable to all networks out of the box.
The results are illustrated in Figure 3 (see also Figure 7).
The best-performing model found by LEMONADE in SS-I achieves just above 3 .
5% test error while having only 4M parameters and less than 3 . 4% with SS-II and 8 .
7 M parameters.
In both spaces, LEMONADE discovers architectures with a test error of approximately 4 .
2% while only having 1 M parameters.
The
Pareto-front of LEMONADE for both spaces is competitive with MobileNet V1, V2 and NASNet for large networks and outperforms them in the regime of less than 500k parameters.
We conclude that using multiple objectives during architecture search is beneﬁcial and that using multiple architectures is superior to using just a single model which is scaled by varying a few model hyperparameters.
We highlight that this result has been achieved based on using only 56 GPU days for LEMONADE compared to 2000 in Zoph et al.
(2018) and with a signiﬁcantly more complex Search Space I (since [Figure] e r o f P a r a m e t e
[Figure]
the entire architecture was optimized and not only a convolutional cell).
LEMONADE also consistently outperforms the random search baseline and a signiﬁcant improvement from generation 1 to 100 can be observed.
Compare also Table 2 in the appendix for detailed numbers.
Comparison to published results In the last paragraph we compared different models when trained with the exact same data augmentation and training pipeline.
We now also brieﬂy compare LEMONADE ’s performance to results stated in the literature.
We apply two widely used methods to improve results over the last paragraph: (i) cells are employed within a well performing, hand crafted architecture, meaning one replaces repeating building blocks in the architecture with discovered cells
Cai et al.
(2018b); Dong et al.
(2018) and (ii) using stochastic regularization techniques such as ScheduledDropPath during training Zoph et al.
; Pham et al.
; Cai et al.
(2018b).
For LEMONADE , we employ the discovered cells within the Shake-Shake architecture and also use
Shake-Shake regularization (Gastaldi, 2017).
We compare LEMONADE with the state of the art single-objective methods by Zoph et al.
(NASNet), Pham et al.
(2018) (ENAS) and Cai et al.
(2018b) (PLNT), as well as multi-objective (Dong et al., 2018) (DPP-Net).
The results are summarized in Table 1.
LEMONADE is on par or outperforms DPP-Net across all parameter regimes.
As all other methods solely optimize for accuracy, they do not evaluate models with few parameters.
However, also for larger models, LEMONADE is competitive to methods that require signiﬁcantly more computational resources (Zoph et al., 2018) or start their search with non-trivial architectures (Cai et al., 2018b; Dong et al., 2018).
ENAS achieves similar performance with a comparably complex search space, but it does not solve the multi-objective problem.
5. T RANSFER TO I MAGE N ET 64 X
To study the transferability of the discovered cells to a different dataset (without having to run architecture search itself on the target dataset), we built architectures suited for ImageNet64x64 (Chrabaszcz et al., 2017) based on ﬁve cells discovered on CIFAR-10.
We again vary (1) the number of cells per block and (2) the number of ﬁlters in the last block.
We compare against different sized MobileNets
V2, NASNets and Wide Residual Networks (WRNs) (Zagoruyko & Komodakis, 2016).
For direct comparability, we again train all architectures in the same way.
In Figure 4, we plot the Pareto Front from all cells combined, as well as the Pareto Front from a single cell, Cell 2, against the baselines.
Both clearly dominate NASNets, WRNs and MobileNets V over the entire parameter range, showing that a multi-objective search again is beneﬁcial.
C ONCLUSION
We have proposed LEMONADE , a multi-objective evolutionary algorithm for architecture search.
The algorithm employs a Lamarckian inheritance mechanism based on (approximate) network morphism operators to speed up the training of novel architectures.
Moreover, LEMONADE exploits the fact that evaluating objectives such, as the performance of a neural networks is orders of magnitude more expensive than evaluating, e.g., a model’s number of parameters.
Experiments on CIFAR-10 and
[Figure] ImageNet64x64 show that LEMONADE is able to ﬁnd competitive models and cells both in terms of accuracy and of resource efﬁciency.
We believe that using more sophisticated concepts from the multi-objective evolutionary algorithms literature and using other network operators (e.g., crossovers and advanced compression methods) could further improve LEMONADE ’s performance in the future.
A A PPENDIX A.0. D ETAILS ON N ETWORK M ORPHISMS
A network morphism is a network operator satisfying the network morphism equation:
[Equation]
) for every x ∈ X ,
[Equation]
) i.e., N w and ( TN ) ˜ w represent the same function.
This can be achieved by properly initializing ˜ w .
Network morphism Type I. Let N w i
i ( x ) be some part of a neural architecture N w ( x ) , e.g., a layer or a subnetwork.
We replace N w i i by
[Equation]
) with ˜ w i = ( w i , A, b ) .
The network morphism equation (3) then holds for A = 1 , b = 0 .
This morphism can be used to add a fully-connected or convolutional layer, as these layers are simply linear mappings.
Chen et al.
dubbed this morphism ”Net2DeeperNet”.
Alternatively to the above replacement, one could also choose
[Equation]
with ˜ w i
=
( w i , C, d ) .
A, b are ﬁxed, non-learnable.
In this case, network morphism Equation (3) holds if C =
A − 1 , d = − Cb .
A Batch Normalization layer (or other normalization layers) can be written in the above form: A, b represent the batch statistics and C, d the learnable scaling and shifting.
Network morphism Type II.
Assume N w
i
i has the form N w
i
i ( x ) =
Ah w h ( x ) + b for an arbitrary function h .
We replace N w i i , w i =
( w h , A, b ) , by
[Equation]
with an arbitrary function ˜
h w ˜ h
( x ) .
The new parameters are ˜ w i =
( w i , w ˜ h , ˜ A ) .
Again, Equation (3) can trivially be satisﬁed by setting ˜ A = 0 .
We can think of two modiﬁcations of a neural network that can be expressed by this morphism:
Firstly, a layer can be widened (i.e., increasing the number of units in a fully connected layer or the number of channels in a CNN - the Net2WiderNet transformation of Chen et al. (2015)).
Let h ( x ) be the layer to be widened.
For example, we can then set ˜ h
= h to simply double the width.
Secondly, skip-connections by concatenation as used by Huang et al.
(2016) can also be expressed.
If h ( x ) itself is a sequence of layers, h ( x ) = h n ( x ) ◦ · · · ◦ h 0 ( x ) , then one could choose ˜ h
( x ) = x to realize a skip from h 0 to the layer subsequent to h n .
Network morphism Type III.
By deﬁnition, every idempotent function N w i i can simply be replaced by
[Equation]
with the initialization ˜ w i = w i .
This trivially also holds for idempotent functions without weights, e.g., ReLU.
Network morphism Type IV.
Every layer N w i i is replaceable by
[Equation]
with an arbitrary function h and Equation (3) holds if the learnable parameter λ is initialized as 1 .
This morphism can be used to incorporate any function, especially any non-linearity.
For example, Wei et al.
(2016) use a special case of this operator to deal with non-linear, non-idempotent activation functions.
Another example would be the insertion of an additive skip connection, which were proposed by He et al.
(2016) to simplify training: If N w i i itself is a sequence of layers, N w i
[-= N w in i n ◦ · · · ◦ N w i 
-][Equation]
then one could choose h ( x ) = x to realize a skip from N w i
ito the layer subsequent to N w in i n .
Note that every combination of network morphisms again yields a network morphism.
Hence, one could, for example, add a block “Conv-BatchNorm-ReLU” subsequent to a ReLU layer by using
Equations (4), (5) and (7).
A. D ETAILS ON A PPROXIMATE N ETWORK M ORPHISMS
Let T be an operator on some space of neural networks N ( X ) , p ( x ) a distribution on X and (cid:15) > 0 .
We say T is an (cid:15) -approximate
network morphism (ANM) with respect to a neural network N w with parameters w iff
[Equation]
for some measure of distance d . Obviously, every network morphism is an (cid:15) -approximate network morphism (for every (cid:15) ) and the optimal ˜ w is determined by the function-preserving property. Unfortunately, one will not be able to evaluate the right hand side of Equation 9 in general since the true data distribution p ( x ) is unknown.
Therefore, in practice, we resort to its empirical counterpart ˜∆( T, N, w ) :
= min ˜ w [Equation]
given
[Equation]
An approximation to the optimal ˜ w can be found with the same algorithm as for training, e.g., SGD. This approach is akin to knowledge distillation (Hinton et al., 2015). We simply use categorical crossentropy as a measure of distance. As retraining the entire network via distillation after applying an ANM is still very expensive, we further reduce computational costs as follows: in cases where the operators only affect some layers in the network, e.g., the layer to be removed as well as its immediate predecessor and successor layers, we let TN ﬁrst inherit all weights of N except the weights of the affected layers.
We then freeze the weights of unaffected layers and train only the affected weights for a few epochs. In our experiments, we employ the following ANM’s: (i) remove a randomly chosen layer or a skip connection, (ii) prune a randomly chosen convolutional layer (i.e., remove 1 / 2 or 1 / 4 of its ﬁlters), and (iii) substitute a randomly chosen convolution by a depthwise separable convolution. We train the affected layers for 5 epochs as described above to minimize the left hand side of Equation 9. Note that these operators could easily be extended by sophisticated methods for compressing neural networks (Han et al., 2016; Cheng et al., 2018).
A. B ASELINE EXPERIMENT WITH UNIFORM SAMPLING INSTEAD OF KDE
In order to evaluate the importance of the sampling strategy employed in LEMONADE , we compare LEMONADE to a version of LEMONADE employing uniform random sampling of parents and uniform selection of children to be trained and evaluated.
The resulting Pareto-fronts after n gen =generations are illustrated in Figure 5.
The most striking difference is that LEMONADE explores architectures with more than one million parameters more thoroughly than LEMONADE (uniform), which samples mostly architectures with less than one million parameter.
The latter can be explained by the property that most points on the Pareto-front lie in this parameter range and, since those act as parents, most children will also lie close to this parameter range.
In contrast, LEMONADE samples points from the Pareto-front inversely to their density and thus, elements at the the extremes of the
Pareto-front will more often act as parents and will generate more offspring in the parameter ranges not yet covered by the Pareto-front.
For the sake of simplicity, we only considered two objectives in Section 5.
To show that our method is not limited to that case, we provide an additional experiments with 5 objectives (which we think is a realistic scenario for NAS applications), namely:
performance on Cifar-10 (expensive) 2.
performance on Cifar-100 (expensive) 3.
number of parameters (cheap) 4. number of multiply-add operations (cheap) 5. inference time (i.e., the time required for a forward pass through the network 4 ) (cheap). [Figure]
o f P a r a
[Figure]
t
[Figure]
Moreover, a histogram of the number of parameters of all sampled models
The experiment ran for 5 days on 16 GPUs in parallel.
The resulting Pareto front consists of approximately 300 neural network architectures.
We again compare against NASNets and MobileNets
V2, see Figure 6 for the results.
As the performance on Cifar-10 and Cifar-100 are highly correlated, the resulting Pareto fronts only consist of a few elements and differences are rather small.
When considering the performance on
Cifar-10 versus the number of parameters or multiply-add operations, LEMONADE is again on par with NASNets and MobileNets V2 for large models while it outperforms them in the area of small models.
In terms of inference time, LEMONADE clearly ﬁnds models superior to the baseline.
A. E XPERIMENTAL D ETAILS
All experiments were run on Nvidia Titan X GPUs, with code implemented in Keras (Chollet et al., 2015) and TensorFlow (Abadi et al., 2015) backend
. A.4. D ETAILED DESCRIPTION OF S EARCH S PACE I
All four initial networks had the following structure: three Conv-BatchNorm-ReLU blocks with intermittent Max-Pooling, followed by a global average pooling and a fully-connected layer with softmax activation.
The networks differ in the number of channels in the convolutions, and for further diversity two of them used depthwise-separable convolutions.
The models had 15 000, 50 000, 100 000 and 400 000 parameters, respectively.
We restricted the space of neural architectures such that every architecture must contain at least(depthwise separable) convolutions with a minimum number of ﬁlters, which lead to a lower bound on the number of parameters of approximately 10 000.
The network operators implicitly deﬁne the search space, we do not limit the size of discovered architectures.
A.4. D ETAILED DESCRIPTION OF S EARCH S PACE II
As done by Liu et al.
, we use k blocks composed of n cells each with stride 1 and k − 1 cells in between the blocks with stride 2 to reduce the spatial resolution, resulting in architectures being composed of k · n + ( k − 1) cells.
The cells are simply stacked sequentially; the input for each cells is the concatenated output of the previous two cells.
We set k = 3 , n = 2 during architecture search, that is we use 8 cells in total.
The number of ﬁlters in the ﬁrst block is ﬁxed as either 32 orand doubled whenever the spatial resolution is halved, resulting in F ∈ { 128 , 256 } ﬁlters in the last block.
The Pareto Front was initialized with four cells: the ﬁrst two cells consist of a single convolutional layer (followed by BatchNorm and ReLU) with F = 128 and F = 256 ﬁlters in the last block, [Figure] respectively.
The other two cells consist of a single depthwise separable convolution (followed by
BatchNorm and ReLU), again with either F = 128 or F = 256 ﬁlters.
A.4. D ETAILS ON VARYING M OBILENETS , NASN ETS AND MODEL AUGMENTATION
We evaluated MobileNets V1 and V2 with different width multiplier α ∈ { 0 . 1 , 0 . 2 , . . .
, 1 . 2 } and
NASNets with different number of cell per block ( ∈ { 2 , 4 , 6 , 8 } ) and different number of ﬁlters ( ∈ { 96 , 192 , 384 , 768 , 1536 } ).
We apply ”model augmentation” to models built from cells as done by Real et al.
Zoph et al.
(2018), i.e., we scale the size of models built from cells by varying the number of cells n ∈ { 2 , 4 , 6 , 8 } per block and the number of ﬁlters F ∈ { 64 , 128 , 256 , 512 } in the last block.
(Recall we used n = 2 , F ∈ { 128 , 256 } during architecture search.)
A.4. E XPERIMENTS IN S ECTION 5.1:
We apply the standard data augmentation scheme described by Loshchilov & Hutter (2017), as well as the recently proposed methods mixup (Zhang et al., 2017) and Cutout (Devries & Taylor, 2017).
The training set is split up in a training (45.000) and a validation (5.000) set for the purpose of architecture search.
We use weight decay ( 5 · 10 − 4 ) for all models.
We use batch size 64 throughout all experiments.
During architecture search as well as for generating the random search baseline, all models are trained for 20 epochs using SGD with cosine annealing (Loshchilov & Hutter, 2017), decaying the learning rate from 0 .
01 to 0 .
For evaluating the test performance, all models are trained from scratch on the training and validation set with the same setup as described above except for 1) we train for 600 epochs and 2) the initial learning rate is set to 0 .
While searching for convolutional cells on CIFAR-10, LEMONADE also ran for approximately 56 GPU days.
However, there were no signiﬁcant changes in the Pareto-front after approximately 24 GPU days.
The training setup (both [Table] during architecture search and ﬁnal evaluation) is exactly the same as before.
We present a detailed comparison of LEMONADE
A.4. E XPERIMENTS IN S ECTION 5.2:
The training setup on ImageNet64x64 is identical to Chrabaszcz et al.
A. A DDITIONAL R ESULTS
Below we plot results from additional experiments
[Table]
[Figure]
[Figure]
0_0_0: InputLayer 0_0_1: SeparableConv2D 0_0_2:
BatchNormalization 0_0_3: Activation 0_0_10: SeparableConv2D 0_0_17: SeparableConv2D 0_0_14: SeparableConv2D 0_0_22:
ConvexMerge 0_0_11: BatchNormalization 0_0_18:
BatchNormalization 0_0_15: BatchNormalization 0_0_12: Activation 0_0_19: Activation 0_0_16: Activation 0_0_21: ConvexMerge 0_0_39: ConvexMerge 0_0_20:
Add 0_0_33: SeparableConv2D 0_0_23:
ConvexMerge 0_0_34: BatchNormalization 0_0_36: SeparableConv2D 0_0_35: Activation 0_0_37: BatchNormalization 0_0_38: Activation 0_0_13: Add
[Figure]
: InputLayer 0_0_ [Figure] : SeparableConv2D 0_0_2:
BatchNormalization 0_0_3: Activation 0_0_7: SeparableConv2D 0_0_10: SeparableConv2D 0_ [Figure] _21: ConvexMerge 0_0_8:
BatchNormalization 0_0_9: Activation 0_0_17: SeparableConv2D 0_0_20:
ConvexMerge 0_0_11: BatchNormalization 0_0_18: BatchNormalization
[Figure] [Figure] _12: Activation
[Figure]
19: Activation
[Figure]
[Figure] [Figure] : Add
0_0_0: InputLayer 0_0_10: SeparableConv2D 0_0_30: SeparableConv2D 0_0_27: SeparableConv2D 0_0_20: SeparableConv2D 0_0_11: BatchNormalization 0_0_12: Activation 0_0_39: SeparableConv2D 0_0_45: SeparableConv2D 0_0_31: BatchNormalization 0_0_40: BatchNormalization 0_0_28:
BatchNormalization 0_0_32: Activation 0_0_41: Activation 0_0_29: Activation 0_0_35: ConvexMerge 0_0_21:
BatchNormalization 0_0_46: BatchNormalization 0_0_33: Add 0_0_34: ConvexMerge 0_0_22: Activation 0_0_47: Activation 0_0_23:
Add 0_0_48: ConvexMerge 0_0_13: Add 0_0_4: SeparableConv2D 0_0_5:
BatchNormalization 0_0_6: Activation 0_0_14: SeparableConv2D 0_0_15: BatchNormalization 0_0_16: Activation
[Figure]
[Figure]
[Figure]
[Figure]