Transfer NAS: Knowledge Transfer between Search Spaces with Transformer Agents

Zalán Borsos, Andrey Khorlin, Andrea GesmundoarXiv 2019

Transfer NAS: Knowledge Transfer between Search Spaces with Transformer Agents

Abstract

Neural Architecture Search (NAS) has revolutionized automated network design but remains computationally expensive due to its lack of transferability. Standard reinforcement learning (RL) based NAS agents are typically tied to a specific search space, requiring a full restart when the search space configuration changes. This paper introduces a Transformer-based RL agent designed to navigate merged conditional search spaces. By leveraging self-attention and shared semantic embeddings, the agent can transfer architectural intuition across different domains, resulting in a 3-4x speedup on the NAS-Bench-101 benchmark.

Introduction: The Rigidity of Current NAS

The primary bottleneck in Neural Architecture Search (NAS) is the tight coupling between the search agent and the search space definition. Unlike human engineers who apply lessons from designing one model (e.g., a CNN) to another (e.g., an MLP), standard RL agents must be retrained from scratch if a researcher introduces a new layer type or alters the network structure. This is because the sequence of decisions and the available action sets are traditionally treated as static and isolated. The challenge lies in creating an agent that can handle varying decision sequences and transfer knowledge between structurally distinct architectures.

Methodology: Merged Spaces and Transformer Agents

To overcome these limitations, the authors propose a unified framework for cross-space transfer:

Merged Conditional Search Spaces

Instead of treating search spaces as disjoint environments, they are merged into a single "conditional" graph. The agent's available actions at any step are determined by the specific search space it is currently exploring. This allows the agent to learn commonalities between different tasks simultaneously.

Figure 1: Visualization of merged conditional search spaces where different architectural paths (e.g., CNN vs. MLP) share common decision nodes like dropout and units.

The Transformer Advantage

While previous NAS agents relied on LSTMs, this work identifies a critical flaw: LSTMs are overly sensitive to immediate sequence order. In a merged space, the "previous" action might belong to a different structural branch. The authors replace the LSTM with a Transformer-based agent using self-attention. This allows the agent to attend to all relevant past decisions regardless of their position in the sequence, making it far more robust for navigating complex, conditional decision trees.

Shared Embeddings and Exploration

Knowledge transfer is further facilitated by sharing embeddings for states with the same semantic names (e.g., "Dropout rate"). To handle the transition to new spaces with unseen actions, the authors employ an "Exploration Mixing" strategy, blending the learned policy with a decaying uniform distribution to ensure the agent discovers new architectural possibilities.

Key Results

The proposed architecture was evaluated on both a synthetic task and a large-scale NAS benchmark.

  • Double XOR (Toy Task): This task tests the ability to capture long-term dependencies. The Transformer-based agent significantly outperformed the LSTM baseline, which struggled to link distant architectural decisions.
  • NAS-Bench-101 Transfer: The agent was pre-trained on restricted sub-spaces and then transferred to the full NAS-Bench-101 space. The transferred agent found high-performing architectures 3 to 4 times faster than agents trained from scratch or using standard methods like Regularized Evolution.
Figure 5: Comparison of reward convergence between the LSTM and Attention-based agents, demonstrating the superior learning efficiency of the Transformer architecture.

Discussion and Future Directions

The success of the Transformer agent suggests that self-attention is a more natural fit for the graph-like nature of architectural search than recurrent models. While the current work relies on specific exploration strategies to manage the transition to new spaces, it paves the way for truly general-purpose NAS agents. Future research could extend this to cross-domain transfer, such as applying knowledge from vision model design to natural language processing tasks.

Summary updated

BibTeX
@misc{borsos2019transfer,
  author = {Zalán Borsos and Andrey Khorlin and Andrea Gesmundo},
  title = {{Transfer NAS: Knowledge Transfer between Search Spaces with Transformer Agents}},
  year = {2019},
  eprint = {1906.08102},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/1906.08102},
}
Figure