Learning Transferable Architectures for Scalable Image Recognition
- Publication
- CVPR 2018Conference
- First submitted to arXiv
- arXiv:1707.07012
Cite this paper · BibTeX
The citation identifies the linked source version. It cites the original paper and its authors.
@misc{classiccnnsnasnet2017,
title = {{Learning Transferable Architectures for Scalable Image Recognition}},
author = {Barret Zoph and Vijay Vasudevan and Jonathon Shlens and Quoc V. Le},
year = {2017},
eprint = {1707.07012},
archivePrefix = {arXiv},
url = {https://arxiv.org/abs/1707.07012}
}
When you have a hammer, everything looks like a nail.
*
Since the rise of deep learning neural networks, constructing an effective network architecture has become a significant challenge.
To tackle this, researchers have proposed various methods for automatically searching for network architectures, known as Neural Architecture Search (NAS).
Among the leaders in this field is the Google team, which you can find employing NAS techniques in various applications.
Defining the Problem
Since the popularity of AlexNet, numerous network architectures have flourished between AlexNet and this paper’s publication in 2017.
However, these architectures are often based on experience and intuition rather than rigorous theoretical foundations.
This leads to several issues, such as:
- Uncertainty about which architectures are the best.
- Designing architectures requires extensive expertise and experience.
- The design process is often time-consuming and resource-intensive.
We can leave the question of theoretical foundations aside here. This paper proposes a way to search for network architectures automatically, which may address some of the problems above.
Solving the Problem
Transferable Architectures
At the time, ImageNet accuracy was an important benchmark for image classification research.
However, ImageNet is too large, and directly searching for suitable architectures on ImageNet would consume considerable resources.
The authors therefore search for cell structures on CIFAR-10, then adjust the repeat count and filter count to reuse those structures on ImageNet. The CIFAR-10 weights are not transferred.
Fundamental Structures
The authors propose two fundamental structures for constructing network architectures:
- Normal Cell: This structure maintains the dimensions of the input feature map (i.e., height and width). Information retention requires a separate assessment of the cell’s operations.
- Reduction Cell: This halves the feature map's height and width by using stride 2 in the initial operations on its inputs.
Although Reduction and Normal Cells can share the same architecture, learning two separate architectures is beneficial based on experience.
Additionally, each time the spatial dimensions are reduced, the authors double the channel count to increase representational capacity; this does not exactly recover information lost through downsampling.
Repeated modules in Inception and ResNet inspired the design. The overall cell placement is chosen by hand; the controller searches inside the Normal and Reduction Cells. Their repetition count and initial filter count remain adjustable.
The Search Process
In the search space, each convolutional cell receives two initial hidden states, and , derived from the outputs of the previous two lower-level cells or the input image.
A controller RNN proposes candidate cells. During search, each candidate network trains for a fixed 20 epochs on CIFAR-10; held-out validation accuracy becomes the reward for a PPO update. After search, the top 250 architectures receive fuller training to select the final cell. The “hidden states” below are feature tensors inside a candidate cell, distinct from the controller RNN's own hidden state.
The paper also compares random search in the same space. It performs slightly worse than reinforcement learning, but the gap is modest. The main contribution is the transferable, scalable cell search space; the results should not all be attributed to PPO.
-
The Prediction Process of the RNN
The RNN recursively predicts the structure of the convolutional cells following these steps:
- Select Hidden State: Choose a hidden state from , , or the set of hidden states generated by previous blocks.
- Select Second Hidden State: Choose a second hidden state from the same options as Step 1.
- Select Operation: Select an operation to apply to the hidden state chosen in Step 1.
- Select Second Operation: Select an operation to apply to the hidden state chosen in Step 2.
- Combine Outputs: Choose a method to combine the outputs of Steps 3 and 4 to produce a new hidden state.
-
Repeating Prediction Steps and Blocks
The RNN repeats the above five prediction steps B times, corresponding to B blocks in the convolutional cell.
These experiments use ; the authors did not exhaustively search other values.
Each round of prediction adds the newly created hidden state to the existing set of hidden states as potential inputs for subsequent blocks.
-
Operation Selection
The RNN selects operations from the following list, based on their popularity in the CNN literature:
- Identity
- 1x3 then 3x1 convolution
- 1x7 then 7x1 convolution
- 3x3 dilated convolution
- 3x3 average pooling
- 3x3 max pooling
- 5x5 max pooling
- 7x7 max pooling
- 1x1 convolution
- 3x3 convolution
- 3x3 depthwise separable convolution
- 5x5 depthwise separable convolution
- 7x7 depthwise separable convolution
-
Combination Methods
In Step 5, the RNN chooses elementwise addition or channel concatenation to produce a new state. Later blocks may read that state. At the end of a NASNet-A cell, states unused by later blocks are concatenated along channels to form the cell output.
DropPath Module
In previous literature, DropPath technology was used to prevent overfitting and improve model generalization.
When training NASNet, the authors tried fixed-probability DropPath and found that it worked poorly.
They instead used ScheduledDropPath, increasing the probability of dropping paths inside a cell linearly during training. The paper reports improvements on both CIFAR-10 and ImageNet.
Search Experiment Results
The CIFAR-10 search produced the two NASNet-A cells above. Repeating them according to Figure 2 gives the full classifier. The search used roughly 500 GPUs for four days; that is search cost, not inference cost.
While the diagram may seem complex at first glance, it is quite understandable:
- Each green node combines two inputs after the yellow operations. Later blocks can reuse states produced by earlier blocks; the pink node concatenates the final cell output.
- Insert a
Reduction Cellwhere spatial resolution must shrink, and repeatNormal Cellelsewhere. These are different cells in the network, not alternative data paths inside a single cell.
Discussion
Results on CIFAR-10
As seen in the table, the large NASNet-A model with cutout data augmentation achieved a state-of-the-art error rate of 2.40% (average of five runs), slightly better than the previous best of 2.56%.
The authors noted that their best single-run error rate reached 2.19%.
Transferring Architectures to ImageNet
Only the network structure was transferred here; the model was retrained.
Several NASNet-A configurations show higher or similar accuracy with fewer parameters and multiply-adds than their listed comparators. The input resolutions differ, so these rows are not a controlled same-input ablation.
The largest NASNet-A achieves 82.7% single-model ImageNet top-1 accuracy, 1.2 percentage points above DPN-131 (81.5%), which the paper calls the previous published best. SENet also reaches 82.7% in the table; the authors describe it as a contemporaneous unpublished result, so NASNet is not alone at the highest listed accuracy.
Evaluation on Mobile Devices
With 224×224 ImageNet inputs, MobileNet-224 reaches 70.6% top-1 at 569M multiply-adds, and ShuffleNet (2x) reaches 70.9% at 524M.
NASNet-A (4 @ 1056) stays near this compute range at 564M multiply-adds and reaches 74.0% top-1, 3.1 percentage points above ShuffleNet. Its 5.3M parameters exceed MobileNet's 4.2M, so it is not smaller on every resource measure.
Conclusion
The paper studies a way to learn an architecture on a dataset of interest: search for repeatable cells on CIFAR-10, transfer their structure to ImageNet, and train the weights again.
By separating a cell's internal structure from network depth, the authors can search for Normal and Reduction Cells once, then adjust and the filter count to build models at different compute budgets. The search itself remains expensive.
Researchers without enough compute to run the search themselves can reuse the published cell structures. They still need to train and measure the resulting model for their own task.