Microcontroller NAS (MCU-NAS) is an automated machine learning process that directly incorporates kilobyte-scale memory budgets, microjoule-level energy limits, and single-digit megabyte flash storage as primary optimization objectives. Unlike general NAS, it searches for architectures within a space defined by microcontroller-specific operations like depthwise separable convolutions and fixed-point arithmetic compatibility, often using hardware-in-the-loop profiling to obtain ground-truth latency and power measurements on the target MCU.
Glossary
Microcontroller NAS (MCU-NAS)

What is Microcontroller NAS (MCU-NAS)?
Microcontroller NAS (MCU-NAS) is a specialized branch of hardware-aware neural architecture search that discovers optimal neural network designs for deployment on microcontrollers with extreme memory, power, and compute constraints.
The search strategy must be exceptionally efficient, often employing zero-cost proxies or one-shot NAS with weight sharing to evaluate thousands of candidates within a constrained compute budget. The ultimate output is a Pareto-optimal frontier of models trading accuracy against metrics like peak RAM usage and inference energy, enabling developers to select a network that fits precisely within the hardware limits of devices like the Arm Cortex-M series or ESP32 for TinyML applications.
Key Constraints Addressed by MCU-NAS
MCU-NAS algorithms are explicitly designed to navigate the extreme resource limitations of microcontrollers. The search process directly optimizes for these fundamental hardware constraints to produce deployable models.
Kilobyte-Scale Memory Budgets
MCU-NAS enforces strict peak RAM (activation memory) and flash (model storage) constraints, often in the range of tens to hundreds of kilobytes. The search algorithm must discover architectures where both the weights and the intermediate tensors during inference fit entirely within on-chip SRAM to avoid costly external memory access.
- Model Size: Optimizes for a minimal number of parameters to fit within limited flash memory.
- Activation Memory: Considers the memory footprint of feature maps during inference, which is often the limiting factor for network depth and width.
- Example: A search might be constrained to < 256KB of total memory, forcing the use of efficient operations like depthwise separable convolutions and limiting channel counts.
Microjoule-Level Energy Consumption
The search objective incorporates a power or energy cost model to minimize inference energy, which is critical for battery-powered IoT devices. This goes beyond just reducing operations; it considers the actual energy profile of different operations on the target MCU.
- Operation-Level Cost: Differentiates between the energy cost of a standard convolution, depthwise convolution, and fully connected layer on the target hardware.
- System Power States: May co-optimize for architectures that allow the MCU to return to a deep sleep state quickly.
- Goal: Discovers models that complete inference within a strict energy budget (e.g., < 100 µJ per inference), enabling years of operation on a coin-cell battery.
Single-Core CPU Latency
MCU-NAS targets real-time performance on single-core, low-clock-speed CPUs (e.g., Arm Cortex-M series at 80-200 MHz). The search uses a latency constraint or cost model to ensure inference completes within a required timeframe, often tens to hundreds of milliseconds.
- Clock-Cycle Awareness: Estimates latency based on the number and type of operations, considering the lack of parallel processing units like GPUs.
- Memory Hierarchy Effects: Accounts for slowdowns due to cache misses or accesses to slower flash memory.
- Contrast with Mobile NAS: While mobile NAS (e.g., for smartphones) optimizes for multi-core GPUs, MCU-NAS assumes a simple, sequential execution environment.
Fixed-Point Arithmetic (Int8/Int16)
MCU-NAS typically assumes deployment using integer-only inference (e.g., 8-bit or 16-bit precision). The search process either discovers architectures that are natively robust to quantization or integrates quantization-aware training (QAT) simulation during the search.
- Quantization-Aware Search (QA-NAS): Evaluates candidate architectures using simulated integer arithmetic to ensure accuracy is maintained post-quantization.
- Precision Search: Can include the choice of per-layer bit-width (e.g., 8-bit for weights, 16-bit for accumulators) as part of the search space.
- Avoids Floating-Point: Actively discourages operations that require floating-point units (FPUs), which are absent or energy-inefficient on most microcontrollers.
Limited Supported Operators
The search space is pruned to only include neural network operators that have efficient implementations on the target MCU. This excludes computationally expensive layers common in cloud models.
- Common Allowed Ops: Depthwise separable convolutions, pointwise convolutions, average pooling, and fully connected layers.
- Excluded Ops: Standard large-kernel convolutions, batch normalization (folded into preceding conv layer at deployment), and complex activations like SiLU.
- Kernel Library Alignment: The search is aligned with the optimized neural network kernels available in frameworks like TensorFlow Lite for Microcontrollers or CMSIS-NN.
Hardware-Specific Incompatibilities
MCU-NAS must avoid architectures that are incompatible with the target hardware's microarchitecture. This involves constraints that are not purely about size or speed, but about functional feasibility.
- Memory Alignment: Ensures tensor dimensions are aligned to the MCU's memory bus width to avoid performance cliffs.
- Kernel Size Restrictions: May avoid certain kernel sizes (e.g., 7x7) that are poorly supported by the underlying DSP instructions.
- Avoiding Dynamic Operations: Excludes operations with dynamic memory allocation or control flow, which are unpredictable on bare-metal systems.
How Does Microcontroller NAS Work?
Microcontroller NAS (MCU-NAS) is the automated process of discovering neural network architectures optimized for the extreme constraints of microcontroller units (MCUs).
The process begins by defining a search space of possible layer types, connections, and widths. A search strategy, such as evolutionary algorithms or gradient-based methods, then explores this space. Crucially, each candidate architecture is evaluated not just for accuracy but against a hardware cost model that predicts its memory footprint, latency, and energy consumption on the target MCU, ensuring the final model fits within kilobyte-scale RAM and microjoule-level power budgets.
To achieve this efficiently, MCU-NAS often employs weight sharing within a supernet, allowing many sub-architectures to be evaluated without full retraining. The search directly optimizes for multi-objective constraints, balancing accuracy against peak RAM usage and inference cycles. The output is a Pareto-optimal model architecture explicitly co-designed for the specific silicon, memory hierarchy, and arithmetic units (e.g., ARM Cortex-M) of the deployment microcontroller.
MCU-NAS vs. Other NAS Approaches
A comparison of neural architecture search methodologies based on their suitability for microcontroller deployment, focusing on search efficiency, hardware awareness, and the ability to meet extreme constraints.
| Feature / Constraint | MCU-NAS (Microcontroller NAS) | General Hardware-Aware NAS | Traditional NAS (Accuracy-Only) |
|---|---|---|---|
Primary Optimization Objective | Peak RAM/Flash usage, Energy (µJ/inf), Latency (ms) on MCU | Latency (ms), Model Size (MB) on mobile/edge SoC | Validation Accuracy (%) on proxy dataset |
Hardware Cost Model | Cycle-accurate simulator or direct on-device profiling | Look-up tables or small neural network predictors | |
Search Space Design | Extremely constrained: <100KB param limit, 8-bit ops only | Constrained: Mobile-friendly ops (e.g., depthwise conv) | Vast: Standard ops (conv, FC, attention) |
Typical Search Compute Budget | < 10 GPU-days | 10-100 GPU-days | 100-1000+ GPU-days |
Quantization & Numerics Awareness | Trained with QAT, searches for quantization-robust ops | May include quantization as a post-search step | Assumes full 32-bit floating point precision |
Memory Bottleneck Modeling | Explicitly models SRAM/Flash hierarchy and activation memory | May model DRAM bandwidth | |
Output Model Scale | Kilobyte-scale (10-500 KB) | Megabyte-scale (1-10 MB) | Megabyte to Gigabyte-scale |
Deployment Target Examples | ARM Cortex-M, RISC-V MCUs, ultra-low-power sensors | Mobile CPUs (Snapdragon), Edge TPUs, NPUs | Cloud GPUs/TPUs, High-end servers |
Common Techniques in MCU-NAS
MCU-NAS employs specialized search strategies and optimization techniques to discover neural networks that fit within the extreme kilobyte-scale memory and microjoule-level energy budgets of microcontrollers.
Hardware-in-the-Loop Profiling
This technique directly measures the true latency, peak RAM usage, and energy consumption of candidate architectures by deploying and profiling them on the actual target microcontroller during the search. This replaces inaccurate proxy models with ground-truth hardware feedback, which is critical for MCUs where cache effects and memory bus contention can drastically alter performance predictions.
- Eliminates Proxy Error: Provides exact measurements for flash, SRAM, and current draw.
- Integrates with Search Loop: The NAS controller uses real hardware metrics as the reward signal or constraint.
- Example: A search might reject a candidate that exceeds 64KB of SRAM after on-device measurement, even if a software simulator predicted 60KB.
Extreme Search Space Pruning
Given the severe constraints, the NAS search space is aggressively pruned to exclude architectures that are fundamentally incompatible with microcontroller hardware. This is based on hardware-informed heuristics.
- Pruning Rules: Eliminate operations with high latency (e.g., large dense layers), architectures requiring dynamic memory allocation, or topologies that prevent efficient layer fusion.
- Fixed-Point-First Design: The search space may be limited to operators known to be stable with 8-bit or 4-bit integer quantization.
- Benefit: Drastically reduces the number of invalid candidates, making the search tractable on limited compute resources.
Memory-Aware Supernet Training
Adapts the One-Shot NAS paradigm with a critical focus on memory footprint. A single, weight-shared supernet is trained, but its training and the sampling of sub-networks are constrained by peak memory usage.
- Memory Cost Modeling: A lightweight model or lookup table predicts the SRAM footprint of any sub-graph within the supernet.
- Constrained Weight Sharing: During supernet training, gradient updates are performed only on sub-networks that satisfy a memory budget, ensuring the shared weights are optimized for feasible architectures.
- Outcome: Enables the evaluation of thousands of sub-architectures by simply querying the trained supernet and its memory model, without retraining.
Multi-Objective Pareto Search
MCU-NAS typically optimizes for three or more competing objectives, seeking architectures on the Pareto frontier where no metric can be improved without degrading another. Common objectives include:
- Model Accuracy (e.g., classification F1-score)
- Peak SRAM Usage (must be under budget, e.g., < 32KB)
- Inference Latency (meets real-time requirement, e.g., < 100ms)
- Energy per Inference (measured in microjoules)
Search strategies like NSGA-II (an evolutionary algorithm) are used to evolve a population of architectures toward this optimal trade-off surface, giving developers a menu of viable models for their specific balance of constraints.
Quantization-Aware Search (QA-NAS)
Integrates quantization simulation directly into the architecture search loop. Candidate networks are trained and evaluated with simulated low-precision arithmetic (e.g., INT8), ensuring the discovered architecture is inherently robust to the precision loss of deployment.
- Simulated Quantization: During supernet training or candidate evaluation, weights and activations are quantized and de-quantized in the forward pass.
- Searches for Quantization-Friendly Structures: The algorithm naturally favors operations and activation functions that exhibit low quantization error.
- Result: The final discovered architecture requires minimal or no fine-tuning after post-training quantization, streamlining the deployment pipeline.
Operator Search for MCUs
The core of the search space defines a set of microcontroller-optimized primitive operations. The NAS algorithm selects and combines these. Common operators include:
- Depthwise Separable Convolutions: Drastically reduces parameters and compute vs. standard convolutions.
- Micro-Fully Connected Layers: Very narrow dense layers with limited input/output features.
- Efficient Activations: Functions like ReLU6 or hard-swish that are cheap to compute on fixed-point units.
- Skip Connections & Add Operations: Used sparingly due to memory overhead of storing residuals.
- Pooling Layers: Fixed, low-overhead operations like average pooling.
The search dynamically constructs a network from this palette, optimizing for the specific sensor data pattern (e.g., 1D time-series vs. 2D audio spectrograms).
Frequently Asked Questions
Microcontroller NAS (MCU-NAS) refers to hardware-aware neural architecture search methods specifically tailored to the extreme constraints of microcontrollers, optimizing for metrics like kilobyte-scale memory and microjoule-level energy. This FAQ addresses common technical questions about its mechanisms, constraints, and applications.
Microcontroller NAS (MCU-NAS) is an automated machine learning technique that searches for optimal neural network architectures under the extreme memory, power, and compute constraints of a microcontroller unit (MCU). It works by defining a search space of possible layer types, connections, and hyperparameters, then using a search strategy (like evolutionary algorithms or gradient-based methods) to evaluate candidates against a multi-objective reward function that includes accuracy, peak RAM usage, flash memory footprint, and inference energy in microjoules. Unlike standard NAS, MCU-NAS incorporates a hardware cost model—often a lookup table or a small neural network—that predicts these hardware metrics without needing to deploy every candidate to physical silicon, making the search tractable.
Enabling Efficiency, Speed & Accuracy
Intelligent Analysis, Decision & Execution
We build AI systems for teams that need search across company data, workflow automation across tools, or AI features inside products and internal software.
Talk to Us
Search across company data
Give teams answers from docs, tickets, runbooks, and product data with sources and permissions.
Useful when people spend too long searching or get different answers from different systems.

Automate internal workflows
Use AI to route work, draft outputs, trigger actions, and keep approvals and logs in place.
Useful when repetitive work moves across multiple tools and teams.

Add AI to products and internal tools
Build assistants, guided actions, or decision support into the software your team or customers already use.
Useful when AI needs to be part of the product, not a separate tool.
Related Terms
Microcontroller NAS (MCU-NAS) operates at the intersection of automated neural design and extreme hardware constraints. These related terms define the core concepts, search strategies, and optimization targets that enable its function.
Hardware-Aware Neural Architecture Search
The broader category of automated neural network design that incorporates hardware-specific constraints—such as latency, memory footprint, and energy consumption—directly into the search objective. MCU-NAS is a specialized sub-field targeting microcontroller-class devices.
- Key Constraint: Moves beyond just model accuracy to include real-world deployment metrics.
- Search Objective: Typically a weighted sum or multi-objective optimization (e.g., accuracy * (1/latency)).
- Example: Searching for a model that achieves >95% accuracy while using less than 50KB of RAM.
Hardware Cost Model
A predictive function used within NAS to estimate the inference latency, peak memory usage, or energy cost of a candidate neural network architecture without deploying it on physical hardware.
- Types: Can be a simple lookup table of layer-wise costs, a linear regression model, or a small neural network predictor.
- Purpose: Drastically accelerates the search by replacing slow, hardware-in-the-loop profiling for most candidates.
- MCU-NAS Challenge: Must be extremely accurate for kilobyte-scale memory and microjoule-level energy predictions, where small errors are significant.
Memory Constraint (NAS)
A strict upper bound on the RAM (activation memory) and often flash (model weight) memory a candidate neural network can consume. This is the primary driver in MCU-NAS, where budgets can be as low as 32-256KB of total SRAM.
- Activation Memory: The temporary memory required to store intermediate layer outputs during inference; often the limiting factor.
- Weight Memory: The storage for the model's parameters; targeted via compression techniques like quantization.
- Enforcement: The search algorithm penalizes or discards architectures that violate the memory budget, guiding the search toward feasible designs.
Once-For-All (OFA)
A pioneering one-shot NAS and training paradigm highly relevant for edge deployment. It trains a single, large supernet from which many sub-networks of different depths, widths, and kernel sizes can be extracted without retraining.
- Efficiency for MCUs: After the one-time supernet training, specialized models for different microcontroller memory budgets can be instantiated in seconds.
- Elastic Dimensions: Allows dynamic adjustment of the network to fit a specific device's constraints.
- Use Case: Enables a single model family to serve a heterogeneous fleet of devices, from powerful MPUs to severely constrained MCUs.
Quantization-Aware NAS (QA-NAS)
A hardware-aware search method that discovers neural network architectures that are inherently robust to quantization. The search is conducted with simulated quantization (e.g., 8-bit integer) in the loop.
- Goal: Find architectures where the accuracy drop from float32 to int8 quantization is minimized.
- MCU-NAS Relevance: Quantization is non-negotiable for MCU deployment to reduce model size and enable fixed-point arithmetic. QA-NAS ensures the discovered architecture won't fail after this essential compression step.
- Process: The search optimizes the quantized accuracy, not the full-precision accuracy.
Neural Hardware Co-Design
The integrated philosophy of jointly optimizing neural network architectures and the features of hardware accelerators. While MCU-NAS typically takes fixed hardware as a constraint, co-design explores a broader solution space.
- MCU-NAS as a Subset: MCU-NAS is often the algorithmic component of a co-design flow for a new microcontroller or NPU.
- Feedback Loop: NAS discovers optimal models for a hardware template; hardware design is then tweaked to better support common operations from those models.
- Outcome: Produces highly efficient, locked-down systems like Google's Edge TPU with its supporting model zoo.

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.
Partnered with leading AI, data, and software stack.
How We Work
Custom AI workflows for your Business
One-fit-all AI don't work for modern businesses. At Inferensys, we aim to understand your business & custom requirements; which we use to define most efficient agentic workflows, the data, and the tools for your business.
01
Review the use case
We understand the task, the users, and where AI can actually help.
Read more02
Pick the right approach
We define what needs search, automation, or product integration.
Read more03
Build the first useful version
We implement the part that proves the value first.
Read more04
Improve from there
We add the checks and visibility needed to keep it useful.
Read moreThe first call is a practical review of your use case and the right next step.
Talk to Us