You Only Search Once: Single Shot Neural Architecture Search via Direct Sparse Optimization

Xinbang Zhang, Zehao Huang, Naiyan Wang

TL;DR

DSO-NAS reframes Neural Architecture Search (NAS) as a network pruning problem on a fully connected graph. By applying sparse optimization ($L_1$ regularization) to continuous scaling factors on information flows, it unifies weight learning and architecture search into a single differentiable process, enabling direct, efficient architecture search on large-scale datasets like ImageNet in just hours.

What Problem Does This Paper Address?

While Deep Neural Networks (DNNs) have eliminated the need for manual feature engineering, they have introduced a new bottleneck: "network engineering." Designing optimal neural network architectures currently requires immense human expertise and trial-and-error.

Automating this via Neural Architecture Search (NAS) has shown great promise, but early methods relying on reinforcement learning (RL) or evolutionary algorithms are notoriously resource-hungry—often requiring hundreds of GPUs running for days. Newer gradient-based methods (like DARTS) speed up the process but remain constrained by rigid search spaces, such as forcing every operation to have a fixed number of inputs or requiring blocks to share identical structures. The authors of this paper tackle these efficiency and flexibility constraints to create a NAS method that can search directly on large datasets without restrictive structural assumptions.

Methods

The authors introduce Direct Sparse Optimization NAS (DSO-NAS), which treats architecture search as an edge-pruning problem on a "super-graph."

  1. Super-Graph Search Space: Instead of building an architecture from scratch, they start with a completely connected Directed Acyclic Graph (DAG) representing a neural network block. Every operation is connected to all previous operations and to the block's input.
  2. Scaling Factors & Sparse Regularization: They introduce a continuous scaling factor ($\lambda$) to control the information flow across each edge. By adding an $L_1$ regularization penalty ($\gamma \|\lambda\|_1$) to the loss function, the optimization forces non-essential connections to become exactly zero.
  3. APG-NAG Optimization: To stably solve this sparse optimization problem within a stochastic deep learning framework, they utilize a modified Accelerated Proximal Gradient method combined with Nesterov Accelerated Gradient (APG-NAG).
Overview of the block search and pruning process
  1. Split Training: To prevent the architecture from overfitting to the training data, the authors split the dataset into two halves: one half updates the network weights ($W$), while the other updates the architecture scaling factors ($\lambda$).
  2. Budget-Aware Search: They introduce Adaptive FLOPs and Adaptive MAC (Memory Access Cost) regularizations. These methods dynamically adjust the penalty parameter ($\gamma$) for each block based on its current computational footprint, preventing blocks from being completely pruned or exploding in complexity.

Datasets

The method was evaluated on two benchmark datasets:

  • CIFAR-10: A standard image classification dataset consisting of 50,000 training images and 10,000 testing images.
  • ImageNet (ILSVRC 2012): A large-scale dataset used to demonstrate the scalability of DSO-NAS, both by transferring a block discovered on CIFAR-10 and by searching directly on ImageNet from scratch.

Key Insights and Ideas

  • NAS as Pruning: Shifting the perspective of NAS from "generation" to "pruning" allows the use of well-studied, theoretically sound sparse optimization techniques.
  • The Overfitting Trap: In standard network pruning, search spaces are small, so weights and structures can be learned on the same data. In NAS, the search space is massive. The authors discovered that splitting the training data between weights and architecture parameters is absolutely vital to prevent the architecture from generalizing poorly to the test set.
  • Compute Balancing: Without budget-aware regularizers, blocks immediately following reduction layers naturally become disproportionately complex. Dynamically scaling the penalty based on current FLOPs ensures a smooth, efficient distribution of compute across the entire macro-architecture.
Performance and distribution of the Adaptive FLOPs technique

Key Results

  • CIFAR-10: DSO-NAS achieved an average test error of 2.84% with 3.0M parameters, requiring only 1 GPU day for the search. This matches or outperforms complex RL and evolutionary methods while cutting search costs from thousands of GPU days to one.
  • ImageNet: When searching directly on ImageNet without block-sharing constraints, DSO-NAS achieved a top-1 test error of 25.4% under a 600M FLOPs budget. The search completed in just 18 hours using 8 GPUs (6 GPU days total), demonstrating true scalability to large datasets.

Limitations and Future Work

Although DSO-NAS successfully incorporates computational budgets like FLOPs and MAC, actual deployment speeds on hardware can still vary due to low-level hardware constraints like cache size and memory bandwidth. The authors note that incorporating explicit hardware-specific features into the optimization loop for true network-hardware co-design remains an important direction for future work.

Summary updated

BibTeX
@article{zhang2021you,
  author = {Xinbang Zhang and Zehao Huang and Naiyan Wang},
  title = {{You Only Search Once: Single Shot Neural Architecture Search via Direct Sparse Optimization}},
  journal = {IEEE Trans. Pattern Anal. Mach. Intell.},
  year = {2021},
  doi = {10.1109/tpami.2020.3020300},
}
Figure