Neural Architecture Search (NAS)

#neural architecture search #reinforcement learning #evolutionary algorithms #gradient-based optimization #bayesian optimization #deep learning #neural networks #model optimization #performance metrics #benchmark datasets

1. Definition and Core Concepts

Definition and Core Concepts

Neural Architecture Search (NAS) automates the design of artificial neural networks, optimizing architectures for specific tasks without human intervention. Unlike traditional manual design, NAS employs search algorithms—such as reinforcement learning, evolutionary methods, or gradient-based optimization—to explore a vast space of possible architectures. The search space typically includes layer types (e.g., convolutions, recurrent cells), connectivity patterns, hyperparameters (e.g., filter sizes, activation functions), and macro-structures (e.g., residual blocks, attention mechanisms).

Search Space Formulation

The search space defines all possible architectures the NAS algorithm can explore. A common approach is the cell-based search space, where the network is constructed by stacking predefined or discovered building blocks. For a directed acyclic graph (DAG) representation of a cell, each node corresponds to a latent representation (e.g., feature map), and edges represent operations (e.g., convolution, pooling). The probability of selecting an operation between nodes i and j can be parameterized using softmax over weights α(i,j):

$$ o^{(i,j)}(x) = \sum_{k=1}^{K} \frac{\exp(\alpha_k^{(i,j)})}{\sum_{l=1}^{K} \exp(\alpha_l^{(i,j)})} \cdot f_k(x) $$

Here, fk(x) denotes the k-th candidate operation (e.g., 3×3 convolution), and α(i,j) are learnable architecture parameters.

Optimization Strategies

NAS optimization involves two nested loops: (1) architecture search, where candidate architectures are sampled and evaluated, and (2) weight training, where the weights of sampled architectures are optimized. Three dominant paradigms exist:

$$ \min_\alpha \mathcal{L}_{val}(w^*(\alpha), \alpha) $$ $$ \text{s.t. } w^*(\alpha) = \arg\min_w \mathcal{L}_{train}(w, \alpha) $$

Performance Estimation

Evaluating every candidate architecture is computationally prohibitive. Weight sharing addresses this by maintaining a supernetwork (one-shot model) where all architectures share weights. Alternatives include:

Practical Considerations

NAS faces trade-offs between search efficiency, computational cost, and discovered architecture quality. Hardware-aware NAS incorporates latency, energy consumption, or memory constraints into the objective function. For example, the search space may exclude operations incompatible with edge-device accelerators. Recent advances like sparse supernetworks and neural predictors reduce search costs from thousands to single GPU days.

Definition and Core Concepts – Neural Architecture Search (NAS) – Tutorial Diagram
Diagram Description: The section describes a cell-based search space with directed acyclic graphs (DAGs) and operation selection between nodes, which is inherently spatial and visual.

Key Components of NAS

Search Space

The search space defines the set of possible neural architectures that can be explored during NAS. For advanced applications, search spaces are typically categorized into three types:

The choice of search space directly impacts the complexity of the NAS problem, with larger spaces requiring more sophisticated search strategies.

Search Strategy

The search strategy determines how the NAS algorithm explores the search space. Advanced methods include:

$$ \mathcal{L}_{RL}(\theta) = \mathbb{E}_{a \sim \pi(\cdot;\theta)}[R(a)] $$

where π(·;θ) is the policy network generating architectures a, and R(a) is the reward (typically validation accuracy). Evolutionary approaches use:

$$ P(a_i \in \mathcal{P}_{t+1}) = \frac{f(a_i)}{\sum_{j=1}^N f(a_j)} $$

where f(a) represents fitness (performance) of architecture a in population Pt.

Performance Estimation Strategy

Evaluating candidate architectures is computationally expensive. Advanced techniques include:

The performance estimation strategy must balance computational cost with evaluation fidelity to avoid search bias.

Architecture Evaluation

Once promising architectures are identified, rigorous evaluation is required. Best practices include:

Recent work has shown that architecture rankings can vary significantly between proxy and full evaluation, necessitating careful validation.

Implementation Considerations

Practical NAS systems require:

Modern frameworks like PyTorch and TensorFlow enable gradient-based NAS through differentiable architecture representations.

# Example of differentiable NAS update step
def update_controller(controller, optimizer, rewards, baseline):
    loss = -torch.sum((rewards - baseline) * controller.log_probs)
    optimizer.zero_grad()
    loss.backward()
    optimizer.step()
    return loss.item()
Key Components of NAS – Neural Architecture Search (NAS) – Tutorial Diagram
Diagram Description: The diagram would physically show the three types of search spaces (chain-structured, cell-based, hierarchical) with visual examples of their layer/cell arrangements and connections.

1.3 Challenges in NAS

Computational Cost

Neural Architecture Search (NAS) is inherently computationally expensive due to the vast search space of possible architectures. Evaluating each candidate architecture typically requires full training and validation, which can take thousands of GPU hours. For instance, early NAS approaches like Zoph & Le (2017) required over 2,000 GPU days to discover an optimal architecture. The computational burden arises from:

$$ \min_{\alpha \in \mathcal{A}} \mathcal{L}_{val}(w^*(\alpha), \alpha) $$ $$ \text{s.t. } w^*(\alpha) = \argmin_w \mathcal{L}_{train}(w, \alpha) $$

Search Space Design

The choice of search space significantly impacts NAS performance. Poorly designed search spaces may exclude high-performing architectures or introduce bias toward suboptimal designs. Key challenges include:

Evaluation Strategy

Accurate performance estimation of candidate architectures is critical but challenging. Common pitfalls include:

Multi-Objective Tradeoffs

Real-world deployments require balancing accuracy with:

$$ \max_{\alpha} \left[ \text{Accuracy}(\alpha), -\text{Latency}(\alpha), -\text{Energy}(\alpha) \right] $$

Reproducibility and Benchmarking

NAS research faces reproducibility challenges due to:

2. Reinforcement Learning-Based Approaches

2.1 Reinforcement Learning-Based Approaches

Reinforcement learning (RL) has emerged as a powerful paradigm for automating neural architecture design by framing NAS as a sequential decision-making problem. The controller, typically implemented as a recurrent neural network (RNN), generates architectural descriptions through a series of actions, which are then evaluated on a validation set. The reward signal—often validation accuracy—guides the controller's policy updates via policy gradient methods.

Markov Decision Process Formulation

The NAS problem is modeled as a Markov Decision Process (MDP) where:

The objective is to maximize the expected cumulative reward:

$$ J( heta) = \mathbb{E}_{\tau \sim p_{\theta}(\tau)} \left[ \sum_{t=0}^T \gamma^t R(s_t, a_t) \right] $$

Policy Gradient Optimization

The controller's policy $$π_θ(a|s)$$ is optimized using the REINFORCE algorithm with baseline subtraction for variance reduction:

$$ abla_θ J(θ) ≈ \frac{1}{m} \sum_{i=1}^m \sum_{t=0}^T (R(\tau^i) - b) abla_θ \log π_θ(a_t^i | s_t^i) $$

where $$b$$ is an exponential moving average of previous rewards. The baseline reduces variance while maintaining unbiased gradient estimates.

Architecture Generation Process

The controller RNN generates architectures autoregressively:

  1. For convolutional networks: Predicts filter sizes, number of filters, and connection patterns
  2. For recurrent networks: Predicts cell types and connection topologies
  3. Each prediction is conditioned on all previous decisions through hidden states

The search space is typically constrained by:

Efficiency Improvements

Several techniques address the computational expense of pure RL-based NAS:

Empirical Performance

RL-based NAS has produced state-of-the-art architectures across domains:

Method Dataset Error Rate
NASNet CIFAR-10 2.65%
ENAS PTB 55.8 perplexity

The computational cost remains substantial, with NASNet requiring 1800 GPU-days for search, though ENAS reduced this to 16 GPU-days through weight sharing.

RL-Based NAS Architecture Generation A block diagram illustrating the RL-based Neural Architecture Search process, showing the RNN controller, state transitions, action selections, and reward feedback loop. RNN Controller πθ(a|s) Action (A) Generated Architectures Reward (R) State (S) hₜ samples updates R(s,a)
Diagram Description: The diagram would show the sequential architecture generation process by the RNN controller, including state transitions and action selections in the MDP framework.

Evolutionary Algorithms

Foundations of Evolutionary NAS

Evolutionary algorithms (EAs) in Neural Architecture Search (NAS) draw inspiration from biological evolution, applying mechanisms such as mutation, crossover, and selection to optimize neural network architectures. The search space consists of candidate architectures, each represented as a genotype encoding layer types, connectivity patterns, and hyperparameters. A population of these architectures evolves over generations, with fitness determined by validation accuracy, computational efficiency, or other objectives.

$$ f(\theta_i) = \text{Accuracy}_{\text{val}}(\theta_i) - \lambda \cdot \text{FLOPs}(\theta_i) $$

Here, θi represents an architecture, and λ balances accuracy and computational cost. The fitness function drives selection pressure toward high-performing, efficient models.

Genetic Operators in NAS

Two primary genetic operators guide evolution:

Selection Mechanisms

Tournament selection and elitism are commonly used:

Pareto Optimization for Multi-Objective NAS

When optimizing for conflicting objectives (e.g., accuracy vs. latency), EAs employ Pareto fronts to identify non-dominated solutions. An architecture θ1 dominates θ2 if:

$$ \forall i \colon f_i(\theta_1) \geq f_i(\theta_2) \land \exists j \colon f_j(\theta_1) > f_j(\theta_2) $$

NSGA-II and SPEA2 are popular algorithms for maintaining diverse Pareto-optimal sets.

Case Study: AmoebaNet

Google’s AmoebaNet demonstrates EA-NAS efficacy. Using tournament selection and aging regularization (discarding older models), it discovered architectures rivaling human-designed networks on ImageNet. Key innovations included:

Computational Challenges and Mitigations

EAs face scalability issues due to expensive fitness evaluations. Strategies to alleviate this include:

Emerging Directions

Recent work integrates EAs with gradient-based methods (e.g., DARTS) for hybrid optimization. Additionally, quality-diversity algorithms like MAP-Elites explore high-performing architectures with distinct behavioral characteristics, useful for robust or transferable model design.

Evolutionary Algorithms – Neural Architecture Search (NAS) – Tutorial Diagram
Diagram Description: The diagram would show the evolutionary process flow, including mutation, crossover, and selection steps, with genotypes transforming across generations.

Gradient-Based Optimization

Gradient-based optimization in Neural Architecture Search (NAS) leverages differentiable relaxation of the discrete architecture search space, enabling efficient exploration via gradient descent. Unlike reinforcement learning or evolutionary methods, this approach formulates NAS as a continuous optimization problem, where architectural parameters are jointly learned with model weights.

Differentiable Architecture Search

The core idea involves relaxing the categorical choice of operations between nodes in a computational graph into a continuous, differentiable mixture. For a given edge (i, j) connecting node i to node j, the output is computed as a weighted sum of K candidate operations:

$$ o_{i,j}(x) = \sum_{k=1}^{K} \frac{\exp(\alpha_{i,j,k})}{\sum_{l=1}^{K} \exp(\alpha_{i,j,l})} \cdot o_k(x) $$

Here, αi,j,k are the architecture parameters determining the importance of operation ok, and softmax ensures normalization. The search space becomes fully differentiable with respect to both the architecture parameters α and the network weights w.

Bi-Level Optimization

The training process involves solving a bi-level optimization problem:

$$ \min_{\alpha} \mathcal{L}_{val}(w^*(\alpha), \alpha) $$ $$ \text{s.t. } w^*(\alpha) = \argmin_{w} \mathcal{L}_{train}(w, \alpha) $$

where train and val denote training and validation loss, respectively. The weights w are optimized on the training set, while architecture parameters α are optimized to minimize validation loss.

Efficient Gradient Approximation

Computing the exact gradient αval(w*(α), α) is computationally prohibitive, as it would require solving the inner optimization to convergence for each gradient step. Instead, practical implementations use a one-step approximation:

$$ \nabla_{\alpha} \mathcal{L}_{val}(w - \xi \nabla_w \mathcal{L}_{train}(w, \alpha), \alpha) $$

where ξ is a learning rate hyperparameter. This approximation enables efficient alternating updates between w and α using standard gradient descent.

Architecture Derivation

After optimization, the discrete architecture is obtained by replacing each mixed operation with the most likely candidate:

$$ o_{i,j} = \argmax_{o_k} \frac{\exp(\alpha_{i,j,k})}{\sum_{l=1}^{K} \exp(\alpha_{i,j,l})} $$

This approach has been successfully applied in DARTS (Differentiable Architecture Search), achieving state-of-the-art performance with significantly reduced computational cost compared to non-differentiable methods.

Practical Considerations

Gradient-Based Optimization – Neural Architecture Search (NAS) – Tutorial Diagram
Diagram Description: The diagram would show the differentiable relaxation of operations between nodes in a computational graph, illustrating the weighted sum of candidate operations and the bi-level optimization flow.

Bayesian Optimization

Bayesian Optimization (BO) is a probabilistic approach for optimizing expensive black-box functions, making it particularly suitable for Neural Architecture Search (NAS). It models the objective function as a Gaussian Process (GP) and iteratively selects candidate architectures to evaluate based on an acquisition function that balances exploration and exploitation.

Gaussian Process Surrogate Model

The core of BO lies in its surrogate model, typically a Gaussian Process, which provides a distribution over possible functions that fit the observed data. Given a set of evaluated architectures X = {x1, ..., xn} and their corresponding performance metrics y = {y1, ..., yn}, the GP defines a prior over functions:

$$ f(\mathbf{x}) \sim \mathcal{GP}\big(m(\mathbf{x}), k(\mathbf{x}, \mathbf{x}')\big) $$

where m(x) is the mean function (often set to zero) and k(x, x') is the kernel function capturing covariance between inputs. The squared exponential kernel is commonly used:

$$ k(\mathbf{x}, \mathbf{x}') = \sigma_f^2 \exp\left(-\frac{1}{2l^2} \|\mathbf{x} - \mathbf{x}'\|^2\right) $$

Here, σf is the signal variance and l is the length-scale hyperparameter. The posterior distribution is updated after each new observation, refining the model's predictions.

Acquisition Functions

BO guides the search by maximizing an acquisition function that quantifies the utility of evaluating a candidate architecture. Common choices include:

For Expected Improvement:

$$ \text{EI}(\mathbf{x}) = \mathbb{E}\big[\max(f(\mathbf{x}) - f^*, 0)\big] $$

Under the GP posterior, this has a closed-form expression:

$$ \text{EI}(\mathbf{x}) = (\mu(\mathbf{x}) - f^* - \xi)\Phi(Z) + \sigma(\mathbf{x})\phi(Z) $$

where Z = (μ(x) − f*ξ) / σ(x), and Φ, ϕ are the CDF and PDF of the standard normal distribution, respectively. The parameter ξ controls exploration-exploitation trade-off.

Practical Considerations in NAS

Applying BO to NAS involves several challenges:

Recent advances include BANANAS (Bayesian Optimization with Neural Architectures for Neural Architecture Search), which combines BO with a neural predictor to improve scalability.

Case Study: Auto-Keras

Auto-Keras implements BO for NAS by treating the architecture search as a structured hyperparameter optimization problem. It uses a tree-structured Parzen estimator (TPE) variant to efficiently navigate the space of possible architectures, achieving competitive performance with minimal manual intervention.

Bayesian Optimization – Neural Architecture Search (NAS) – Tutorial Diagram
Diagram Description: The diagram would show the Gaussian Process posterior updating with new observations and how acquisition functions (EI, UCB, PI) select the next candidate architecture.

3. Accuracy vs. Computational Cost Trade-offs

Accuracy vs. Computational Cost Trade-offs

Neural Architecture Search (NAS) fundamentally operates under the constraint of optimizing two competing objectives: model accuracy and computational cost. The trade-off between these objectives is governed by the Pareto efficiency principle, where improving one metric typically degrades the other. Formally, this can be expressed as a multi-objective optimization problem:

$$ \min_{\alpha \in \mathcal{A}} \left( \mathcal{L}(\alpha), \mathcal{C}(\alpha) \right) $$

where α represents the architecture, ℒ(α) is the validation loss (proxy for accuracy), and 𝒞(α) is the computational cost (e.g., FLOPs, latency, or memory footprint).

Quantifying Computational Cost

The computational cost 𝒞(α) is typically measured in one of three ways:

For convolutional layers, FLOPs can be derived as:

$$ \text{FLOPs} = 2 \times H_{\text{out}} \times W_{\text{out}} \times C_{\text{out}} \times K_h \times K_w \times C_{\text{in}} $$

where Hout, Wout are spatial dimensions, Cin, Cout are input/output channels, and Kh, Kw are kernel dimensions.

Pareto-Optimal Architectures

A NAS algorithm discovers architectures lying on the Pareto frontier, where no other architecture dominates in both objectives. The frontier can be approximated using:

$$ \mathcal{P} = \{ \alpha \in \mathcal{A} \mid \nexists \alpha' \text{ s.t. } \mathcal{L}(\alpha') \leq \mathcal{L}(\alpha) \land \mathcal{C}(\alpha') \leq \mathcal{C}(\alpha) \} $$

Weighted sum scalarization is commonly used to navigate this frontier:

$$ \min_{\alpha} \mathcal{L}(\alpha) + \lambda \mathcal{C}(\alpha) $$

where λ controls the trade-off. For example, λ = 0.07 was used in MnasNet to balance accuracy and latency on mobile devices.

Hardware-Aware NAS

Modern NAS methods incorporate hardware feedback loops. For instance, ProxylessNAS uses gradient-based architecture search with a latency loss term:

$$ \mathcal{L}_{\text{total}} = \mathcal{L}_{\text{CE}} + \beta_1 \mathbb{E}[\text{latency}] + \beta_2 \text{Var}[\text{latency}] $$

where β1 and β2 penalize mean and variance of measured latency.

Case Study: EfficientNet

The EfficientNet family demonstrates how compound scaling (depth, width, resolution) affects the trade-off. Scaling baseline model by (α, β, γ) yields:

$$ \text{FLOPs} \propto \alpha \beta^2 \gamma^2 $$

Empirically, optimal scaling for ImageNet accuracy follows α = 1.2, β = 1.1, γ = 1.15, achieving 84.4% top-1 accuracy with 66M parameters and 19B FLOPs.

Search Space Design Implications

The choice of search space operations directly impacts the achievable trade-offs:

Accuracy vs. Computational Cost Trade-offs – Neural Architecture Search (NAS) – Tutorial Diagram
Diagram Description: The diagram would show the Pareto frontier with example architectures plotted along the accuracy vs. computational cost axes, illustrating the trade-off relationship.

3.2 Benchmark Datasets and Tasks

Neural Architecture Search (NAS) relies heavily on standardized benchmark datasets and tasks to evaluate the performance of discovered architectures. These benchmarks provide a controlled environment for comparing different NAS methods, ensuring reproducibility and fairness in evaluation. The choice of dataset and task depends on the target application, computational constraints, and the desired trade-off between exploration and exploitation.

Image Classification Benchmarks

Image classification remains the most common benchmark for NAS due to its well-established evaluation protocols and the availability of large-scale datasets. The following datasets are widely used:

Object Detection and Segmentation Benchmarks

For NAS applied to more complex vision tasks, the following benchmarks are prevalent:

Natural Language Processing Benchmarks

NAS has also been applied to NLP tasks, with the following benchmarks being common:

Specialized NAS Benchmarks

Several benchmarks have been specifically designed for NAS research:

$$ \text{Score}(A) = \frac{1}{N} \sum_{i=1}^{N} \left( \alpha \cdot \text{Acc}_i(A) - \beta \cdot \text{FLOPs}(A) \right) $$

Where A represents an architecture, Acci is its accuracy on task i, and FLOPs measures computational cost. The coefficients α and β control the trade-off between performance and efficiency, typically determined via cross-validation.

Evaluation Metrics

Beyond raw accuracy, NAS benchmarks employ various metrics to assess different aspects of discovered architectures:

The choice of benchmark significantly impacts NAS research directions. Smaller datasets enable rapid iteration but may not reflect real-world performance, while large-scale benchmarks provide more reliable evaluations at greater computational cost. Recent trends show increasing use of proxy tasks and progressive evaluation strategies to balance these factors.

3.3 Fairness and Robustness in NAS

Fairness in Neural Architecture Search

Neural Architecture Search (NAS) introduces unique fairness challenges due to its automated nature. The search process may inadvertently favor architectures that perform well on majority classes while degrading performance on underrepresented groups. Let D denote the dataset with subgroups D1, D2, ..., Dk. A fairness-aware NAS objective can be formulated as:

$$ \min_{\theta} \max_{i \in \{1..k\}} \mathcal{L}(f_{\theta}, D_i) $$

where fθ is the neural network parameterized by architecture θ, and is the loss function. This minimax formulation ensures no subgroup performance falls below an acceptable threshold.

Robustness Considerations

NAS-discovered architectures often exhibit sensitivity to adversarial perturbations and distribution shifts. The robustness of an architecture θ can be quantified through its expected loss under worst-case perturbations δ:

$$ R(\theta) = \mathbb{E}_{(x,y)\sim D} \left[ \max_{\|\delta\| \leq \epsilon} \mathcal{L}(f_{\theta}(x + \delta), y) \right] $$

Recent approaches integrate robustness directly into the search process through:

Bias Mitigation Techniques

Several methods have emerged to address fairness in NAS:

Method Approach Trade-offs
FairDARTS Pareto-optimal architecture search with fairness constraints Increased search complexity
RobustNAS Adversarially robust supernet training Higher computational cost
EQUINAS Equality-constrained optimization Requires careful constraint tuning

Certifiable Robustness

Recent work has extended formal verification methods to NAS-discovered architectures. For a neural network fθ with Lipschitz constant Lθ, the worst-case output deviation under input perturbation δ is bounded by:

$$ \|f_{\theta}(x) - f_{\theta}(x + \delta)\|_2 \leq L_{\theta} \|\delta\|_2 $$

NAS techniques can directly optimize for architectures with provably small Lθ through:

Practical Implementation Challenges

Implementing fairness and robustness in NAS systems presents several engineering challenges:

NAS Fairness-Robustness Trade-off Space Accuracy Fairness Robustness

4. NAS for Computer Vision

4.1 NAS for Computer Vision

Neural Architecture Search (NAS) has revolutionized computer vision by automating the design of high-performance neural networks. Unlike handcrafted architectures, NAS leverages optimization techniques to discover topologies that maximize accuracy while minimizing computational cost. The search space for vision tasks typically includes operations like convolutions, pooling, skip connections, and attention mechanisms, constrained by factors such as latency, memory footprint, and task-specific performance metrics.

Search Space Design

The design of the search space is critical in NAS for computer vision. A common approach is the cell-based search space, where the network is constructed by stacking repeated computational cells. Each cell is a directed acyclic graph (DAG) with nodes representing feature maps and edges representing operations. The search space defines:

For example, in DARTS (Differentiable Architecture Search), the search space is continuous, and the architecture is encoded via learnable parameters α that weight each operation. The probability of selecting operation o between nodes i and j is given by:

$$ p_{o}^{(i,j)} = \frac{\exp(\alpha_{o}^{(i,j)})}{\sum_{o' \in \mathcal{O}} \exp(\alpha_{o'}^{(i,j)})} $$

Optimization Strategies

NAS optimization methods for computer vision fall into three categories:

In gradient-based methods, the architecture parameters α and model weights w are jointly optimized using bilevel optimization:

$$ \min_{\alpha} \mathcal{L}_{val}(w^*(\alpha), \alpha) $$ $$ \text{s.t.} \quad w^*(\alpha) = \argmin_{w} \mathcal{L}_{train}(w, \alpha) $$

Efficiency Considerations

NAS for computer vision must balance search cost and model performance. Techniques to improve efficiency include:

For hardware-aware NAS, the objective function often includes a Pareto-optimal trade-off between accuracy and latency:

$$ \mathcal{L}(\alpha) = \text{CE}(\alpha) + \lambda \cdot \log(\text{Latency}(\alpha)) $$

Case Study: EfficientNet

EfficientNet leverages NAS to scale model depth, width, and resolution optimally. The compound scaling method uses a grid search to determine the best scaling coefficients ϕ for these dimensions:

$$ \text{depth}: d = \alpha^\phi $$ $$ \text{width}: w = \beta^\phi $$ $$ \text{resolution}: r = \gamma^\phi $$

where α, β, γ are constants determined via NAS. This approach achieves state-of-the-art accuracy with significantly fewer parameters than hand-designed models.

NAS for Computer Vision – Neural Architecture Search (NAS) – Tutorial Diagram
Diagram Description: The diagram would show a cell-based search space as a directed acyclic graph (DAG) with nodes representing feature maps and edges labeled with candidate operations like convolutions or skip connections.

4.2 NAS for Natural Language Processing

Neural Architecture Search (NAS) has demonstrated significant success in automating the design of deep learning models for computer vision, but its application to Natural Language Processing (NLP) introduces unique challenges. Unlike image data, text sequences exhibit hierarchical, variable-length dependencies that require specialized architectural considerations. NAS for NLP must account for token embeddings, attention mechanisms, and recurrent or transformer-based structures.

Search Space Design for NLP

The search space for NLP architectures typically includes:

Mathematically, the search space can be formalized as a directed acyclic graph (DAG) where each node represents a computational block (e.g., LSTM, attention) and edges define data flow. The probability of selecting an operation o from a set of candidates O is often parameterized using softmax over architecture weights α:

$$ P(o) = \frac{\exp(\alpha_o)}{\sum_{o' \in O} \exp(\alpha_{o'})} $$

Optimization Strategies

NAS methods for NLP often employ reinforcement learning (RL), evolutionary algorithms, or gradient-based optimization. In RL-based approaches, a controller network generates architectures, and rewards are based on validation performance. The objective is to maximize expected reward:

$$ J(\theta) = \mathbb{E}_{a \sim \pi(\cdot;\theta)} [R(a)] $$

where θ represents controller parameters and R(a) is the reward for architecture a. Gradient-based methods, such as DARTS, relax the discrete search space into a continuous one, enabling efficient optimization via backpropagation:

$$ \nabla_{\alpha} \mathcal{L}_{\text{val}}(w^*, \alpha) $$

where w* denotes model weights optimized on training data, and α represents architecture parameters.

Case Study: NAS-BERT

NAS has been applied to transformer-based models like BERT, where the search space includes the number of layers, attention heads, and hidden dimensions. NAS-BERT achieves competitive performance with fewer parameters by optimizing:

Empirical results show that NAS-designed transformers reduce inference latency by 20% while maintaining accuracy on GLUE benchmarks.

Challenges & Future Directions

Key challenges in NAS for NLP include:

Recent advances leverage weight-sharing (e.g., One-Shot NAS) and meta-learning to accelerate search. Future work may explore differentiable NAS for dynamic architectures that adapt to input complexity.

NAS for Natural Language Processing – Neural Architecture Search (NAS) – Tutorial Diagram
Diagram Description: The section describes a directed acyclic graph (DAG) structure for NLP search spaces and multiple architectural components (embeddings, attention, sequence blocks) with complex interactions.

NAS in Edge and Mobile Devices

Neural Architecture Search (NAS) for edge and mobile devices introduces unique constraints not present in cloud-based deployments. The primary challenges include stringent computational budgets, limited memory, and energy efficiency requirements. Traditional NAS methods, which often rely on heavy-weight search spaces and compute-intensive optimization, must be adapted to meet these constraints without sacrificing model accuracy.

Key Constraints in Edge NAS

Edge devices operate under hard limits on latency, power consumption, and model size. These constraints translate into specific optimization objectives during NAS:

These objectives are often conflicting, requiring multi-objective optimization techniques. The Pareto front becomes critical for evaluating trade-offs between accuracy, latency, and energy consumption.

Efficient Search Spaces for Edge NAS

Designing a search space tailored for edge devices involves:

Mathematically, the search space can be formalized as a directed acyclic graph (DAG) where each node represents a tensor and edges represent mobile-optimized operations. The optimization problem becomes:

$$ \min_{\alpha \in \mathcal{A}} \mathbb{E}_{(x,y) \sim \mathcal{D}} [\mathcal{L}(f_{\alpha}(x), y)] $$ $$ \text{s.t.} \quad \text{FLOPs}(f_{\alpha}) \leq B_{\text{FLOPs}}, \quad \text{Mem}(f_{\alpha}) \leq B_{\text{Mem}} $$

where α parameterizes the architecture, B represents resource budgets, and fα is the neural network.

Hardware-Aware NAS

Modern edge NAS incorporates hardware feedback directly into the search loop. This involves:

The hardware feedback loop transforms the optimization into:

$$ \alpha^* = \argmin_{\alpha} \mathcal{L}_{\text{val}}(\alpha) + \lambda_1 \text{Lat}(\alpha) + \lambda_2 \text{Energy}(\alpha) $$

where Lat(α) and Energy(α) are hardware-measured metrics, and λ terms balance the objectives.

Case Study: MobileNetV3

The MobileNetV3 architecture, discovered through hardware-aware NAS, demonstrates key innovations for edge deployment:

On a Pixel 4, MobileNetV3 achieves 75.2% ImageNet accuracy at just 1.8ms latency, demonstrating the effectiveness of hardware-aware NAS for edge scenarios.

Emerging Directions

Recent advances push the boundaries of edge NAS:

These approaches are redefining what's possible in bringing state-of-the-art AI to the most resource-constrained environments.

Edge NAS Search Space & Hardware Feedback A diagram showing the directed acyclic graph (DAG) structure of a mobile-optimized search space with labeled nodes (tensors) and edges (operations like depthwise convolutions), alongside hardware feedback loops profiling latency/energy. Search Space DAG Depthwise conv Inverted residual FLOPs budget Hardware Feedback Measurement Module (Latency/Energy) Pareto Front Latency Energy Lookup Table Differentiable Latency
Diagram Description: The diagram would show the directed acyclic graph (DAG) structure of a mobile-optimized search space with labeled nodes (tensors) and edges (operations like depthwise convolutions), alongside hardware feedback loops profiling latency/energy.

5. Key Research Papers

5.1 Key Research Papers

  • NAS-BNN: Neural Architecture Search for Binary Neural Networks — To address the aforementioned challenges, researchers leverage Neural Architecture Search (NAS) to automatically design a series of BNNs [12], [13], [14], [15].For example, BNAS [12] and BATS [13] employ differentiable NAS on their carefully designed cell-based search spaces. Binary MobileNet [15] uses weight-sharing NAS to explore the best candidate for the number of groups and find a tiny ...
  • PDF Are Labels Necessary for Neural Architecture Search? - ecva.net — Keywords: Neural Architecture Search; Unsupervised Learning 1 Introduction Neural architecture search (NAS) has emerged as a research problem of searching for architectures that perform well on target data and tasks. A key mystery sur-rounding NAS is what factors contribute to the success of the search. Intuitively,
  • BNAS: An Efficient Neural Architecture Search Approach Using Broad ... — effective way to develop more efficient NAS approach. In this paper, we propose Broad Neural Architecture Search (BNAS), an automatic architecture search approach with state-of-the-art efficiency. Different from other NAS approaches, in BNAS, an elaborately designed broad scalable architecture dubbed Broad Convolutional Neural Network (BCNN ...
  • Systematic review on neural architecture search | Artificial ... — The query string used for this search was "Neural Architecture Search (NAS)," "architecture searching algorithm," and "predict performance." After eliminating duplicated publications, pruning non-related papers, and adding our pre-studied papers to this collection, 160 papers were accumulated.
  • PDF UP-NAS: Unified Proxy for Neural Architecture Search - CVF Open Access — Integration-Lab/UP-NAS. 1. Introduction Neural architecture search (NAS) is an automated machine learning method that aims to find optimal model structures by searching the neural network architecture space. Tradi-tional deep learning models require experts to design the model structure. NAS simplifies this process by automat-
  • NAS-SE: Designing A Highly-Efficient In-Situ Neural Architecture Search ... — The emergence of Neural Architecture Search (NAS) enables an automated neural network development process that potentially replaces manually-enabled machine learning expertise. A state-of-the-art NAS method, namely One-Shot NAS, has been proposed to drastically reduce the lengthy search time for a wide spectrum of conventional NAS methods ...
  • PDF RENAS: Reinforced Evolutionary Neural Architecture Search - CVF Open Access — Reinforced Evolutionary Neural Architecture Search (RE-NAS), which is an evolutionary method with reinforced mu-tation for NAS. Our method integrates reinforced mutation into an evolution algorithm for neural architecture explo-ration, inwhich a mutationcontroller isintroduced to learn the effects of slight modifications and make mutation ac ...
  • Neural Architecture Search for Generative Adversarial Networks: A ... — Neural Architecture Search (NAS) has emerged as a pivotal technique in optimizing the design of Generative Adversarial Networks (GANs), automating the search for effective architectures while addressing the challenges inherent in manual design. This paper provides a comprehensive review of NAS methods applied to GANs, categorizing and comparing various approaches based on criteria such as ...
  • Cross task neural architecture search for EEG signal recognition — Our approach is inspired by Neural Architecture Search (NAS) framework [78], [42], [7], [68], which introduces the automatic design of artificial neural networks.Yet, previous explorations are mostly in the computer vision area. By utilizing NAS, we increase the automation level into mostly manually designed structure in EEG field.Moreover, this could bring neural network customization ...
  • A survey on computationally efficient neural architecture search — The rest of this paper is organized as follows. Section 2 provides the definition and mathematical formulation of NAS as an optimization problem, along with a brief overview of the development of NAS methods. Section 3 gives a detailed investigation of proxy-based NAS, which covers low-fidelity estimation, one-shot NAS and network morphism. Section 4 presents a systematical analysis of ...

5.2 Open-Source NAS Tools

  • Enhanced Neural Architecture Search Using Super Learner and Ensemble ... — Neural Architecture Search (NAS) enables multiple architectures to be evaluated prior to selection of the optimal architecture. A system integrating open-source tools for Neural Architecture Search (OpenNAS) of image classification problems has been developed and made available to the open-source community. OpenNAS takes any dataset of ...
  • PDF BN-NAS: Neural Architecture Search With Batch Normalization — We present BN-NAS, neural architecture search with Batch Normalization (BN-NAS), to accelerate neural ar-chitecture search (NAS). BN-NAS can significantly reduce the time required by model training and evaluation in NAS. Specifically, for fast evaluation, we propose a BN-based in-dicator for predicting subnet performance at a very early ...
  • PDF RENAS: Reinforced Evolutionary Neural Architecture Search - CVF Open Access — Reinforced Evolutionary Neural Architecture Search (RE-NAS), which is an evolutionary method with reinforced mu-tation for NAS. Our method integrates reinforced mutation into an evolution algorithm for neural architecture explo-ration, inwhich a mutationcontroller isintroduced to learn the effects of slight modifications and make mutation ac ...
  • Fast Data Aware Neural Architecture Search via Supernet Accelerated ... — In particular, Hardware Aware Neural Architecture Search (NAS) is regarded as a promising research direction to scale the process of creating lean TinyML systems. Alongside scaling the creation of TinyML systems, the speed at which NAS evaluates Neural Network (NN) architectures has also proven useful for creating higher-performing ...
  • Network-aware federated neural architecture search — Neural Architecture Search is the process of building the best-performing neural network architecture for a given task in an automated way. NAS has already shown success in various tasks [17], [18], [19]. One of the prior works [6] by Google Brain utilized Reinforcement Learning (RL) in the neural architecture search process. The proposed ...
  • Neural architecture search with interpretable meta-features and fast ... — This paper proposes a Prediction-based NAS method named MbML-NAS (Model-based Meta-Learning for NAS) that learns from neural architectures' meta-information and prior model performances to predict and find accurate ConvNets.MbML-NAS employs traditional regression models as meta-predictors, such as linear models and decision trees, thus predicting the performances of ConvNets to select the best ...
  • Rapid Neural Architecture Search by Learning to Generate ... - GitHub — Despite the success of recent Neural Architecture Search (NAS) methods on various tasks which have shown to output networks that largely outperform human-designed networks, conventional NAS methods have mostly tackled the optimization of searching for the network architecture for a single task (dataset), which does not generalize well across multiple tasks (datasets).
  • RaNAS: Resource-Aware Neural Architecture Search for Edge Computing — On the other hand, new trends are emerging that deploy models on edge devices to avoid data transmission and enable adaptive learning [].However, Neural Architecture Search (NAS) [7, 42] for edge devices is time-consuming.This is primarily due to the need to transfer new models to remote edge devices, deploy and execute each model on these devices, and gather performance data to compare ...
  • Neural Architecture Search using Particle Swarm and Ant Colony Optimization — Neural architecture search is the process of automatically finding and tuning DNNs. It has been shown that DNNs have made remarkable progress in solving many real world problems such as image recognition, speech recognition and machine translation[].In general, NAS systems consist of three main components: a search space, a search algorithm and an evaluation strategy.

5.3 Recommended Books and Surveys

  • GitHub - GraphNAS/Awesome-NAS: A curated list of neural architecture ... — A curated list of neural architecture search (NAS) resources. - GraphNAS/Awesome-NAS ... for Best Speed/Accuracy Trade-off in Neural Architecture Search: CVPR: EA: github: SNAS: stochastic neural architecture search: ICLR: G- ... Neural Architecture Search: A Survey Thomas Elsken, Jan Hendrik Metzen, Frank Hutter. arXiv 1808 ...
  • ATNAS: Automatic Termination for Neural Architecture Search — The success of such representation learning has been driven by improvements in neural architectures. However, limits to the heuristic designing of neural architectures remain. Neural architecture search (NAS) is designed to automate such architecture engineering of neural network models (Elsken et al., 2019, Ren et al., 2021, White et al., 2023).
  • A Comprehensive Survey of Neural Architecture Search: Challenges and ... — Neural Architecture Search ( NAS ) is just such a revolutionary algorithm, and the related research work is complicated and rich. Therefore, a comprehensive and systematic survey on the NAS is ...
  • Evolutionary neural architecture search combining multi-branch ConvNet ... — Early NAS approaches 24 usually utilize the global search space that requires using a search strategy with the ability to search all necessary components of the architecture, which means the optimal neural architecture requires to be discovered within a huge search space. In contrast, modular search space simplifies to only search one or more ...
  • PDF E-DNAS: Differentiable Neural Architecture Search for Embedded Systems — Neural Architecture Search (NAS) [5, 6, 7] approaches. These techniques aim to automatically design light and accurate DNNs by optimizing over a search space dened by all possible operations of the target architecture. This optimization is carried on using either reinforcement learning [5, 6] or evolutionary computing [7].
  • Graph Neural Architecture Search: A Survey - IEEE Xplore — Differences with existing surveys. The studies involving Graph-NAS surveys are limited. Xie et al.[19] provided an exhaustive enumeration of optimization strategies in neural architecture search.Although their work slightly tackled Graph-NAS, it is not emphasized on Graph-NAS challenges andwas publishedat the time when there were just a few ...
  • A survey on computationally efficient neural architecture search — To counter this problem, Neural Architecture Generator Operation (NAGO) [120] considered NAS as a search for the best network generator, and built a novel graph-based hierarchical search space which can cover a wide range of network architectures with only a few hyperparameters. Consequently, the problem dimensionality was greatly reduced ...
  • Graph Neural Architecture Search: A Survey — Abstract illustration of Graph-NAS frameworks. The search algorithm samples an architecture s from a predefined search space S. The performance of s is determined and evaluated according to the ...
  • Progressive Neural Architecture Search | SpringerLink — In this section we describe the neural network architecture search space used in our work. We build on the hierarchical approach proposed in [], in which we first learn a cell structure, and then stack this cell a desired number of times, in order to create the final CNN.3.1 Cell Topologies. A cell is a fully convolutional network that maps an \(H \times W \times F\) tensor to another \(H ...
  • (PDF) Neural architecture search for resource constrained hardware ... — NAS, Neural Architecture Search. Generic CNN architecture. For each layer an operator is chosen among a pre‐defined list (convolution, dilated convolution, depthwise convolution, maxpooling ...