Abstract
Can we automatically design a Convolutional Network (ConvNet) with the highest image classification accuracy under the latency constraint of a mobile device? Neural Architecture Search (NAS) for ConvNet design is a challenging problem due to the combinatorially large design space and search time (at least 200 GPU-hours). To alleviate this complexity, we propose Single-Path NAS, a novel differentiable NAS method for designing device-efficient ConvNets in less than 4 hours.
- Novel NAS formulation: our method introduces a single-path, over-parameterized ConvNet to encode all architectural decisions with shared convolutional kernel parameters.
- NAS efficiency: Our method decreases the NAS search cost down to 8 epochs (30 TPU-hours), i.e., up to 5,000x faster compared to prior work.
- On-device image classification: Single-Path NAS achieves 74.96% top-1 accuracy on ImageNet with 79ms inference latency on a Pixel 1 phone, which is state-of-the-art accuracy compared to NAS methods with similar latency (<80ms).
Introduction
Designing Convolutional Neural Networks (ConvNets) for mobile devices is a balancing act: achieving the highest possible accuracy within strict hardware constraints like latency and power. Neural Architecture Search (NAS) was created to automate this design process, but it is traditionally computationally expensive.
Traditional "multi-path" NAS methods construct a massive "supernet" where every possible operation (e.g., a 3x3 conv, a 5x5 conv, or a skip connection) is a separate branch. This leads to a combinatorial explosion of parameters and memory usage, often requiring hundreds or thousands of GPU-hours to find an optimal design. Single-Path NAS aims to eliminate this inefficiency by treating architectural choices as subsets of a single path.
Methodology
The core innovation is the Single-Path NAS formulation. Instead of building a supernet with multiple parallel branches, the authors use a single path with an over-parameterized "superkernel."
- Superkernel Formulation: To choose between a 3x3 and a 5x5 convolution, the model uses a 5x5 weight matrix. The 3x3 kernel is simply the "inner core" of the 5x5 weights. An indicator function (relaxed to a sigmoid during training) decides whether to use just the inner core or the full 5x5 shell.
- Expansion and Skip-ops: Similarly, expansion ratios (the number of channels in a bottleneck layer) are treated as subsets of the maximum possible channels. A "skip-op" is handled by a decision to "zero out" all weights in that layer.
- Differentiable Search: Because these architectural decisions are formulated as trainable parameters within the weights themselves, the entire architecture can be optimized using gradient descent directly on the target task (ImageNet).
- Latency-Aware Loss: The loss function combines standard cross-entropy with a latency penalty, estimated using a pre-profiled runtime model of the target hardware (a Pixel 1 smartphone).
Key Results
Single-Path NAS achieves state-of-the-art results while drastically reducing the computational cost of the search process.
- Search Speed: Single-Path NAS completed its search in just 3.75 hours (30 TPU-hours) over 8 epochs. This is 5,000x faster than MnasNet and 25x faster than ProxylessNAS.
- Accuracy and Efficiency: The resulting model achieved 74.96% top-1 accuracy on ImageNet with a latency of 79ms on a Pixel 1. This outperforms other hardware-aware NAS methods (like FBNet and MnasNet) in the same latency bracket by approximately 0.3% to 0.8% in accuracy.
- Predictive Accuracy: The pre-profiled runtime model was highly effective, with only a 1.76% average prediction error compared to actual on-device measurements.
Conclusion
Single-Path NAS demonstrates that treating candidate operations as nested versions of one another allows for a significantly more efficient search space. By moving from a multi-path to a single-path supernet, the memory footprint is reduced enough to perform the search directly on large-scale datasets like ImageNet. While currently optimized for the MobileNetV2 macro-architecture, this approach provides a generalizable framework for hardware-aware design that can be extended to other constraints like power consumption or memory footprint.
Reference: Stamoulis, D., et al. (2019). Single-Path NAS: Device-Aware Efficient ConvNet Design. arXiv:1905.04159v1.
Summary updated