# Embedded-Arena: Building Hardware-in-the-Loop Coding Agents to Run AI on Microcontrollers

*Zhihan Zhang, Alexander Le Metzger, Jiuyang Lyu, Chun-Cheng Chang, Jiayi Shao, Yujia Liu, Emmanuel A Mensah, Edward Wang, Kurtis Heimerl, Gregory D Abowd, Natasha Jaques, Shwetak Patel, Vikram Iyer*

[NeurIPS page](https://neurips.cc/virtual/2026/poster/149789) · [OpenReview](https://openreview.net/forum?id=nJ0AEgMZGZ) · [alphaXiv](https://www.alphaxiv.org/abs/2606.16190) · [Open on the map](../papers.html#p149789)

Category: [Efficient LLM Inference & Training](../pcat/14.md) › [Efficient LLM Serving Scaling](../pgroup/50.md) · Type: new method · Keywords: hardware-in-the-loop optimization, microcontroller AI, model compression, embedded systems, LLM agent

Areas: [Memory](../areas/memory.md) › Model Memory Optimization › Memory-Efficient On-Device Inference; [Code & Coding Agents](../areas/codegen.md) › Code Generation and Optimization › GPU Kernel Optimization; [AI Agents](../areas/agents.md) › Agentic Decision Making › Agentic Optimization and Evaluation; [Evaluation & Benchmarks](../areas/evaluation.md) › Language Model and Agent Benchmarks › Language Models for Hardware Design

## Summary
Embedded-Arena introduces a hardware-in-the-loop LLM agent that iteratively optimizes models and firmware on microcontrollers, achieving up to 400× compression with minimal accuracy loss.

## Explained to a 5-year-old
We built a smart helper that talks to tiny computers. It tries to make AI models super small so they fit on the tiny computers. The helper gets feedback from the tiny computer and keeps trying until the AI works. It can make the AI 250 times smaller for pictures and 400 times smaller for sounds. This lets the tiny computers run AI without needing batteries all the time.

## Explained to a 5-year-old, longer
Tiny computers are used in things like animal cameras and health watches. These computers are very small and have very little space for AI programs. Making AI work on them while keeping them accurate is hard. The paper creates a special assistant that talks to the tiny computer and asks it how well the AI is doing. The assistant can change the AI model and even the computer's software to make it fit better. It does this many times, learning from each try. After a few tries, the AI becomes super small but still works well. For picture tasks, the AI becomes 250 times smaller with only a tiny drop in accuracy. For sound tasks, the AI becomes 400 times smaller with a small error. This lets the tiny computers run AI without needing big batteries. The assistant even beats the best human experts after a few tries. In real life, it helped an animal camera identify elk and a wearable transcribe child speech.

## For a technical reader
The work introduces a closed-loop optimization pipeline that runs on actual microcontroller hardware. An LLM agent receives real-time measurements of memory, power, and temperature, then iteratively compiles, flashes, and evaluates model variants. This feedback loop enables automatic co-optimization of both the model and firmware, achieving up to 400× compression while keeping accuracy loss under 6%. The system was validated on two embedded applications-a vision-based elk detector and an audio-based phonetic transcriber-demonstrating battery-free operation via solar harvesting. Compared to manual tuning, the automated approach reaches successful deployment in three iterations and can surpass human experts within seven.

## Problem
Deploying AI on microcontrollers requires satisfying hard constraints on memory, power, and temperature while preserving model accuracy. Currently, this optimization is performed manually by experts, which is time-consuming and scales poorly.

## Method
The approach uses a closed-loop LLM agent that receives real-time hardware feedback, iteratively compiles, flashes, and measures models on actual MCU hardware, refining both the model and firmware to satisfy constraints. The agent performs multi-turn optimization, iterating until deployment succeeds, and can surpass human expert results within a limited number of iterations.

## Results
The approach achieves the first successful deployment within three iterations, reaching 250× compression for vision models with under 3.3% accuracy loss and 400× compression for audio with under 6% Feature Error Rate, surpassing human expert results within seven iterations.

## Contributions
It introduces a hardware-in-the-loop agent arena that automates multi-constraint model optimization on MCUs, enabling iterative co-optimization of models and firmware without manual expert tuning.

## Practical relevance
The approach enables battery-free, on-device AI for wildlife monitoring and child development research, reducing reliance on cloud infrastructure.

## Research questions this paper is counted under

- [How can we automatically design and optimize deep learning models for hardware constraints without manual expertise?](../q/345.md)

This page was written by language models from the title and abstract of each paper, and the answers were checked by two other models. It can be wrong: check the paper itself. [Suggest a correction](../feedback/?on=p/149789)
