AutoHAS: Efficient Hyperparameter and Architecture Search

Xuanyi Dong, Mingxing Tan, Adams Wei Yu, Daiyi Peng, Bogdan Gabrys, Quoc V LeOpenReview 2020

TL;DR

This paper introduces AutoHAS, a unified framework that efficiently searches for both neural network architectures and their hyperparameters simultaneously. By cleverly discretizing continuous hyperparameters and leveraging weight-sharing techniques, AutoHAS significantly reduces the computational cost of finding optimal models, achieving state-of-the-art results on several benchmarks.

What Problem Does This Paper Address?

Designing high-performing deep learning models is a complex and time-consuming process. It typically involves two major optimization tasks: finding the best network architecture (e.g., how layers are connected, types of operations) and tuning hyperparameters (e.g., learning rate, weight decay, optimizer). Traditionally, these tasks have been tackled separately. Architecture search methods often focus on finding the best structure, assuming fixed hyperparameters, while hyperparameter optimization methods assume a fixed architecture. This separation is suboptimal because the ideal hyperparameters often depend on the specific architecture, and vice-versa. Existing methods for either task are often computationally expensive, requiring many trials (e.g., training multiple models from scratch), making them impractical for large-scale models and datasets. The paper aims to bridge this gap by proposing a single, efficient framework that can optimize both aspects concurrently.

Methods

AutoHAS tackles the joint search for architectures and hyperparameters by:

  • Unified Representation: It represents both architectural choices (e.g., types of operations in layers) and hyperparameters (e.g., learning rate, weight decay) using a unified, discretized format. Continuous hyperparameters are transformed into a linear combination of categorical bases. This allows a single controller to sample from a combined search space.
  • Weight Sharing: Similar to efficient Neural Architecture Search (NAS) methods like ENAS and DARTS, AutoHAS uses a "super model" whose weights are shared across different candidate architectures. This avoids training each candidate from scratch. AutoHAS extends this weight-sharing concept to hyperparameters as well.
  • Reinforcement Learning (RL) Controller: An RL controller is trained to sample candidate architecture-hyperparameter pairs. The controller learns a probability distribution over the discretized search space.
  • Temporary Weights: To decouple the optimization of the shared network weights and the controller, AutoHAS introduces temporary weights. These weights are used to evaluate the performance of a sampled architecture-hyperparameter pair, and the resulting validation accuracy serves as a reward to update the controller. These temporary weights are then discarded, preventing them from polluting the shared super-model weights.
  • REINFORCE Algorithm: The paper specifically uses the REINFORCE algorithm for training the RL controller. To mitigate training instability common in weight-sharing methods, AutoHAS averages gradients from multiple sampled pairs.

Datasets

The paper evaluates AutoHAS on the following datasets:

  • CIFAR-10
  • CIFAR-100
  • ImageNet
  • Stanford Cars
  • Oxford Flowers
  • SUN-397
  • Places365

The paper does not introduce new benchmarks but demonstrates AutoHAS's effectiveness on existing, widely-used datasets.

Key Insights and Ideas

  • The Synergy of Joint Search: The core insight is that optimizing architectures and hyperparameters together, rather than separately, leads to better performance. The ideal hyperparameters are architecture-dependent, and AutoHAS effectively captures this dependency.
  • Discretization for Unified Search: Transforming continuous hyperparameters into a discrete, unified representation is crucial for enabling a single controller to manage both architectural and hyperparameter choices. This elegantly handles the mixed-type search space.
  • Memory Efficiency through Temporary Weights: The introduction of temporary weights is a clever way to decouple the controller's learning from the super-model's weight updates. This not only stabilizes training but also significantly reduces memory requirements compared to methods that directly update the super-model with sampled configurations.
  • Generalizability Across Search Spaces: AutoHAS demonstrates strong performance across various search spaces (architecture-only, hyperparameter-only, and joint) and datasets, highlighting its flexibility.

Key Results

  • Improved Accuracy: AutoHAS consistently improves accuracy over baseline models. For highly optimized models like ResNet and EfficientNet on ImageNet, it achieves up to 0.8% accuracy gain. For less optimized scenarios (e.g., Oxford Flowers), improvements reach up to 11%.
  • Efficiency: AutoHAS significantly reduces search cost. It achieves comparable or better accuracy with 10x less computation cost compared to random search and Bayesian search. It also shows better accuracy than other efficient methods like IFT (Implicit Function Theorem) with similar search costs.
  • Memory Savings: The REINFORCE-based AutoHAS is significantly more memory-efficient than differentiable search methods, reducing memory cost by up to 70%. This allows it to search for larger models.
  • State-of-the-Art Performance: AutoHAS achieves state-of-the-art accuracy on the Places365 dataset by improving upon the EfficientNet-B0 baseline by 1%.

Limitations and Future Work

  • Weight Initialization: The paper notes that AutoHAS cannot search for weight initialization strategies.
  • RL vs. Differentiable: While the paper champions RL for its memory efficiency, it acknowledges that differentiable search algorithms could also be integrated with AutoHAS, albeit with higher memory costs.
  • Future Directions: The authors suggest evaluating AutoHAS on standard NAS and HPO benchmarks. They also plan to investigate integrating different searching algorithms within the AutoHAS framework and comprehensively studying its performance.

Summary updated

BibTeX
@misc{dong2020autohas,
  author = {Xuanyi Dong and Mingxing Tan and Adams Wei Yu and Daiyi Peng and Bogdan Gabrys and Quoc V Le},
  title = {{AutoHAS: Efficient Hyperparameter and Architecture Search}},
  year = {2020},
  url = {https://openreview.net/forum?id=ykCRDlfxmk},
  howpublished = {OpenReview},
}
Figure