Abstract
Inverse design enables automating the discovery and optimization of devices achieving performance significantly exceeding that of traditional human-engineered designs. However, existing methodologies to inverse-design electromagnetic devices require computationally expensive and time-consuming full-wave electromagnetic simulation at each iteration or generation of large datasets for training neural-network surrogate models. This work introduces the Precomputed Numerical Green Function method, an approach for ultrafast electromagnetic inverse design. The static components of the design are incorporated into a numerical Green function obtained from a single fully-parallelized precomputation step, reducing the cost of evaluating candidate designs during optimization to only being proportional to the size of the region under modification. A low-rank matrix update technique is introduced that further decreases the cost of the method to milliseconds per iteration without any approximations or compromises in accuracy. This method is shown to have linear time complexity, reducing the total runtime for an inverse design by several orders of magnitude compared to using conventional electromagnetics solvers. The design examples considered demonstrate speedups of up to 16,000x, shortening the design process from multiple days to weeks down to minutes. The approach enables practical and ultrafast design of complex structures that are prohibitively time-consuming for prior inverse design methods.
Similar content being viewed by others
Data availability
Source data are provided with this paper.
Code availability
The source code for the PNGF method is publicly available at: https://github.com/ACME-Lab-Stanford/PNGF67.
References
Johnson, J. M. & Rahmat-Samii, V. Genetic algorithms in engineering electromagnetics. IEEE Antennas Propag. Mag. 39, 7–21 (1997).
Altshuler, E. E. & Linden, D. S. Wire-antenna designs using genetic algorithms. IEEE Antennas Propag. Mag. 39, 33–43 (1997).
Robinson, J. & Rahmat-Samii, Y. Particle swarm optimization in electromagnetics. IEEE Trans. Antennas Propag. 52, 397–407 (2004).
Stadler, S. & Igel, J. Developing realistic FDTD GPR antenna surrogates by means of particle swarm optimization. IEEE Trans. Antennas Propag. 70, 4259–4272 (2022).
Jin, N. & Rahmat-Samii, Y. Advances in particle swarm optimization for antenna designs: real-number, binary, single-objective and multiobjective implementations. IEEE Trans. Antennas Propag. 55, 556–567 (2007).
Lalau-Keraly, C. M., Bhargava, S., Miller, O. D. & Yablonovitch, E. Adjoint shape optimization applied to electromagnetic design. Opt. Express 21, 21693–21701 (2013).
Zhu, R. et al. Phase-to-pattern inverse design paradigm for fast realization of functional metasurfaces via transfer learning. Nat. Commun. 12, 2974 (2021).
Naseri, P. & Hum, S. V. A generative machine learning-based approach for inverse design of multilayer metasurfaces. IEEE Trans. Antennas Propag. 69, 5725–5739 (2021).
Hou, J. et al. Customized inverse design of metamaterial absorber based on target-driven deep learning method. IEEE Access 8, 211849–211859 (2020).
Mohammadi Estakhri, N., Edwards, B. & Engheta, N. Inverse-designed metastructures that solve equations. Science 363, 1333–1338 (2019).
Karahan, E. A. et al. Deep-learning enabled generalized inverse design of multi-port radio-frequency and sub-terahertz passives and integrated circuits. Nat. Commun. 15, 10734 (2024).
Karahan, E. A., Liu, Z. & Sengupta, K. Deep-learning-based inverse-designed millimeter-wave passives and power amplifiers. IEEE J. Solid-State Circuits 58, 3074–3088 (2023).
Yang, X. et al. Circularly polarized antenna array synthesis based on machine-learning-assisted surrogate modeling. IEEE Trans. Antennas Propag. 72, 1469–1482 (2024).
Zhu, E. et al. Frequency transfer and inverse design for metasurface under multi-physics coupling by Euler latent dynamic and data-analytical regularizations. Nat. Commun. 16, 2251 (2025).
Molesky, S. et al. Inverse design in nanophotonics. Nat. Photonics 12, 659–670 (2018).
Li, Z. et al. Inverse design enables large-scale high-performance meta-optics reshaping virtual reality. Nat. Commun. 13, 2409 (2022).
Hughes, T. W., Minkov, M., Williamson, I. A. D. & Fan, S. Adjoint method and inverse design for nonlinear nanophotonic devices. ACS Photonics 5, 4781–4787 (2018).
Peurifoy, J. et al. Nanophotonic particle simulation and inverse design using artificial neural networks. Sci. Adv. 4, 4206 (2018).
Roberts, G. et al. 3D-patterned inverse-designed mid-infrared metaoptics. Nat. Commun. 14, 2768 (2023).
Ma, W. et al. Deep learning for the design of photonic structures. Nat. Photonics 15, 77–90 (2021).
Camacho, M., Edwards, B. & Engheta, N. A single inverse-designed photonic structure that performs parallel computing. Nat. Commun. 12, 1466 (2021).
Piggott, A. Y. et al. Inverse design and demonstration of a compact and broadband on-chip wavelength demultiplexer. Nat. Photonics 9, 374–377 (2015).
Wiecha, P. R. & Muskens, O. L. Deep learning meets nanophotonics: a generalized accurate predictor for near fields and far fields of arbitrary 3D nanostructures. Nano Lett. 20, 329–338 (2020).
Grbčić, L. et al. Inverse design of photonic surfaces via multi fidelity ensemble framework and femtosecond laser processing. npj Comput. Mater. 11, 1–13 (2025).
Sun, A. et al. Edge-guided inverse design of digital metamaterial-based mode multiplexers for high-capacity multi-dimensional optical interconnect. Nat. Commun. 16, 2372 (2025).
Sanchez-Lengeling, B. & Aspuru-Guzik, A. Inverse molecular design using machine learning: Generative models for matter engineering. Science 361, 360–365 (2018).
Kumar, S., Tan, S., Zheng, L. & Kochmann, D. M. Inverse-designed spinodoid metamaterials. npj Comput. Mater. 6, 1–10 (2020).
Ha, C. S. et al. Rapid inverse design of metamaterials based on prescribed mechanical behavior through machine learning. Nat. Commun. 14, 5765 (2023).
Coli, G. M., Boattini, E., Filion, L. & Dijkstra, M. Inverse design of soft materials via a deep learning-based evolutionary strategy. Sci. Adv. 8, 6731 (2022).
Zunger, A. Inverse design in search of materials with target functionalities. Nat. Rev. Chem. 2, 1–16 (2018).
Kennedy, J. & Eberhart, R. Particle swarm optimization. In Proc. ICNN’95 - International Conference on Neural Networks Vol. 4, 1942–19484. https://doi.org/10.1109/ICNN.1995.488968 (1995).
Alizadeh, R., Allen, J. K. & Mistree, F. Managing computational complexity using surrogate models: a critical review. Res. Eng. Des. 31, 275–298 (2020).
Ludick, D. J. et al. Efficient analysis of large aperiodic antenna arrays using the domain Green’s Function Method. IEEE Trans. Antennas Propag. 62, 1579–1588 (2014).
Verweij, S., Liu, V. & Fan, S. Accelerating simulation of ensembles of locally differing optical structures via a Schur complement domain decomposition. Opt. Lett. 39, 6458–6461 (2014).
Gao, H.-W., Wang, S., Sheng, X.-Q. & Peng, Z. Rapid numerical analysis of electrically large PEC platforms with local variations via a platform Green’s Function Method. IEEE Trans. Antennas Propag. 70, 9544–9556 (2022).
Markkanen, J., Yla-Oijala, P. & Sihvola, A. Discretization of volume integral equation formulations for extremely anisotropic materials. IEEE Trans. Antennas Propag. 60, 5195–5202 (2012).
Harrington, R. F. The method of moments in electromagnetics. J. Electromagn. Waves Appl. 1, 181–200 (1987).
Lin, H.-C., Wang, Z. & Hsu, C. W. Fast multi-source nanophotonic simulations using augmented partial factorization. Nat. Comput. Sci. 2, 815–822 (2022).
Zhang, F. (ed.). The Schur Complement and Its Applications. Numerical Methods and Algorithms Vol. 4 (Springer, 2005).
Ansys Canada Ltd. Understanding the mode overlap calculation. https://optics.ansys.com/hc/en-us/articles/360034396834-Understanding-the-mode-overlap-calculation (2024).
Taflove, A. & Hagness, S.C. Computational Electrodynamics: The Finite-difference Time-domain Method 3rd edn. (Artech House, 2005).
Bayin, S. Mathematical Methods in Science and Engineering (Wiley, 2006).
Budhu, J. & Grbic, A. Fast and accurate optimization of metasurfaces with gradient descent and the Woodbury Matrix Identity. IEEE Trans. Antennas Propag. 71, 7679–7683 (2023).
Jiao, Y., Fan, S. & Miller, D. A. B. Demonstration of systematic photonic crystal device design and optimization by low-rank adjustments: an extremely compact mode separator. Opt. Lett. 30, 141–143 (2005).
Capek, M., Jelinek, L. & Gustafsson, M. Shape synthesis based on topology sensitivity. IEEE Trans. Antennas Propag. 67, 3889–3901 (2019).
Ansys, Inc. Ansys HFSS, version 2025 R1. https://www.ansys.com/products/electronics/ansys-hfss (2025).
Dassault Systèmes. CST Studio Suite, version 2025. https://www.3ds.com/products/simulia/cst-studio-suite (2025).
Kimionis, J., Georgiadis, A., Daskalakis, S. N. & Tentzeris, M. M. A printed millimetre-wave modulator and antenna array for backscatter communications at gigabit data rates. Nat. Electron. 4, 439–446 (2021).
Wu, G.-B. et al. A universal metasurface antenna to manipulate all fundamental characteristics of electromagnetic waves. Nat. Commun. 14, 5155 (2023).
Zhao, W. et al. 2D Titanium carbide printed flexible ultrawideband monopole antenna for wireless communications. Nat. Commun. 14, 278 (2023).
Ahmad, A., Choi, D. -y & Ullah, S. A compact two elements MIMO antenna for 5G communication. Sci. Rep. 12, 3608 (2022).
Zheng, Y. & Sideris, C. Ultra-fast simulation and inverse design of metallic antennas. In Proc. 2023 IEEE/MTT-S International Microwave Symposium - IMS 2023 351–354. https://doi.org/10.1109/IMS37964.2023.10187915 (2023).
Islam, S., Zada, M. & Yoo, H. Highly compact integrated Sub-6 GHz and millimeter-wave band antenna array for 5G smartphone communications. IEEE Trans. Antennas Propag. 70, 11629–11638 (2022).
Liu, L., Cheung, S. W. & Yuk, T. I. Compact MIMO Antenna for portable devices in UWB applications. IEEE Trans. Antennas Propag. 61, 4257–4264 (2013).
Liu, W. E. I., Chen, Z. N., Qing, X., Shi, J. & Lin, F. H. Miniaturized wideband metasurface antennas. IEEE Trans. Antennas Propag. 65, 7345–7349 (2017).
Kibaroglu, K., Sayginer, M., Phelps, T. & Rebeiz, G. M. A 64-element 28-GHz phased-array transceiver with 52-dBm EIRP and 8-12-Gb/s 5G link at 300 meters without any calibration. IEEE Trans. Microw. Theory Tech. 66, 5796–5811 (2018).
Dadgarpour, A., Zarghooni, B., Virdee, B. S. & Denidni, T. A. One- and two-dimensional beam-switching antenna for millimeter-wave MIMO applications. IEEE Trans. Antennas Propag. 64, 564–573 (2016).
Karmokar, D. K., Esselle, K. P. & Hay, S. G. Fixed-frequency beam steering of microstrip leaky-wave antennas using binary switches. IEEE Trans. Antennas Propag. 64, 2146–2154 (2016).
Yang, G.-W. et al. A compact reconfigurable microstrip antenna with multidirectional beam and multipolarization. IEEE Trans. Antennas Propag. 67, 1358–1363 (2019).
Mackertich-Sengerdy, G., Campbell, S. D. & Werner, D. H. Tailored compliant mechanisms for reconfigurable electromagnetic devices. Nat. Commun. 14, 683 (2023).
Uchimura, H., Takenoshita, T. & Fujii, M. Development of a “laminated waveguide”. IEEE Trans. Microw. Theory Tech. 46, 2438–2443 (1998).
Deslandes, D. & Wu, K. Accurate modeling, wave mechanisms, and design considerations of a substrate integrated waveguide. IEEE Trans. Microw. Theory Tech. 54, 2516–2526 (2006).
Deslandes, D. & Wu, K. Integrated microstrip and rectangular waveguide in planar form. IEEE Microw. Wirel. Compon. Lett. 11, 68–70 (2001).
Lee, J.-H. et al. A V-band front-end with 3-D integrated cavity filters/duplexers and antenna in LTCC technologies. IEEE Trans. Microw. Theory Tech. 54, 2925–2936 (2006).
Elsawaf, M.H.A. & Sideris, C. Concurrent multi-mode excitation for mode division multiplexing over substrate integrated waveguides. In Proc. 2023 IEEE/MTT-S International Microwave Symposium - IMS 2023 505–508. https://doi.org/10.1109/IMS37964.2023.10188009 (2023).
Amestoy, P. R., Duff, I. S., L’Excellent, J.-Y. & Koster, J. A fully asynchronous multifrontal solver using distributed dynamic scheduling. SIAM J. Matrix Anal. Appl. 23, 15–41 (2001).
Sun, R. & Sideris, C. Precomputed numerical green function method: near real-time full-wave electromagnetic inverse design. Zenodo, https://doi.org/10.5281/zenodo.18396471 (2026).
Acknowledgements
The authors gratefully acknowledge support by the Air Force Office of Scientific Research (FA9550-20-1-0087, C.S., and FA9550-25-1-0020, C.S.) and the National Science Foundation (CCF-2047433, C.S.).
Author information
Authors and Affiliations
Contributions
C.S. conceived the idea and supervised the work. J.H.S. and Y.Z. performed numerical simulations. C.S., J.H.S., and Y.Z. carried out the inverse design of the example studies. M.E. measured the fabricated devices. H.C.L. and C.W.H. implemented augmented partial factorization for precomputations. J.H.S. and C.S. participated in the writing of this manuscript.
Corresponding author
Ethics declarations
Competing interests
The authors declare no competing interests.
Peer review
Peer review information
Nature Communications thanks Geun Ho Ahn and the other, anonymous, reviewer(s) for their contribution to the peer review of this work. A peer review file is available.
Additional information
Publisher’s note Springer Nature remains neutral with regard to jurisdictional claims in published maps and institutional affiliations.
Supplementary information
Source data
Rights and permissions
Open Access This article is licensed under a Creative Commons Attribution-NonCommercial-NoDerivatives 4.0 International License, which permits any non-commercial use, sharing, distribution and reproduction in any medium or format, as long as you give appropriate credit to the original author(s) and the source, provide a link to the Creative Commons licence, and indicate if you modified the licensed material. You do not have permission under this licence to share adapted material derived from this article or parts of it. The images or other third party material in this article are included in the article’s Creative Commons licence, unless indicated otherwise in a credit line to the material. If material is not included in the article’s Creative Commons licence and your intended use is not permitted by statutory regulation or exceeds the permitted use, you will need to obtain permission directly from the copyright holder. To view a copy of this licence, visit http://creativecommons.org/licenses/by-nc-nd/4.0/.
About this article
Cite this article
Sun, JH., Elsawaf, M., Zheng, Y. et al. Near real-time full-wave inverse design of electromagnetic devices. Nat Commun (2026). https://doi.org/10.1038/s41467-026-69477-y
Received:
Accepted:
Published:
DOI: https://doi.org/10.1038/s41467-026-69477-y


