Introduction
In Neural Architecture Search (NAS), translating a complex neural network graph into a mathematical vector—known as architecture encoding—is a critical challenge. Search algorithms rely on these encodings to navigate the vast space of possible network designs.
Most existing methods are structure-aware: they focus heavily on the topological "shape" of the graph (i.e., which node connects to which). However, this creates a problem. Two networks can look very different structurally but perform almost identically, while a minor structural tweak can sometimes cause a massive drop in accuracy. This results in a "jagged" search space that is notoriously difficult for optimization algorithms to navigate.
While some "computation-aware" encodings exist, they often suffer from scaling issues (growing exponentially as networks get deeper), weak representations (relying on simple RNNs that miss deep contextual relationships), or generative hurdles (failing to capture performance nuances when reconstructing single architectures).
CATE (Computation-Aware Transformer-based Encoding) is a novel method that prioritizes functional performance over raw structural topology. By using a pairwise Transformer pre-training scheme, CATE creates a "smoother" search space where architectures with similar accuracies are mapped close together, significantly improving the efficiency and generalization of NAS.
Methodology
CATE introduces a Transformer-based approach to solve the limitations of previous encodings. Its architecture and training pipeline rely on three key innovations:
- Pairwise Pre-training: Instead of processing one architecture at a time, CATE takes a pair of computationally similar architectures (e.g., those with similar FLOPs or parameter counts). It masks some of the operations in both and trains the model to predict the missing pieces.
- Cross-Attention for Context: By utilizing cross-attention between the two architectures in a pair, the Transformer learns "contextualized" information. It understands how an operation in one network relates to a similar operation in another.
- Dependency Masking (Floyd-Augmented): Standard Transformers are bidirectional, but neural networks are Directed Acyclic Graphs (DAGs) where data flows in one direction. CATE uses the Floyd Algorithm to compute long-range dependencies, creating a custom "causal mask" so the Transformer only attends to operations that actually influence one another in the data flow.
Key Insights
- Smoothness is Efficiency: The core insight of CATE is that mapping architectures with similar performance to the same region in latent space allows downstream search algorithms (like Bayesian Optimization) to find the "global maximum" much faster. It effectively turns a rugged optimization landscape into a smooth hill.
- Computation > Structure: What a model does (its computation) provides a more useful signal for NAS than what a model looks like (its structure).
- Transformers are Graph-Ready: While originally built for text, Transformers—when equipped with the right DAG-respecting masking—are incredibly powerful tools for encoding graph-based neural architectures.
- Generalization Beyond the Training Set: Because CATE learns the underlying logic of computation rather than just memorizing graph shapes, it can effectively rank architectures it has never seen before, even those with different numbers of nodes or edges.
Key Results
The authors evaluated CATE on industry-standard NAS benchmarks, including NAS-Bench-101, NAS-Bench-301, and custom "Outside Search Space" setups designed to test generalization.
- State-of-the-Art Performance: On the DARTS search space (CIFAR-10), CATE combined with Bayesian Optimization (CATE-DNGO-LS) achieved an average test error of 2.46%, outperforming major competitors like BANANAS (2.67%) and arch2vec (2.56%).
- Superior Generalization: In experiments testing outside the initial search space, CATE significantly outperformed traditional adjacency matrix encodings, proving it truly understands underlying computation rather than just structural patterns.
- Search Efficiency: CATE found top-tier models with significantly lower search costs (measured in GPU days) compared to other predictor-based or evolution-based methods.
Limitations and Future Work
While highly effective, CATE's pairwise pre-training relies on a hyperparameter ($\delta$) to define what counts as "computationally similar" (e.g., the acceptable difference in FLOP counts). Finding the optimal $\delta$ for a brand-new search space may require some initial trial and error.
Additionally, CATE currently uses FLOPs and parameter counts as proxies for computation. Future iterations could incorporate more nuanced metrics, such as actual hardware latency, and scale the approach to even larger, more diverse spaces like TuNAS.
Summary updated