acceptodds
Published as a conference paper at NeurIPS 2026

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

Abstract

Embedded devices from wildlife monitoring stations to clinical wearables require local AI inference due to latency, communication, or privacy constraints. Optimizing models for heterogeneous microcontrollers (MCUs) requires simultaneously satisfying hard physical constraints on memory, power, and temperature while preserving accuracy, a multidimensional optimization that is today performed manually by experts. We ask whether an LLM agent can autonomously navigate this complex, multi-turn pipeline guided by real hardware feedback, and introduce a hardware-in-the-loop agent arena in which the agent iteratively refines both model and firmware—compiling, flashing, and measuring on real hardware—to enable iterative optimization. Frontier models, including Claude Opus 4.7 and Gemini 3.1 Pro, fail entirely without hardware feedback (0% deployment success), whereas our closed-loop formulation achieves the first successful deployment within three iterations and can surpass human expert results within seven. This agentic co-optimization achieves 250× compression for vision models with <3.3% accuracy loss and 400× for audio with <6% Feature Error Rate loss, enabling battery-free operation on a commercial MCU via solar harvesting. We demonstrate practical impact in two real-world systems: an elk-detection camera trap (96.7% accuracy) and a phonetic-transcription wearable (8.44% FER) for child development research.

Keywords:
Sydney, Main Track

Reviews

Among:
Shape:
123456this paper, Top 8%
Figure 1. Mean review rating of the reviewed papers at NeurIPS 2026. This paper averages 5.00 over 3 reviews, above 92% of the others.
Reviewer_tQnAOpenReview ↗
Rating
5
Clarity
3
Confidence
3
Originality
2
Quality
3
Significance
4
Read review
Summary

The paper describes an automated pipeline aimed at the utilization of off-the-shelf LLMs to produce optimized DL models which can be deployed on specialized edge hardware (MCUs). It describes a novel method to include physical, real world, measurements in the feedback loop of an agent tasked with the optimization of DL models in terms of deployability, model accuracy, power consumption, and thermal radiation.

In the proposed method, an LLM agent produces a software artifact, including a compressed DL model, and get two feedbacks :

  • a binary feedback on the deployability of the produced artifact on the specialized hardware and,
  • a vector of real values associated with measurements made on the physical target.

The application of this method is described in two application settings: elk detection in video streaming and real-time phoneme transcription.

Strengths and weaknesses

The paper clearly states the objectives and the use cases are also well described. The motivation to use LLMs to complete the challenging task of tuning DL models to specialized hardware is well grounded. The different parameters used to put the agent arena in place, DL models used as starting points, and used LLM are adequately described, making it possible to replicate the results as long as the specialized hardware is available. The described work is a PoC to improve applicability of LLM usage to problems involving physical constraints.

The analysis of failure conditions are interesting.

The results are relatively convincing even though there hasn't been enough iterations to ensure statistical significance of the obtained measures. This is confirmed by the authors in their checklist and justified by a lack of resources. This limits the generality of the approach to other use cases but pave the way to more advanced studies.

An expriment combining the different performance criteria would have been an interesting challenge for the presented method.

One of my concerns is about the lack of analysis of the produced software artifacts. It seems the research team included experts in embedded software but the obtained software artifacts aren't analysed or described, even though it seems to be of better quality than human produced artifacts. It could have been of great interest to the embedded software community to get insight from the resulting software.

Questions

In Fig. 3 and 4, how was it possible to measure FER and mAP50-95 on failed attempts ?

Limitations

Yes

Paper formatting concerns

There is a duplicated sentence in lines 222-225.

There are far too many things in Fig.5. And those things are of different types (photo, graphs, spectrogram).

1 comment

We thank the reviewer for the positive assessment and for recognizing the motivation, practical value, and reproducibility of our hardware in the loop framework. We appreciate your thoughtful suggestions. We address each point below.


analysis of the produced software artifacts

We thank the reviewer for raising this point. We agree that understanding how the agents optimize firmware is valuable to the embedded systems community. We conducted an additional analysis of the generated artifacts and will add a dedicated subsection in the revision.

Our analysis shows that the agent does not invent fundamentally new optimization techniques. Instead, its advantage is that it solidly discovers, combines, and applies embedded optimization practices through iterative hardware feedback. In summary:

For model compression, the agents mainly improve the search process rather than inventing new compression methods. They first created a small model whose weight footprint, activation memory, processor mapping, supported operators, and ping-pong buffers could be reasoned about explicitly. After establishing a deployable core, they conservatively increased depth, width, and training budget while preserving the known-good hardware layout. The larger LLMs with higher reasoning efforts made fewer arithmetic and constraint-management errors, and therefore required fewer HIL iterations to converge on architectures that maximized usable model capacity.

For power optimization, the generated firmware applies classic low power techniques, including:

  • Dynamic voltage and frequency scaling during idle periods. For example, it switches the CPU clock source to the low‑power internal IBRO oscillator for the mandatory 2 s startup delay, then back to ISO for compute. Since energy ≈ active‑time × active‑power, slowing the clock during forced‑idle windows is a direct win.
  • Clock gating for unused peripherals.
  • Deep sleep with RTC wakeup between inference cycles.
  • Lower camera pixel clock frequencies.
  • CPU and CNN clock reduction to lower peak current.
  • UART log suppression to avoid unnecessary active time.

The preferred optimizations differ by objective. For total energy, agents focus on reducing idle energy and shortening active time. For peak current, they instead spread computation over time and lower operating frequencies to reduce instantaneous current spikes.

Interestingly, GPT 5.4 was the only model that discovered overriding printf() to remove verbose camera driver logging, reducing unnecessary serial communication.

For thermal optimization, the agents reduce clock frequencies, optimize memory subsystem settings, and insert short scheduling gaps that lower peak temperature while still satisfying the runtime constraint. One particularly interesting optimization was that only Claude Opus 4.7 adjusted the PSRAM clock to cut dynamic power.

The results are relatively convincing even though there hasn't been enough iterations to ensure statistical significance of the obtained measures…

We agree that additional runs strengthen confidence in the results. We conducted two additional independent runs for Gemini 3.1 Pro on the most challenging task (YOLO on MAX78000), increasing the evaluation to 30 total iterations for both low and high reasoning efforts. Because every trajectory consists of 10 optimization rounds, and each round requires model training, compilation, flashing, and physical hardware measurement, it was not feasible to repeat the entire evaluation across all tasks during the rebuttal period. We will continue expanding the evaluation in the camera ready version.

The conclusion remains unchanged. Without hardware feedback, both Sco and Doc settings still achieved 0 successful deployments in all iterations, while Hardware-in-the-loop (HIL) consistently produced successful deployments (50-80%) with stable final mAP50-95 (Low: 10.43-14.20; High: 17.11-18.03).

To further strengthen the evaluation, we also performed additional statistical analysis. We treat each (model, task) pair as one paired observation, avoiding pseudoreplication from treating individual iterations as independent samples. Since our hypothesis of interest is specifically whether HIL improves over Sco/Doc (not an exploratory three-way comparison), we run two planned Wilcoxon signed-rank tests (HIL vs. Sco, HIL vs. Doc) with Holm correction. We additionally report bootstrap 95% confidence intervals and a mixed-effects logistic regression (GEE, binomial, clustered by model, controlling for task) controlling for task differences and repeated measurements.

Across all tasks (N = 48 paired evaluations):

Feedback ConfigMean success95% CI
Sco12.3%[6.5, 18.8]
Doc18.5%[10.6, 27.1]
HIL37.9%[29.0, 47.1]

HIL is significantly higher than both Sco (p < 0.0001) and Doc (p = 0.0004, Holm-corrected). The GEE model confirms this after controlling for task and within-model correlation (HIL vs. Sco: OR ≈ 4.7, p < 0.0001; HIL vs. Doc: p < 0.0001).

In Fig. 3 and 4, how was it possible to measure FER and mAP50-95 on failed attempts?

We apologize for the unclear presentation. The plotted mAP50-95 and FER values for "Failed" attempts are host side evaluations, not measurements collected from the MCU. The deployment itself failed because the generated model violated hardware constraints such as memory or operator support, even though its software level accuracy could still be evaluated.

We included these points to visualize the agent's search trajectory. High accuracy failed points show that the agent found a promising model, but it was not yet deployable on the target hardware. We will revise both figure captions and the main text to make this clear.

Paper Formatting Concerns

We thank the reviewer for pointing out the presentation issues. We have fixed them.

Reviewer_n17HOpenReview ↗
Rating
5
Clarity
3
Confidence
4
Originality
3
Quality
3
Significance
3
Read review
Summary

The work focuses on the central challenge of deploying AI models on embedded micro controllers where typical large scale models cannot be deployed as is due to operational constraints around memory, processing power and thermal considerations. The paper proposes a hardware-in-the-loop (HIL) agent framework, where an agent is given the task of optimizing the deployment of AI models by making model and/or firmware changes and compiling/deploying them, take physical feedback from hardware sensors as an input for guiding its optimizations and then use these parameters and data to iteratively optimize the model. Paper claims that for embedded applications and deployment considerations, agents without hardware feedback fail to achieve successful deployments. With hardware feedback, some applications can see strong compression with not a significant accuracy loss in vision and audio deployments use-cases.  The paper establishes with evidence that hardware feedback is essential for agent-based embedded AI deployment

Strengths and weaknesses

Strengths: The identified problem is unique and there is not much work around this area. Evaluation is covering depth and breadth - 6 most common LLM agents and across multiple hardware platforms Actual hardware measurements are used for the feedback and based on real deployment cases.

Weaknesses: Since no open source models have been used I believe reproducibility is going to be an issue, also since real world deployments are considered and not established benchmarks. Benchmarks are not proposed as part of the evaluation. That would in itself be a major contribution. Results depend on physical environment like temperature and hardware state. While they did consider aspects like power, thermal, current, they fail to consider other aspects that could influence the optimizations - like time series sensors or more broader workloads  No statistical analysis has been performed - error bars, or multi variance analysis or even multiple runs to analyze consistency of results is not clear. High operational complexity as need dedicated hardware setups, measurement instruments, toolchains etc.

Questions
  • Do you have any associated benchmarks that could be released with the paper?
  • How many runs were conducted? Are the results averaged over multiple runs?
  • A suggestion to add some statistical analysis will strengthen the paper claims.
Limitations

yes

Paper formatting concerns

N/A

Final justification

My initial assessment was positive to begin with and my posed questions were answered by the authors if the possible capacity. If the authors add the aforementioned edits to the paper it will help have more well-rounded presentation of the work. These represent comparatively minor adds. I stand by my positive assessment.

1 comment

We thank the reviewer for the positive assessment and for recognizing the novelty of the problem, the breadth of the evaluation, and the importance of grounding the agent with real hardware feedback. We address each concern below.


no open source models have been used

We thank the reviewer for raising this concern about reproducibility because our evaluation used frontier closed source models. To address this, we ran additional experiments with two recent open source reasoning models, GLM 5.1 and DeepSeek V4 Pro, on the most challenging task in our paper (YOLO on MAX78000). These additional results follow the same trend as the six frontier models already evaluated: without hardware feedback, neither model produced a successful deployment. With hardware in the loop, both models successfully optimized the deployment.

ModelScoDocHardware-in-the-Loop (HIL)
GLM 5.1 (Low)0%0%0%
GLM 5.1 (High)0%0%20% (Best mAP50-95: 18.61)
DeepSeek V4 Pro (High)0%0%50% (Best mAP50-95: 16.58)

Because every trajectory consists of 10 optimization rounds, and each round requires model training, compilation, flashing, and physical hardware measurement, it was not feasible to repeat the entire evaluation across all tasks during the rebuttal period. We will continue expanding the evaluation with additional open source models in the camera ready version.

Benchmark release and hardware complexity

We agree that a benchmark would be a major contribution in this domain but considering the diversity of models and hardware, creating a representative, generalized benchmark similar to those used for software models requires careful consideration to make sure scores are representative of improved task performance. Additionally, real-world hardware evaluation requires physical devices and there is currently no standardized method to run a benchmark for embedded systems. This paper seeks to fill that gap as a first step towards a robust benchmarking ecosystem using a low cost (~$100) easy to use (USB interface) cross-platform power measurement device.

To allow future researchers to reproduce and extend the arena, we have released a repository with full evaluation harness (task specs, hardware constraint vectors, build/flash/measurement scripts, and the automated scoring pipeline) and hardware setup instructions. We can also provide an anonymous repository for reviewer access. Since links are not allowed in author responses, we can share the anonymous link with the AC in an Official Comment.

How many runs were conducted? Are the results averaged over multiple runs?

Tables 1 and 2 report one optimization trajectory per condition. Each trajectory already consists of 10 sequential optimization iterations, rather than a single evaluation.

To further strengthen the paper, we performed two additional independent runs for Gemini 3.1 Pro on the YOLO on MAX78000 task, giving 30 optimization iterations for both low and high reasoning settings. The conclusion remains unchanged. Without hardware feedback, both Sco and Doc settings still achieved 0 successful deployments in all iterations, while Hardware-in-the-loop (HIL) consistently produced successful deployments (50-80%) with stable final mAP50-95 (Low: 10.43-14.20; High: 17.11-18.03).

A suggestion to add some statistical analysis will strengthen the paper claims

We thank the reviewer for the suggestion to strengthen our claims with statistics. We added the following statistical analysis across the full evaluation, which we will incorporate into a revised Experiments section and Appendix:

Overall results (N = 48):

Feedback ConfigMean success95% CI
Sco12.3%[6.5, 18.8]
Doc18.5%[10.6, 27.1]
HIL37.9%[29.0, 47.1]

HIL is significantly higher than both Sco (p < 0.0001) and Doc (p = 0.0004, Holm-corrected). The GEE model confirms this after controlling for task and within-model correlation (HIL vs. Sco: OR ≈ 4.7, p < 0.0001; HIL vs. Doc: p < 0.0001).

Per task, the improvements are statistically significant for Model Compression (HIL vs. Sco p=0.0029; HIL vs. Doc p = 0.0032) and Power Minimization (HIL vs. Sco p = 0.0234). Thermal Management (HIL vs. Sco p = 0.0625; HIL vs. Doc p = 0.0859) shows the same trend but does not reach significance after correction, which we will explicitly state as a limitation warranting a larger sample in future work.

Method. We treat each (model, task) pair as one paired observation, avoiding pseudoreplication from treating individual iterations as independent samples. Since our hypothesis of interest is specifically whether HIL improves over Sco/Doc (not an exploratory three-way comparison), we run two planned Wilcoxon signed-rank tests (HIL vs. Sco, HIL vs. Doc) with Holm correction. We additionally report bootstrap 95% confidence intervals and a mixed-effects logistic regression (GEE, binomial, clustered by model, controlling for task) controlling for task differences and repeated measurements.

Reviewer_FCn4OpenReview ↗
Rating
5
Clarity
4
Confidence
4
Originality
2
Quality
4
Significance
4
Read review
Summary

The paper proposes a hardware-in-the-loop arena for evaluating and improving LLM coding agents that deploy AI models on MCU devices. The agent iteratively edits model and firmware artifacts, then receives multi-objective feedback from compilation, flashing, serial logs, power measurements, and thermal measurements on real hardware. The paper evaluates several frontier LLMs across model compression, power minimization, and thermal management tasks on three MCU platforms, and demonstrates two application case studies, including an elk-detection and a child speech-monitoring wearable.

Strengths and weaknesses

Strengths

  • S1. The core idea of using real hardware feedback for agentic embedded-ML optimization is compelling. The paper makes a strong case that compilation success is not enough for MCU deployment, where agents can fail through unsupported operators, invalid memory layouts, power-state bugs, thermal issues, or workload evasion.
  • S2. The benchmark is more realistic than many software-only coding-agent benchmarks because it measures physical quantities (like power and temperature) and evaluates iterative improvement rather than binary correctness alone.
  • S3. The experiments cover multiple objectives, including model compression, power minimization, and thermal management. The failure mode analysis is useful and helps explain why HIL feedback can matter.

Weaknesses

  • W1. The novelty relative to prior work is not fully convincing. The paper argues that prior embedded-agent systems do not target AI/ML deployment, but it does not discuss MONAQ (https://aclanthology.org/2025.findings-emnlp.918/), which is highly relevant because it also uses LLM agents for resource-constrained AI/ML tasks. The distinction may be that this work uses real physical HIL feedback while MONAQ uses LLM-based search without runtime hardware feedback, but this needs to be stated clearly.
  • W2. The work sometimes reads like a hardware-specific extension of existing agent/evaluation loops. The authors should better explain what new scientific or benchmark challenge arises specifically from MCU deployment, beyond replacing a software benchmark environment with physical MCU devices.
  • W3. The ablations may not be sufficient. The paper compares score-only, documentation, and HIL, but does not fully isolate which part of HIL matters most: serial logs, power traces, thermal traces, structured natural-language feedback, behavior judging, or artifact history.
Questions
  • Q1. Which feedback components are essential? An ablation over serial logs, scalar score, resource usage, power trace, thermal trace, and behavior-judge feedback would clarify whether the improvement comes from physical measurement or from richer textual debugging.

  • Q2. Can you broaden or better justify the task coverage? At minimum, please discuss why the three MCU families and two modalities are representative, and whether the conclusions should extend to IMU/ECG/time-series TinyML tasks.

Limitations

Yes.

Paper formatting concerns

N/A

Final justification

The rebuttal satisfactorily resolves my main concerns about novelty by clearly distinguishing the proposed physical HIL loop from MONAQ and by explaining the MCU-specific sim-to-real challenges. The new statistical and signal-attribution analyses also provide convincing evidence that serial logs, behavior validation, and physical measurements address complementary failure modes, substantially reducing my concern about the ablations. Task and platform coverage remains limited, and finer-grained component ablations would still be valuable, but I view these as reasonable limitations which the community could work on.

Comments on the paper

1 comment
Meta-review

The paper formalizes MCU AI deployment as a hardware-in-the-loop agent arena. An LLM agent iteratively produces firmware, model, and config artifacts, a build-and-flash operator returns a deployability verdict, and on success a physical measurement returns on-device accuracy, current, energy, and temperature. Three tasks run across three MCU families with six frontier LLMs under score-only, documentation, and HIL settings.

The headline result is that without hardware feedback frontier models reach 0% deployment on the hardest task (YOLO segmentation on MAX78000), and HIL lifts this to up to 80%, surpassing the 14.15% human-expert baseline. Two end-to-end deployments follow, a solar-powered elk-detection camera trap and a child phoneme-transcription wearable. Reviewers agree physical rather than simulated measurements in the loop is the distinguishing idea; divergence centers on novelty, ablation depth, and statistical rigor.

Main strengths:

Closing the loop with real instrumented hardware (current traces, on-chip temperature, serial logs) rather than a software scoring function meaningfully advances the coding-agent and MLE-bench line, and the formalism generalizes beyond MCUs. The two practitioner co-designed deployments are concrete and non-toy, the elk trap enabling solar harvesting being especially compelling. The failure-mode catalog plus an LLM-judge that catches workload evasion is more informative than binary pass/fail.

Main weaknesses:

Novelty delineation is absent. Reviewer FCn4 notes MONAQ, an LLM-agent system for resource-constrained ML, is undiscussed, and related work does not position against the LLM-agent resource-constrained-ML search line, leaving the first-to-formalize claim not fully established.

There is no feedback-component ablation. HIL bundles resource usage, serial logs, deployment statistics, power and thermal traces, and behavior judging into one signal, so the causal claim that physical measurements drive the improvement is not isolated from the alternative that richer textual debugging helps (Reviewer FCn4).

Statistical robustness is unaddressed. The checklist states no multi-seed runs were performed and no error bars are reported, flagged by Reviewers n17H and tQnA. The headline results rest on single-run trajectories, so stability across seeds and hardware state is unclear. Reproducibility is also hard, given closed-source models, bespoke rigs, and no commitment to release task definitions, harness, or traces.

Weaknesses that, if addressed sufficiently in the author response, might significantly adjust odds of accepting this paper:

  1. Addressing the novelty concern;

  2. Conducting ablation study.

Authors have responsed the reviewers' comments and all reviewers have positive scores of this work.

From OpenReview, CC BY 4.0. Authors as signed there; shown unedited.

Related papers

Loading the map…

Discussion (0)

Sign in to comment.