Abstract
Neural architecture search (NAS) has fostered various fields of machine learning. Despite its prominent dedications, many have criticized the intrinsic limitations of high computational cost. We aim to ameliorate this by proposing a pretraining scheme that can be generally applied to controller-based NAS. Our method, locality-based self-supervised classification task, leverages the structural similarity of network architectures to obtain good architecture representations. We incorporate our method into neural architecture optimization (NAO) to analyze the pretrained embeddings and its effectiveness and highlight that adding metric learning loss brings a favorable impact on NAS.
Introduction
Neural Architecture Search (NAS) has revolutionized machine learning by automating the design of neural networks, often surpassing human-designed models. However, the high computational cost remains a significant barrier to widespread adoption. Most controller-based NAS methods require training thousands of candidate architectures to teach the controller what a high-performance model looks like. This process is energy-intensive and time-consuming. We propose a self-supervised pretraining scheme that leverages the structural "locality" of architectures—the principle that similar network designs tend to have similar performance—to initialize the search controller with a meaningful representation of the search space without requiring expensive performance evaluations.
Locality-based Self-Supervised Learning
The core of our approach is a pretraining task that teaches the controller the structural relationships within the search space. Instead of starting the search from scratch, we pretrain the controller's encoder using metric learning.
- Generating Samples: For a given anchor architecture, we generate "positive" samples by applying minor structural edits, such as changing a node type or an edge connection. "Negative" samples are randomly selected from the search space.
- Metric Learning: We apply metric learning losses (e.g., Triplet Margin Loss) to force the encoder to map structurally similar architectures (those with low edit distance) to proximal points in a continuous embedding space.
- Integration with NAO: This pretrained encoder is then integrated into the Neural Architecture Optimization (NAO) framework. NAO performs search by navigating this continuous embedding space using gradient ascent, which is significantly more efficient when the space is structurally organized.
Key Insights: The Structural Prior
A fundamental premise of our work is that structural similarity serves as a proxy for performance similarity. We empirically verify this by showing that architectures with small edit distances exhibit significantly smaller differences in test accuracy. By enforcing this locality in the embedding space, we create a "smoother" manifold that is easier for the controller to navigate.
Interestingly, while adding a metric learning loss makes the reconstruction of the graph slightly more difficult for the decoder, this trade-off acts as a beneficial regularization. It ensures the embedding space is well-structured, preventing the search process from getting stuck in poor local optima and improving overall stability.
Results
Evaluations on the NAS-Bench-101 benchmark demonstrate substantial efficiency gains. Using Triplet Margin Loss, our method found the optimal architecture in just 519 queries, compared to 810 queries for the baseline without metric learning. Furthermore, pretrained controllers consistently reached near-optimal test accuracy (~94.23%) faster and with lower variance across different runs. This suggests that the structural prior provided by pretraining effectively guides the search toward high-performance regions of the architecture space.
Conclusion
Pretraining NAS controllers with structural locality provides a powerful inductive bias that significantly reduces the computational cost of architecture search. By leveraging self-supervised metric learning, we can create efficient, performance-aware representations of search spaces without the need for thousands of expensive model evaluations. Future work will explore the use of Graph Neural Networks (GNNs) to further enhance structural encoding and test the generalizability of this approach on more complex, non-cell-based search spaces.
Summary updated