Chat to Chip: Large Language Model Based Design of Arbitrarily Shaped Metasurfaces
Huanshu Zhang, Lei Kang, Sawyer D. Campbell, Douglas H. Werner · 2025
Read Chat to Chip: Large Language Model Based Design of Arbitrarily Shaped Metasurfaces by Huanshu Zhang, Lei Kang, Sawyer D. Campbell, Douglas H. Werner (2025) in the Tower of Babel, a free online library of public-domain works preserved in clean, searchable text. No sign-up. The full text is served as a plain-text file at a predictable URL, where text is present: https://antarctic-labs.com/tower-of-babel/arxiv-2509-24196.txt.
Introduction
Designing a metasurface, a flat sheet that steers light, usually means costly full-wave simulations for each new shape. Huanshu Zhang and 3 co-authors show that a large language model can learn that design task from text descriptions of shapes. Data-driven rivals avoid simulations but need a fresh network and long tuning for each new optical job.
Fed with descriptions of free-form shapes, the model learned to predict spectra and to solve the inverse design task. The team benchmarked open-weight models and traced how accuracy grows with model size at the billion-parameter scale. One-dimensional token models proved practical for two-dimensional shapes. The chat-to-chip workflow aims to make such design far more user-friendly.
Catalog record
| CREATOR | Huanshu Zhang, Lei Kang, Sawyer D. Campbell, Douglas H. Werner |
|---|---|
| YEAR | 2025 |
| COLLECTION | PAPERS |
| FORMAT | TXT |
| FILE SIZE | 27 KB |
| VERSION | 1.0 |
| LICENSE | http://creativecommons.org/licenses/by/4.0/ |
| RIGHTS | CC BY |
| SOURCE | arXiv |
Source: https://arxiv.org/abs/2509-24196
Browse the full library · About the Tower of Babel
Full text
The opening of the work, from the library's hosted text:
Chat to Chip: Large Language Model Based Design of Arbitrarily Shaped Metasurfaces Huanshu Zhang, Lei Kang, Sawyer D. Campbell, Douglas H. Werner Abstract Traditional metasurface design is limited by the computational cost of full-wave simulations, preventing thorough exploration of complex configurations. Data-driven approaches have emerged as a solution to this bottleneck, replacing costly simulations with rapid neural network evaluations and enabling near-instant design for meta-atoms. Despite advances, implementing a new optical function still requires building and training a task-specific network, along with exhaustive searches for suitable architectures and hyperparameters. Pre-trained large language models (LLMs), by contrast, sidestep this laborious process with a simple fine-tuning technique. However, applying LLMs to the design of nanophotonic devices, particularly for arbitrarily shaped metasurfaces, is still in its early stages; as such tasks often require graphical networks. Here, we show that an LLM, fed with descriptive inputs of arbitrarily shaped metasurface geometries, can learn the physical relationships needed for spectral prediction and inverse design. We further benchmarked a range of open-weight LLMs and identified relationships between accuracy and model size at the billion-parameter level. We demonstrated that 1-D token-wise LLMs provide a practical tool to designing 2-D arbitrarily shaped metasurfaces. Linking natural-language interaction to electromagnetic modelling, this “chat-to-chip” workflow represents a step toward more user-friendly data-driven nanophotonics. † † footnotetext: Accepted manuscript at Nanophotonics . DOI: https://doi.org/10.1515/nanoph-2025-0343 . The Version of Record may differ slightly. Keywords Metasurfaces; Large Language Model; Deep Learning. 1 Introduction Metasurfaces, which are defined as planar arrays of subwavelength scatterers that modulate the amplitude, phase, and polarization of light locally, have quickly become pivotal to nanophotonic devices [ 1 ] , enabling applications from high-numerical-aperture meta-lenses [ 2 ] and holographic imagers [ 3 ] to augmented-reality displays [ 4 ] . Despite this progress, metasurface design remains constrained by the need for brute-force full-wave electromagnetic solvers such as the finite-difference time-domain (FDTD) [ 5 ] and finite-element methods (FEM) [ 6 ] . A single design iteration must traverse a high-dimensional parameter space, carry out numerous simulations, and finely adjust geometric features to satisfy spectral and/or wave-front requirements [ 7 ] . For practical devices targeting large apertures and multiple functionalities, the corresponding computational load may take days or weeks, even when executed on large clusters or supercomputers [ 8 ] . The resulting limitation discourages the exploration of unconventional materials, multilayer stacks, and fully aperiodic layouts. To keep pace with the burgeoning applications for metasurfaces, new design paradigms that bypass repeated heavy-duty simulations are urgently required. Recent breakthroughs in data-driven modelling offer a promising alternative route [ 9 ] . Once trained on curated pairs of optical or electromagnetic responses with corresponding metasurface geometry, deep neural networks (DNNs) can predict the optical response of previously unseen geometries within milliseconds, marking a structure evaluation orders of magnitude faster than that based on full-wave solvers [ 10 ] , [ 11 ] . Recent works have shown the potential of DNN-based approaches for metasurface design [ 12 ] , [ 13 ] , [ 14 ] . For instance, Malkiel et al. employed a DNN for H-shaped plasmonic nanostructure design [ 15 ] . An et al. developed a DNN to predict wideband amplitude and phase responses of quasi-freeform dielectric metasurfaces [ 16 ] . Chen et al. introduced a transformer-based model for both forward and inverse design of broadband solar metamaterial absorbers [ 17 ] . Moreover, Zhang et al. proposed a fixed-attention mechanism for the design of high-degree-of-freedom metamaterials [ 18 ] . Although DNN-based models have demonstrated impressive accuracy and speed, integrating them into a metasurface design pipeline is still far from a turnkey off-the-shelf procedure [ 19 ] . Each new optical function typically requires a new training set, a custom network topology, and exhaustive hyper-parameter selections. This typically includes choosing the number of layers and neurons in each layer, which is an iterative, code-heavy process driven largely by heuristic intuition rather than first-principles guidance [ 20 ] . To this end, Large Language Models (LLMs) present a qualitatively different proposition. LLMs are transformer-based neural networks that encapsulate billions of parameters in a single, frozen architecture pre-trained on vast amounts of natural-language text and code [ 21 ] . In this stage, the model is taught the simple objective of predicting the next word in a sequence; yet, by doing so at web-scale, it internalizes syntax, semantics, and a surprising amount of factual and mathematical structure [ 22 ] . Since the core model is fixed, researchers can simply train the LLM on task-specific datasets instead of re-designing and re-training a new network for every new task, thereby eliminating the laborious network-sizing and hand-tuning that DNNs demand. These characteristics make LLMs ideal candidates for enabling efficient design of metasurfaces with complex structures and layouts that possess various targeted functionalities. When domain precision is required, the same model can be “further trained” in an efficient manner (i.e., fine-tuned) on a relatively small, task-specific dataset, such as predicting the transmission spectrum of a metasurface [ 23 ] , [ 24 ] . In practice, this dataset pairs sequence-based descriptions of each unit cell (geometric parameters, material indices, lattice spacing, and so on) with descriptions of its simulated optical response (spectral magnitude, phase, near-field maps, etc.). This pairing mirrors the input-output structure of conventional DNNs but represents both geometry and responses in a language-like format amenable to LLMs. Because LLMs accept byte streams, neither architectural redesign nor feature engineering is necessary: the model simply learns the mapping of geometries to responses in passes. After fine-tuning on a new dataset, which takes slightly longer than the time taken to train one custom DNN, the LLMs can predict spectra within seconds, providing near-real-time feedback during design loops while removing the code-heavy scaffolding and exhaustive hyper-parameter sweeps that traditional DNN-based methods demand. Thus, LLMs promise a “chat-to-chip” route for modelling metasurfaces. For example, in their pioneering study Kim et al. fine-tuned Llama [ 25 ] for both forward prediction and inverse design of all-dielectric metasurfaces [ 26 ] , lowering the entry barrier for researchers who lack machine-learning background. Lu et al. fine-tuned ChatGPT 3.5 on various details of prompts and temperatures for the design of metamaterials [ 27 ] , Liu et al. used LLMs for design recommendation of phosphorescent materials [ 28 ] , and, by optimizing and stitching wavelength-scale superpixels, Lupoiu et al. introduced a multi-agent LLM framework paired with a surrogate Maxwell solver that autonomously designs metasurfaces in near-real time [ 29 ] . However, scaling these approaches from parameterized meta-atoms to arbitrarily shaped metasurfaces is of great importance to numerous applications but remains largely unexplored [ 30 ] , [ 31 ] . Token-wise attention is intrinsically one-dimensional, whereas free-form surfaces require rich spatial reasoning. Emerging hybrids that couple LLM backbones with graph or vision transformers, or that embed topology as structured tokens, may be a possible a solution [ 32 ] . However, a generally applicable framework for LLM-accelerated design of complex metasurfaces has yet to be reported, as accuracy of vision language models (VLMs) still lags behind LLM-level reliability while their implementation is cost-intensive and fragile [ 33 ] . Here, we present a workflow using