RC-DARTS: Resource Constrained Differentiable Architecture Search

Xiaojie Jin, Jiang Wang, Joshua Slocum, Ming-Hsuan Yang, Shengyang Dai, Shuicheng Yan, Jiashi FengarXiv 2019

Abstract

Recent advances show that Neural Architectural Search (NAS) methods are able to find state-of-the-art image classification deep architectures. In this paper, we consider the one-shot NAS problem for resource-constrained applications. This problem is of great interest because it is critical to choose different architectures according to task complexity when the resource is constrained. Previous techniques are either too slow for one-shot learning or do not take the resource constraint into consideration. In this paper, we propose the resource constrained differentiable architecture search (RC-DARTS) method to learn architectures that are significantly smaller and faster while achieving comparable accuracy. Specifically, we propose to formulate the RC-DARTS task as a constrained optimization problem by adding the resource constraint. An iterative projection method is proposed to solve the given constrained optimization problem. We also propose a multi-level search strategy to enable layers at different depths to adaptively learn different types of neural architectures. Through extensive experiments on the Cifar10 and ImageNet datasets, we show that the RC-DARTS method learns lightweight neural architectures which have smaller model size and lower computational complexity while achieving comparable or better performances than the state-of-the-art methods.

Introduction

Neural Architecture Search (NAS) has successfully automated the design of high-performing models, but it faces two major hurdles: resource blindness and computational cost. Most NAS methods optimize solely for accuracy, resulting in "over-engineered" models that are too large or slow for mobile and edge devices. While the original Differentiable Architecture Search (DARTS) made NAS much faster by using gradient-based optimization, it lacked a mechanism to enforce explicit resource constraints like FLOPs and parameter counts.

RC-DARTS addresses these gaps by incorporating resource constraints directly into the optimization process. This allows engineers to discover the best architecture within a specific hardware budget (e.g., fewer than $X$ FLOPs and $Y$ parameters) in a fraction of the time required by reinforcement learning-based approaches.

Methodology

The authors introduce three key innovations to the DARTS framework:

Constrained Optimization via Iterative Projection

RC-DARTS formulates NAS as a constrained optimization problem. Unlike standard DARTS, which focuses only on minimizing validation loss, RC-DARTS uses a two-phase training loop:

  1. Phase I (Unconstrained): The model updates its architecture parameters to minimize validation loss.
  2. Phase II (Projection): The architecture parameters are "projected" back into a feasible region defined by the resource constraints. Since the resource cost function is non-convex, this is solved using a Lagrangian formulation and gradient descent.
The iterative projection method for resource-constrained optimization.

Differentiable Resource Costs

To make constraints work with gradients, the authors approximate the cost (FLOPs/Parameters) of a cell by taking the expected cost across all possible operations, weighted by the architecture's softmax probabilities.

Multi-level Search (MLS)

Standard NAS usually searches for one "cell" and repeats it throughout the network. RC-DARTS recognizes that layers at different depths have different needs. Early layers handle high-resolution data and benefit from different operations than late, low-resolution layers. The network is divided into groups that can learn distinct architectures adaptively.

Experimental Results

The authors evaluated RC-DARTS on CIFAR-10 and ImageNet, demonstrating that the method is remarkably efficient, finding high-performing architectures in about 1 GPU day.

  • CIFAR-10: RC-DARTS found a model with 2.81% error using only 3.3M parameters, outperforming standard DARTS while searching 4x faster.
  • ImageNet: A model searched on CIFAR-10 and transferred to ImageNet (RC-DARTS-C58) achieved a 25.1% Top-1 error with 4.9M parameters and 590M FLOPs. This outperforms MobileNetV2 (26.3% error) while maintaining a smaller footprint.
Discovered mid-level and high-level normal cells using RC-DARTS.

Key Insights

  • Constraints as Regularizers: Adding resource constraints helps prevent the architecture search from overfitting. By limiting the search space to simpler models, the resulting architectures generalized better to the test set.
  • Depth-Adaptive Needs: The multi-level search results show that early layers tend to prefer operations that manage computational complexity (FLOPs), while deeper layers focus on representational capacity (Parameters).

Conclusion

RC-DARTS provides a robust framework for hardware-aware NAS. By using iterative projection and multi-level search, it discovers lightweight architectures that are both accurate and efficient. Future work may involve extending this to non-linear hardware constraints like actual device latency and integrating modern primitives like Inverted Residual Blocks.

Summary updated

BibTeX
@misc{jin2019rc,
  author = {Xiaojie Jin and Jiang Wang and Joshua Slocum and Ming-Hsuan Yang and Shengyang Dai and Shuicheng YAN and Jiashi Feng},
  title = {{RC-DARTS: Resource Constrained Differentiable Architecture Search}},
  year = {2019},
  eprint = {1912.12814},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/1912.12814},
}
Figure