Inverse Design of Plasmonic Nanohole Arrays by Combing Spectra and Structural Color in Deep Learning

Herein, deep learning (DL) is used to predict the structural parameters of Ag nanohole arrays (NAs) for spectrum‐driving and color‐driving plasmonic applications. A dataset of transmission spectra and structural parameters of NAs is generated using finite‐difference time‐domain (FDTD) calculations and is converted to vivid structural colors using the corresponding transmission spectrum. A bidirectional neural network is used to train the transmission spectrum and structural color together. The accuracy of predicting the structural parameters using a desired spectrum is tested and found to be up to 0.99, with a determination coefficient of reproducing the desired spectrum and color to be 0.97 and 0.96, respectively. These values are higher compared to those when only training for spectrum, but requiring less training time. This strategy is able to inverse design the NAs in less than 1 s to maximize surface‐enhanced Raman scattering (SERS) enhancement by matching transmission resonance and laser excitation wavelength, and accurately regenerate colored images in 7.5 s, allowing for nanoscale printing at a resolution of approximately 100 000 dots in−1. This work has important implications for the efficient design of nanostructures for various plasmonic applications, such as plasmonic sensors, optical filters, metal‐enhanced fluorescence, SERS, and super‐resolution displays.

Herein, deep learning (DL) is used to predict the structural parameters of Ag nanohole arrays (NAs) for spectrum-driving and color-driving plasmonic applications.A dataset of transmission spectra and structural parameters of NAs is generated using finite-difference time-domain (FDTD) calculations and is converted to vivid structural colors using the corresponding transmission spectrum.A bidirectional neural network is used to train the transmission spectrum and structural color together.The accuracy of predicting the structural parameters using a desired spectrum is tested and found to be up to 0.99, with a determination coefficient of reproducing the desired spectrum and color to be 0.97 and 0.96, respectively.These values are higher compared to those when only training for spectrum, but requiring less training time.This strategy is able to inverse design the NAs in less than 1 s to maximize surface-enhanced Raman scattering (SERS) enhancement by matching transmission resonance and laser excitation wavelength, and accurately regenerate colored images in 7.5 s, allowing for nanoscale printing at a resolution of approximately 100 000 dots in À1 .This work has important implications for the efficient design of nanostructures for various plasmonic applications, such as plasmonic sensors, optical filters, metal-enhanced fluorescence, SERS, and super-resolution displays.
through the nanoholes and subsequently decouple on the other interface, resulting in extraordinary optical transmission (EOT) and multiple transmission peaks and resonant absorption dips. [19,20]This mechanism provides NAs with flexibility in spectrum-driving applications [18] and a variety of apparent colors in color-driving applications. [3][23] While NAs have been widely studied, DL has not been used for efficient inverse design of spectrum or structural color.The optical responses of NAs are more complicated than those of plasmonic NPs, and need a more sophisticated DL model and a better understanding of the structure-spectrum or structure-color relationship critical.[13][14][15][16][17] Including the thickness in these studies would introduce complexity and difficulty in fabrication or synthesis, making it almost impossible to experimentally realize structural color changes in a large display area. [11,12,16,17]n this work, we investigate the use of a DL model for the inverse design of Ag NAs for spectrum and color mapping and propose a modified DL model capable of simultaneously addressing both training spectrum and color requirements.A dataset consisting of transmission spectra and structural parameters (the period P and diameter D with a fixed thickness) of NAs is generated based on finite-difference time-domain (FDTD) calculations, and the corresponding structural color is derived from the calculated spectrum.Four neural networks (NNs) are constructed and compared for inverse design of NAs, with the optimal NN trained to simultaneously predict spectrum and structural color, achieving a high accuracy of 0.99 and a large determination coefficient of 0.97.Such predictions can be completed in less than 1 s.As a proof of concept, an optimized surface-enhanced Raman scattering (SERS) substrate based on NA is predicted in less than 1 s, and a colorful image is regenerated using NAs in 7.5 s with high accuracy.The inverse design of NAs is expected to facilitate the development of plasmonic sensors, optical filters, metal-enhanced fluorescence, and SERS applications that require multi-spectrum capabilities and precise dimensions.

Results and Discussion
Figure 1 illustrates the process of inverse design for Ag NAs.It focuses on solving two separate problems: predicting structural parameters from input spectrum and predicting structural parameters from input structural color.The first step involves using FDTD to generate a dataset consisting of transmission spectra and corresponding structural parameters for NAs with a fixed thickness.The transmission spectra can be converted to structural colors to generate a second dataset, consisting of structural colors and corresponding structural parameters.The second step involves building and improving NNs to predict structural parameters from input spectrum and structural color.
Here, the effectiveness of training both spectrum and structural color in a single NN is specifically investigated.The inverse design based on spectrum is demonstrated to be used for SERS substrate design while the inverse design based on structural color is used for colored image reproduction.
In Figure 2a, an Ag NA array with a hexagonal lattice is shown, along with its major structural parameters, such as the period (P), hole diameter (D), the ratio (r = D/P), and thickness (H).The Ag NA can be created using electron beam lithography (EBL), [25] focused ion beam (FIB) lithography, [26] or colloidal lithography (CL). [27]It is assumed that the NA is embedded in a uniform bulk material such as glass, ensuring that the SP mode frequencies at both interfaces are matched, resulting in efficient light coupling and distinct peaks/dips in transmission spectra. [28]A silica layer can be added via a sol-gel process or physical vapor deposition to the top of the NA layer, which is supported on a glass substrate for experimental purposes.
In the FDTD calculations, 7781 transmission spectra T(λ) were generated for Ag NAs with varied r and P. The range of r varied from 0.2 to 0.8 with an increment of 0.02, P was chosen from 50 to 1050 nm with a step size of 4 nm, and H was held constant at 50 nm.Figure 2b displays typical T(λ) of the Ag NAs with a fixed r = 0.5 and varied P from 100 to 900 nm.Each transmission spectrum has a distinct peak, G1, which is the (1, 0) Bragg resonance order at the Ag/glass interface. [29]The peak G1 has a significant redshift from λ G1 = 456 nm to λ G1 = 1464 nm, while the maximum transmittance (T G1 ) varies slightly between 60% and 70% when P changes from 100 to 900 nm.
Figure 2c shows the transmission spectrum map calculated as a function of r for a fixed P = 400 nm.Two peaks, G2 and G3, are indicated by arrows.G2 is the (1, 0) transmission peak at the Ag/glass interface, which is the same as G1.G3 is the (1, 1) transmission peak at Ag/glass interface. [29]As r increases from 0.2 to 0.7, the peak G2 slightly redshifts from λ G2 = 700 nm to λ G2 = 800 nm, T G2 increases significantly from 18% to 80%, and the full-width at half-maximum (FWHM) broadens from Δλ G2 = 100 nm to Δλ G2 = 600 nm.The λ and T of the peak G3 change slightly.These results indicate that by adjusting P and D, the spectral response of the NAs can be easily tuned in a wide range of wavelengths and T can also be modulated.
In Figure 2d, the transmission spectrum was transformed into standard red green blue (sRGB) colors, using a process outlined in Section S1, Supporting Information.The sRGB color space was chosen due to its popularity in display, image, and industry design.The resulting colors covered a wide range of hues from red to purple.The colors changed significantly for each arrow (fixed r and varied P) and slightly for each column (varied r and fixed P), with noticeable differences in brightness.The Commission Internationale d'Eclairage (CIE) 1931-xy chromaticity diagram in Figure 2e shows that the color space achieved by the NAs ranged from 0.15 to 0.45 for x, 0.08 to 0.65 for y, and 3.52 to 70.47 for Y. Here, x and y represent the proportions of red and green values, respectively, while Y measures brightness.The color gamut of the NAs in Figure 2e occupied 76% of sRGB and 87% of cyan magenta yellow key plate (CMYK) color spaces.It was comparable to that of a commercial monitor (>70% sRGB) and much larger (%4 times) than that of a high-quality print magazine (yellow triangle). [30]The color gamut of the NAs also included many blue and green hues with higher saturation, which were outside the color spaces of sRGB and CMYK.It is important to note that the color gamut in Figure 2e was achieved by varying only two structural parameters (P and D).Although some previous works have achieved larger color gamuts, they usually required varying more structural parameters, including thickness. [11,12,16,17]

Inverse Design Using Spectrum
It is essential to input the desired spectrum to accurately predict the structural parameters for fabrication purpose.To achieve the inverse design of NAs using a desired spectrum, a tandem bidirectional DNN [15] was created (as depicted in Figure 3a).The inverse network, which takes spectral data (354 wavelength points in the range of 380-780 nm) as inputs and structural parameters (P and D) as labels, is connected to a forward network where the input and label are interchanged.The output of the entire network is also spectral data, which can be directly compared to determine the weights in the inverse and forward networks.The intermediate layer consists of the structural parameters P and D. The flow of the bidirectional network follows a spectrum-structure-spectrum (SSS) approach.This approach overcomes the one-to-many problem for inverse design, is more stable, and is more efficient in predicting the desired response. [15]o train the SSS network, the initial set of 7781 spectra was reduced to 6951 by eliminating those with structural colors outside the sRGB area.The remaining spectra were randomly divided into three groups: 5000 for training, 1000 for validation, and 951 for testing.During the modeling process, the network's connection weights were continuously adjusted with each batch of data in epochs.The network was provided with the validation data every 9 epochs, during which the determination coefficient (R 2 ), quantifying the correlation between input and output spectra (Spec-R 2 ), was calculated.Calculation details of R 2 can be found in Section S2, Supporting Information.Spec-R 2 measures the similarity between the output and input spectra, and ranges from 0 to 1.As training progressed, the validation Spec-R 2 steadily increased over epochs, plateauing at 0.92 after around 800 epochs, as shown in Figure 3b by the black curve.The real and predicted P and D values exhibited a similar trend during testing, with the determination coefficient for the structure parameters (Stru-R 2 ) reaching 0.99 after 800 epochs, while Spec-R 2 peaked at 0.94.
The main objective of the inverse design approach is to predict a spectrum that closely matches a desired spectrum, even if the structural parameters of NA are not labeled.Despite achieving a Stru-R 2 of 0.99, there is room for improvement in Spec-R 2 .To address this, a new network called the spectrum-structure-color (SSC) network was developed, which takes a desired spectrum as input, uses structural parameters as an intermediate layer, and outputs values of R, G, and B (Figure 3c).The network converts the input spectrum to an (R, G, B) coordinate and compares it with the output (R, G, B) coordinate, which produces an R 2 value between the two coordinates called RGB-R 2 .The SSC network consistently outperformed the SSS network, with a higher validation RGB-R 2 of 0.96 compared to 0.92 as shown in Figure 3b.The SSC network also achieved high test Stru-R 2 (0.99) and a test RGB-R 2 of 0.97, which is larger than RGB-R 2 of the SSS network (0.94).These higher R 2 values demonstrate that the SSC network may be better at producing desired spectra.Figure 3d shows an example of reproducing an input spectrum using the SSS and SSC networks.The input spectrum, with P = 686 nm and D = 370 nm (black curve), was not part of the training set.The output spectrum of the SSS network is shown as the red dotted curve, while the predicted structural parameters of the SSS and SSC networks are P/D = 687/369 and 679/369 nm, respectively.The FDTD generates corresponding T(λ) based on the two sets of P and D values, resulting in the blue and pink curves for the SSS and SSC networks, respectively.Although some deviations exist in the short wavelength range (λ = 500-550 nm) where multiple small peaks/dips appear, the three spectra obtained by the NNs are in qualitative agreement with the input spectrum.The Fréchet distance ( f ) between the calculated spectrum and input spectrum is a measure of similarity between curves that considers the location and ordering of the points along the curves. [31]The f values of the output spectrum from the SSS network (red dotted curve) and FDTD-calculated spectra from the SSS (blue curve) and SSC (pink curve) networks are 0.29, 0.30, and 0.014, respectively.The smallest f value is obtained from the FDTD-calculated spectrum from the SSC network, indicating that the predicted structural parameters from the SSC network match the input spectrum more closely.
It should be noted that while the predicted structural parameters of the SSS network (P/D = 687/369 nm) are closer to the real parameters (P/D = 686/370 nm) in this particular instance, the SSC network is better suited for finding more similar spectra by directly comparing input and output colors rather than seeking high similarity in structural parameters.In the SSS network's forward network (right half network in Figure 3a), it is difficult to predict 354 spectrum datapoints using only two structural parameters.In contrast, the SSC network's forward network (right half network in Figure 3c) predicts three (R, G, B) datapoints, which is much easier to train than 354 datapoints, resulting in higher R 2 values.Additionally, the SSC network outputs less data, reducing the model scale and lowering computing memory and burden.The SSC network also trains faster, taking %15 min compared to %21 min for the SSS network, which is %40% faster.For larger datasets, this improvement in training efficiency would be even more significant.

Inverse Design Using Color
To design plasmonic nanostructures for structure color application, a direct input of color is needed to predict the corresponding structural parameters.This renders the SSS and SSC networks developed earlier, which take spectrum as input, unsuitable for inverse color design.To enable direct input of color and prediction of structural parameters, a bidirectional tandem network, the color-structure-color (CSC) network, is constructed, with (R, G, B) values, structural parameters, and (R, G, B) values as input, intermediate, and output layers, respectively (see Figure 4a).The weights of the inverse and forward networks are trained simultaneously to reduce loss and increase the similarity between the input and output colors, as measured by the RGB-R 2 value.After optimization, the test RGB-R 2 is found to be 0.96, indicating accurate color reproduction.To enable easy comparison, the color difference, represented by the ΔE value, is calculated to quantify the difference in visual perception between the input and output colors [32] ΔE ¼ where L i , a i , and b i (i = 1, 2) are the color coordinates in an alternate color space, calculated from the RGB values.A smaller ΔE value indicates a smaller color difference and better color reproduction, with a ΔE < 1 being imperceptible to the human eye and ΔE = 6-7 being an acceptable threshold in commercial practice. [32]In the test set of 951 colors, 91% of the predicted (R, G, B) values have a ΔE below 7 (shown as a dashed line in Figure 4b), and the mean ΔE value of the entire test set is 2.85, demonstrating the high accuracy of the constructed CSC model.Additionally, a color-structure-spectrum (CSS) network was constructed based on the SSC network, which trains RGB and spectrum together.The CSS network has input color and output spectrum, as shown in Figure 4c.The test RGB-R 2 is obtained to be 0.88, with 82% of the test colors having a ΔE value less than 7 (shown as a dashed line in Figure 4d), and the mean ΔE value is 3.83.The overall performance of the CSS network is not as good as that of the CSC network because it is challenging for the CSS network to achieve high accuracy with only two structural parameters used to predict 354 spectrum datapoints in the forward network.The ΔE for the CSS network is calculated by converting the output spectra to corresponding (R, G, B) values and then comparing them to the input (R, G, B) values.
Table 1 presents six random instances from the test set that were not used for training the CSC and CSS networks.The (R, G, B) values obtained from the corresponding spectrum were input to the networks to predict the structural parameters and output (R, G, B) values.For the CSC network, the structural parameters are predicted accurately, and the colors are reproduced with a small difference, as indicated by the ΔE values, which are smaller than those of the CSS network for the same instances.It is worth noting that the CSS network predicts more accurate structural parameters for the second and sixth instances, but the corresponding ΔE values are still larger than those of the CSC network.The test accuracy to predict the structural parameters for the CSS network is 0.92, which is higher than that of the CSC network, but the CSC network still produces smaller ΔE values.This again confirms that the CSC network is better suited for finding optimal solutions, while the CSS network's focus on structural accuracy may not always lead to the best color reproduction.Importantly, these instances were not included in the training dataset, demonstrating the strong generalization ability of the CSC network.

Predicting Desired Transmission Spectra for SERS
Predicting desired spectra of NAs for SERS using inverse design helps harness the benefits of transmission-based SERS and facilitates exploration of the transmission intensity-SERS enhancement correlation.Transmission-based SERS simplifies optical alignment, making it well suited for integration with microfluidic devices.Despite potential SERS signal reduction post-substrate transmission, advancements in this approach could broaden our understanding of SERS and uncover novel applications.Previous studies [33,34] indicate a relationship between transmission intensity and SERS enhancement.By enabling the inverse design of NAs for desired transmission spectra, we offer a robust platform for researchers to delve into this correlation further.This quick and accurate method aids in designing NAs with specific transmission spectra, potentially maximizing the SERS effect, and enhancing the efficiency of SERS-based applications.The NN has the potential to significantly enhance the efficiency of obtaining desired spectra for SERS based on NAs, as shown in Figure 5.With the inverse design of NAs based on DL, the simplest spectral profile of Gaussian with FWHM = 100 nm and peaks at λ = 488, 514, and 532 nm (three main laser wavelengths used in commercial Raman systems) were generated and input into the SSS network, which generated the corresponding NAs with predicted P and D: 138/54, 172/75, and 173/71 nm, respectively.Such a process only took less than 1 s.FDTD calculated spectra using the predicted P and D also matched the input spectra well as shown in Figure 5a-c.The f values of the output and FDTD calculated spectra to the input spectrum is 0.1057/0.15,0.171/0.195,and 0.177/0.197for λ = 488, 514, and 532 nm, respectively.To create a SERS substrate that can be excited by multiple laser wavelengths, a broad spectrum with an EOT peak ranging from 488 to 633 nm was artificially generated.Using this spectrum as input, the structural parameters for reproducing the desired spectrum were obtained to be P = 228 nm and D = 181 nm, and the corresponding FDTD calculated spectrum is shown in Figure 5d.The f of the output and FDTD calculated spectra to the input spectrum is 0.297 and 0.256, respectively.This demonstrates that SERS substrates excited by different laser wavelengths can be easily designed  using Ag NAs although the input spectra are not in the training dataset.Additionally, this inverse design process can also improve other plasmonic applications that rely on spectrum tuning, such as sensors, optical filters, and surface enhanced fluorescence.It is noted that the four spectra predicted by SSS is better than those by SSC, which may be not typical instances.Another guess is that SSC can produce more accurate spectra when the data is similar, while the generalization for distinct spectra would be stronger for SSS.For SSC with inputting spectra and outputting colors, it may be better applied using spectra to reproduce colors, such as the applications of artwork restoration and accurate color match.

Painting Regeneration
The relationship between color and structural parameters is complex and cannot be accurately described by an analytic relationship.To better understand this connection, multidimensional data processing approaches are necessary.[37] In contrast, the DL method can predict both existing and nonexisting color-related structural parameters accurately.As an example, the painting "The Scream" by Edvard Munch was digitized into 413 Â 474 pixels in Figure 6a, and the corresponding color values were input into the CSC network.The CSC network output the structural parameters for each pixel, and the regenerated painting colors were obtained as shown in Figure 6b.Compared to the original painting, the regenerated painting is less bright and vivid.The ΔE between the original and regenerated painting is 8.9.The perceptual hash algorithm, [38] differential hash algorithm, [38] and mean structural similarity (MSSIM) [39] were employed to compare the original painting with the regenerated one.The results show that the CSC network is robust and accurate with calculated scores of 90%, 89%, and 78% for each algorithm, respectively.However, the ΔE between the original and regenerated painting is attributed to the intrinsic optical performance of Ag and its nanostructure, which limits the ability to produce white.In addition, the MSSIM score is affected by the brightness, resulting in a darker regenerated picture than the original.Furthermore, DL models scale more effectively with data set size.Nevertheless, the CSC network took only 7.5 s to reproduce the entire painting, while the least square method required approximately 5 h, demonstrating significantly lower efficiency.Our color palette shows nonuniform color distribution, with densely and sparsely populated areas, making exact color matching complex.Comparing our DL approach to least squares methods, which both need the dataset, our model provides real-time color predictions, offers significantly greater time efficiency, and has superior generalizability and precision, especially in sparsely populated color regions.
To conduct a more detailed analysis, we compared ΔE between the original painting and the regenerated painting for two selected areas with 51 Â 59 pixels (the dotted squares in Figure 6a,b) containing mostly red and non-red colors.The ΔE was numerically computed to be 4.63 for the non-red area (bottom square) and 9.99 for the red area (top square).The non-red area had a smaller ΔE and could be better reconstructed.In Figure 6c, we presented the CIE 1931-xy chromaticity coordinates of the colors extracted from the original (blue dots) and regenerated (green dots) painting.The color gamut of the original painting was slightly larger than that of the regenerated painting, especially for the red area.These results indicate that the CSC network's inverse-designed colors are accurate for points within the color gamut boundaries of the NAs, i.e., the nonred area.The accuracy and producibility of NAs are limited if the color becomes too red and falls outside the color boundaries of NAs. Figure 6d displays the structural parameters of P and D utilized in reconstructing the painting, where the maximum D and P values are 760 and 1080 nm, respectively.The minimum P value is 52 nm, while D can be negative, representing a very dark color similar to black.For practical purposes, a film without holes can be used to replace samples with negative D.
It is important to note that the color gamut of the NAs was achieved by varying only two structural parameters, P and D, while keeping the thickness constant, which makes practical fabrication easier.The current state-of-the-art lithography techniques, such as EBL, FIB, and CL, are well suited for designing 2D patterns that can be used as templates or masks for depositing the desired nanostructures.Varying thickness during deposition is difficult, which limits the color gamut that can be achieved with other types of nanostructures that require changes in thickness. [11,16]The NAs can be easily fabricated with a uniform thickness, which allows for a wide range of vivid colors to be produced.Our two-parameter design covers a wide spectrum and color range, rivaling more complex structures.Chosen for fabrication simplicity, this approach balances theoretical allure and practical feasibility.Additionally, the color gamut of NAs can be expanded by fabricating them with different thicknesses, which can be tailored for specific applications (Figure S1, Supporting Information).For instance, NAs with a thickness of 100 nm show a larger color gamut than those with 50 nm thickness.Furthermore, the transmission spectrum of NAs is not significantly affected by point defects or variations in their shape due to fabrication errors. [23]This ensures that the colors produced by NAs remain stable regardless of fluctuations in the fabrication process.In fact, it has been demonstrated that the structural colors of NAs can be reproduced with just two holes, [21,22] with the area of seven holes in a hexagonal pattern being used as the minimum pixel in this study.Most of the colors were obtained in the range of 50-800 nm, allowing for color printing at a resolution of approximately 100 000 DPI.These values are much higher than those of the most advanced monitors and printers, demonstrating the potential of NAs in super-resolution displays and optical data storage applications.

Conclusions
In a summary, this study has demonstrated an efficient method for achieving desired spectrum and structural color of Ag NAs using a developed DL NN.By training both the spectrum and structural color of the NAs together in one NN, the approach achieves higher accuracy and is less time-and resource-consuming than NNs that train only the spectrum.The structural parameters of NAs can be efficiently designed for desired spectra, which can greatly benefit applications ranging from chemical sensing and biophysics to subwavelength optics and optoelectronics.Furthermore, by training the structural color of the NAs, the approach can be used to quickly and accurately regenerate arbitrary colorful pictures with super-resolution.This has great potential in digital displays, optical security devices, and durable optical data storage.The inverse design of NAs is also made easier to be realized in the real world due to the uniform thickness of the NAs, while still maintaining a wide spectral response and color gamut.The scalability of our DL-based method for NA film inverse design is promising, as it can manage larger datasets and complex structures while potentially adapting to different materials.This work will significantly facilitate the development of NAs and NA-based plasmonic applications, while also providing advanced NNs for DL-driven nanophotonic design.

Experimental Section
Dataset Generation: A commercial software package (FDTD Solutions, Lumerical Solutions Inc.) was used to generate the dataset of structural parameters and transmission spectra.The NA was embedded in glass (SiO 2 (Glass)-Palik) on both sides, with Ag (Silver)-Palik (0-2 μm) as the material choice for the silver.To ensure simulation accuracy, the settings were as follows: Mesh_Acc = 5, Sim_Tim = 1e-12, and Shutoff_Min = 1eÀ5.Prior to simulation, the thickness of the silver was set to 50 nm and remained constant while P and D were varied.In this modeling process, we calculated a hexagonal arrangement of NAs.The period and diameter parameters were varied in a loop to generate different spectra.Two loops were written in the script, one gradually increasing the period from 50 to 1050 nm in steps of 4 nm, resulting in 251 points.The other loop increased the ratio of diameter to period from 0.2 to 0.8 in steps of 0.02, providing 31 points.Thus, the total original data consisted of 251 Â 31 = 7781 points.The boundary conditions were set as follows: x was set to Anti-Symmetric, y to Symmetric, and z to a perfect metal layer.The getresult function was used to extract the transmission spectra from the monitor, and these were sequentially stored in a predetermined matrix.
DL: For the bidirectional NNs, the prepared data was converted into tensors, randomized, and split into training, validation, and test sets.The bidirectional model, taking SSS for example, took preprocessed spectral data and trained it through an inverse network to predict P and D of an NA.These parameters were then input into a forward network for spectrum prediction and characterization.The networks optimized loss, updated gradients, and enhanced robustness concurrently.Validation using a separate dataset ensured real-time monitoring of the training process.With a training data size of 5000 and a batch size of 600, nine iterations were required for complete training.Real-time training loss was reported to assess model effectiveness, and validation results were outputted.After 5000 iterations and observing a stable R 2 value, the model's accuracy was validated.The model was then saved, and its generalization ability was evaluated using a separate test set.
All the calculations and NN training were performed on a Windows PC with the hardware: CPU: Intel Core i9-9900K; RAM: 48 GB; and GPU: NVIDIA RTX 2070.All the DL models and training were developed and performed on the open-source deep-learning-framework PyTorch.The hyperparameters of the DL models can be seen in Section S4, Supporting Information.

Figure 1 .
Figure 1.Scheme of inverse design of nanohole arrays (NAs) based on deep learning (DL).

Figure 2 .
Figure 2. a) A schematic of the Ag NA. b) Representative T(λ) of Ag NAs with an increasing P from 100 to 900 nm and a fixed r = 0.5 (the ratio between D and P).The peaks in the dotted rectangle are referred as G1.The number above the peak marks P value.c) A color map of T(λ) as a function of r with a fixed P (=400 nm).The two peaks are referred as G2 and G3, respectively.d) A palette of colors obtained by tuning P and r with a fixed H (=50 nm).e) Commission Internationale d'Eclairage (CIE) 1931-xy chromaticity coordinates of the colors converted by the calculated T(λ).The blue, red, and yellow triangles indicate the boundaries of standard red green blue (sRGB), cyan magenta yellow key plate (CMYK), and high-quality print magazine color space, respectively.

Figure 3 .
Figure 3. a) The architecture of spectrum-structure-spectrum (SSS) network.b) The validation Spec-R 2 curves in the training process of SSS and spectrum-structure-color (SSC) networks.c) The architecture of SSC network.d) Input spectrum, output spectrum of SSS network, and finite-difference time-domain (FDTD) calculated spectra using the predicted structural parameters of SSS and SSC networks.

Figure 4 .
Figure 4. a) The architecture of color-structure-color (CSC) network.b) ΔE of the testing instances of CSC network.c) The architecture of color-structure-spectrum (CSS) network.d) ΔE of the testing instances of CSS network.

Figure 6 .
Figure 6.a) The origin and b) reproduction of the painting "The Scream" based on inverse of NAs by CSC network.Selected areas with 51 Â 59 pixels were extracted to compare the reproduction of different colors.c) CIE 1931-xy chromaticity coordinates of the colors extracted from the original (blue dots) and reconstructed (green dots) painting.d) Predicted P and D for reconstructing the painting.

Table 1 .
Six instances of the color and structural parameters of the input, CSC prediction, and CSS prediction.