arXiv:2608.26417physics.opticsAug 2026

Manuscript Offprint

arXiv:2608.26417

Towards a universal meta-optics solver via large language models

Huanshu Zhang, Lei Kang, Yuyan Chen, Luxiang Wang, Zhaolong Cao, Douglas H. Werner

Huanshu Zhang, a^{a} Lei Kang, a^{a} Yuyan Chen, b^{b} Luxiang Wang, b^{b} Zhaolong Cao, b,+^{b,+} Douglas H. Werner a,∗^{a,*}

a^{a} The Pennsylvania State University, Department of Electrical Engineering, University Park, PA 16802, USA

b^{b} School of Electronics and Information Technology, Sun Yat-Sen University, Guangzhou 510275, China

Abstract. Metasurface design increasingly requires fast models that can operate across structurally distinct device families, rather than retraining a separate surrogate for every geometry class. Conventional neural network surrogates often depend on fixed-dimensional descriptors, family-specific output formats, and repeated architecture tuning, which limits their scalability across heterogeneous meta-atoms. Here, we present a unified large language model (LLM) workflow for multi-family metasurface modeling and inverse-design. Geometries, design parameters, and optical response channels were converted into a shared instruction-following text format and used to fine-tune Gemma-2-9B across 8 metasurface families. Compared with single-family baselines, the joint model simultaneously predicted the optical responses of all metasurface families while reducing the MSE for each family by an average of 56.5%. The same representation was also used for inverse design. These results show that a shared sequence-based LLM interface can provide a practical route to cross-family metasurface design while reducing the need for task-specific surrogate architectures.

Keywords: metasurfaces; large language models; surrogate modeling; inverse design; nanophotonics

*Corresponding Author, E-mail: dhw@psu.edu

+Second Corresponding Author, E-mail: caozhlong@mail.sysu.edu.cn

1 Introduction

Metasurfaces have become a central platform for compact optical engineering because subwavelength structuring makes it possible to tailor transmission, reflection, phase, polarization conversion, and resonance behavior in ultrathin devices. 1−3^{1-3} This design freedom has enabled a wide range of applications, including beam shaping, 4^{4} imaging, 2^{2} spectral filtering, 5^{5} chiral response control, 6^{6} and multifunctional photonic components. 7−9^{7-9} Yet the same geometric freedom that makes metasurfaces attractive also makes them difficult to design efficiently. 10,11^{10,11} Even within a single meta-atom family, one must evaluate complicated mappings from geometric parameters to wavelength-dependent optical responses over a large design space. Standard workflows still rely heavily on repeated numerical simulation. 12,13^{12,13} As metasurface studies move beyond canonical unit-cell families toward broader collections of shapes, materials, and operating conditions, fast models that remain reliable across families have become a practical bottleneck for both scientific exploration and design workflows. 14−16^{14-16}

Data-driven surrogates have emerged as a powerful response to this difficulty. 17−20^{17-20} Once trained on geometry-response pairs, neural networks can replace repeated full-wave simulations with near-instant inference and thereby accelerate screening, optimization, and inverse-design loops. 21−23^{21-23} However, most existing surrogates are still organized around a single geometry family or a narrowly defined benchmark. 24,25^{24,25} In practice, a new metasurface class often triggers a new cycle of dataset preparation, network selection, architecture and hyperparameter tuning, loss balancing, and retraining. 16,17,26^{16,17,26} Such a workflow is manageable for isolated demonstrations, but it scales poorly when a research program contains several structurally distinct metasurface families that should ideally be studied under one unified modeling framework. For example, a model trained for cylindrical pillars is usually not directly usable for other geometries, such as H-shaped structures. 27^{27} More importantly, the one-family workflow limits a broader question: whether common electromagnetic patterns learned from one class of metasurfaces can improve prediction on another, rather than forcing each geometry family to remain a separate machine-learning problem.

Recent studies have begun to address this scalability problem through multi-task learning, transfer learning, or generative deep neural networks (DNNs). An et al. trained DNNs on full-wave simulation data to achieve scalable objective-driven design across cylindrical, H-shaped, and nearly free-form meta-atoms, but they did not establish one shared model for multiple geometries or metasurface families. 27^{27} Zhu et al. used an ImageNet-pretrained Inception-V3 transfer-learning framework to adapt learning across dielectric-substrate settings of a microwave reflective metasurface, but not across distinct metasurface types. 28^{28} Yeung et al. used a conditional deep convolutional generative adversarial network (cDCGAN) with multiparameter image encoding for global inverse-design across two metasurface families. 29^{29} However, expanding such image-encoded models to more families may require redesigned representations, more training data, and additional architecture tuning. Zhang et al. used heterogeneous transfer learning for data-efficient forward- and inverse-design across several microwave metasurface variants, but they remained within one broad microwave metallic-resonator-on-dielectric-substrate family. 30^{30} Very recently, Xiao et al. reported a powerful machine learning platform for thermal meta-emitters using a human-defined geometric/material descriptor, which enables autoencoder-assisted forward prediction and conditional generative modeling to design meta-emitters within a pre-defined library of 32 types of 3D primitives and 30 candidate materials within one framework. 31^{31} That framework is versatile, but it remains constrained by predefined primitive and material libraries. OptoGPT formulates multilayer thin-film inverse design as conditional sequence generation using serialized material-thickness tokens. 32^{32} Together, these studies show important progress toward versatility, but they also expose a central workflow limitation of conventional task-specific DNN surrogates: fixed-dimensional input and output variables, as well as model choices do not naturally accommodate families with different parameter counts, response definitions, spectral ranges, and electromagnetic mechanisms within one shared training interface.

Large Language Models (LLMs) offer a complementary representation because they can encode heterogeneous scientific inputs and outputs through a common sequence-based interface while reducing the amount of task-specific human labor and machine-learning expertise required. 14,33−35^{14,33-35} This feature is especially appealing for heterogeneous metasurface families, where geometry classes often differ in parameter definitions, record formats, wavelength ranges, and response conventions. Yet the design tasks still share an underlying requirement to map structural descriptions onto optical behavior. Meanwhile, recent agentic frameworks represent a distinct direction, using LLMs primarily to plan, generate code, and orchestrate learned or physics-based solvers for autonomous photonic design. 36−38^{36-38} Instead of designing a bespoke model architecture for each task, one could represent the relevant properties as structured text and use them to train a single LLM. 14,33,34^{14,33,34} An LLM surrogate therefore raises the possibility that one model can absorb cross-family regularities while retaining enough task specificity to produce geometry-aware predictions for multiple metasur-face families at once or even perform inverse-design. If successful, such a framework would reduce the need for repeated model engineering, architecture redesign, and human labor when new families are added. This does not remove the need for solid data, correct preprocessing, or physical interpretation, but it can make multi-family surrogate construction more accessible to researchers without specialized machine learning expertise. The unresolved question is whether a single LLM can act as an accurate geometry-aware surrogate and inverse-design engine across heterogeneous metasurface families.

Here, we present a unified LLM workflow for heterogeneous metasurface modeling and inverse-design. Instead of treating each unit-cell family as a separate DNN problem, we express geometry identity, wavelength range, design parameters, and spectral response channels within one shared text representation. This allows one single LLM to learn across distinct metasurface families. Beyond the training methods and trained models, this work also contributes the eight-family instruction-following dataset itself as a reusable training asset. Because the dataset shares the same format, it can be directly merged with future LLM-surrogate corpora. As shown below, several families benefit already upon their first inclusion in joint training and their performance can be further improved as additional families are added. Whether an entirely new future family shows the same benefit remains to be tested. Using this concept, we first trained an LLM for forward predictions and compared isolated single-family training with progressively broader multi-family training. We then used the same concept for inverse-design, where the model predicts geometry parameters from target spectra and a specified geometry family. Together, these results establish that an LLM can provide a practical, simple, and scalable route toward cross-family metasurface learning without the need for task-specific model-architecture and training-pipeline redesign for every new task. We note that in this work, “toward a universal solver” refers to an extensible modeling framework in which heterogeneous metasurface families can share one representation, model architecture, and training pipeline, rather than to predict a family absent from fine-tuning.

References (40)