[Paper Review] CATE: Computation-aware Neural Architecture Encoding with Transformers
CATE proposes a computation-aware neural architecture encoding method using a pairwise pre-training scheme with Transformers to learn dense, contextualized representations of neural architectures. By leveraging masked language modeling on computationally similar architecture pairs and causal attention, CATE achieves superior performance and generalization in both in- and out-of-search-space NAS benchmarks, outperforming fixed-encoding baselines like adjacency matrices.
Recent works (White et al., 2020a; Yan et al., 2020) demonstrate the importance of architecture encodings in Neural Architecture Search (NAS). These encodings encode either structure or computation information of the neural architectures. Compared to structure-aware encodings, computation-aware encodings map architectures with similar accuracies to the same region, which improves the downstream architecture search performance (Zhang et al., 2019; White et al., 2020a). In this work, we introduce a Computation-Aware Transformer-based Encoding method called CATE. Different from existing computation-aware encodings based on fixed transformation (e.g. path encoding), CATE employs a pairwise pre-training scheme to learn computation-aware encodings using Transformers with cross-attention. Such learned encodings contain dense and contextualized computation information of neural architectures. We compare CATE with eleven encodings under three major encoding-dependent NAS subroutines in both small and large search spaces. Our experiments show that CATE is beneficial to the downstream search, especially in the large search space. Moreover, the outside search space experiment demonstrates its superior generalization ability beyond the search space on which it was trained. Our code is available at: https://github.com/MSU-MLSys-Lab/CATE.
Motivation & Objective
- To address the limitations of fixed transformation-based computation-aware encodings in neural architecture search (NAS), which suffer from poor generalization and ineffective pre-training.
- To improve the representation power of computation-aware encodings by leveraging deep contextualized representations through self- and cross-attention mechanisms in Transformers.
- To enable effective pre-training of architecture encoders using a pairwise learning scheme that captures long-range dependencies and computation locality.
- To demonstrate that learned, contextualized encodings generalize better than fixed encodings in out-of-distribution search spaces.
- To provide a scalable, general-purpose architecture encoding method applicable to diverse NAS subroutines and search spaces.
Proposed method
- CATE employs a pairwise pre-training scheme where computationally similar architecture pairs are corrupted by masking a fraction of their operations, and the model is trained to predict the masked operators.
- The method uses a shared-weights Transformer encoder to encode each architecture in a pair, followed by a cross-attention Transformer that fuses joint information from both encodings.
- A causal mask derived from the adjacency matrix ensures the model respects the directed, acyclic flow of neural architectures, replacing the standard bidirectional attention used in BERT.
- The model is pre-trained using a masked language modeling (MLM) objective, enabling it to learn deep, contextualized computation representations.
- Long-range dependencies are enhanced by augmenting the adjacency matrix with Floyd-Warshall algorithm results to capture indirect connections.
- The final architecture encoding is derived from the cross-attention output and used in downstream NAS subroutines such as predictor-based search, reinforcement learning, and bandit-based search.
Experimental results
Research questions
- RQ1Can a pairwise pre-training scheme with Transformers learn more effective computation-aware architecture encodings than fixed transformation methods?
- RQ2Does the use of cross-attention and causal masking improve the modeling of architectural computation flow and generalization?
- RQ3How does CATE perform in out-of-search-space generalization compared to fixed encodings like adjacency matrices?
- RQ4What is the impact of architectural pair sampling strategy, hyperparameters, and mask type on downstream NAS performance?
- RQ5Can CATE generalize effectively to larger, unseen search spaces while maintaining high accuracy and efficiency?
Key findings
- CATE outperforms the adjacency matrix encoding by a large margin in out-of-training search space evaluation, achieving a validation error of 5.94% on NAS-Bench-101 with a 150-query budget.
- The indirect dependency mask outperforms the direct mask, reducing test error by 0.09% on NAS-Bench-101 and 0.05% on NAS-Bench-301, indicating long-range dependency modeling enhances encoding quality.
- Larger numbers of cross-attention blocks ($L_c$) and wider feed-forward layers ($d_{ff}$) improve NAS performance, with $L_c=24$ and $d_{ff}=64$ yielding the lowest error of 5.95% on NAS-Bench-101.
- A small neighborhood size $K$ and strong computation locality ($\delta$) lead to better performance, with $\delta = 1 \times 10^6$ and $K=2$ showing optimal results.
- CATE generalizes effectively beyond the training search space, demonstrating superior robustness and scalability in both small and large NAS benchmarks.
- The method achieves state-of-the-art performance across three encoding-dependent NAS subroutines: predictor-based, reinforcement learning, and bandit-based search.
Read this paper
Open the full text in the Nubint reader and ask about any passage as you read.
Read this paper on NubintThis review was generated by AI from the original paper. Please check the paper before citing it.