aw_nas: A Modularized and Extensible NAS framework

Xuefei Ning, Changcheng Tang, Wenshuo Li, Songyi Yang, Tianchen Zhao, Niansong Zhang, Tianyi Lu, Shuang Liang, Huazhong Yang, Yu WangarXiv 2020

Introduction

Neural Architecture Search (NAS) has significantly advanced the automated design of deep learning models. Despite its success, the field faces challenges regarding reproducibility and the fragmentation of codebases. Most NAS implementations are siloed, making it difficult to adapt existing methods to new tasks or hardware constraints. To address these issues, we introduce aw_nas, an open-source Python framework designed for modularity and extensibility.

Problem Statement

The current NAS landscape is characterized by three primary hurdles:

  1. Implementation Complexity: Developing new NAS algorithms from scratch is resource-intensive.
  2. Lack of Comparability: Disentangling the benefits of a search algorithm from the tuning of its search space is often impossible in monolithic codebases.
  3. Hardware Agnosticism: Many frameworks prioritize accuracy while neglecting real-world performance metrics like latency and energy consumption on specific hardware (e.g., GPUs, FPGAs).

The aw_nas Architecture

The core innovation of aw_nas is the decomposition of NAS algorithms into seven interchangeable modular components:

  • Dataset: Defines the data source (e.g., CIFAR, ImageNet).
  • Objective: Specifies the rewards and optimization targets (e.g., accuracy, latency).
  • Search Space: Defines the architectural primitives and connectivity rules.
  • Controller: The search engine (e.g., RL, evolutionary, or gradient-based).
  • Weights Manager: Handles parameter sharing strategies (e.g., supernets).
  • Evaluator: Assesses the performance of candidate architectures.
  • Trainer: Orchestrates the overall search flow and component interactions.
The modular architecture of the aw_nas framework, highlighting the "rollout" interface between components.

The "rollout" abstraction serves as a standardized interface, allowing researchers to swap components—such as replacing a Reinforcement Learning controller with a Differentiable one—without modifying the rest of the pipeline.

aw_nas includes a dedicated Hardware Profiling Pipeline. This tool profiles architectural primitives on target hardware to build sophisticated cost prediction models. Research within the framework revealed that "naive addition" of block latencies is insufficient for accurate GPU performance prediction due to non-linearities in caching and parallelism. Consequently, aw_nas utilizes LSTM-based models to capture sequential dependencies, achieving significantly higher accuracy in estimating latency and energy consumption.

Experimental Results

The framework's utility was validated through several experiments:

  • Reproducibility: aw_nas successfully reproduced the performance of established algorithms like ENAS, DARTS, and PC-DARTS on CIFAR-10.
  • Cost Prediction Accuracy: The LSTM-based hardware cost models achieved a 3.6x improvement in rMSE for GPU latency and a 9.7x improvement for FPGA energy estimation over baseline methods.
  • Task Versatility: The framework was applied to object detection on the VOC dataset. As shown in Figure 4, aw_nas identified a Pareto front of architectures that outperform standard MobileNet-V3 baselines in the trade-off between VOC mAP and parameter count.
Pareto front of architectures discovered for object detection on the VOC dataset, comparing accuracy against parameter count.

Conclusion

aw_nas provides a unified, modular platform that mitigates the fragmentation in NAS research. By standardizing interfaces and integrating hardware-aware profiling, it enables more rigorous comparisons and the development of models optimized for diverse deployment scenarios. Future work will focus on scaling the framework to larger applications and enhancing its accessibility for non-expert users.

Code Availability: The framework is open-source and available at https://github.com/walkerning/aw_nas.

Summary updated

Abstract

Neural Architecture Search (NAS) has received extensive attention due to its capability to discover neural network architectures in an automated manner. aw_nas is an open-source Python framework implementing various NAS algorithms in a modularized manner. Currently, aw_nas can be used to reproduce the results of mainstream NAS algorithms of various types. Also, due to the modularized design, one can simply experiment with different NAS algorithms for various applications with awnas (e.g., classification, detection, text modeling, fault tolerance, adversarial robustness, hardware efficiency, and etc.). Codes and documentation are available at https://github.com/walkerning/aw_nas.
BibTeX
@misc{ning2020aw,
  author = {Xuefei Ning and Changcheng Tang and Wenshuo Li and Songyi Yang and Tianchen Zhao and Niansong Zhang and Tianyi Lu and Shuang Liang and Huazhong Yang and Yu Wang},
  title = {{aw\_nas: A Modularized and Extensible NAS framework}},
  year = {2020},
  eprint = {2012.10388},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2012.10388},
}
Figure