Methods and apparatuses for improved resonant metasurface design based on spectral perception
By employing a spectrally-based resonant metasurface design method, utilizing the GLSAT forward prediction network and the DNN inverse design network, a rapid and high-precision design of resonant metasurface structure parameters from ideal spectra is achieved. This solves the problems of long processing time, low efficiency, and insufficient accuracy in existing technologies, and is applicable to reflection, transmission, and phase modulation devices.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- NAT UNIV OF DEFENSE TECH
- Filing Date
- 2025-02-07
- Publication Date
- 2026-04-14
AI Technical Summary
Existing resonant metasurface design methods are time-consuming, inefficient, computationally expensive, and lack sufficient prediction accuracy, especially in the analysis of complex structures and high-dimensional datasets, making it difficult to meet real-time design requirements.
An improved method based on spectral sensing was adopted, and a GLSAT forward prediction network and a DNN inverse design network were designed. By utilizing multi-head attention mechanism and deep neural network, a fast and high-precision design of resonant metasurface structure parameters from ideal spectrum was achieved through cascaded networks.
While reducing computational costs, it significantly improves the efficiency and accuracy of resonant metasurface design, enabling the rapid generation of structural parameters that meet design requirements, and is suitable for reflection, transmission, and phase modulation devices.
Smart Images

Figure CN120030900B_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of resonant metasurface design, particularly to the field of resonant metasurface reverse design based on spectral sensing characteristics, and specifically to a resonant metasurface design method and apparatus based on spectral sensing improvement. Background Technology
[0002] In recent years, all-dielectric resonant metasurfaces have attracted much attention in optical component design due to their advantages of low loss and high quality factor (Q factor). These resonant metasurfaces are widely used in reflection, transmission, and absorption filters and phase modulation devices. However, studying the spectral properties of resonant metasurfaces faces multiple challenges: on the one hand, their spectral responses often exhibit complex behavior, involving multiple resonant modes and nonlinear effects, making prediction and design complex; on the other hand, the continuous variation of spectral properties over a wide frequency range generates high-dimensional datasets, requiring advanced computational techniques for effective analysis and optimization.
[0003] Traditional resonant metasurface design relies on numerical full-wave simulations (such as the finite element method (FEM), finite-difference time-domain (FDTD), and finite-integral (FIT) methods). While this on-demand resonant metasurface design approach offers high accuracy, it still depends on empirical manual parameter tuning and trial-and-error, requiring significant computational resources and time. This is especially true when dealing with complex geometries, where achieving a specific electromagnetic response through empirical parameter tuning and iterative optimization is extremely time-consuming and inefficient. Furthermore, the rapid development of artificial intelligence (AI), particularly machine learning (ML), has provided powerful computational tools to overcome these obstacles and has driven research into the inverse design of resonant metasurfaces. Evolutionary algorithms such as particle swarm optimization (PSO) and genetic algorithms (GA) are frequently used in resonant metasurface design. However, these heuristic algorithms are computationally complex and often time-consuming when dealing with a large number of parameters, resulting in low computational efficiency and difficulty in meeting real-time design requirements.
[0004] In contrast, deep learning models based on deep neural networks (DNNs) are capable of solving complex problems due to the powerful capabilities of their multiple layers of hidden units. This capability allows them to reveal hidden relationships between structural parameters and their electromagnetic (EM) responses, such as amplitude and phase. Therefore, the large databases generated through full-wave simulations can be used to train neural networks. Data-driven methods, once the model has reached high-precision training, can reduce the forward prediction time from structural parameters to target amplitude or phase to milliseconds, thereby accelerating the reverse design process from target spectrum to structural design.
[0005] Nevertheless, inverse prediction networks from spectrum to structure can produce non-unique solutions because the same spectral input may correspond to multiple structural outputs. Furthermore, the target spectrum is often idealized (ideal spectrum), making it difficult for the model to accurately capture the complex underlying relationships. Some existing techniques utilize generative adversarial networks (GANs) to find corresponding structures from the target spectrum. On the other hand, networks such as fully connected networks (FCNs), bidirectional neural networks, and tensor neural networks (NTNs) have also been applied to the inverse design of spectral prediction for resonant metasurfaces. Some existing techniques employ dimensionality reduction methods to address the matching problem between structural geometry and spectral data. While this can remove unnecessary sharp peaks, it also leads to the loss of spectral information.
[0006] Transformer models based on self-attention mechanisms have demonstrated outstanding performance in language and vision tasks in recent years. This architecture overcomes many limitations of previous models, successfully capturing key spectral features from low-dimensional structures, including high-Q-factor resonant metasurface sensor resonances, broadband solar metamaterial absorbers, and molecular fingerprint features in Raman spectroscopy. However, the application of Transformer architectures typically requires a large number of layer stacks to achieve the desired performance, leading to increased model complexity and computational cost. These challenges indicate a need for more efficient Transformer designs that maintain or improve the accuracy of predicted electromagnetic responses while reducing the number of layers. Summary of the Invention
[0007] In view of this, in order to solve the problems of long design time, low efficiency, high computational cost, and insufficient prediction accuracy due to information loss in the existing technology, the present invention provides a resonant metasurface design method and apparatus based on spectral sensing improvement. The resonant metasurface design method based on spectral sensing improvement not only improves the prediction accuracy of the algorithm, but also has the characteristics of short design time, high efficiency, and low computational cost.
[0008] This invention provides a resonant metasurface design method based on spectral sensing improvement, comprising the following steps:
[0009] Step 110: Design a GLSAT forward prediction network to achieve forward prediction from resonant metasurface structure parameters to ideal spectra and obtain the predicted spectra; the design of the GLSAT forward prediction network is based on a multi-head attention mechanism improved by spectral perception; the GLSAT forward prediction network includes an FCL module for dimensional expansion and a dual Transformer module for feature decomposition and extraction of high-dimensional spectra.
[0010] Step 120: Based on the prediction design requirements for achieving the ideal spectral response, select the dataset of resonant metasurface structure parameters, train and optimize the GLSAT forward prediction network to obtain the trained GLSAT forward prediction network.
[0011] Step 130: Design a DNN inverse design network to realize the design of resonant metasurface structure parameters that satisfy the ideal spectral response; the DNN inverse design network is implemented based on the design algorithm of a deep neural network;
[0012] Step 140: Cascade the DNN inverse design network with the trained GLSAT forward prediction network to construct a cascaded inverse design network from ideal spectrum to resonant metasurface structure parameters; the cascaded inverse design network includes a Gaussian line spectrum generator that preprocesses the ideal spectrum, a DNN inverse design network, and a trained GLSAT forward prediction network.
[0013] Step 150: Input the ideal spectrum used as the training set into the cascaded inverse design network, train and optimize the DNN inverse design network until a cascaded inverse design network that meets the design accuracy requirements is obtained;
[0014] Step 160: Input a set of ideal spectra based on real-world design requirements into the cascaded inverse design network to meet the design accuracy requirements. Use the DNN inverse design network in the cascaded inverse design network to generate resonant metasurface structure parameters that meet the ideal spectral response, thus completing the design of the resonant metasurface.
[0015] Specifically, the FCL module includes multiple residual modules with fully connected layer structures to implement three-stage dimensionality expansion. Each fully connected layer structure contains multiple linear layers. The residual modules include at least three types: a first residual module, a second residual module, and a third residual module. Each linear layer of any type of residual module is followed by an activation function, LeakyReLU, to introduce nonlinearity and mitigate gradient vanishing; its negative slope is taken as... ;
[0016] The dual Transformer module is used to extract global and local features of high-dimensional spectral data, and extracts all features through a multi-head attention mechanism. The dual Transformer module includes a GPT module for global perception and an LPT module for local perception. The multi-head attention mechanism includes a cross-attention mechanism for the GPT module to extract global features to achieve interactive multi-head attention analysis of spectral fragments, and a self-attention mechanism for the LPT module to extract local features to achieve inline multi-head attention analysis of spectral fragments.
[0017] Furthermore, in Step 110, the process of using the GLSAT forward prediction network to perform forward prediction from resonant metasurface structure parameters to ideal spectra and obtain the predicted spectrum includes:
[0018] Step 111: Utilize the FCL module to extend the dimensionality of the resonant metasurface structure parameters, including: […]. The parameters of the 3D resonant metasurface structure are extended to The two first residual modules, of which This represents the number of parameters of the resonant metasurface structure; the first residual module is expanded to... The second residual module of dimension; further expanding the second residual module to The third residual module of the dimension, in which Represents spectral dimensions;
[0019] Step 112: Preprocess the output data of the FCL module before it enters the dual Transformer module, including: using a layer with dimension... Data standardization is performed using a fully connected layer structure. The standardized spectral dimensions are used; the standardized data is then processed through a projection matrix to obtain the query vector required by the multi-head attention mechanism. Key vector Sum value vector ,in , This represents the total number of tokens for the spectrum, where each token represents a spectral segment.
[0020] Step 113: Input the data preprocessed in Step 112 into the dual Transformer module for data processing, including: data processing of the GPT module, data processing of the LPT module, and smoothing of the data by one-dimensional convolutional layers that connect the GPT module and the LPT module, and the LPT module and the data output layer respectively.
[0021] Step 114: The data, after being smoothed by the one-dimensional convolutional layer connecting the LPT module and the data output layer, is output through the output layer to obtain the predicted spectrum.
[0022] Preferably, in Step 113,
[0023] The data processing procedure of the GPT module includes:
[0024] Divide the data into One token;
[0025] A cross-attention mechanism is used to capture the attention of token interactions, and an attention score is calculated. and attention results Calculated using the following formulas respectively:
[0026]
[0027]
[0028] in, Representation matrix The transpose, and
[0029]
[0030]
[0031]
[0032] This indicates finding the transpose of a matrix. The Softmax function is used to convert a matrix of data into probability scores.
[0033] By focusing all the attention of the head The concatenation of these results yields a multi-head attention analysis result based on a cross-attention mechanism, given by the following formula:
[0034]
[0035] The Contact function is a tensor concatenation function used to achieve multiple attention results. splicing; It is the first Attention results for each head, with the number of heads being [number missing]. , It is a weight parameter matrix related to all heads;
[0036] The obtained multi-head attention analysis results This data is then passed to a normalized feedforward layer to implement multi-level normalization processing.
[0037] The data processing procedure of the LPT module includes:
[0038] Use inclusion The self-attention mechanism of each attention head will perform multi-head attention analysis on a single token to obtain an attention score. The following formula is given:
[0039]
[0040]
[0041] in, ,all and The data all originate from the same spectral segment. The Sigmoid function is a sigmoid activation function, and its output value is... between;
[0042] use and The Hadamard product yields attention results. It is given by the following formula:
[0043]
[0044] Among them, all , and All data are derived from the same spectral segment;
[0045] Use the Contact function to collect attention results from all heads When concatenated, the multi-head attention analysis result based on the self-attention mechanism is obtained, given by the following formula:
[0046]
[0047] in, Indicates the number of heads. It is the first Attention results of each head It is a weight parameter matrix related to all heads;
[0048] The obtained multi-head attention analysis results This data is then passed to a normalized feedforward layer to implement multi-level normalization processing.
[0049] Preferably, the normalized feedforward layer comprises two normalization layers, a feedforward network, and an activation function LeakyReLU; the two normalization layers are a first normalization layer and a second normalization layer; the structure of the normalized feedforward layer from top to bottom is as follows: the first normalization layer is used to ensure the stability of the feature distribution and improve the convergence performance of the model; the feedforward network is used to perform nonlinear transformations and further extract features; the second normalization layer is used to perform stable gradient propagation; and the activation function LeakyReLU is used to introduce nonlinear factors to prevent gradient vanishing.
[0050] During the multi-layer normalization process of the data, after the data is transmitted from the first normalization layer to the feedforward network, the input and output of the feedforward network are fused using a residual connection method to ensure that the input information of the data can be preserved.
[0051] Specifically, in Step 120, the process of selecting a dataset of resonant metasurface structure parameters and training and optimizing the GLSAT forward prediction network according to the predictive design requirements for achieving the ideal spectral response includes:
[0052] Step 121: Divide the dataset into training set, validation set and test set according to the proportions;
[0053] Step 122: The GLSAT forward prediction network is trained and optimized using the AdamW optimizer. The initial learning rate in the AdamW optimizer is set to 0.0005, and the learning rate is adjusted using cosine annealing scheduling, gradually decreasing according to the cosine function. An L2 regularization module is added to the AdamW optimizer to mitigate overfitting. The loss function in the AdamW optimizer... The mean square error is used to measure the predicted spectrum. Compared with the original spectrum obtained through simulation The difference between them, the loss function It is given by the following formula:
[0054] ,
[0055] in, Indicates the number of samples in the training set;
[0056] Step 123: Using metrics on the validation set The optimization performance of the GLSAT forward prediction network is evaluated; the metrics are... The mean absolute error (MAE) method is used to provide robust evaluation results of network optimization performance. It is given by the following formula:
[0057] ,
[0058] in, This indicates the number of samples in the validation set.
[0059] Specifically, in Step 130, the input layer of the DNN inverse design network contains spectral data, which is... Composed of spectral points, the output layer generates a... The vector stores the corresponding data of the resonant metasurface structure parameters; the deep neural network consists of three consecutive fully connected hidden layers with fully connected layer structures, each of which contains... , and One neuron.
[0060] Specifically, in Step 150, the process of inputting the ideal spectrum as the training set into the cascaded inverse design network to train and optimize the DNN inverse design network until a cascaded inverse design network that meets the design accuracy requirements includes:
[0061] Step 151: Use the Gaussian line spectrum generator to preprocess the ideal spectrum to obtain a Gaussian spectrum that is closer to the physically realizable spectrum, including constructing a set of Gaussian-like spectral datasets to obtain Gaussian spectra corresponding to the response of the ideal spectrum.
[0062] The ideal spectrum is generated by filtering the original spectrum dataset through a predefined requirement threshold, resulting in an ideal spectrum containing only binary values of 0 or 1; the filtering threshold is set to 0.9.
[0063] Step 152: Input the Gaussian spectrum into a cascaded architecture of the DNN inverse design network and the trained GLSAT forward prediction network, and train and optimize the DNN inverse design network, including: inputting the Gaussian spectrum into the DNN inverse design network, using the DNN inverse design network to design, generate and output resonant metasurface structure parameters; using the output resonant metasurface structure parameters as input data for the trained GLSAT forward prediction network, generating and outputting predicted spectra; comparing the input Gaussian spectrum with the output predicted spectra, calculating the loss function, and optimizing the parameters of the deep neural network by minimizing the gradient descent of the loss function, thereby improving the accuracy of the DNN inverse design network in designing resonant metasurface structure parameters.
[0064] Preferably, the design requirements for the ideal spectrum meet the requirements of the designed resonant metasurface in terms of the wavelength and intensity of the reflection peak, including the design of a narrowband filter reflective resonant metasurface specifically for an alkali metal laser with a linewidth of 10 nm and a wavelength of 795 nm.
[0065] The dataset selected in Step 120 consists of resonant metasurface structure parameters of a square lattice diamond-structured silicon dioxide substrate, including: the diameter of the cylinder. ,high Distance between adjacent cylinders , among which, diameter Less than distance At this point, the dimensionality of the resonant metasurface structure parameters... Set training rounds ;
[0066] In Step 121, the dataset is divided into a training set, a validation set, and a test set according to the proportions of 80%, 10%, and 10%, respectively.
[0067] In Step 151, the standard deviation is defined. The Gaussian linear reflectance spectrum curves are parameterized to construct a set of Gaussian-like spectral datasets, which serve as Gaussian-type spectra; This represents the Gaussian spectrum obtained through a Gaussian line-type processor;
[0068] The process of training the DNN reverse-engineered network in Step 152 includes:
[0069] By minimizing the Euclidean distance between the input Gaussian spectrum and the predicted spectrum generated by the trained GLSAT forward prediction network, the weights and biases of each fully connected hidden layer in the deep neural network are iteratively updated, while keeping the network parameters of the trained GLSAT forward prediction network unchanged, and the network parameters in the deep neural network are gradually optimized until an optimized DNN inverse design network is obtained.
[0070] Introducing weighting factors W S This enhances the impact of peak features on prediction results, enabling the network to prioritize capturing key spectral characteristics. W S It is given by the following formula:
[0071] ;
[0072] The training of the DNN inverse design network uses a loss function defined by the following formula. :
[0073] ,
[0074] in, This represents the number of training set samples for the DNN reverse-engineered network. This represents the resonant metasurface structure parameters generated by the DNN inverse design network. = This represents the resonant metasurface structure parameter values selected in Step 120;
[0075] The optimization performance index of the DNN inverse design network is defined by the following formula:
[0076] ;
[0077] In Step 160, the optimized DNN inverse design network is used to generate the resonant metasurface structure parameters with high reflectivity in the target band in one go, according to the design requirements of the ideal spectrum prediction.
[0078] Furthermore, this invention also protects a resonant metasurface design device based on spectral sensing improvement, which designs a resonant metasurface using the steps of the aforementioned method, and the device includes the following modules:
[0079] The first module is used to design a GLSAT forward prediction network to achieve forward prediction from resonant metasurface structure parameters to ideal spectra and obtain the predicted spectra. The design of the GLSAT forward prediction network is based on a multi-head attention mechanism improved by spectral perception. The GLSAT forward prediction network includes an FCL module for dimensional expansion and a dual Transformer module for feature decomposition and extraction of high-dimensional spectra.
[0080] The second module is used to select a dataset of resonant metasurface structure parameters based on the predictive design requirements for achieving the ideal spectral response, and to train and optimize the GLSAT forward prediction network to obtain a trained GLSAT forward prediction network.
[0081] The third module is used to design a DNN inverse design network to achieve the design of resonant metasurface structure parameters that meet the ideal spectral response; the DNN inverse design network is implemented based on a deep neural network design algorithm.
[0082] The fourth module is used to cascade the DNN inverse design network with the trained GLSAT forward prediction network to construct a cascaded inverse design network from the ideal spectrum to the resonant metasurface structure parameters; the cascaded inverse design network includes a Gaussian line spectrum generator that preprocesses the ideal spectrum, the DNN inverse design network, and the trained GLSAT forward prediction network.
[0083] The fifth module is used to input the ideal spectrum used as the training set into the cascaded inverse design network, train and optimize the DNN inverse design network until a cascaded inverse design network that meets the design accuracy requirements is obtained.
[0084] The sixth module is used to input a set of ideal spectra based on real-world design requirements into the cascaded inverse design network to meet the design accuracy requirements. Using the DNN inverse design network in the cascaded inverse design network, the resonant metasurface structure parameters that meet the ideal spectral response are generated to complete the design of the resonant metasurface.
[0085] In summary, this invention provides a resonant metasurface design method and apparatus based on spectral sensing improvement. Compared with the prior art, the method of this invention mainly achieves the following improvements and significant effects:
[0086] 1) By designing a forward prediction network with a GLSAT forward prediction network, and testing and optimizing the GLSAT forward prediction network, the prediction process from resonant metasurface structure parameters to ideal spectra is accelerated. In particular, the design of the dual Transformer module in the GLSAT forward prediction network: using the GPT module, a cross-attention mechanism is used to extract features and perform multi-head attention analysis on the global perception of the spectrum; using the LPT module, a self-attention mechanism is used to extract features and perform multi-head attention analysis on the local perception of the spectrum. The dual Transformer module design achieves significant performance improvement in quickly capturing global correlations and local details of high-dimensional spectral data.
[0087] 2) By considering the different requirements of single-band and double-band reflection peaks for high reflectivity in the ideal spectrum, a DNN inverse design network capable of handling different targets is designed to achieve inverse design optimization. By inputting the prediction results of the GLSAT forward prediction network into the testing and optimization of the DNN inverse design network, the DNN inverse design network is cascaded with the optimized GLSAT forward prediction network, thereby further improving the prediction accuracy of spectral sensing.
[0088] Therefore, the algorithm complexity of the aforementioned method of the present invention is limited. While saving computational costs, it improves the efficiency and accuracy of resonant metasurface design based on spectral sensing, and is expected to be applied to the development of rapid and accurate resonant metasurface devices. Attached Figure Description
[0089] Figure 1 A flowchart illustrating a resonant metasurface design method based on spectral sensing improvement, provided in the first embodiment of the present invention;
[0090] Figure 2 This is a schematic diagram of the algorithm architecture of the GLSAT forward prediction network in the first embodiment of the present invention, wherein, and They are all data dimensions. It is a dimension of standardized spectral data. It represents the distance between the periodic arrangement of resonant metasurface units. The Global Perception Transformer is the GPT module used for global perception, while the Local Perception Transformer is the LPT module used for local perception. This represents the attention score obtained in the GPT module. This is the number of headers in the GPT module. This represents the attention score obtained in the LPT module. This is the number of headers in the LPT module;
[0091] Figure 3This is a schematic diagram of the algorithm architecture of the dual Transformer module in the first embodiment of the present invention, where ProjectMatrix represents the projection matrix. , It is a key vector. It is a value vector, in the GPT module. In the LPT module , and These represent the attention results in the GPT and LPT modules, respectively. W G This is a weight parameter matrix related to all heads. Intra-block represents the cross-interaction between data modules, Intro-block represents the interaction within data modules, Contact is the concatenation function, Coarse-tune is the coarse-tuning layer, and Fine-tune is the fine-tuning layer. The data dimensions of both the coarse-tuning and fine-tuning layers are 1. Layer Norm 1 is the first normalization layer, Layer Norm 2 is the second normalization layer, Feed Forword is a feedforward network, and LeakyReLU is an activation function that introduces nonlinearity.
[0092] Figure 4 This is a schematic diagram of the algorithm architecture of the DNN inverse design network in the first embodiment of the present invention, wherein GSSG is a Gaussian line spectrum generator;
[0093] Figure 5 This is a schematic diagram of the algorithm architecture of the cascaded reverse design network in the first embodiment of the present invention, where Loss represents the error between the input and output data characterized by the loss function, and GLSAT refers to the GLSAT forward prediction network.
[0094] Figure 6 This is a schematic diagram of the algorithm architecture of the DNN reverse design network in the second embodiment of the present invention, wherein, It is the diameter of the cylinder. Is height and is The distance between adjacent cylinders;
[0095] Figure 7 This is a schematic diagram of the algorithm architecture of the DNN reverse design network in the second embodiment of the present invention;
[0096] Figure 8This diagram illustrates the comparison between the original and predicted spectra obtained through simulation of the second embodiment of the present invention. MAE represents the mean absolute error, and (a)-(h) represent the comparison curves between the original and predicted spectra obtained through simulation when MAE is 0.0032, 0.0067, 0.0042, 0.0034, 0.0048, 0.055, 0.0020, and 0.0031, respectively. It is the original spectrum. It predicts the spectrum;
[0097] Figure 9 This is a histogram showing the distribution of the absolute value error range of spectral points obtained through simulation of the second embodiment of the present invention.
[0098] Figure 10 This is a schematic diagram comparing the Gaussian spectra obtained from simulations under different structural parameter conditions in the second embodiment of the present invention with the predicted spectra. Data representing Gaussian spectra, Indicates the predicted spectrum, It is the original spectrum. It is a simulated spectrum. Detailed Implementation
[0099] To make the objectives, technical solutions, and advantages of this invention clearer, the invention will be further described in detail below with reference to the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are for illustrative purposes only and are not intended to limit the invention. For example, terms such as "upper" and "lower" used to describe orientation are only used to describe the positional relationship in the accompanying drawings of this invention when referring to the network algorithm architecture involved in the method steps of this invention, and should not be used to limit the technical features of the method or apparatus of this invention itself.
[0100] In the first embodiment, referring to Figure 1 As shown, this invention proposes a resonant metasurface design method based on spectral sensing improvement, the method specifically including the following steps:
[0101] Step 110: Design a GLSAT forward prediction network to achieve forward prediction from resonant metasurface structure parameters to ideal spectra and obtain the predicted spectra; the design of the GLSAT forward prediction network is based on a multi-head attention mechanism improved by spectral perception; the GLSAT forward prediction network includes an FCL module for dimensional expansion and a dual Transformer module for feature decomposition and extraction of high-dimensional spectra.
[0102] Step 120: Based on the prediction design requirements for achieving the ideal spectral response, select the dataset of resonant metasurface structure parameters, train and optimize the GLSAT forward prediction network to obtain the trained GLSAT forward prediction network.
[0103] Step 130: Design a DNN inverse design network to realize the design of resonant metasurface structure parameters that satisfy the ideal spectral response; the DNN inverse design network is implemented based on the design algorithm of a deep neural network;
[0104] Step 140: Cascade the DNN inverse design network with the trained GLSAT forward prediction network to construct a cascaded inverse design network from ideal spectrum to resonant metasurface structure parameters; the cascaded inverse design network includes a Gaussian line spectrum generator that preprocesses the ideal spectrum, a DNN inverse design network, and a trained GLSAT forward prediction network.
[0105] Step 150: Input the ideal spectrum used as the training set into the cascaded inverse design network, train and optimize the DNN inverse design network until a cascaded inverse design network that meets the design accuracy requirements is obtained;
[0106] Step 160: Input a set of ideal spectra based on real-world design requirements into the cascaded inverse design network to meet the design accuracy requirements. Use the DNN inverse design network in the cascaded inverse design network to generate resonant metasurface structure parameters that meet the ideal spectral response, thus completing the design of the resonant metasurface.
[0107] Specifically, in Step 110, the algorithm architecture of the GLSAT forward prediction network is as follows: Figure 2 As shown, the FCL module employs multiple residual modules with fully connected layer structures to implement three-stage dimensional expansion. The fully connected layer structure contains multiple linear layers. The residual modules include at least three types: a first residual module, a second residual module, and a third residual module. The three-stage dimensional expansion specifically includes: firstly, the initial... The parameters of the 2D resonant metasurface structure are extended to 2D. The two first residual modules, of which The number of structural parameters representing the resonant metasurface; then the first residual module is expanded to a dimension. The second residual module; then the second residual module is further expanded into a dimension. The third residual module, in which Representing the spectral dimension, each linear layer is followed by the LeakyReLU activation function, which introduces a nonlinear factor and has a negative slope. .
[0108] Furthermore, the dual Transformer module includes a Global Perception Transformer (GPT module) and a Local Perception Transformer (LPT module). The GPT module is used to extract the correlation between spectral fragments, and the LPT module is used to refine the spectral details within each spectral fragment. The design of the dual Transformer module decomposes high-dimensional spectral data into global and local features, and extracts all features through a multi-head attention mechanism. Specifically, the global features are extracted through the cross-attention mechanism of the GPT module using interactive multi-head attention analysis of spectral fragments, and the local features are extracted through the self-attention mechanism of the LPT module using inline multi-head attention analysis of spectral fragments. This results in a significant performance improvement in rapidly capturing global correlations and local details of high-dimensional spectral data.
[0109] like Figure 2 As shown, before the output data of the FCL module enters the dual Transformer module, it first undergoes data standardization through a fully connected layer structure, with a data dimension of [missing information]. The data is then processed using a projection matrix to obtain the query vector required by the multi-head attention mechanism. Key vector Sum value vector , ,in This represents the total number of spectral fragments (tokens).
[0110] Furthermore, such as Figure 2 As shown, the output data of the FCL module, after being normalized and processed by the projection matrix, enters the dual Transformer module for further processing. This process includes:
[0111] (i) The first stage, such as Figure 3 As shown, the data enters the GPT module for processing, including dividing the spectral data into... We have several tokens, and then we perform multi-head attention analysis on these tokens using a cross-attention mechanism.
[0112] This uses a cross-attention mechanism to capture the attention of token interactions, and the attention score is calculated. and attention results Calculated using the following formulas (1) and (2):
[0113] (1)
[0114] (2)
[0115] in, Representation matrix The transpose, and
[0116] (3)
[0117] here This represents finding the transpose of a matrix; the attention score By calculating the matrix and The dot product of the transpose, then divided by The square root is then taken using the Softmax function; the Softmax function is a commonly used function in machine learning and deep learning, used to convert a vector or matrix of data into probability values.
[0118] When performing matrix multiplication, all Metropolis and Data interaction occurs, and the results of multi-head attention analysis are obtained by combining the attention results of all heads. When spliced together, the specific calculation is as follows (4):
[0119] (4)
[0120] The Contact function is a tensor concatenation function used to achieve multiple attention results. splicing; It is the first Attention results for each head, with the number of heads being [number missing]. , It is a weight parameter matrix associated with all heads. The multi-head-based cross-attention mechanism enables the GLSAT forward prediction network to quickly capture global dependencies between spectral segments, thereby providing coarse tuning for global spectral perception.
[0121] (ii) Second stage, such as Figure 3 The data shown is processed by the LPT module, including the use of... m The self-attention mechanism of each attention head performs multi-head attention analysis on a single token. This self-attention mechanism can quickly capture the relationships within each spectral segment.
[0122] The calculation of attention score is similar to that of the GPT module, but the data used in the query vector, key vector and value vector are all from the same spectral segment, and the calculation results are obtained by the Sigmoid function, as shown in the following formulas (5) and (6):
[0123] (5)
[0124] (6)
[0125] The Sigmoid function is an S-shaped activation function whose output value is in... between.
[0126] Attention results Depend on and Description of the Hadamard product:
[0127] (7)
[0128] In the above calculation process, Only contains and The information, and Include , and Information, ,here , and They all originate from the same spectral segment.
[0129] Subsequently, the Contact function is used to collect the attention results from all heads. The results of the multi-head attention analysis are obtained by combining the results, as shown in the following formula (8):
[0130] (8)
[0131] in, Indicates the number of heads. It is the first Attention results of each head It is a weight parameter matrix associated with all heads. The multi-head-based self-attention mechanism rapidly captures the connections within each spectral segment, thereby enabling local spectral sensing to provide fine-tuning of the spectrum.
[0132] Furthermore, such as Figure 3As shown, the data processing procedure of the GPT module or LPT module includes: after obtaining the multi-head attention analysis results, the results are adjusted by the coarse-tuning layer or fine-tuning layer in the system and then passed to a normalized feedforward (NFF) layer to achieve multi-layer normalization processing of the data. The normalized feedforward layer has a multi-layer structure, specifically including from top to bottom: a first normalization layer (Layer Norm 1), used to ensure the stability of the feature distribution and improve the convergence performance of the model; a feedforward network (FFN) composed of fully connected layers, used to perform nonlinear transformation and further extract features; a second normalization layer (Layer Norm 2), used for stable gradient propagation; and an activation function LeakyReLU (Leaky Rectified LinearUnit), used to introduce nonlinearity and prevent gradient vanishing. During the process of data entering the NFF and undergoing multi-level normalization, after the data is transmitted from the Layer Normal 1 to the FFN, the input and output of the FFN are fused using a residual connection method to ensure that the input information of the data can be preserved.
[0133] (iii) Finally, as Figure 2 As shown, the data output by the NFF is smoothed through a one-dimensional convolutional layer between the GPT module and the LPT module, as well as between the LPT module and the data output layer, to reduce high-frequency fluctuations in the predicted spectral curve.
[0134] Preferably, the process of training and optimizing the GLSAT forward prediction network in Step 120 includes:
[0135] Step 121: According to the design requirements for achieving the ideal spectral response, select the dataset of resonant metasurface structure parameters, and divide the dataset into training set, validation set and test set according to the proportions.
[0136] Step 122: The GLSAT forward prediction network is trained and optimized using the AdamW optimizer, and the initial value of the learning rate in the AdamW optimizer is set to 0.0005; an L2 regularization (weight decay) function module is added to the optimizer to reduce overfitting.
[0137] Step 123: Evaluate the optimization effect of the GLSAT forward prediction network.
[0138] Specifically, during the training of the GLSAT forward prediction network, the learning rate is adjusted using cosine annealing scheduling, gradually decreasing according to a cosine function. The period of the cosine annealing scheduling is consistent with the total number of training rounds, ensuring that the learning rate... The weights gradually decay during each training epoch. This strategy helps the model converge smoothly by making large updates early in training and then gradually refining the weights to approach the optimal solution. The use of the AdamW optimizer decouples weight decay from gradient updates, allowing for more efficient application of weight decay in each iteration, thus improving convergence speed and generalization ability. The loss function in the AdamW optimizer... Mean square error (MSE) is used to measure the predicted spectrum. Compared with the original spectrum obtained from actual simulation The difference between them, the loss function It is given by the following formula:
[0139] (9)
[0140] in, This represents the number of samples in the training set.
[0141] Furthermore, when evaluating the optimization performance of the GLSAT forward prediction network, the metrics on the validation set are calculated using the mean absolute error (MAE). The metrics are used to provide robust evaluation results of network optimization performance. It is given by the following formula:
[0142] (10)
[0143] in, This indicates the number of samples in the validation set.
[0144] Specifically, the algorithm architecture for the DNN reverse design network described in Step 130 is as follows: Figure 4 As shown, the DNN inverse design network is based on a deep neural network (DNN) and is used to design resonant metasurface structures that achieve ideal spectral responses. The input layer of the DNN inverse design network contains spectral data, which is generated by... Composed of several reflection spectral points, the output layer generates one. The vector stores the corresponding data of the resonant metasurface structure parameters. The DNN consists of three consecutive fully connected hidden layers (linear layers), each containing... , and One neuron.
[0145] Specifically, in Step 140, to address the non-convergence problem caused by non-unique solutions, the fully trained GLSAT forward prediction network is cascaded with the DNN inverse design model, and then combined with a Gaussian-shape spectrum generator (GSSG), as follows: Figure 5 As shown, a cascaded reverse design network is constructed. Figure 5 The algorithm architecture of the cascaded inverse design network is presented, where GSSG is used to establish the correspondence between the response of the ideal spectrum and the near-physically realizable spectrum.
[0146] To obtain the ideal spectrum, it is necessary to determine the required threshold ( ). I demand The dataset of the original spectra is filtered to generate an ideal spectrum containing only 0 or 1 binarized values; the filtering threshold can be set to 0.9.
[0147] Specifically, in Step 150, the ideal spectrum used as the training set is input into the cascaded inverse design network to train and optimize the DNN inverse design network until a cascaded inverse design network that meets the design accuracy requirements is obtained. This process includes:
[0148] Step 151: Preprocess the ideal spectrum using the GSSG to obtain a Gaussian spectrum: By constructing a set of Gaussian-like spectral datasets that correspond to the response of the ideal spectrum, the gap between the ideal spectrum and the physically realizable spectrum is reduced.
[0149] Step 152: Input the Gaussian spectrum Figure 5 The cascaded architecture of the DNN inverse design network and the trained GLSAT forward prediction network shown includes training and optimizing the DNN, including:
[0150] The Gaussian spectrum is input into a DNN inverse design network, and the resonant metasurface structure parameters are designed and generated using the DNN inverse design network, and the data is output.
[0151] The above output data is used as input data for the trained GLSAT forward prediction network to generate a prediction spectrum;
[0152] The input Gaussian spectrum is compared with the output predicted spectrum to calculate the loss function. By minimizing the gradient descent of the loss function, the parameters of the DNN are optimized, thereby improving the accuracy of the design of resonant metasurface structure parameters in the DNN inverse design network.
[0153] In the second embodiment of the present invention, a narrowband filtering reflective resonant metasurface for an alkali metal laser with a linewidth of 10 nm and a wavelength of 795 nm is specifically designed using the steps of the resonant metasurface design method described in the first embodiment. That is, the prediction requirement for the ideal spectral response mainly meets the requirements of the designed resonant metasurface in terms of the wavelength and intensity of the reflection peak; at this point, the ideal spectrum reflects the characteristic requirements of the reflection spectrum. Therefore, the dataset selected in Step 120 is the structural parameters corresponding to the resonant metasurface on a square lattice diamond structure silicon dioxide substrate. These structural parameters include: the diameter of the cylinder... ,high Distance between adjacent cylinders The resonant metasurface is composed of multiple resonant metasurface units with identical structures arranged periodically. The specific structural parameters are as follows: Figure 6 Middle coordinate system The resonant metasurface unit structure diagram is shown, and the dimensional variables of the structural parameters are... 3. Dimensional variables Set training rounds . Figure 7 This is the algorithm architecture of the cascaded reverse design network constructed in this embodiment. Considering the limitations of actual manufacturing and the diameter... It must be less than the distance of the periodic arrangement of cylinders. The system performs a parameter scan on the three independent structural parameters and samples them uniformly within a defined range, as shown in Table 1.
[0154] Table 1 Structural Data Scan Range
[0155]
[0156] Specifically, in Step 121, the selected dataset is divided into a training set, a validation set, and a test set according to a ratio of 80%, 10%, and 10%, respectively.
[0157] Furthermore, in Step 122, using Store the predicted spectra generated by the GLSAT forward prediction network.
[0158] In Step 151, considering that the reflectance spectrum usually exhibits a Gaussian linear shape and has a high reflectance spectral bandwidth, the standard deviation is further defined. The Gaussian curves are parameterized to construct a set of Gaussian-like reflectance spectra, which serve as Gaussian-type spectra; This refers to the Gaussian spectrum obtained through GSSG processing.
[0159] Furthermore, for a single-peak spectrum, its Gaussian spectral curve function is shown in formula (11), and for a double-peak spectrum, its Gaussian spectral curve function is shown in formula (12):
[0160] (11)
[0161] (12)
[0162] In Step 152, during the training of the DNN inverse network, a weighting factor is introduced, given the critical importance of the reflection peak in metasurface filter design. W S This enhances the impact of peak features on prediction results, enabling the network to prioritize the capture of key spectral characteristics. W S The following formula (13) gives the answer:
[0163] (13)
[0164] It should be noted that for other applications, such as broadband filters and transmission filters, the weighting factor can be adjusted or even the loss function can be changed to meet specific ideal spectral response requirements.
[0165] Furthermore, by minimizing the Euclidean distance between the predicted spectrum and the input Gaussian spectrum, the weights and biases of each linear layer in the DNN are iteratively updated, while the network parameters of the pre-trained GLSAT forward prediction network remain unchanged. As training progresses, the network parameters in the DNN are progressively optimized until an optimized DNN inverse design network is obtained.
[0166] Preferably, the training of the DNN uses a loss function defined by the following formula (14),
[0167] , (14)
[0168] in, This represents the number of training set samples for the DNN reverse-engineered network. This represents the parameter values of the resonant metasurface structure generated by the DNN inverse design network. = This represents the parameter values of the resonant metasurface structure selected in Step 120. It can be seen that the loss function... It consists of two parts: structural parameter loss and spectral data loss, which are weighted by a factor. Combine them.
[0169] During the training and optimization of the DNN, the optimization performance metric is defined by the following formula:
[0170] (15)
[0171] The indicators By rigorously evaluating the reproducibility accuracy of the ideal spectrum, the effectiveness and reliability of the model are ensured.
[0172] Finally, through Step 160, the optimized DNN inverse design network can be used to generate the resonant metasurface structure parameters with high reflectivity in the target band on demand in one go.
[0173] For the second embodiment, simulations were performed using Lumerical FDTD numerical simulation software to generate the original spectrum in the wavelength range of 700–1100 nm, containing 300 equidistant wavelength points. Ultimately, 2120 sets of sample data were obtained, including high reflectivity spectra with single-band or double-band reflection peaks. Subsequent algorithm performance verifications for all networks were based on this dataset.
[0174] To verify the accuracy of the data-driven cascaded reverse design network, this invention uses 212 unused test data samples in the dataset. The difference at each spectral point is measured again using absolute error, with an average value of only 0.0063. The results of comparing the original spectrum obtained from simulation with the predicted spectrum are as follows: Figure 8 As shown, the difference between the two is quantified by the different mean absolute errors (MAE) between the spectra, and is labeled in... Figure 8 Above each comparison plot in (a)-(h), the absolute error at each spectral point is represented by the shaded area in the plot, further demonstrating the high accuracy of the GLSAT forward training network. Figure 9 The diagram shows the histogram of the absolute error range distribution for each spectral point, further illustrating that the cascaded inverse design network designed in the method of this invention can achieve the high-precision prediction requirement of the ideal spectral response, thus fully demonstrating the high performance of the method steps in realizing the design of resonant metasurfaces based on spectral sensing improvement.
[0175] To further illustrate the forward prediction performance of the GLSAT forward prediction network designed in this invention, simulations and comparisons were conducted on multiple existing metasurface design datasets. The comparative experimental data between the GLSAT forward prediction network and existing technologies are shown in Table 2.
[0176] Table 2. Experimental Comparison Data Between GLSAT Forward Prediction Network and Existing Technologies
[0177]
[0178] Among them: the data in the columns containing diamond mirrors and silicon carbide mirrors are experimental data using the technical solution of this invention, while the data in the columns corresponding to ultrasonic absorbers, four-resonator metasurfaces, nanospheres, silicon cylindrical metasurfaces, and H-type silicon cylindrical metasurfaces are experimental data using existing technologies.
[0179] Table 2 shows the forward prediction results of the GLSAT forward prediction network in the method described in the second embodiment on different datasets provided by the present invention and the aforementioned prior art. The dimensions of the resonant metasurface structure parameters corresponding to these datasets range from a minimum of 3 to a maximum of 2002, and the number of samples ranges from a minimum of 2021 to a maximum of 200,000. In the resonant metasurface design method based on spectral sensing improvement provided by the present invention, the algorithm architecture of the designed GLSAT forward prediction network can basically achieve high-precision prediction on these datasets, indicating that the GLSAT forward prediction network has strong generalization ability.
[0180] As can be seen from the last row of the table, except for the silicon cylindrical metasurface dataset in the prior art, which is uncomparable due to the loss of spectral detail caused by its downsampling processing from spectral dimensions from 301 to 31, the GLSAT forward prediction network designed in the resonant metasurface design method provided by this invention achieves performance improvements on all other prior art datasets in Table 2. This demonstrates that the GLSAT forward prediction network designed in this invention has high ideal spectral prediction accuracy.
[0181] In Step 160 of the second embodiment, the parameters of the resonant metasurface structure obtained by using the optimized DNN inverse design network are obtained, and the corresponding predicted spectrum is obtained by using the optimized GLSAT forward prediction network. and the Compared with the Gaussian spectrum data initially generated by GSSG A comparison was made, and the results are as follows: Figure 10 As shown. Furthermore, to further verify the effectiveness of the method described in this invention, the resonant metasurface structure parameters predicted by the DNN inverse design network were used, and the corresponding simulated spectra were calculated again through FDTD simulation. and compared with the original spectrum before GSSG processing. A comparison was made, and the results are as follows: Figure 10 As shown. The results show that the DNN inverse design network designed in the method of the present invention can effectively predict the structural parameters of the resonant metasurface that meet the ideal spectral response requirements, and the predicted spectrum is in high agreement with the ideal spectral response requirements of the narrowband filtered reflective resonant metasurface.
[0182] In a third embodiment, the present invention protects a resonant metasurface design device based on spectral sensing improvement. The device designs a resonant metasurface using the steps of the aforementioned method. The device includes the following modules:
[0183] The first module is used to design a GLSAT forward prediction network to achieve forward prediction from resonant metasurface structure parameters to ideal spectra and obtain the predicted spectra. The design of the GLSAT forward prediction network is based on a multi-head attention mechanism improved by spectral perception. The GLSAT forward prediction network includes an FCL module for dimensional expansion and a dual Transformer module for feature decomposition and extraction of high-dimensional spectra.
[0184] The second module is used to select a dataset of resonant metasurface structure parameters based on the predictive design requirements for achieving the ideal spectral response, and to train and optimize the GLSAT forward prediction network to obtain a trained GLSAT forward prediction network.
[0185] The third module is used to design a DNN inverse design network to achieve the design of resonant metasurface structure parameters that satisfy the ideal spectral response; the DNN inverse design network is implemented based on a deep neural network design algorithm.
[0186] The fourth module is used to cascade the DNN inverse design network with the trained GLSAT forward prediction network to construct a cascaded inverse design network from the ideal spectrum to the resonant metasurface structure parameters; the cascaded inverse design network includes a Gaussian line spectrum generator that preprocesses the ideal spectrum, the DNN inverse design network, and the trained GLSAT forward prediction network.
[0187] The fifth module is used to input the ideal spectrum used as the training set into the cascaded inverse design network, train and optimize the DNN inverse design network until a cascaded inverse design network that meets the design accuracy requirements is obtained.
[0188] The sixth module is used to input a set of ideal spectra based on real-world design requirements into the cascaded inverse design network to meet the design accuracy requirements. Using the DNN inverse design network in the cascaded inverse design network, the resonant metasurface structure parameters that meet the ideal spectral response are generated to complete the design of the resonant metasurface.
[0189] Compared with existing technologies, this invention provides a resonant metasurface design method and apparatus based on spectral sensing improvement. By combining global and local spectral sensing capabilities, it effectively solves the problem of information loss in the process of converting low-dimensional structural data into high-dimensional spectral prediction; it reduces model complexity and computational cost, while improving the accuracy and efficiency of spectral prediction and reverse design. Another aspect of the technological improvement is that it can achieve higher prediction accuracy with a relatively small number of dataset samples.
[0190] In one embodiment, the present invention provides a computer device including a memory and a processor. The memory stores a computer program, and the processor executes the computer program to implement the steps of the spectrally sensing-based improved resonant metasurface design method provided in any of the above embodiments. The computer device may be a server. The computer device includes a processor, a memory, a network interface, and a database connected via a system bus. The processor of the computer device provides computational and control capabilities. The memory of the computer device includes a non-volatile storage medium and internal memory. The non-volatile storage medium stores an operating system, computer programs, and a database. The internal memory provides an environment for the operation of the operating system and computer programs in the non-volatile storage medium. The database of the computer device stores sample data. The network interface of the computer device is used for communication with external terminals via a network connection.
[0191] On the other hand, the present invention provides a computer-readable storage medium having a computer program stored thereon, wherein the computer program, when executed by a processor, implements the steps of the resonant metasurface design method based on spectral sensing improvement provided in any of the above embodiments.
[0192] Those skilled in the art will understand that all or part of the processes in the methods of the above embodiments can be implemented by a computer program instructing related hardware. The computer program can be stored in a non-volatile computer-readable storage medium. When executed, the computer program can include the processes of the embodiments of the above methods. Any references to memory, storage, databases, or other media used in the embodiments provided in this application can include non-volatile and / or volatile memory. Non-volatile memory may include read-only memory (ROM), programmable ROM (PROM), electrically programmable ROM (EPROM), electrically erasable programmable ROM (EEPROM), or flash memory. Volatile memory may include random access memory (RAM) or external cache memory. By way of illustration and not limitation, RAM is available in a variety of forms, such as static RAM (SRAM), dynamic RAM (DRAM), synchronous DRAM (SDRAM), dual data rate SDRAM (DDRSDRAM), enhanced SDRAM (ESDRAM), synchronous link DRAM (SLDRAM), RAMbus direct RAM (RDRAM), direct memory bus dynamic RAM (DRDRAM), and memory bus dynamic RAM (RDRAM), etc.
[0193] Matters not covered in this invention are common knowledge.
[0194] The technical features of the above embodiments can be combined in any way. For the sake of brevity, not all possible combinations of the technical features in the above embodiments are described. However, as long as there is no contradiction in the combination of these technical features, they should be considered to be within the scope of this specification.
[0195] The embodiments described above are merely illustrative of several implementations of the present invention, and while the descriptions are specific and detailed, they should not be construed as limiting the scope of the invention. It should be noted that those skilled in the art can make various modifications and improvements without departing from the concept of the present invention, and these all fall within the scope of protection of the present invention. Therefore, the scope of protection of this application should be determined by the appended claims.
[0196] The above description is merely a preferred embodiment of the present invention and is not intended to limit the invention. Various modifications and variations can be made to the present invention by those skilled in the art. Any modifications, equivalent substitutions, improvements, etc., made within the spirit and principles of the present invention should be included within the scope of protection of the present invention.
Claims
1. A resonant metasurface design method based on spectral sensing improvement, characterized in that, The method includes the following steps: Step 110: Design a GLSAT forward prediction network to achieve forward prediction from resonant metasurface structure parameters to ideal spectra and obtain the predicted spectra; the design of the GLSAT forward prediction network is based on a multi-head attention mechanism improved by spectral perception; the GLSAT forward prediction network includes an FCL module for dimensional expansion and a dual Transformer module for feature decomposition and extraction of high-dimensional spectra. The FCL module comprises multiple residual modules with fully connected layer structures to implement three-stage dimensionality expansion. Each fully connected layer structure contains multiple linear layers. The residual modules include at least three types: a first residual module, a second residual module, and a third residual module. Each linear layer of any residual module is followed by an activation function, LeakyReLU, to introduce nonlinearity and mitigate gradient vanishing; its negative slope is taken as... ; The dual Transformer module is used to extract global and local features of high-dimensional spectral data, and extracts all features through a multi-head attention mechanism. The dual Transformer module includes a GPT module for global perception and an LPT module for local perception. The multi-head attention mechanism includes a cross attention mechanism for the GPT module to extract global features to achieve interactive multi-head attention analysis of spectral fragments, and a self-attention mechanism for the LPT module to extract local features to achieve inline multi-head attention analysis of spectral fragments. Step 120: Based on the prediction design requirements for achieving the ideal spectral response, select the dataset of resonant metasurface structure parameters, train and optimize the GLSAT forward prediction network to obtain the trained GLSAT forward prediction network. Step 130: Design a DNN inverse design network to design the parameters of a resonant metasurface structure that satisfies the ideal spectral response; the DNN inverse design network is implemented based on a deep neural network design algorithm; the input layer of the DNN inverse design network contains spectral data, which is generated by... Composed of spectral points, the output layer generates a... The vector stores the corresponding data of the resonant metasurface structure parameters; the deep neural network consists of three consecutive fully connected hidden layers with fully connected layer structures, each of which contains... , and 10 neurons; among them, Indicates the number of structural parameters of the resonant metasurface. Represents spectral dimensions; Step 140: Cascade the DNN inverse design network with the trained GLSAT forward prediction network to construct a cascaded inverse design network from ideal spectrum to resonant metasurface structure parameters; the cascaded inverse design network includes a Gaussian line spectrum generator that preprocesses the ideal spectrum, a DNN inverse design network, and a trained GLSAT forward prediction network. Step 150: Input the ideal spectrum used as the training set into the cascaded inverse design network, train and optimize the DNN inverse design network until a cascaded inverse design network that meets the design accuracy requirements is obtained; Step 160: Input a set of ideal spectra based on real-world design requirements into the cascaded inverse design network to meet the design accuracy requirements. Use the DNN inverse design network in the cascaded inverse design network to generate resonant metasurface structure parameters that meet the ideal spectral response, thus completing the design of the resonant metasurface.
2. The resonant metasurface design method based on spectral sensing improvement according to claim 1, characterized in that, In Step 110, the GLSAT forward prediction network is used to perform forward prediction from resonant metasurface structure parameters to the ideal spectrum, and the process of obtaining the predicted spectrum includes: Step 111: Utilize the FCL module to extend the dimensionality of the resonant metasurface structure parameters, including: […]. The parameters of the 3D resonant metasurface structure are extended to The two first residual modules, of which This represents the number of parameters of the resonant metasurface structure; the first residual module is expanded to... The second residual module of dimension; further expanding the second residual module to The third residual module of the dimension, in which Represents spectral dimensions; Step 112: Preprocess the output data of the FCL module before it enters the dual Transformer module, including: using a layer with dimension... Data standardization is performed using a fully connected layer structure. The standardized spectral dimensions are used; the standardized data is then processed through a projection matrix to obtain the query vector required by the multi-head attention mechanism. Key vector Sum value vector ,in , This represents the total number of tokens for the spectrum, where each token represents a spectral segment. Step 113: Input the data preprocessed in Step 112 into the dual Transformer module for data processing, including: data processing of the GPT module, data processing of the LPT module, and smoothing of the data by one-dimensional convolutional layers that connect the GPT module and the LPT module, and the LPT module and the data output layer respectively. Step 114: The data, after being smoothed by the one-dimensional convolutional layer connecting the LPT module and the data output layer, is output through the output layer to obtain the predicted spectrum.
3. The resonant metasurface design method based on spectral sensing improvement according to claim 2, characterized in that, In Step 113, The data processing procedure of the GPT module includes: Divide the data into One token; A cross-attention mechanism is used to capture the attention of token interactions, and an attention score is calculated. and attention results Calculated using the following formulas respectively: in, Representation matrix The transpose, and This indicates finding the transpose of a matrix. The Softmax function is used to convert a matrix of data into probability scores. By focusing all the attention of the head The concatenation of these results yields a multi-head attention analysis result based on a cross-attention mechanism, given by the following formula: The Contact function is a tensor concatenation function used to achieve multiple attention results. splicing; It is the first Attention results for each head, with the number of heads being [number missing]. , It is a weight parameter matrix related to all heads; The obtained multi-head attention analysis results This data is then passed to a normalized feedforward layer to implement multi-level normalization processing. The data processing procedure of the LPT module includes: Use inclusion The self-attention mechanism of each attention head will perform multi-head attention analysis on a single token to obtain an attention score. The following formula is given: in, ,all and The data all originate from the same spectral segment. The Sigmoid function is a sigmoid activation function, and its output value is... between; use and The Hadamard product yields attention results. It is given by the following formula: Among them, all , and All data are derived from the same spectral segment; Use the Contact function to collect attention results from all heads When concatenated, the multi-head attention analysis result based on the self-attention mechanism is obtained, given by the following formula: in, Indicates the number of heads. It is the first Attention results of each head It is a weight parameter matrix related to all heads; The obtained multi-head attention analysis results This data is then passed to a normalized feedforward layer to implement multi-level normalization processing.
4. The resonant metasurface design method based on spectral sensing improvement according to claim 3, characterized in that, The normalized feedforward layer comprises two normalization layers, a feedforward network, and an activation function LeakyReLU; the two normalization layers are the first normalization layer and the second normalization layer; the structure of the normalized feedforward layer from top to bottom is as follows: the first normalization layer is used to ensure the stability of the feature distribution and improve the convergence performance of the model; the feedforward network is used to perform nonlinear transformations and further extract features; The second normalization layer is used for stable gradient propagation; the activation function LeakyReLU is used to introduce nonlinear factors to prevent gradient vanishing. During the multi-layer normalization process of the data, after the data is transmitted from the first normalization layer to the feedforward network, the input and output of the feedforward network are fused using a residual connection method to ensure that the input information of the data can be preserved.
5. The resonant metasurface design method based on spectral sensing improvement according to claim 4, characterized in that, In Step 120, according to the predictive design requirements for achieving the ideal spectral response, a dataset of resonant metasurface structure parameters is selected, and the GLSAT forward prediction network is trained and optimized, including: Step 121: Divide the dataset into training set, validation set and test set according to the proportions; Step 122: The GLSAT forward prediction network is trained and optimized using the AdamW optimizer. The initial learning rate in the AdamW optimizer is set to 0.0005, and the learning rate is adjusted using cosine annealing scheduling, gradually decreasing according to the cosine function. An L2 regularization module is added to the AdamW optimizer to mitigate overfitting. The loss function in the AdamW optimizer... The mean square error is used to measure the predicted spectrum. Compared with the original spectrum obtained through simulation The difference between them, the loss function It is given by the following formula: , in, Indicates the number of samples in the training set; Step 123: Using metrics on the validation set The optimization performance of the GLSAT forward prediction network is evaluated; the metrics are... The mean absolute error (MAE) method is used to provide robust evaluation results of network optimization performance. It is given by the following formula: , in, This indicates the number of samples in the validation set.
6. The resonant metasurface design method based on spectral sensing improvement according to claim 5, characterized in that, In Step 150, the process of inputting the ideal spectrum, which serves as the training set, into the cascaded inverse design network to train and optimize the DNN inverse design network until a cascaded inverse design network that meets the design accuracy requirements is obtained includes: Step 151: Use the Gaussian line spectrum generator to preprocess the ideal spectrum to obtain a Gaussian spectrum that is closer to the physically realizable spectrum, including constructing a set of Gaussian-like spectral datasets to obtain Gaussian spectra corresponding to the response of the ideal spectrum. The ideal spectrum is generated by filtering the original spectrum dataset through a predefined requirement threshold, resulting in an ideal spectrum containing only binary values of 0 or 1; the requirement threshold is set to 0.
9. Step 152: Input the Gaussian spectrum into a cascaded architecture of the DNN inverse design network and the trained GLSAT forward prediction network, and train and optimize the DNN inverse design network, including: inputting the Gaussian spectrum into the DNN inverse design network, using the DNN inverse design network to design, generate and output resonant metasurface structure parameters; using the output resonant metasurface structure parameters as input data for the trained GLSAT forward prediction network, generating and outputting predicted spectra; comparing the input Gaussian spectrum with the output predicted spectra, calculating the loss function, and optimizing the parameters of the deep neural network by minimizing the gradient descent of the loss function, thereby improving the accuracy of the DNN inverse design network in designing resonant metasurface structure parameters.
7. The resonant metasurface design method based on spectral sensing improvement according to claim 6, characterized in that, The design requirements for the ideal spectrum prediction meet the requirements of the designed resonant metasurface in terms of wavelength and intensity of the reflection peak, including the design of a narrowband filter reflective resonant metasurface specifically for alkali metal lasers with a linewidth of 10 nm and a wavelength of 795 nm. The dataset selected in Step 120 consists of resonant metasurface structure parameters of a square lattice diamond-structured silicon dioxide substrate, including: the diameter of the cylinder. ,high Distance between adjacent cylinders , among which, diameter Less than distance At this point, the dimensionality of the resonant metasurface structure parameters... Set training rounds ; In Step 121, the dataset is divided into a training set, a validation set, and a test set according to the proportions of 80%, 10%, and 10%, respectively. In Step 151, the standard deviation is defined. The Gaussian linear reflectance spectrum curves are parameterized to construct a set of Gaussian-like spectral datasets, which serve as Gaussian-type spectra; This represents the Gaussian spectrum obtained through a Gaussian line-type processor; The process of training the DNN reverse-engineered network in Step 152 includes: By minimizing the Euclidean distance between the input Gaussian spectrum and the predicted spectrum generated by the trained GLSAT forward prediction network, the weights and biases of each fully connected hidden layer in the deep neural network are iteratively updated, while keeping the network parameters of the trained GLSAT forward prediction network unchanged, and the network parameters in the deep neural network are gradually optimized until an optimized DNN inverse design network is obtained. Introducing weighting factors W S This enhances the impact of peak features on prediction results, enabling the network to prioritize capturing key spectral characteristics. W S It is given by the following formula: ; The training of the DNN inverse design network uses a loss function defined by the following formula. : , in, This represents the number of training set samples for the DNN reverse-engineered network. This represents the resonant metasurface structure parameters generated by the DNN inverse design network. Indicates the weighting factor. = This represents the resonant metasurface structure parameter values selected in Step 120; The optimization performance index of the DNN inverse design network is defined by the following formula: ; In Step 160, the optimized DNN inverse design network is used to generate the resonant metasurface structure parameters with high reflectivity in the target band in one go, according to the design requirements of the ideal spectrum prediction.
8. A resonant metasurface design device based on spectral sensing improvement, characterized in that, The device designs a resonant metasurface using the steps of the method as described in claim 1, and the device includes the following modules: The first module is used to design a GLSAT forward prediction network to achieve forward prediction from resonant metasurface structure parameters to ideal spectra and obtain the predicted spectra. The design of the GLSAT forward prediction network is based on a multi-head attention mechanism improved by spectral perception. The GLSAT forward prediction network includes an FCL module for dimensional expansion and a dual Transformer module for feature decomposition and extraction of high-dimensional spectra. The FCL module comprises multiple residual modules with fully connected layer structures to implement three-stage dimensionality expansion. Each fully connected layer structure contains multiple linear layers. The residual modules include at least three types: a first residual module, a second residual module, and a third residual module. Each linear layer of any type of residual module is followed by an activation function, LeakyReLU, to introduce nonlinearity and mitigate gradient vanishing; its negative slope is... ; The dual Transformer module is used to extract global and local features of high-dimensional spectral data, and extracts all features through a multi-head attention mechanism. The dual Transformer module includes a GPT module for global perception and an LPT module for local perception. The multi-head attention mechanism includes a cross attention mechanism for the GPT module to extract global features to achieve interactive multi-head attention analysis of spectral fragments, and a self-attention mechanism for the LPT module to extract local features to achieve inline multi-head attention analysis of spectral fragments. The second module is used to select a dataset of resonant metasurface structure parameters based on the predictive design requirements for achieving the ideal spectral response, and to train and optimize the GLSAT forward prediction network to obtain a trained GLSAT forward prediction network. The third module is used to design a DNN inverse design network to achieve the design of resonant metasurface structure parameters that satisfy the ideal spectral response. The DNN inverse design network is implemented based on a deep neural network design algorithm. The input layer of the DNN inverse design network contains spectral data, which is... Composed of spectral points, the output layer generates a... The vector stores the corresponding data of the resonant metasurface structure parameters; the deep neural network consists of three consecutive fully connected hidden layers with fully connected layer structures, each of which contains... , and 10 neurons; among them, Indicates the number of structural parameters of the resonant metasurface. Represents spectral dimensions; The fourth module is used to cascade the DNN inverse design network with the trained GLSAT forward prediction network to construct a cascaded inverse design network from the ideal spectrum to the resonant metasurface structure parameters; the cascaded inverse design network includes a Gaussian line spectrum generator that preprocesses the ideal spectrum, the DNN inverse design network, and the trained GLSAT forward prediction network. The fifth module is used to input the ideal spectrum used as the training set into the cascaded inverse design network, train and optimize the DNN inverse design network until a cascaded inverse design network that meets the design accuracy requirements is obtained. The sixth module is used to input a set of ideal spectra based on real-world design requirements into the cascaded inverse design network to meet the design accuracy requirements. Using the DNN inverse design network in the cascaded inverse design network, the resonant metasurface structure parameters that meet the ideal spectral response are generated to complete the design of the resonant metasurface.