Abstract
Neural Architecture Search (NAS) has traditionally focused on search algorithm design, often treating the representation of architectures as a secondary implementation detail. This paper provides the first formal study of architecture encodings—the mapping of neural graphs to numerical tensors. We categorize encodings into adjacency-based and path-based paradigms and analyze their impact across fundamental NAS subroutines. Our results demonstrate that no single encoding is optimal for all tasks; while adjacency matrices excel at structural mutations, path-based encodings are superior for training performance predictors. Furthermore, we provide theoretical grounding for the efficiency of truncated path encodings, enabling more scalable NAS without performance loss.
Introduction
Neural Architecture Search (NAS) aims to automate the design of deep learning models by searching through a space of Directed Acyclic Graphs (DAGs). To process these graphs, algorithms must convert them into numerical tensors, a process known as encoding. Historically, researchers used convenient representations like adjacency matrices without a formal understanding of how these choices affected search efficiency. This paper addresses this gap by analyzing the scalability and effectiveness of different encoding schemes across various NAS subroutines.
Encoding Paradigms
The authors formally define an encoding as a function mapping a neural architecture to a real-valued tensor. They identify two primary paradigms:
- Adjacency Matrix-based: These represent the network as a list of edges and operations, often using one-hot or categorical matrices to denote connections between nodes.
- Path-based: These represent the network as the set of all possible paths from input to output, capturing the functional flow of information.
Key Insights: The Right Tool for the Job
A central finding of the study is that there is no "one size fits all" encoding. The effectiveness of a representation depends heavily on the NAS subroutine being performed:
- Structural Mutations: Adjacency matrices are superior for random sampling and local search mutations because they represent the structural building blocks directly. Small changes in the matrix correspond to intuitive structural changes in the graph.
- Performance Prediction: Path-based encodings are significantly more effective for training "predictor" models (e.g., in the BANANAS algorithm). These models attempt to guess the accuracy of an architecture without training it; path representations better capture the functional characteristics that correlate with performance.
- The Phase Transition of Paths: The authors mathematically prove that path-based encodings exhibit a "phase transition." Information loss is minimal when truncating these encodings until a specific threshold is reached. This allows for the use of compact, efficient path representations (e.g., reducing 364 dimensions to 40) without sacrificing search accuracy.
Empirical Results
The researchers evaluated these encodings on major benchmarks like NASBench-101 and NASBench-201. In neural predictor experiments, path-based encodings achieved significantly lower Mean Absolute Error (MAE) compared to adjacency-based counterparts.
As shown in the Bayesian Optimization results, the choice of encoding directly impacts the test error of the best-found neural network over time. By identifying the optimal encoding for each subroutine, the authors were able to refine existing algorithms to achieve state-of-the-art results.
Conclusion
This study highlights that the encoding is a critical design choice in NAS. While path-based encodings offer superior predictive power and theoretical robustness to truncation, they face challenges in generalizing to larger search spaces where adjacency matrices remain more robust. Future work will focus on designing hybrid encodings that leverage the strengths of both paradigms to further reduce the computational and environmental costs of automated model design.
Summary updated