IDToolkit: A Toolkit for Benchmarking and Developing Inverse Design Algorithms in Nanophotonics

Jia-Qi Yang 0001, Yucheng Xu, Jia-Lei Shen, Ke-Bin Fan, De-Chuan Zhan, Yang Yang 0074

Abstract

Inverse design in nanophotonics—the process of discovering physical structures that produce specific optical responses—is a burgeoning field for machine learning application. However, the field is currently hindered by a lack of standardized benchmarks and a reliance on potentially inaccurate neural surrogates. We introduce IDToolkit, an open-source framework designed to bridge the gap between machine learning and nanophotonics. IDToolkit provides a standardized "gym" featuring three realistic design problems and ten baseline algorithms. Crucially, it utilizes high-fidelity physical simulators (MEEP) rather than neural surrogates for evaluation, ensuring that discovered designs are physically valid. Our benchmarks reveal critical insights into algorithm performance, the limitations of surrogate models, and the surprising strength of simple baselines.

Introduction

In the field of nanophotonics, researchers aim to design structures—such as metasurfaces, multi-layer films, or nanopillars—that manipulate light in precise ways. Traditionally, this involves intuition-driven trial and error or local optimization. "Inverse design" seeks to automate this by mapping a desired optical response back to the physical parameters of a structure.

While this is an ideal domain for artificial intelligence, two major hurdles prevent widespread adoption by the AI community:

  1. The Domain Barrier: AI researchers often lack the deep physics expertise and access to expensive, proprietary simulation software (like CST or Lumerical) required to evaluate their models.
  2. The "Surrogate Trap": To save time, many studies use neural networks to approximate physical simulations. However, these surrogates often fail when an algorithm proposes a novel design that is "out-of-distribution" (OOD). This leads to misleadingly optimistic results that do not hold up when tested against real physics.

IDToolkit addresses these challenges by providing an easy-to-use, open-source environment that integrates directly with the theoretically guaranteed physical simulator, MEEP.

The IDToolkit Framework

IDToolkit is built on PyTorch and the Ray framework, enabling high-performance multiprocessing. This architecture allows the toolkit to overcome the computational bottleneck of physical simulations, achieving up to an 11.6x speedup on a 16-core system for specific problems.

Inverse Design Algorithms

The toolkit implements and compares ten baseline algorithms across two main categories:

  • Iterative Optimizers: Algorithms such as Bayesian Optimization (BO), Tree-structured Parzen Estimator (TPE), and Evolution Strategies (ES). these interact directly with the simulator to search for optimal designs. They require no prior training data but can be computationally intensive.
  • Deep Inverse Design: Generative models including GANs, VAEs, and Tandem Networks. These are trained on a dataset to learn the mapping from a target response to a physical structure, allowing for near-instantaneous design generation once trained.

Benchmark Problems

To provide a comprehensive evaluation, IDToolkit introduces three distinct nanophotonic challenges with varying complexities:

  1. Multi-layer Optical Thin Films (MOTFs): The task is to design a 10-layer radiative cooler. This problem is unique because it involves a mixed search space: discrete variables (choosing from seven different materials) and continuous variables (layer thicknesses).
  2. Thermophotovoltaics (TPV): This involves designing metamaterial unit cells for energy harvesting. The search space is defined by B-Splines to allow for the creation of complex, smooth, and physically realizable shapes.
  3. Structural Color Filter (SCF): The goal is to design silicon nanopillars that produce specific colors. This problem features a relatively simple 3-dimensional target space (RGB coordinates), making it an ideal testbed for low-dimensional optimization.

Key Insights and Results

The Necessity of Physical Simulators

Our research confirms that neural surrogates lose precision on the very designs they are meant to discover. Because inverse design often pushes boundaries to find novel solutions, these solutions frequently fall outside the training distribution of a surrogate. Direct interaction with a simulator like MEEP is essential for valid scientific research in this domain.

Algorithm-Problem Matching

No single algorithm dominates all tasks, highlighting the importance of problem-specific selection:

  • TPE emerged as the superior choice for problems with discrete variables (like MOTFs) due to its tree-structured approach to modeling the search space.
  • BO and TPE excel when the target space is low-dimensional, such as the color coordinates in the SCF problem.
  • Gradient Descent (GD), when paired with a trained forward model, proved most effective at pushing past the "best-in-training-set" baseline for complex, continuous problems like TPV.

The "Train Best" Baseline

A significant finding is the strength of the "Train Best" baseline—simply selecting the best design from a large random training set. Many sophisticated AI models struggle to significantly outperform this simple lookup within a limited number of trials, suggesting that many current AI approaches in nanophotonics are not yet reaching their full potential.

Real-World Difficulty

Designing for "real" physical targets (e.g., a specific desired spectrum) is significantly more difficult than designing for "IID" targets (targets previously generated by the simulator). This highlights the "Out-of-Distribution" challenge that remains a primary obstacle in scientific AI.

Conclusion and Future Work

IDToolkit provides the necessary infrastructure to move nanophotonic inverse design toward more rigorous and reproducible standards. While deep learning offers speed, it still struggles with discrete variables; conversely, iterative methods are accurate but slow for high-dimensional designs.

Future research directions enabled by IDToolkit include:

  1. Hybrid Approaches: Combining deep learning for dimensionality reduction with iterative optimizers for fine-tuning.
  2. Advanced Forward Models: Utilizing Graph Neural Networks (GNNs) to better capture the underlying physics of the structures.
  3. Human-in-the-Loop: Incorporating professional domain knowledge and human priors into the AI search process to navigate complex design spaces more efficiently.

The toolkit is available to the community at https://github.com/ThyrixYang/IDToolkit.

Summary updated

BibTeX
@inproceedings{yang2023idtoolkit,
  author = {Jia-Qi Yang and Yucheng Xu and Jia-Lei Shen and Ke-Bin Fan and De-Chuan Zhan and Yang Yang},
  title = {{IDToolkit: A Toolkit for Benchmarking and Developing Inverse Design Algorithms in Nanophotonics}},
  booktitle = {ACM SIGKDD Conference on Knowledge Discovery and Data Mining},
  year = {2023},
}
Figure