SlowGuess/NeurIPS_2023_OCR huggingface dataset:
where  $(x,y,f,g)$  implies (the number of input dimensions, the number of output dimensions, a normalization technique, an activation function). Training of this network is performed using the Adam optimizer [35] and the mean squared error, configured with a learning rate of 0.001 and a batch size of 64. The network architecture and its associated components including batch normalization [28] are implemented using PyTorch [45]. To enhance the training process and select an optimal model, we employ early stopping based on the validation dataset's performance. We set the maximum number of training epochs as 200 and use the average of the last five validation losses as a threshold to determine when to stop training early. This approach helps us to finalize our model by ensuring that it generalizes well without overfitting.
Upon completion of the training process, the final model's performance on the test dataset is evaluated in terms of mean squared errors, yielding the following results for various nanophotonic structures:
- Three-layer film made of  $\mathrm{TiO_2 / Ag / TiO_2}$ : mean squared error of 0.000549;
- Anti-reflective nanocones made of fused silica: mean squared error of 0.000004;
Vertical nanowires made of cSi: mean squared error of 0.000058;
- Close-packed nanospheres made of cSi/TiO $_2$ : mean squared error of 0.000061;
- Three-layer film with double-sided nanocones made of  $\mathrm{TiO_2 / Ag / TiO_2 / TiO_2 / TiO_2}$ : mean squared error of 0.000020.
These results demonstrate the models' ability to reliably estimate the target optical properties across different structural configurations.
K Details of Experiments
In the main text, we delineate the comparative analysis of various optimization techniques applied to parametric structure optimization. The optimization algorithms used in this work can be enumerated as follows:
- Random search: a technique of selecting points from a uniform distribution;
- Powell's method [49]: a method to find a local solution without an assumption on differentiability;
- Py-BOBYQA [10]: a derivative-free approach for local optimization;
- DIRECT [30]: a global optimization method without the Lipschitz constant;
- Differential evolution [64]: a metaheuristic approach that iteratively improves solution candidates;
- Bayesian optimization [16]: a probabilistic model-based global optimization strategy for black-box functions.
For the implementation of random search, we employ the NumPy's uniform distributions [25], where NumPy is under the BSD license. Powell's method, DIRECT, and differential evolution are executed via their respective implementations in SciPy [69], also BSD licensed. Py-BOBYQA is run using the implementation obtained from its public repository, $^{S1}$  which operates under the GNU General Public License. For Bayesian optimization, we utilize BayesO [33], which is available under the MIT license. A variety of commercial CPUs, e.g., AMD EPYC 9374F, AMD EPYC 7302, and Intel Xeon Gold 6126, are used as the computational resources deployed for dataset creation, benchmarking, and structure optimization.
L Experiments for the Combinatorial System with Material Blocks
Figure S4: Results of structure optimization for the combinatorial system with material blocks using random search. Similar to Figure 8, it repeats each experiment 50 times. The sample mean and the standard error of the sample mean are plotted.
For the combinatorial system with material blocks, we test random search with uniform distributions in the process of selecting materials for all the material blocks in the structure. The objective of this problem is absorbance maximization for the AM1.5 global solar spectrum. To simplify the task, we dismiss band gaps for particular materials for these experiments. Since we have twelve options for materials, the number of possible structural configurations, i.e., in this case  $12^{80}$ , is enormous. This benchmark can be utilized to compare various combinatorial optimization algorithms, and the development and utilization of more advanced combinatorial optimization techniques are left for future work.
M Future Directions
Topology optimization via automatic differentiation has been studied in the field of photonics [22, 56]. Currently, we do not include support for such gradient-based methods. However, the FDTD
$^{S1}$ Accessible here: https://github.com/numericalalgorithmsgroup/pybobyqa.
simulation software including Meep [44] and Ansys Lumerical has added features for efficient gradient computation (with roughly twice the cost of a single function evaluation) [23]. Incorporating this into our benchmarks is a natural topic for future work.
In addition, we implement a user-friendly process for the integration of additional structures, supporting the involvement of a broad background of researchers and practitioners. We aim to constantly develop and maintain this work, and will strive to actively encourage the contributions of other researchers and practitioners.
N Limitations
The simulations we conduct are subject to potential instabilities and require precise settings. As a result, there are occasions when the combined values of reflectance, absorbance, and transmittance might exceed 1. It is important to note, however, that the results presented in this work do not yield any negative values in the reflectance, absorbance, and transmittance measurements we are concerned with. That said, it is within the realm of possibility for simulations to produce negative results.
Additionally, in contexts of continuous optimization with a surrogate model, the regression models we employ are not entirely devoid of errors, which can stem from both incorrect assumptions made by the model, i.e., inductive bias, and the inherent inaccuracies of the model itself. Eventually, these errors could introduce inaccuracies into the optimization process. Despite this potential for discrepancy between the surrogate model and the actual scenario, the comparisons we make between different optimization algorithms remain valid, provided that the surrogate model used is consistently applied across all optimization procedures.
O Societal Impacts
This research contributes to the field of materials science, specifically focusing on nanophotonic structures and their design problems. As such, it is important to consider the potential societal impacts, both negative and positive, that may arise from the practical application of our findings. On one hand, the manufacturing, fabrication, and disposal of materials and nanophotonic structures could lead to environmental pollution, affecting air, water, and land quality. It is crucial that these pollution issues are addressed proactively and managed effectively to mitigate any adverse effects on the environment and society. On the other hand, our work has the potential to significantly benefit the renewable energy sector, particularly in the advancement of solar cell technology. By contributing to the development of more efficient solar cells, we are aiding the transition towards a more sustainable energy landscape, which could result in a reduction of greenhouse gas emissions and a move towards a carbon-neutral society.
Figure S5: Visualization of the transmittance of the three-layer film made of  $\mathrm{TiO_2 / Ag / TiO_2}$  for three different fidelity levels, i.e., low fidelity (shown in left panels), medium fidelity (shown in center panels), and high fidelity (shown in right panels).
(a)  $t_2 = 7$
(b)  $t_2 = 15$
Figure S6: Visualization of the transmittance of the three-layer film made of  $\mathrm{TiO_2 / Au / TiO_2}$  for three different fidelity levels, i.e., low fidelity (shown in left panels), medium fidelity (shown in center panels), and high fidelity (shown in right panels).
Figure S7: Visualization of the transmittance of the three-layer film made of  $\mathrm{TiO_2 / Cu / TiO_2}$  for three different fidelity levels, i.e., low fidelity (shown in left panels), medium fidelity (shown in center panels), and high fidelity (shown in right panels).
Figure S8: Visualization of the transmittance of the three-layer film made of  $\mathrm{TiO_2 / Ni / TiO_2}$  for three different fidelity levels, i.e., low fidelity (shown in left panels), medium fidelity (shown in center panels), and high fidelity (shown in right panels).
Figure S9: Visualization of the transmittance of the three-layer film made of AZO/Ag/AZO for three different fidelity levels, i.e., low fidelity (shown in left panels), medium fidelity (shown in center panels), and high fidelity (shown in right panels).
Figure S10: Visualization of the transmittance of the three-layer film made of cSi/Ag/cSi for three different fidelity levels, i.e., low fidelity (shown in left panels), medium fidelity (shown in center panels), and high fidelity (shown in right panels).
Figure S11: Visualization of the transmittance of the three-layer film made of ITO/Ag/ITO for three different fidelity levels, i.e., low fidelity (shown in left panels), medium fidelity (shown in center panels), and high fidelity (shown in right panels).
Figure S12: Visualization of the transmittance of the three-layer film made of  $\mathrm{ZnO / Ag / ZnO}$  for three different fidelity levels, i.e., low fidelity (shown in left panels), medium fidelity (shown in center panels), and high fidelity (shown in right panels).
(b) Medium fidelity
Figure S13: Visualization of the reflectance of the anti-reflective nanocones made of fused silica for three different fidelity levels.
Figure S14: Visualization of the absorbance of the vertical nanowires made of  $\mathrm{CH}_3\mathrm{NH}_3\mathrm{PbI}_3$  or GaAs for three different fidelity levels, i.e., low fidelity (shown in left panels), medium fidelity (shown in center panels), and high fidelity (shown in right panels).
(a)  $\mathrm{CH}_3\mathrm{NH}_3\mathrm{PbI}_3$
(b) GaAs
(a) cSi
Figure S15: Visualization of the absorbance of the close-packed  $\mathrm{TiO_2}$  nanospheres on top of a thin film made of cSi,  $\mathrm{CH}_3\mathrm{NH}_3\mathrm{PbI}_3$  , or GaAs for three different fidelity levels, i.e., low fidelity (shown in left panels), medium fidelity (shown in center panels), and high fidelity (shown in right panels).
(b)  $\mathrm{CH}_3\mathrm{NH}_3\mathrm{PbI}_3$
(c) GaAs
(a)  $t_2 = 8, r_1 = r_2 = 20, h_1 = h_2 = 50$
(b)  $t_2 = 18, r_1 = r_2 = 20, h_1 = h_2 = 50$
Figure S16: Visualization of the transmittance of the three-layer film with double-sided nanocones made of  $\mathrm{TiO_2 / Ag / TiO_2 / TiO_2 / TiO_2}$  for three different fidelity levels, i.e., low fidelity (shown in left panels), medium fidelity (shown in center panels), and high fidelity (shown in right panels).
Figure S17: Visualization of the transmittance of the three-layer film with double-sided nanocones made of  $\mathrm{TiO_2 / Au / TiO_2 / TiO_2 / TiO_2}$  for three different fidelity levels, i.e., low fidelity (shown in left panels), medium fidelity (shown in center panels), and high fidelity (shown in right panels).
Figure S18: Visualization of the transmittance of the three-layer film with double-sided nanocones made of  $\mathrm{TiO_2 / Cu / TiO_2 / TiO_2 / TiO_2}$  for three different fidelity levels, i.e., low fidelity (shown in left panels), medium fidelity (shown in center panels), and high fidelity (shown in right panels).
Figure S19: Visualization of the transmittance of the three-layer film with double-sided nanocones made of  $\mathrm{TiO_2 / Ni / TiO_2 / TiO_2 / TiO_2}$  for three different fidelity levels, i.e., low fidelity (shown in left panels), medium fidelity (shown in center panels), and high fidelity (shown in right panels).
Figure S20: Visualization of the transmittance of the three-layer film with double-sided nanocones made of AZO/Ag/AZO/AGO/AGO for three different fidelity levels, i.e., low fidelity (shown in left panels), medium fidelity (shown in center panels), and high fidelity (shown in right panels).
Figure S21: Visualization of the transmittance of the three-layer film with double-sided nanocones made of cSi/Ag/cSi/cSi/cSi for three different fidelity levels, i.e., low fidelity (shown in left panels), medium fidelity (shown in center panels), and high fidelity (shown in right panels).
Figure S22: Visualization of the transmittance of the three-layer film with double-sided nanocones made of ITO/Ag/ITO/ITO/ITO for three different fidelity levels, i.e., low fidelity (shown in left panels), medium fidelity (shown in center panels), and high fidelity (shown in right panels).
Figure S23: Visualization of the transmittance of the three-layer film with double-sided nanocones made of  $\mathrm{ZnO / Ag / ZnO / ZnO / ZnO}$  for three different fidelity levels, i.e., low fidelity (shown in left panels), medium fidelity (shown in center panels), and high fidelity (shown in right panels).