Inferensys

Glossary

Search Strategy (NAS)

In Neural Architecture Search (NAS), the search strategy is the core algorithm that explores a defined search space to discover optimal neural network architectures for a given task and constraints.
Stylish WeWork-like workspace with hot desks and document wall, professional searching through enterprise knowledge base on a mounted ultrawide display, warm industrial pendants overhead.
NEURAL ARCHITECTURE SEARCH

What is Search Strategy (NAS)?

The core algorithmic engine that drives the automated discovery of neural network designs.

In Neural Architecture Search (NAS), the search strategy is the core algorithm that explores a predefined search space of possible neural network architectures to discover optimal designs for a given task. It systematically proposes, evaluates, and refines candidate models based on a performance estimator, balancing the exploration of novel structures with the exploitation of high-performing ones. Common strategies include Reinforcement Learning (RL-NAS), Evolutionary Algorithms, and Gradient-Based Optimization (DARTS).

The choice of strategy critically impacts search efficiency and outcome. Reinforcement Learning uses a controller network to generate architectures, rewarded for high accuracy. Evolutionary NAS applies genetic operations like mutation to a population of models. Gradient-Based methods, like Differentiable Architecture Search (DARTS), treat the search as a continuous optimization problem. For Hardware-Aware NAS, the strategy must also optimize for constraints like latency, memory, and energy, often using a hardware cost model to guide the search toward microcontroller-friendly designs.

NEURAL ARCHITECTURE SEARCH

Primary Search Strategy Paradigms

The search strategy is the core algorithm that navigates the vast space of possible neural network designs. Different strategies offer distinct trade-offs between search efficiency, computational cost, and the quality of the final discovered architecture.

01

Reinforcement Learning (RL-NAS)

In Reinforcement Learning NAS (RL-NAS), a controller network (typically an RNN or Transformer) is trained via policy gradient methods to generate candidate architecture descriptions. The controller's actions (e.g., selecting layer types, filter sizes) are rewarded based on the validation accuracy of the child network after training. This creates a feedback loop where the controller learns to propose better architectures over time.

  • Key Mechanism: The search is framed as a sequential decision-making process.
  • Classic Example: NASNet used an LSTM controller to generate convolutional cell structures for image classification.
  • Pros: Can discover highly novel, high-performing architectures.
  • Cons: Extremely computationally expensive, often requiring thousands of GPU days for the initial pioneering works.
02

Evolutionary Algorithms

Evolutionary NAS treats architecture discovery as a population-based optimization problem. A population of candidate architectures is maintained and iteratively improved through biologically inspired operations.

  • Core Operations:
    • Mutation: Randomly alters an architecture (e.g., change an operation, add/remove a connection).
    • Crossover (Recombination): Combines parts of two parent architectures to create an offspring.
    • Selection: The least fit architectures (by accuracy, latency, etc.) are culled from the population.
  • Fitness Evaluation: Each candidate is trained (often partially) and evaluated to assign a fitness score.
  • Advantage: Naturally suited for multi-objective optimization, easily finding architectures on the Pareto frontier of accuracy vs. efficiency.
  • Example: AmoebaNet achieved state-of-the-art results using regularized evolution.
03

Gradient-Based Search (DARTS)

Gradient-Based NAS, exemplified by Differentiable Architecture Search (DARTS), formulates the search as a continuous optimization problem. It constructs a supernet where every possible architectural choice is represented as a mixture of operations with continuous architecture parameters (alpha weights).

  • Process: The supernet weights and the alpha parameters are optimized jointly via gradient descent on the training data. After search, a discrete architecture is derived by selecting the operation with the highest alpha weight at each choice point.
  • Key Benefit: Dramatically faster search (order of days vs. thousands of GPU days) by leveraging efficient backpropagation.
  • Major Drawback: High memory consumption due to the supernet, and potential performance discrepancy between the continuous relaxation and the final discretized network.
  • Hardware-Aware Extension: ProxylessNAS extends this by incorporating hardware latency, measured directly on target devices, into the gradient-based loss.
04

One-Shot / Weight-Sharing NAS

One-Shot NAS is a family of methods that decouples architecture search from architecture evaluation using a central technique: weight sharing. A single, over-parameterized supernet is trained once. All candidate sub-architectures inherit their weights from this shared supernet, allowing their performance to be estimated without costly independent training.

  • Search Phase: After supernet training, a search algorithm (e.g., evolutionary, random) samples sub-architectures and evaluates them using the shared weights, often in minutes.
  • Final Training: The top-performing candidate is then retrained from scratch for final deployment.
  • Efficiency: This approach reduces search cost by several orders of magnitude.
  • Paradigm Example: Once-For-All (OFA) trains a single supernet that can dynamically shrink in depth, width, and kernel size to produce numerous hardware-tailored sub-networks without retraining.
05

Bayesian Optimization

Bayesian Optimization (BO) is a sample-efficient global optimization strategy well-suited for expensive black-box functions—like training a neural network. In NAS, BO builds a probabilistic surrogate model (e.g., a Gaussian Process) to predict the performance of unseen architectures based on previously evaluated ones.

  • Acquisition Function: Guides the search by balancing exploration (trying architectures in uncertain regions) and exploitation (refining around current best candidates). Common functions include Expected Improvement (EI) and Upper Confidence Bound (UCB).
  • Search Loop:
    1. Use the surrogate model to predict performance across the search space.
    2. Select the most promising candidate via the acquisition function.
    3. Evaluate it (train it) to get ground-truth performance.
    4. Update the surrogate model with the new data point.
  • Use Case: Particularly effective when the search space can be encoded with meaningful, continuous descriptors and the total number of evaluations must be very low (e.g., <100).
06

Random Search & Zero-Cost Proxies

This category encompasses the simplest and most efficient strategies, crucial for constrained environments like TinyML.

  • Random Search: Serves as a surprisingly strong baseline. By uniformly sampling architectures from a well-designed search space, it often outperforms more complex, poorly tuned search algorithms. Its efficiency allows for extensive exploration within a fixed compute budget.
  • Zero-Cost Proxies: A class of ultra-efficient metrics that predict a network's final trained performance using only its initial, untrained state. They require a single forward/backward pass (or less) and no training.
    • Examples: grad_norm (magnitude of gradients), snip (sensitivity of loss to parameter pruning), synflow (preservation of signal flow).
    • Application in NAS: Used to pre-filter thousands of candidates in seconds, ranking them to guide a subsequent search (e.g., evolutionary) or to select top architectures directly, enabling NAS in minutes on a single GPU.
SEARCH STRATEGY SELECTION

How to Choose a NAS Search Strategy?

Selecting a Neural Architecture Search (NAS) strategy involves evaluating the trade-offs between search efficiency, computational cost, and the ability to incorporate hardware constraints to find optimal models for microcontroller deployment.

Choosing a NAS search strategy requires matching the algorithm's characteristics to project constraints. For extreme hardware limitations like microcontrollers, hardware-aware NAS is mandatory, prioritizing strategies that integrate latency and memory cost models. Evolutionary algorithms and reinforcement learning are sample-efficient but computationally heavy, while gradient-based methods like DARTS offer speed but may require subsequent proxyless validation on real hardware to ensure estimates are accurate.

The decision hinges on the search budget and need for Pareto-optimal solutions. For a fixed, low-compute budget, one-shot NAS with weight sharing in a supernet is pragmatic. When profiling on actual hardware is feasible, hardware-in-the-loop search provides the most reliable measurements. Ultimately, the strategy must efficiently navigate the search space to discover architectures that satisfy the multi-objective trade-offs of accuracy, size, and power dictated by TinyML deployment targets.

HARDWARE-AWARE NAS

Search Strategy Comparison

A comparison of core algorithmic approaches used to explore the neural architecture search space, highlighting their suitability for discovering models under microcontroller constraints.

Search StrategyMechanismSearch EfficiencyHardware-Aware IntegrationTypical Use Case

Reinforcement Learning (RL-NAS)

Controller network trained via policy gradient to propose architectures.

Low

Requires separate, often learned, hardware cost model.

Mobile/Edge models (e.g., MNasNet)

Evolutionary Algorithms

Population-based optimization using mutation, crossover, and selection.

Low

Hardware metrics evaluated per candidate; easy to add as objective.

Multi-objective search for extreme constraints

Differentiable (Gradient-Based) e.g., DARTS

Continuous relaxation of search space optimized via gradient descent.

High

Challenging; latency often added as a continuous regularization term.

Rapid prototyping on proxy tasks

One-Shot / Weight-Sharing e.g., OFA

Trains one supernet; sub-architectures evaluated via weight sharing.

Very High

Hardware constraints applied during sub-network extraction or training.

Production deployment across a device family

Random Search with Early Stopping

Uniform sampling from the search space.

Medium

Simple: filter or penalize samples that violate constraints.

Baseline evaluation and constrained space exploration

Bayesian Optimization

Surrogate model (e.g., Gaussian Process) guides sample selection.

Medium-High

Hardware metric incorporated as an input to the surrogate model.

Small, expensive-to-evaluate search spaces

Hardware-in-the-Loop Search

Direct on-device profiling of candidates during search.

Very Low

Direct and accurate; measures true latency, power, memory.

Final-stage optimization for a specific MCU

SEARCH STRATEGY (NAS)

Frequently Asked Questions

This FAQ addresses core algorithmic approaches for exploring neural network design spaces, a critical component of Hardware-Aware Neural Architecture Search for microcontroller deployment.

A search strategy in Neural Architecture Search (NAS) is the core algorithm that explores a defined search space of possible neural network architectures to discover high-performing models for a given task. It systematically proposes, evaluates, and refines candidate architectures based on a performance metric, such as accuracy or hardware efficiency. Common strategies include Reinforcement Learning (RL), Evolutionary Algorithms, and Gradient-Based Optimization. The choice of strategy directly impacts the computational cost, search time, and quality of the final discovered architecture, making it a fundamental design decision in any NAS pipeline.

Prasad Kumkar

About the author

Prasad Kumkar

CEO & MD, Inference Systems

Prasad Kumkar is the CEO & MD of Inference Systems and writes about AI systems architecture, LLM infrastructure, model serving, evaluation, and production deployment. Over 5+ years, he has worked across computer vision models, L5 autonomous vehicle systems, and LLM research, with a focus on taking complex AI ideas into real-world engineering systems.

His work and writing cover AI systems, large language models, AI agents, multimodal systems, autonomous systems, inference optimization, RAG, evaluation, and production AI engineering.