Abstract
Existing neural architecture search (NAS) methods often return an architecture with good search performance but generalizes poorly to the test setting. To achieve better generalization, we propose a novel neighborhood-aware NAS formulation to identify flat-minima architectures in the search space, with the assumption that flat minima generalize better than sharp minima. The phrase "flat-minima architecture" refers to architectures whose performance is stable under small perturbations in the architecture (e.g., replacing a convolution with a skip connection). Our formulation takes the "flatness" of an architecture into account by aggregating the performance over the neighborhood of this architecture. We demonstrate a principled way to apply our formulation to existing search algorithms, including sampling-based algorithms and gradient-based algorithms. To facilitate the application to gradient-based algorithms, we also propose a differentiable representation for the neighborhood of architectures. Based on our formulation, we propose neighborhood-aware random search (NA-RS) and neighborhood-aware differentiable architecture search (NA-DARTS). Notably, by simply augmenting DARTS with our formulation, NA-DARTS outperforms DARTS and achieves state-of-the-art performance on established benchmarks, including CIFAR-10, CIFAR-100 and ImageNet.
Introduction
Neural Architecture Search (NAS) has revolutionized the design of deep learning models by automating the discovery of high-performing architectures. However, a persistent challenge in NAS is the "generalization gap": architectures that exhibit superior performance during the search phase often fail to maintain that performance when evaluated on the final test set. This discrepancy is frequently attributed to the search algorithm converging on "brittle" or "sharp" minima in the architecture space.
This paper introduces Neighborhood-Aware NAS, a novel formulation designed to identify "flat-minima" architectures. By prioritizing designs whose performance remains stable under small structural perturbations, the proposed method significantly improves generalization across various benchmarks.
The Problem: Sharp Minima and the Generalization Gap
Standard NAS algorithms typically minimize validation loss on a proxy task to find an optimal architecture. However, the authors argue that this process often targets sharp minima—solutions that perform exceptionally well at a specific point but degrade rapidly if the environment changes. In the context of NAS, this change occurs when transitioning from the weight-sharing search setting (with proxy data) to the full-training evaluation setting.
Methodology: Neighborhood-Aware Formulation
To address this, the authors propose shifting the optimization objective from a single architecture $\alpha$ to a neighborhood $\mathcal{N}(\alpha)$. A neighbor is defined as an architecture that differs by a minimal number of operations, such as replacing a $3\times3$ convolution with a skip connection.
Aggregated Objective
Instead of minimizing the error of a single point, the objective becomes the aggregated error (typically the mean) of all architectures within the neighborhood: $$ \min_{\alpha} \mathbb{E}_{\alpha' \in \mathcal{N}(\alpha)} [ \mathcal{L}_{val}(\alpha', w^*(\alpha')) ] $$ This formulation ensures that the chosen architecture is not just a "lucky" outlier but resides in a robust, high-performing region of the search space.
Differentiable Neighborhoods (NA-DARTS)
To apply this concept to gradient-based methods like DARTS, the authors introduce a differentiable neighborhood representation. By injecting controlled noise into the architecture parameters during search, the model effectively explores the local landscape, allowing the gradient descent process to gravitate toward flatter regions.
Empirical Evidence and Results
The authors validated their approach using NAS-Bench-201 and standard datasets like CIFAR and ImageNet.
Flatness and Generalization
The core assumption—that flat minima generalize better—was empirically verified. As shown in the results below, architectures identified as "flat" consistently achieved lower test errors than their "sharp" counterparts. Furthermore, the neighborhood-aware approach significantly improved the ranking correlation (Kendall's Tau) between search-time performance and final test performance, indicating a more reliable search process.
Benchmarking Performance
The "Neighborhood-Aware" versions of existing algorithms demonstrated state-of-the-art results:
- NA-DARTS on CIFAR-100: Achieved a test error of 16.48%, a substantial improvement over the standard DARTS baseline of 17.72%.
- ImageNet: NA-DARTS reached a top-1 error of 25.5%, outperforming both standard DARTS (26.7%) and more complex NAS variants.
- Robustness: In challenging search spaces (e.g., the "S3" space), NA-DARTS prevented the "performance collapse" often seen in differentiable NAS, reducing CIFAR-100 test error from 22.49% to 18.86%.
Conclusion
Neighborhood-Aware NAS provides a principled and effective way to bridge the generalization gap in architecture search. By incorporating the "flatness" of the loss landscape into the search objective, the method identifies robust architectures that translate well from proxy tasks to real-world applications. This augmentation offers a powerful tool for enhancing the reliability of both sampling-based and gradient-based NAS algorithms.
Summary updated