Neural Architecture Search with Bayesian Optimisation and Optimal Transport

Kirthevasan Kandasamy, Willie Neiswanger, Jeff Schneider, Barnabás Póczos, Eric P. Xing

TL;DR

The authors introduce NASBOT, a framework that brings the sample efficiency of Bayesian Optimization (BO) to the complex world of Neural Architecture Search (NAS). By developing OTMANN, a novel distance metric based on Optimal Transport, they can mathematically quantify the similarity between diverse neural network graphs. This allows NASBOT to find high-performing architectures with significantly fewer evaluations than traditional evolutionary or reinforcement learning methods.

What Problem Does This Paper Address?

Designing a neural network architecture is a high-stakes "black-box" optimization problem. Evaluating a single design—training it from scratch and checking its validation accuracy—can take hours or even days.

While Bayesian Optimization (BO) is the gold standard for optimizing expensive functions (like tuning a few continuous hyperparameters), it traditionally struggles with NAS. The reason is that BO requires a way to measure the "distance" or similarity between two points. In standard machine learning, points are just vectors of numbers. In NAS, "points" are complex directed acyclic graphs (DAGs) with varying numbers of layers, types of operations, and skip connections.

Examples of neural network architectures represented as directed acyclic graphs (DAGs).

Without a robust distance metric for these graphs, standard BO cannot "reason" about which architectures are likely to perform similarly, making it difficult to predict the performance of untested designs.

Methods

The paper solves this by introducing two primary components: a novel distance metric and a BO framework built on top of it.

1. OTMANN (Optimal Transport Metrics for Architectures of Neural Networks)

This is the core innovation. To compare two networks, the authors treat it as a matching problem: how much "effort" does it take to transform one network into another?

  • Layer Masses: Each layer is assigned a "mass" based on its computational importance (e.g., the number of filters and incoming units).
  • Path Lengths: They calculate the distance from each layer to the input and output using shortest, longest, and random-walk paths. This captures the layer's structural role within the broader network.
  • Label Mismatch: A cost matrix defines how "different" a convolution layer is from a pooling layer or a fully connected layer.
  • The Program: They use an Optimal Transport framework to find the minimum cost to match the computational mass of one network to another, accounting for both the type of layers and their topological positions in the graph.

2. NASBOT (The BO Framework)

With a distance metric in hand, they build a Gaussian Process (GP) surrogate model to guide the search.

  • Kernel: They use the OTMANN distance to create a kernel that tells the GP how correlated two architectures are.
  • Acquisition Function: They use Expected Improvement (EI) to decide which architecture to evaluate next, balancing exploration and exploitation.
  • Evolutionary Search for the "Next Best": Since the space of all possible graphs is infinite, they use a simple evolutionary algorithm (applying mutations like adding a layer or changing units) to find the architecture that maximizes the acquisition function before actually training it.

Datasets

The authors evaluated NASBOT on seven datasets:

  • Regression (MLPs): Blog Feedback, Indoor Location, Slice Localization, Naval Propulsion, Protein Tertiary Structure, and News Popularity.
  • Classification (CNNs): CIFAR-10.

They compared NASBOT against three baselines: Random Search (RAND), a standard Evolutionary Algorithm (EA), and TreeBO (a BO method limited to simpler, feed-forward structures).

Key Insights and Ideas

  • Structure Matters as Much as Computation: OTMANN doesn't just look at the number of neurons. By using path lengths to the input/output, it recognizes that a convolution layer at the start of a network serves a very different purpose than one at the end.
  • Optimal Transport is Robust: Unlike graph edit distances (which are often NP-hard to compute), the Optimal Transport formulation is computationally efficient and handles networks of different sizes gracefully.
  • Judiciousness over Brute Force: Most NAS methods rely on thousands of GPU hours. NASBOT is designed for the "compute-constrained" researcher, focusing on making every single training run count by using a sophisticated surrogate model.

Key Results

  • Consistency: NASBOT outperformed or matched all baselines across all seven datasets.
  • Sample Efficiency: On the regression tasks, NASBOT consistently found lower Mean Squared Error (MSE) much faster than Random Search or EA.
Performance comparison of NASBOT against baselines across multiple datasets over time.
  • CNN Performance: On CIFAR-10, NASBOT found architectures with a test error of 0.0869 (8.69%) within a limited budget of 150K iterations. While not beating the absolute state-of-the-art (which uses massive compute), it significantly beat the EA and RAND baselines within the exact same time constraints.
  • Architecture Discovery: NASBOT naturally gravitated toward modern design patterns, such as long skip connections and multiple decision layers, without being explicitly programmed to use them.

Limitations and Future Work

  • Search Speed: While NASBOT is highly sample-efficient (requiring fewer model trainings), the internal step of optimizing the acquisition function (running the Optimal Transport program many times) is slower than simple random sampling.
  • Kernel Validity: The authors note that while their distance metric works well in practice, it isn't strictly proven to result in a "positive definite" kernel, which is a theoretical requirement for Gaussian Processes.
  • Scalability: The experiments were conducted on 2-4 GPUs. Scaling this to massive, multi-node searches remains an open area for implementation.
  • Joint Optimization: Future work could involve jointly optimizing architecture and other hyperparameters (like learning rate or weight decay) using a product kernel.

Summary updated

BibTeX
@inproceedings{kandasamy2018neural,
  author = {Kirthevasan Kandasamy and Willie Neiswanger and Jeff Schneider and Barnabás Póczos and Eric P. Xing},
  title = {{Neural Architecture Search with Bayesian Optimisation and Optimal Transport}},
  booktitle = {Advances in Neural Information Processing Systems},
  year = {2018},
}
Figure