A Self-Evolving Agentic Framework for Metasurface Inverse Design
Organizations: Department of Electrical and Computer Engineering, University of Massachusetts Lowell
Abstract
Metasurface inverse design can realize complex optical functionality, but turning a target optical response into executable optimization code still requires substantial expertise in computational electromagnetics and solver-specific software engineering. We present a self-evolving agentic framework that lowers this barrier by coupling a coding agent, explicit human-readable skill files, and a deterministic physics-based evaluator. Rather than updating model weights, it revises the skill files from solver-grounded feedback, while the base model and differentiable solver, which provides the physics simulation and gradients, stay fixed. On a multi-type benchmark, skill evolution raises same-type task success from 38% to 74%, the fraction of physical criteria met from 0.51 to 0.87, and reduces average attempts from 4.10 to 2.30. On two new-type families, success holds near ceiling on one (0.92 to 0.90) and rises from 0.20 to 0.90 on the other. Skill evolution offers a practical path toward autonomous and accessible inverse-design workflows.
Figures & tables
| Dataset | Condition | SG | SE | CPF | BM | Attempts |
|---|---|---|---|---|---|---|
| Same-type | Starter-skill baseline | 38.0% | 86.0% | 0.510 | -2.380 | 4.10 |
| Same-type | Post-train | 74.0% | 100.0% | 0.870 | -2.281 | 2.30 |
| Same-type | Delta | +36.0pp | +14.0pp | +0.360 | +0.099 | -1.80 |
| New-type-A | Starter-skill baseline | 92.0% | 100.0% | 0.960 | -4.626 | 1.60 |
| New-type-A | Post-train | 90.0% | 100.0% | 0.950 | -2.092 | 1.68 |
| New-type-A | Delta | -2.0pp | +0.0pp | -0.010 | +2.534 | +0.08 |
Appendix figures & tables6 assets
Supplementary material from the paper’s appendix.
Appendix
| Family | Problem type | Design space | Criterion form |
|---|---|---|---|
| Single-condition reflective design | Low-dimensional periodic reflective geometry | ||
| Dual-angle reflective design | Low-dimensional periodic reflective geometry | ||
| Polarization-selective reflective design | Low-dimensional periodic reflective geometry | ||
| Dual-wavelength reflective design | Low-dimensional periodic reflective geometry | ||
| Plasmonic reflective design | Periodic reflective geometry in a plasmonic regime | ||
| Transmissive phase-target metasurface design | Unit-cell geometry with family-dependent parameterization |
| Setting | Split | Tasks | Family coverage | Interpretation |
|---|---|---|---|---|
| Same-type | Train | 50 | One sibling template from each of through | Same-type training over all six primary families |
| Same-type | Validation | 15 | Held-out sibling of , plus | Mild generalization check using closely related sibling templates |
| Same-type | Test | 50 | Held-out sibling templates from through | Same-type test on sibling templates not used during training |
| New-type-A | Train | 50 | , , and | Training restricted to single-condition, dual-angle, and polarization-selective reflection |
| New-type-A | Validation | 15 | Validation on an unseen dual-wavelength family | |
| New-type-A | Test | 50 | , , and | Family-heldout test across plasmonic and transmissive phase-target regimes |
| Same-type | New-type-A | New-type-B | ||||
| Row | SG (%) | CPF | SG (%) | CPF | SG (%) | CPF |
| Starter-skill baseline (test) | 38 | 0.51 | 92 | 0.96 | 20 | 0.34 |
| Iteration 1 (train / val) | 48 / 100 | 0.58 / 1.00 | 52 / 100 | 0.61 / 1.00 | 92 / 13 | 0.96 / 0.23 |
| Iteration 2 (train / val) | 80 / 100 | 0.89 / 1.00 | 48 / 93 | 0.62 / 0.93 | 92 / 100 | 0.96 / 1.00 |
| Iteration 3 (train / val) | 80 / 100 | 0.90 / 1.00 | 42 / 80 | 0.44 / 0.80 | 92 / 100 | 0.96 / 1.00 |
| Iteration 4 (train / val) | 80 / 100 | 0.87 / 1.00 | 26 / 100 | 0.34 / 1.00 | 90 / 100 | 0.95 / 1.00 |
| Category | Definition |
|---|---|
| Tensor Index OOB | Errors caused by invalid tensor indexing, shape mismatch, or out-of-bounds tensor access during candidate-program execution. |
| API Misuse | Errors caused by incorrect use of solver or optimization APIs, including invalid argument conventions and unsupported call patterns. |
| Gradient Error | Failures related to broken computational graphs, missing gradients, or invalid backward propagation through the optimization objective. |
| No Code / No Solution | Cases in which the Coding Agent fails to produce a complete executable candidate, or produces a candidate that never reaches a valid solution. |
| Excluded infrastructure failures | Connection errors, timeouts, and similar runtime-environment failures are excluded from Figure 3 because they are not directly attributable to the learned skill content. |
| Snapshot | Source | Length | Primary role |
|---|---|---|---|
| starter skill | same-type run, starter-skill snapshot (iter0) | 92 lines | Minimal TorchRDIT setup and execution pattern |
| Evolved skill | same-type run, archived selected snapshot (iter1) | 218 lines | Structured task classification, failure-aware guidance, and reusable strategy selection |