Neighborhood-Aware Neural Architecture Search

Xiaofang Wang, Shengcao Cao, Mengtian Li, Kris Kitani

TL;DR

Neural Architecture Search (NAS) often finds architectures that perform well during search but fail to generalize to new datasets. This paper introduces Neighborhood-Aware NAS, a formulation that searches for "flat-minima architectures"—those whose performance remains stable even when small changes are made to their structure. By optimizing for the average performance of an architecture's "neighborhood," the authors achieve state-of-the-art results on ImageNet and CIFAR-100, significantly improving generalization.

What Problem Does This Paper Address?

The central challenge in NAS is the "generalization gap." Most search algorithms aim to minimize validation loss within a specific search setting (often involving weight sharing, proxy datasets, or shortened training schedules). However, an architecture that is "optimal" in these artificial conditions often performs poorly when trained from scratch on a full dataset.

The authors argue that this happens because standard NAS identifies "sharp minima" in the architecture space—solutions that work perfectly in one specific configuration but break if anything changes. Drawing inspiration from neural network training, where flat minima in the weight space generalize better, the authors propose that the same principle applies to the architecture space.

Methods

The core idea is to replace the standard optimization objective—finding the single best architecture $\alpha$—with a neighborhood-aware objective. Instead of just looking at $f(\alpha)$, they look at the aggregated performance $g(f(\mathcal{N}(\alpha)))$ of all architectures in the neighborhood $\mathcal{N}(\alpha)$.

Key Innovations:

  1. Neighborhood Definition: They define a neighborhood based on architectural distance (e.g., how many operations differ between two cells). A "neighbor" might be an architecture where one convolution is replaced by a skip connection.
  2. Aggregation Functions: They primarily use the mean performance of the neighborhood. This ensures the chosen architecture is not just a lucky outlier but sits in a "wide valley" of high performance.
  3. Differentiable Neighborhoods: To make this work with gradient-based methods like DARTS, they developed a differentiable neighborhood representation. They inject small, re-normalized noise into the continuous architecture parameters $\alpha$, allowing the algorithm to "sense" the surrounding landscape and backpropagate through the neighborhood aggregation.
The loss landscape of NA-DARTS (right) is significantly flatter than standard DARTS (left), indicating a more robust architecture.

Datasets

The authors validated their approach across several standard benchmarks:

  • NAS-Bench-201: A simulated environment used for initial proof-of-concept and testing their Random Search variant (NA-RS).
  • CIFAR-10 & CIFAR-100: Used for both searching and evaluating generalization.
  • ImageNet & ImageNet-16-120: Used to test how well architectures searched on small datasets (CIFAR-10) transfer to large-scale, real-world tasks.

Key Insights and Ideas

  • Flatness = Generalization: The "aha moment" is the empirical validation that architectures with low neighborhood variance (flat minima) consistently outperform those with high variance (sharp minima) when moving from search to test settings.
  • Ranking Matters: Standard NAS criteria often provide a poor ranking of candidate architectures. The authors show that their neighborhood-aware criterion (using the mean) provides a much higher correlation (Kendall’s Tau) with the true ground-truth performance.
  • Robustness to Failure Modes: In specific search spaces where DARTS typically fails (like the "S3" space where it tends to collapse into skip connections), NA-DARTS remains robust and finds high-performing models.
Table 1 shows that flat-minima architectures consistently achieve lower test errors across all datasets compared to sharp-minima ones.

Key Results

  • NA-DARTS vs. DARTS: By simply adding the neighborhood-aware formulation, NA-DARTS outperformed standard DARTS by 1.18% on CIFAR-100 and 1.2% on ImageNet.
  • State-of-the-Art: NA-DARTS achieved a top-1 test error of 25.5% on ImageNet, outperforming many complex NAS variants like P-DARTS and PC-DARTS.
  • Efficiency: Despite evaluating neighborhoods, the search cost remains manageable. NA-DARTS requires roughly 1.1 GPU days, which is comparable to the 1.0 GPU day required for second-order DARTS.

Limitations and Future Work

  • Search Cost: While the authors optimized the mean aggregation to be memory-efficient, evaluating multiple neighbors per step naturally increases the computational overhead compared to single-point optimization.
  • Hyperparameter Sensitivity: The method introduces new hyperparameters, such as the distance threshold $d$ and the noise level $\epsilon$. While the authors provide ablation studies, the optimal values might vary across different search spaces.
  • Discrete vs. Continuous: The mapping between the continuous relaxation used in gradients and the discrete architectural perturbations is an approximation. Further refining this "differentiable neighborhood" could lead to even more stable search processes.

Summary updated

BibTeX
@inproceedings{wang2021neighborhood,
  author = {Xiaofang Wang and Shengcao Cao and Mengtian Li and Kris Kitani},
  title = {{Neighborhood-Aware Neural Architecture Search}},
  booktitle = {BMVC},
  year = {2021},
}
Figure