Inferensys

Glossary

Search Space (NAS)

In Neural Architecture Search (NAS), the search space is the formally defined set of all possible neural network architectures that an automated search algorithm can explore and evaluate.
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.
DEFINITION

What is a Search Space in Neural Architecture Search (NAS)?

The search space is the foundational, constrained set of all possible neural network architectures that a Neural Architecture Search (NAS) algorithm can explore and evaluate.

In Neural Architecture Search (NAS), the search space is the formally defined set of all possible neural network architectures that an automated search algorithm can explore. It is parameterized by discrete and continuous choices, including layer types (e.g., convolution, pooling), connectivity patterns (e.g., skip connections), kernel sizes, and channel widths. A well-designed search space balances expressiveness—the ability to contain high-performing models—with tractability, ensuring the search is computationally feasible. For Hardware-Aware NAS, this space is further constrained by target device metrics like latency and memory.

The structure of the search space directly dictates the efficiency and outcome of the NAS process. Common formulations include cell-based search spaces, where a repeating computational cell is optimized, and macro search spaces, which define the entire network skeleton. In TinyML and microcontroller-targeted NAS, the search space is aggressively pruned to exclude operations incompatible with severe resource constraints, such as large dense layers or high-precision activations. This hardware-aware definition ensures discovered architectures are inherently deployable on the target edge device.

ARCHITECTURAL DIMENSIONS

Core Components of a NAS Search Space

The search space in Neural Architecture Search (NAS) is a formally defined set of all possible neural network architectures the algorithm can explore. It is parameterized by discrete and continuous choices that define the network's topology and operations.

01

Operator Search

This defines the set of primitive operations (e.g., 3x3 convolution, 5x5 depthwise convolution, max pooling, identity, zero) that can be placed at each node or layer in the computational graph. For TinyML, the search space is often constrained to hardware-efficient operators like depthwise-separable convolutions to reduce FLOPs and parameter count. The choice of operators directly impacts the model's capacity, inductive bias, and computational cost on the target microcontroller.

02

Connectivity & Topology

This component defines the permissible connections between operations or layers, governing the network's data flow. Common patterns include:

  • Chain-structured: Sequential layers, common in early NAS.
  • Cell-based: A directed acyclic graph (DAG) of operations within a repeating cell, enabling skip connections and multi-branch structures for efficiency.
  • Macro-architecture: The high-level skeleton defining the number of cells, stages, and resolution changes. For microcontroller targets, topologies are often shallower and narrower to fit within kilobyte-scale memory budgets.
03

Hyperparameter Search Dimensions

Beyond operations and connections, the search space includes key architectural hyperparameters:

  • Channel/Width Search: The number of output filters for each convolutional layer. This is a primary lever for trading accuracy (more channels) against memory and compute (fewer channels).
  • Kernel Size Search: Choosing filter spatial dimensions (e.g., 1x1, 3x3, 5x5). Larger kernels increase receptive field but also computational cost quadratically.
  • Expansion Ratio Search (for Mobile inverted bottlenecks): The factor by which channels are expanded within a block. These dimensions are often treated as categorical or integer choices within bounded ranges.
04

Hardware-Aware Parameterization

For Hardware-Aware NAS targeting microcontrollers, the search space is explicitly parameterized by device-specific constraints:

  • Memory Budget: Defines maximum peak RAM (activation memory) and flash (model weights) usage, pruning architectures that exceed it.
  • Latency/Energy Targets: Incorporates hardware cost models (e.g., lookup tables, neural predictors) that estimate a candidate's inference time or energy consumption on the target MCU.
  • Quantization-Aware Design: The space may include operations known to be quantization-friendly or simulate quantization noise during search (Quantization-Aware NAS). This ensures the final model is robust to 8-bit or lower precision deployment.
05

Search Space Pruning & Design

A critical pre-search step is pruning the theoretical space of all possible architectures to a manageable, high-potential subset. This is done by:

  • Incorporating Domain Knowledge: Mandating efficient operators like depthwise convolutions.
  • Enforcing Valid Connectivity: Preventing cycles or invalid tensor shape mismatches.
  • Applying Hardware Filters: Immediately discarding architectures that violate hard constraints (e.g., >256KB flash). A well-designed, pruned search space dramatically improves search efficiency and the likelihood of finding a viable microcontroller-optimized model.
06

Representation & Encoding

For a search algorithm to manipulate architectures, the search space must be encoded into a searchable representation. Common encodings include:

  • String-based: A sequence of tokens representing operation and connection choices.
  • Graph-based: A direct DAG representation where nodes are operations and edges are connections.
  • Continuous Relaxation (e.g., DARTS): Architecture parameters are represented as continuous variables in a supernet, enabling gradient-based optimization. The choice of encoding is tightly coupled with the search strategy (e.g., RL, evolution, gradient).
DESIGN PRINCIPLES AND CONSTRAINTS

Search Space (NAS)

In Neural Architecture Search (NAS), the search space is the foundational, formally defined set of all possible neural network architectures that an automated algorithm can explore and evaluate.

A search space is parameterized by discrete and continuous choices, including layer operations (e.g., convolution types), connectivity patterns (e.g., skip connections), and hyperparameters like channel counts and kernel sizes. For Hardware-Aware NAS, this space is explicitly constrained by target device limits such as peak memory, latency, and energy consumption. A well-designed space balances expressiveness—the ability to discover high-performing models—with tractability to enable efficient search.

Common search space formulations include cell-based spaces, which stack repeated learned building blocks, and macro spaces, which search over entire network skeletons. In TinyML and microcontroller NAS, the space is aggressively pruned to exclude architectures incompatible with kilobyte-scale memory, often integrating quantization-aware operators. The search strategy (e.g., reinforcement learning, gradient-based methods) navigates this constrained combinatorial space to identify Pareto-optimal architectures.

ARCHITECTURE PARAMETERIZATION

Common Types of Search Spaces in NAS

A comparison of fundamental search space formulations used in Neural Architecture Search, detailing their parameterization, typical use cases, and implications for search efficiency and hardware-aware optimization.

Search Space TypeParameterizationTypical GranularitySearch ComplexityHardware-Aware Suitability

Cell-Based Search Space

Repeating computational blocks (normal/reduction cells)

Macro-Architecture

Medium

High (enforces regularity)

Hierarchical Search Space

Nested motifs from operations to cells to networks

Multi-Scale

High

Medium (flexible but complex)

Global / Layer-Wise Search Space

Independent operation choice per network layer

Micro-Architecture

Very High

Low (unstructured)

Differentiable Supernet (DARTS)

Continuous relaxation of operation choices

Micro-Architecture

Low (per supernet training)

Medium (requires proxy)

Once-For-All (OFA) Space

Pre-defined sub-network dimensions (depth, width, kernel, resolution)

Elastic Dimensions

Very Low (post-training extraction)

Very High (explicit constraints)

Mobile / Microcontroller-Optimized Space

Restricted ops (e.g., depthwise conv, fixed-point friendly activations)

Hardware-Pruned

Low to Medium

Very High (tailored)

Operator Search Space

Choice of layer type (conv, pool, identity, skip, etc.)

Micro-Architecture

High

Medium (core to efficiency)

Channel & Width Search Space

Number of output channels per layer

Network Width

Medium

High (direct memory/latency control)

Kernel Size Search Space

Spatial dimensions of convolutional filters (e.g., 1x1, 3x3, 5x5)

Receptive Field

Low

Medium (affects ops & latency)

SEARCH SPACE (NAS)

Frequently Asked Questions

In Neural Architecture Search, the search space defines the universe of all possible neural network designs the algorithm can explore. For TinyML deployment, this space is constrained by the severe memory, power, and compute limits of microcontrollers.

In Neural Architecture Search (NAS), the search space is the formally defined set of all possible neural network architectures that the automated search algorithm is allowed to consider and evaluate. It is a critical design choice that constrains the exploration to a manageable, yet expressive, domain of potential solutions. The space is typically parameterized by variables such as:

  • Layer types (e.g., standard convolution, depthwise convolution, pooling)
  • Connectivity patterns (e.g., sequential, residual, dense blocks)
  • Hyperparameters like the number of channels, kernel sizes, and the number of repeating cells. A well-designed search space balances expressiveness (the ability to discover high-performing models) with tractability (keeping the search computationally feasible). For Hardware-Aware NAS targeting microcontrollers, the search space is explicitly limited by hardware constraints like maximum SRAM usage, flash memory footprint, and inference latency, often pruning architectures that exceed these budgets from the outset.
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.