Searching for A Robust Neural Architecture in Four GPU Hours

Xuanyi Dong, Yi Yang

TL;DR

GDAS (Gradient-based search using Differentiable Architecture Sampler) slashes the time required for Neural Architecture Search (NAS) from thousands of GPU hours to just four. By using a differentiable sampling mechanism over a Directed Acyclic Graph (DAG), the authors turn a massive discrete search problem into an efficient gradient descent optimization that achieves state-of-the-art performance on image and language tasks.

What Problem Does This Paper Address?

Designing high-performance neural networks used to be a manual, "trial-and-error" process for human experts. Neural Architecture Search (NAS) emerged to automate this, but early methods were prohibitively expensive. Techniques based on Reinforcement Learning (RL) or Evolutionary Algorithms (EA) often required training thousands of candidate models, consuming upwards of 3,000 GPU hours to find a single good architecture.

The core challenge is that the "search space" (the set of all possible ways to connect layers) is discrete and astronomical in size. You can't easily use calculus (gradients) to navigate a space where you are choosing between "Option A" and "Option B." This paper aims to make the search process differentiable and efficient enough to run on a single commodity GPU in a single afternoon.

Methods

The authors represent the search space as a Directed Acyclic Graph (DAG), where nodes are feature tensors and edges represent operations (like convolutions or pooling).

The GDAS framework on a DAG, illustrating the differentiable sampling of edges between nodes.

The "secret sauce" is the Differentiable Architecture Sampler (GDAS):

  • Gumbel-Max Trick: To bridge the gap between discrete choices and continuous optimization, they use the Gumbel-Max trick. This allows them to sample a specific sub-graph (a single path through the DAG) during the forward pass while keeping the process mathematically differentiable during the backward pass.
  • Sub-graph Sampling: Unlike some previous differentiable methods (like DARTS) that keep all possible operations active at once—which is memory-intensive—GDAS only samples and trains a part of the graph at each iteration. This prevents different operations from "competing" and canceling each other out, leading to more stable training.
  • AOS (Alternative Optimization Strategy): They alternate between updating the weights of the operations (using the training set) and updating the architecture's "probability distribution" (using the validation set).
The macro-architecture used for CIFAR and ImageNet, showing how searched blocks are stacked with reduction cells.

Datasets

The authors validated their approach across several standard benchmarks:

  • CIFAR-10 & CIFAR-100: Small-scale image classification.
  • ImageNet: Large-scale image classification (used to test how well the discovered "cells" transfer to bigger tasks).
  • Penn Treebank (PTB): A standard dataset for language modeling (RNN search).
  • WikiText-2 (WT2): Another language modeling benchmark to test the transferability of discovered RNN cells.

Key Insights and Ideas

  • Efficiency is King: By sampling sub-graphs, GDAS reduces the search time by roughly 10,000x compared to the original NASNet, without sacrificing accuracy.
  • The "Acceleration Trick": During the forward pass, the model acts like a discrete network (using argmax). During the backward pass, it uses a "soft" relaxation (softmax). This saves massive amounts of GPU memory—about $|F|$ times less (where $F$ is the number of candidate functions).
  • Fixed Reduction Cells: Interestingly, the authors found that using a simple, human-designed "reduction cell" (to shrink image dimensions) while only searching for the "normal cell" actually yielded better results than searching for both. This suggests that some architectural components are better off following established engineering principles.

Key Results

  • CIFAR-10: Discovered an architecture with only 2.5M parameters that achieved a 2.82% test error. The search took only 4 GPU hours on a single NVIDIA V100.
  • ImageNet: When the cell found on CIFAR-10 was scaled up for ImageNet, it achieved a 26.0% Top-1 error, which is competitive with models that took months of compute to find.
  • Language Modeling: On the PTB dataset, GDAS found an RNN cell that achieved a test perplexity of 57.5, outperforming many manually designed and automatically searched models.

Limitations and Future Work

While GDAS is incredibly fast, the authors noted that direct search on large-scale datasets (like ImageNet) is still tricky. When they tried to search directly on ImageNet using the same hyperparameters as CIFAR, the results weren't as strong. This suggests that NAS still requires careful hyperparameter tuning when moving between vastly different data scales.

Future work involves refining these hyperparameters to allow for direct, high-speed searching on massive datasets without needing to "transfer" from smaller ones like CIFAR.

Summary updated

BibTeX
@inproceedings{dong2019searching,
  author = {Xuanyi Dong and Yi Yang},
  title = {{Searching for A Robust Neural Architecture in Four GPU Hours}},
  booktitle = {CVPR},
  year = {2019},
  url = {https://openreview.net/forum?id=ri-Vi3Gguar},
}
Figure