Skip to main content
QUICK REVIEW

[Paper Review] EvoPrompting: Language Models for Code-Level Neural Architecture Search

Angelica Chen, D. Dohan|arXiv (Cornell University)|Feb 28, 2023
Evolutionary Algorithms and ApplicationsComputer Science17 citations
TL;DR

EvoPrompting uses an evolved, prompt-tuned language model as crossover/mutation in an evolutionary NAS loop to design neural architectures; it yields smaller, higher-performing models on MNIST-1D and novel GNNs that outperform SOTA on many CLRS tasks.

ABSTRACT

Given the recent impressive accomplishments of language models (LMs) for code generation, we explore the use of LMs as adaptive mutation and crossover operators for an evolutionary neural architecture search (NAS) algorithm. While NAS still proves too difficult a task for LMs to succeed at solely through prompting, we find that the combination of evolutionary prompt engineering with soft prompt-tuning, a method we term EvoPrompting, consistently finds diverse and high performing models. We first demonstrate that EvoPrompting is effective on the computationally efficient MNIST-1D dataset, where EvoPrompting produces convolutional architecture variants that outperform both those designed by human experts and naive few-shot prompting in terms of accuracy and model size. We then apply our method to searching for graph neural networks on the CLRS Algorithmic Reasoning Benchmark, where EvoPrompting is able to design novel architectures that outperform current state-of-the-art models on 21 out of 30 algorithmic reasoning tasks while maintaining similar model size. EvoPrompting is successful at designing accurate and efficient neural network architectures across a variety of machine learning tasks, while also being general enough for easy adaptation to other tasks beyond neural network design.

Motivation & Objective

  • Motivate improving neural architecture search (NAS) via language models (LMs) and prompt-tuning.
  • Develop EvoPrompting to use LMs as adaptive crossover/mutation operators within an evolutionary NAS loop.
  • Demonstrate effectiveness on MNIST-1D and CLRS algorithmic reasoning benchmarks to discover compact, high-performing architectures.
  • Show that EvoPrompting discovers architectures surpassing human designs and current state-of-the-art on multiple tasks.

Proposed method

  • Represent neural architectures as code strings in Python and use a code-pretrained LM as a crossover/mutation operator.
  • Iteratively generate candidate architectures via few-shot prompts and LM sampling, train them, and evaluate fitness on a task dataset.
  • Prompt-tune the LM between rounds using top-performing architectures to improve crossovers over time.
  • Score candidates by a fitness function based on validation error and model size (fitness = -model_size * validation_error).
  • Use seed architectures to initialize population and select top survivors for next generation (elitism).
  • Train the crossover LM with prompt-tuning for multiple rounds, creating new child architectures from in-context examples.
Figure 1 : An overview of EvoPrompting . After initializing the search with a handful of manually designed program seeds, the meta-learning loop begins. First, our code-pretrained LM uses the seeds as in-context prompt examples to generate candidate architectures. Those candidate architectures are t
Figure 1 : An overview of EvoPrompting . After initializing the search with a handful of manually designed program seeds, the meta-learning loop begins. First, our code-pretrained LM uses the seeds as in-context prompt examples to generate candidate architectures. Those candidate architectures are t

Experimental results

Research questions

  • RQ1Can a code-pretrained LM, embedded in an evolutionary loop, generate novel neural architectures that outperform human-designed baselines?
  • RQ2Does EvoPrompting improve LM in-context learning for architecture design via prompt-tuning and evolutionary prompts?
  • RQ3How does EvoPrompting perform on lightweight benchmarks (MNIST-1D) versus more complex graph neural network tasks (CLRS) in terms of accuracy and model size?

Key findings

  • EvoPrompting yields smaller and higher-performing architectures on MNIST-1D, surpassing both human-designed baselines and naive prompting on accuracy and size.
  • On MNIST-1D, EvoPrompting achieves a Pareto frontier close to the origin, indicating favorable accuracy–size tradeoffs.
  • In CLRS, EvoPrompting discovers novel GNN architectures that outperform the Triplet-GMPNN baseline on a majority of tasks (21 out of 30).
  • Prompt-tuning interleaved with evolutionary crossovers is essential; removing prompt-tuning or using random parents degrades performance.
  • A code-vocabulary LM enables searching over arbitrary Python-defined architectures, reducing reliance on manually designed search spaces.
(a) Pareto frontiers of the model size versus test error of the top 20 experiments for each variation of the MNIST1D model search. Frontiers closer to the origin are considered more desirable.
(a) Pareto frontiers of the model size versus test error of the top 20 experiments for each variation of the MNIST1D model search. Frontiers closer to the origin are considered more desirable.

Read this paper

Open the full text in the Nubint reader and ask about any passage as you read.

Read this paper on Nubint

This review was generated by AI from the original paper. Please check the paper before citing it.