Metamaterial surface structure design method based on self-encoding diffusion model

By combining an autoencoder and a diffusion model, the high computational cost and generation ambiguity problems in the reverse design of nanophotonic metamaterials were solved, and efficient and accurate generation of metamaterial surface structures was achieved.

CN121659780APending Publication Date: 2026-03-13NANJING UNIV
View PDF 0 Cites 1 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-12-10
Publication Date
2026-03-13

AI Technical Summary

Technical Problem

Existing technologies for reverse design of nanophotonic metamaterials suffer from high computational costs, ambiguous or biased results, and difficulty in handling complex topological structures, especially with low design efficiency under high-precision requirements.

Method used

We employ an autoencoder diffusion model, combining autoencoders and diffusion models, to achieve high-quality sample generation through a stepwise denoising process, thereby reducing computational complexity. Furthermore, we guide the generation of metamaterial surface structures by using a cross-attention mechanism to guide spectral conditions.

Benefits of technology

It significantly improves the generation accuracy and design efficiency of metamaterial surface structures, and can effectively learn complex topological structures to meet the diverse requirements of high precision.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN121659780A_ABST
    Figure CN121659780A_ABST
Patent Text Reader

Abstract

The invention provides a metamaterial surface structure design method based on a self-encoding diffusion model, and the method comprises the steps: encoding a high-dimensional surface structure to a potential space, and inputting the encoded surface structure to a diffusion model, thereby greatly reducing the training time of the model; in a denoising stage of the diffusion model, a cross attention mechanism is used to introduce a spectral vector, a reconstructed surface structure is generated, a pre-trained forward prediction network is used to output a predicted spectral vector, an error between the predicted spectral vector and a real spectral vector is calculated, and the error is used as a main loss to train a self-encoding diffusion model. Therefore, the model can deeply learn the corresponding relation between the spectral vector and the surface structure of the nano photon metamaterial, and reverse design is realized. After the spectrum vectors in the test set are reversely designed by using the design method, the generated reconstructed surface structure passes through the forward prediction network, the obtained predicted spectrum is highly fitted with the real spectrum, and the problem that the design diversity and the accuracy are difficult to balance in the reverse design in the prior art is solved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention belongs to the field of metamaterial design, specifically relating to a metamaterial surface structure design method based on a self-encoded diffusion model. Background Technology

[0002] Metamaterials are novel functional materials meticulously constructed artificially. Their unique physical properties primarily stem from the spatial arrangement and configuration of their internal microstructures, rather than the chemical nature of their constituent materials. These materials enable the special manipulation of physical fields such as electromagnetic waves and sound waves, demonstrating immense potential in waveguides, stealth, and sensing. Among them, nanophotonic metamaterials, as an important branch, focus on the precise manipulation of light fields at the subwavelength scale. By designing the geometry, size, and arrangement of nanounits, anomalous optical phenomena such as negative refraction and super-resolution imaging can be achieved, providing new pathways for cutting-edge applications such as integrated photonic devices, biosensing, and high-speed optical communication. However, traditional metamaterials typically require arrangement and fabrication in three-dimensional space, leading to problems such as large size and difficulty in fabrication in practical applications. Therefore, metasurfaces have emerged. We consider metasurfaces as two-dimensional structures of metamaterials, overcoming these problems and offering advantages such as low cost and low loss.

[0003] In the design process of nanomaterial photonic metamaterial surface structures, forward prediction refers to extrapolating their spectral information given the surface structure parameters. Currently, mainstream methods still rely on numerical solutions to Maxwell's equations, including the method of moments, the finite element method, and the finite-difference time-domain method. Although these methods offer high accuracy, each solution requires dense mesh generation and iterative calculations, with a single simulation often taking several minutes to hours, severely limiting the efficiency of large-scale design and optimization.

[0004] Correspondingly, inverse design aims to obtain suitable metamaterial surface structures based on spectral information (such as absorption characteristics or phase distribution in specific frequency bands). Traditional methods often employ heuristic search strategies such as genetic algorithms and particle swarm optimization, iteratively selecting the optimal structure in the solution space. While these methods are universal, each redesign requires a complete execution of the search process, resulting in high computational costs and a lack of generalization ability. In recent years, deep learning generative models have provided new ideas for inverse design. For example, generative adversarial networks generate structures through dynamic games between the generator and discriminator, but their training stability is poor and they are prone to pattern collapse. Variational autoencoders encode structure-response relationships into a low-dimensional latent space for sampling and generation; however, the generated results are often fuzzy or biased, making it difficult to meet high-precision requirements.

[0005] Diffusion models, as an emerging generative paradigm, achieve high-quality sample generation through a stepwise denoising process and have yielded significant results in fields such as image and speech processing. However, their application in metamaterial inverse design is still in the exploratory stage, especially in handling complex topologies and multi-objective constraints. Therefore, constructing a novel inverse design framework suitable for nanophotonic metamaterials that can balance generation quality and design efficiency has become a key issue that urgently needs to be addressed in this field. Summary of the Invention

[0006] The purpose of this invention is to address the shortcomings of existing technologies by providing a metamaterial surface structure design method based on an autoencoded diffusion model. This method optimizes and improves the diffusion model to address its long training time and difficulty in learning complex topological structures, thereby significantly improving the accuracy of reconstructed surface structures while maintaining diversity.

[0007] Technical Solution: To solve the aforementioned technical problems and achieve the above-mentioned objectives, this invention proposes a nanophotonic sandwich-type metamaterial surface structure. This structure comprises a top-layer metal resonator, a middle-layer dielectric spacer, and a lower-layer metal reflective substrate. The lower-layer metal reflective substrate has an electrical conductivity of 4.561... The gold (Au) has a thickness of t1; the middle dielectric spacer layer is an F4B dielectric substrate with a relative permittivity of 2.65 and a width of [missing information]. The thickness is t2; the top layer of the metal is a coded pattern area, the width of which is less than t2. The coded pattern area is divided into 64 The 64-element matrix can be encoded using any one of the following antenna shapes: cross, H, open ring, ellipse, bow tie, L, rectangle, or arc.

[0008] Furthermore, the coded pattern metal is the same as the underlying metal base plate, using a metal with an electrical conductivity of 4.561. The gold (Au) has a thickness of t1.

[0009] Furthermore, this invention proposes a reverse design method for the surface structure of nanophotonic metamaterials based on a combination of autoencoders and diffusion models, comprising the following steps:

[0010] S1. Construct the dataset, including 64 The surface encoding matrix of 64 is converted into a binary encoding matrix and the corresponding reflectance spectral vector, and the dataset is divided into training set, validation set and test set according to 8:1:1.

[0011] S2. Construct a positive prediction network model, feed the training set into the model for iterative training, use the validation set to verify and save the best model during the iterative process, and fix the parameters of the positive prediction network model.

[0012] S3. Construct the inverse design network of AEDM that combines autoencoder and diffusion model, and initialize the network parameters; feed the training set into the AEDM model for iterative training, and use the validation set to verify and save the best AEDM model and fix the parameters during the iterative training process;

[0013] S4. Input the real spectral vectors from the test set into the denoising network of the AEDM model to obtain the predicted surface structure. Then, input the predicted spectral vectors into the trained forward prediction network model to verify the overall performance of the network.

[0014] Furthermore, the method for step S1 is as follows:

[0015] S11. Collect grayscale pattern samples of eight shapes—cross, H, open ring, ellipse, bow tie, L, rectangle, and arc—on the surface of a nanophotonic metamaterial, and convert the grayscale patterns into 64-bit grayscale patterns. 64 1. A binary encoding matrix is ​​used to construct the corresponding metamaterial surface structure. The matrix is ​​then fed into electromagnetic simulation software to obtain the corresponding reflection spectrum curve. The frequency range is set to 60~160Thz.

[0016] S12. The obtained reflectance spectrum curve is sampled at intervals within the range of 60~160Thz. Uniform frequency sampling at THz can yield an N-dimensional reflectance spectral vector, where N is a positive integer;

[0017] S13. The N-dimensional real part vector and N-dimensional imaginary part vector are calculated from the spectral vector. The real part Re and the imaginary part Im of the spectral vector of the metamaterial surface structure have the following correspondence with the amplitude A and the phase φ:

[0018]

[0019] ;

[0020] The real and imaginary vectors serve as both labels for the forward prediction network and as one of the inputs to the autoencoder diffusion AEDM model.

[0021] Furthermore, the method for step S2 is as follows:

[0022] S21. Construct a forward prediction network model, which consists of a feature extraction network and two parallel spectral vector prediction modules. The feature extraction network is used to extract the features of the transformed binary encoding matrix and outputs a 512-dimensional feature vector. The two parallel spectral prediction modules are the real part spectral prediction module and the imaginary part spectral prediction module, respectively. Both accept the 512-dimensional feature vector and output N-dimensional real part prediction vector and imaginary part prediction vector, respectively.

[0023] S22. The feature extraction network of the forward prediction network model uses the backbone convolutional network module of ResNet18, which accepts 64 inputs. 64 1. Binary encoded matrix vector, outputting a 512-dimensional feature vector; two parallel spectral prediction modules each use 4 fully connected layers to map the 512-dimensional feature vector onto an N-dimensional vector, outputting an N-dimensional real part prediction vector pred_real_spec and an imaginary part prediction vector pred_imag_spec respectively.

[0024] S23, Set the training focus to 64 64 1. The binary encoded matrix vector is used as the input of the forward prediction model, and the output is the real part prediction vector and the imaginary part prediction vector. Then, the MSE is calculated with the real real part spectral vector real_spec and the real imaginary part spectral vector imag_spec respectively as the loss to train the forward prediction model.

[0025] The formula for calculating MSE is as follows:

[0026]

[0027] in, Indicates the number of data samples. Indicates the first The true label of the nth sample, which is the nth real_spec and imag_spec in each sample. Indicates the first The predicted values ​​for each sample, namely pred_real_spec and pred_imag_spec;

[0028] S24. During iterative training, the model performance is verified with a validation set in each iteration, the best model is saved, and after the model converges, the prediction accuracy of the model is tested with a test set. Once the preset conditions are met, the parameters of the sinusoidal prediction network model are fixed.

[0029] Furthermore, the method for step S3 is as follows:

[0030] S31. Construct an autoencoder diffusion model (AEDM), which consists of three parts: an autoencoder module, a diffusion model, and a forward prediction network model.

[0031] S32, the autoencoder module consists of two parts: an encoder network and a decoder network. The encoder network maps the input image to the latent space and is composed of a series of convolutional layers and downsampling operations. The input is 64... 64 1. Binary encoded matrix vector, output is 16 16 The latent space feature tensor is 1; the decoder network is the inverse process of the encoder network, and its function is to reconstruct the original size metamaterial structure from the latent space features. Its input is 16. 16 The latent space feature tensor of 1 outputs 64. 64 A matrix vector is used, and the pixel values ​​are constrained to the range [0, 1] using the Sigmoid activation function. Pixel values ​​less than 0.5 are set to 0, and values ​​greater than or equal to 0.5 are set to 1. This method is used for binarization to generate the final metamaterial surface structure. When training the autoencoder module, the encoder network and decoder network are trained together, with an input of 64... 64 The original binary image of 1 yields 64 64 The reconstructed binary image is obtained by using the mean square error between the reconstructed binary image and the original binary image as the loss function. The performance of the autoencoder module is verified using a validation set during the iterative process, and the optimal network parameters are saved and fixed.

[0032] S33. The diffusion model is used to generate structural design feature vectors in the latent space output by the encoder and output the structural design through the decoder. It includes two parts: a forward diffusion process and a backward denoising process. The forward diffusion process is a fixed Markov chain that adds Gaussian noise to the original latent space features in T steps. At each step t, the noisy features... The calculation formula is:

[0033]

[0034] in, These are the original latent space features. It satisfies the standard normal distribution Gaussian noise, where, It is the identity matrix. These are pre-calculated noise scheduling parameters, which change as t progresses from 0 to T. Decrease from 1 to 0;

[0035] The reverse denoising process is to remove random noise. Initially, noise is gradually reduced to generate reconstructed latent space features. ,from arrive Each step is guided by noise predictions from the denoising network, and its calculation formula is as follows:

[0036]

[0037] in, It is noise that follows a standard normal distribution. All of these are pre-calculated coefficients. The noise is predicted by the denoising network. This process iterates from t=T to t=1, eventually obtaining the reconstructed latent space features. ;

[0038] S34. The goal of the denoising network is to predict the noise added to the latent space features during the forward diffusion process. This network is a U-Net convolutional neural network composed of multiple ResNet residual network modules. A one-dimensional time step t is mapped to an M-dimensional vector through a linear layer and injected into each ResNet block, allowing the network to perceive the current denoising progress. Simultaneously, to incorporate spectral information into the denoising process, a cross-attention mechanism is introduced into the network's downsampling path. Intermediate features are used as the query, and the projection of spectral information is used as the key and value. Through attention weight calculation, the generation process is effectively guided by spectral information. The input to the entire denoising network is noisy latent features. The current time step t and spectral information spec are used as the output, which is the predicted noise. ;

[0039] S35. When training the diffusion model, the encoder network in the trained autoencoder module generates latent space features for all training samples. Then, the denoising network in the diffusion model is trained, and its input is the latent space features after being annotated through the forward diffusion process. Given the current time step t and the spectral information spec, the goal is to predict the noise added at step t. Calculate its relationship with the noise added in step t. The MSE between; reconstructing the latent space features after denoising. The decoder network of the input autoencoder module obtains the reconstructed binary image, which is then input into the pre-trained forward prediction network model in S2 to obtain the corresponding real part prediction spectral vector and imaginary part prediction spectral vector. The MSE is calculated with the real part prediction spectral vector and the imaginary part prediction spectral vector respectively, and together with the noise loss, it constitutes the total loss to optimize the model parameters. During the iterative training process, the performance of the diffusion model is verified using a validation set, and the best model parameters are saved and fixed.

[0040] Furthermore, the method for step S4 is as follows:

[0041] S41. Extract the denoising network from the AEDM model;

[0042] S42. Sample random noise from a standard Gaussian distribution. Using the true spectral vectors in the test set as a condition, The true spectral vector is input into a denoising network, and a T-step reverse denoising process is performed to gradually remove noise and obtain the generated latent space features. ;

[0043] S43, will The final metamaterial surface structure is reconstructed by inputting the data into the decoder network of the pre-trained autoencoder module.

[0044] S44. Input the reconstructed metamaterial surface structure into the pre-trained forward prediction network model to obtain the corresponding predicted spectral vector. Compare it with the true spectral vector in the initial input test set to verify the model performance.

[0045] Beneficial effects: Compared with the prior art, the technical solution of the present invention has the following beneficial technical effects:

[0046] (1) This invention introduces an autoencoder model to convert 64 64 Binary surface structure encoding from 1 to 16 16 The latent space of 1 significantly reduces the computational complexity of the diffusion model and achieves accurate generation guided by spectral conditions through the cross-attention mechanism.

[0047] (2) The separate encoder-diffusion model-decoder process of the present invention enables the model to learn complex data distributions and efficiently generate metamaterial structures that meet specific performance requirements, providing an effective end-to-end solution for solving complex reverse design problems. Attached Figure Description

[0048] Figure 1 This is a schematic diagram of the surface structure of the nanophotonic metamaterial in an embodiment of the present invention;

[0049] Figure 2 This is a flowchart illustrating the structure and training process of the forward prediction network model in an embodiment of the present invention.

[0050] Figure 3 This is a flowchart illustrating the structure and training process of the autoencoder diffusion model in an embodiment of the present invention. Detailed Implementation

[0051] The technical solution of the present invention will be described in detail below with reference to the accompanying drawings, but the scope of protection of the present invention is not limited to the embodiments described.

[0052] Example:

[0053] like Figure 1As shown, this invention proposes a nanophotonic sandwich-type metamaterial surface structure consisting of a top-layer metal resonator, a middle-layer dielectric spacer, and a lower-layer metal reflective substrate. The key feature is that this structure forms a highly efficient reflection configuration, enabling precise control of the reflection spectrum in the mid-infrared to far-infrared transition region (60-160 THz). The lower-layer metal reflective substrate has an electrical conductivity of 4.561... The gold (Au) has a thickness t1 of 50 nm; the intermediate dielectric spacer layer has a specified dielectric constant of 2.0 (1-0.003i), a permeability of 1.0, and a width of... The thickness t2 is 100nm, and the metal top layer is a coding pattern area with a width less than 2000nm. The coded pattern area is divided into a 64×64 matrix. The metal used for the coded pattern is the same as the underlying metal base plate, and it uses a metal with a conductivity of 4.561. The gold (Au) has a thickness t1 of 50nm, and the coding pattern uses eight common metamaterial antenna shapes.

[0054] Furthermore, this invention proposes a reverse design method for the surface structure of the aforementioned nanophotonic sandwich metamaterial, which combines an autoencoder model and a diffusion model. This method includes the following steps:

[0055] S1. Construct the dataset, including 64 The surface encoding matrix of 64 is converted into a binary encoding matrix and the corresponding reflectance spectral vector, and the dataset is divided into training set, validation set and test set according to 8:1:1.

[0056] S2. Construct a positive prediction network model, feed the training set into the model for iterative training, use the validation set to verify and save the best model during the iterative process, and fix the parameters of the positive prediction network model.

[0057] S3. Construct the inverse design network of AEDM that combines autoencoder and diffusion model, and initialize the network parameters; feed the training set into the AEDM model for iterative training, and use the validation set to verify and save the best AEDM model and fix the parameters during the iterative training process;

[0058] S4. Input the real spectral vectors from the test set into the denoising network of the AEDM model to obtain the predicted surface structure. Then, input the predicted spectral vectors into the trained forward prediction network model to verify the overall performance of the network.

[0059] Furthermore, the method for step S1 is as follows:

[0060] S11. Collect grayscale pattern samples of eight shapes—cross, H, open ring, ellipse, bow tie, L, rectangle, and arc—on the surface of a nanophotonic metamaterial, and convert the grayscale patterns into 64-bit grayscale patterns. 64 1. A binary encoding matrix is ​​used to construct the corresponding metamaterial surface structure. The matrix is ​​then fed into electromagnetic simulation software to obtain the corresponding reflection spectrum curve. The frequency range is set to 60~160Thz.

[0061] S12. The obtained reflectance spectrum curve is sampled at intervals within the range of 60~160Thz. Uniform frequency sampling at THz yields an N-dimensional reflectance spectral vector, where N is a positive integer.

[0062] S13. The N-dimensional real part vector and N-dimensional imaginary part vector are calculated from the spectral vector. The real part Re and the imaginary part Im of the spectral vector of the metamaterial surface structure have the following correspondence with the amplitude A and the phase φ:

[0063]

[0064] ;

[0065] The real and imaginary vectors serve as both labels for the forward prediction network and as one of the inputs to the autoencoder diffusion AEDM model.

[0066] Furthermore, the method for step S2 is as follows:

[0067] S21. Construct a forward prediction network model, which consists of a feature extraction network and two parallel spectral vector prediction modules. The feature extraction network is used to extract the features of the transformed binary encoding matrix and outputs a 512-dimensional feature vector. The two parallel spectral prediction modules are the real part spectral prediction module and the imaginary part spectral prediction module, respectively. Both accept the 512-dimensional feature vector and output N-dimensional real part prediction vector and imaginary part prediction vector, respectively.

[0068] S22. The feature extraction network of the forward prediction network model uses the backbone convolutional network module of ResNet18, which accepts 64 inputs. 64 1. Binary encoded matrix vector, outputting a 512-dimensional feature vector; two parallel spectral prediction modules each use 4 fully connected layers to map the 512-dimensional feature vector onto an N-dimensional vector, outputting an N-dimensional real part prediction vector pred_real_spec and an imaginary part prediction vector pred_imag_spec respectively.

[0069] S23, Set the training focus to 64 64 1. The binary encoded matrix vector is used as the input of the forward prediction model, and the output is the real part prediction vector and the imaginary part prediction vector. Then, the MSE is calculated with the real real part spectral vector real_spec and the real imaginary part spectral vector imag_spec respectively as the loss to train the forward prediction model.

[0070] The formula for calculating MSE is as follows:

[0071]

[0072] in, Indicates the number of data samples. Indicates the first The true label of the nth sample, which is the nth real_spec and imag_spec in each sample. Indicates the first The predicted values ​​for each sample, namely pred_real_spec and pred_imag_spec;

[0073] S24. During iterative training, the model performance is verified with a validation set in each iteration, the best model is saved, and after the model converges, the prediction accuracy of the model is tested with a test set. Once the preset conditions are met, the parameters of the sinusoidal prediction network model are fixed.

[0074] Furthermore, the method for step S3 is as follows:

[0075] S31. Construct an autoencoder diffusion model (AEDM), which consists of three parts: an autoencoder module, a diffusion model, and a forward prediction network model.

[0076] S32, the autoencoder module consists of two parts: an encoder network and a decoder network. The encoder network maps the input image to the latent space and is composed of a series of convolutional layers and downsampling operations. The input is 64... 64 1. Binary encoded matrix vector, output is 16 16 The latent space feature tensor is 1; the decoder network is the inverse process of the encoder network, and its function is to reconstruct the original size metamaterial structure from the latent space features. Its input is 16. 16 The latent space feature tensor of 1 outputs 64. 64 A matrix vector is used, and the pixel values ​​are constrained to the range [0, 1] using the Sigmoid activation function. Pixel values ​​less than 0.5 are set to 0, and values ​​greater than or equal to 0.5 are set to 1. This method is used for binarization to generate the final metamaterial surface structure. When training the autoencoder module, the encoder network and decoder network are trained together, with an input of 64... 64 The original binary image of 1 yields 64 64 The reconstructed binary image is obtained by using the mean square error between the reconstructed binary image and the original binary image as the loss function. The performance of the autoencoder module is verified using a validation set during the iterative process, and the optimal network parameters are saved and fixed.

[0077] S33. The diffusion model is used to generate structural design feature vectors in the latent space output by the encoder and output the structural design through the decoder. It includes two parts: a forward diffusion process and a backward denoising process. The forward diffusion process is a fixed Markov chain that adds Gaussian noise to the original latent space features in T steps. At each step t, the noisy features... The calculation formula is:

[0078]

[0079] in, These are the original latent space features. It satisfies the standard normal distribution Gaussian noise, where, It is the identity matrix. These are pre-calculated noise scheduling parameters, which change as t progresses from 0 to T. Decrease from 1 to 0;

[0080] The reverse denoising process is to remove random noise. Initially, noise is gradually reduced to generate reconstructed latent space features. ,from arrive Each step is guided by noise predictions from the denoising network, and its calculation formula is as follows:

[0081]

[0082] in, It is noise that follows a standard normal distribution. All of these are pre-calculated coefficients. The noise is predicted by the denoising network. This process iterates from t=T to t=1, eventually obtaining the reconstructed latent space features. ;

[0083] S34. The goal of the denoising network is to predict the noise added to the latent space features during the forward diffusion process. This network is a U-Net convolutional neural network composed of multiple ResNet residual network modules. A one-dimensional time step t is mapped to an M-dimensional vector through a linear layer and injected into each ResNet block, allowing the network to perceive the current denoising progress. Simultaneously, to incorporate spectral information into the denoising process, a cross-attention mechanism is introduced into the network's downsampling path. Intermediate features are used as the query, and the projection of spectral information is used as the key and value. Through attention weight calculation, the generation process is effectively guided by spectral information. The input to the entire denoising network is noisy latent features. The current time step t and spectral information spec are used as the output, which is the predicted noise. ;

[0084] S35. When training the diffusion model, the encoder network in the trained autoencoder module generates latent space features for all training samples. Then, the denoising network in the diffusion model is trained, and its input is the latent space features after being annotated through the forward diffusion process. Given the current time step t and the spectral information spec, the goal is to predict the noise added at step t. Calculate its relationship with the noise added in step t. The MSE between; reconstructing the latent space features after denoising. The decoder network of the input autoencoder module obtains the reconstructed binary image, which is then input into the pre-trained forward prediction network model in S2 to obtain the corresponding real part prediction spectral vector and imaginary part prediction spectral vector. The MSE is calculated with the real part prediction spectral vector and the imaginary part prediction spectral vector respectively, and together with the noise loss, it constitutes the total loss to optimize the model parameters. During the iterative training process, the performance of the diffusion model is verified using a validation set, and the best model parameters are saved and fixed.

[0085] Furthermore, the specific method for step S4 is as follows:

[0086] S41. Extract the denoising network from the AEDM model;

[0087] S42. Sample random noise from a standard Gaussian distribution. Using the true spectral vectors in the test set as a condition, The true spectral vector is input into a denoising network, and a T-step reverse denoising process is performed to gradually remove noise and obtain the generated latent space features. ;

[0088] S43, will The final metamaterial surface structure is reconstructed by inputting the data into the decoder network of the pre-trained autoencoder module.

[0089] S44. Input the reconstructed metamaterial surface structure into the pre-trained forward prediction network model to obtain the corresponding predicted spectral vector. Compare it with the true spectral vector in the initial input test set to verify the model performance.

[0090] When reverse-engineering the metamaterial surface structure using the real spectral information in this embodiment according to the above method, there are eight patterns for the metamaterial surface structure in this embodiment: cross, H, open ring, ellipse, bow tie, L, rectangle, and arc. 3000 pattern samples are generated for each shape. The generated pattern samples are then fed into electromagnetic simulation software for numerical simulation, constructing a paired dataset containing 24000 elements (binary encoding matrix, 51-dimensional real spectral vector, and 51-dimensional imaginary spectral vector). The dataset is then divided into a training set of size 19200, a validation set of size 2400, and a test set of size 2400, in an 8:1:1 ratio.

[0091] Follow step S2 to build a positive prediction network model, and feed the paired datasets from the training set into the positive prediction network model for iterative training. Set the optimizer for model training to Adam, the initial learning rate to 1e-4, and the training cycle to 800. During the iterative cycle, use the paired datasets from the validation set to validate the model performance, save the best model, and fix the model parameters.

[0092] After cyclic training, the test set nearly converged, achieving high accuracy. At this point, the optimal training cycle for the model was 747. Table 1 shows the differences between predicted and true values ​​when randomly selecting examples from the test set. The positive prediction network showed a high degree of fit between the predicted and true values ​​on both the real and imaginary spectral curves, indicating that the positive prediction network has achieved high accuracy and can quickly and accurately predict the reflection spectra of nanophotonic metamaterial surface structures.

[0093] Table 1 Test performance of the forward prediction network model

[0094]

[0095] The parameters of the trained forward prediction network model are fixed. Following step S3, the encoder and decoder networks of the autoencoder model, and the denoising network of the diffusion model are constructed. Further, following step S4, paired datasets are fed into the autoencoder-diffusion model for iterative training. The optimizer is set to Adam, the initial learning rate is 1e-4, the training period is set to 500 epochs, and during the iterative cycle, the model performance is validated using paired datasets from the validation set. The best model is saved, and the model parameters are fixed.

[0096] After model convergence, the performance of the best model is validated using a test set. The real spectral vectors from the test set are input to obtain the reconstructed binary encoded image, which is then input into a pre-trained forward prediction network model to output the corresponding real and imaginary predicted spectral vectors. Table 2 shows the difference between the predicted and real spectra, indicating a high degree of fit. This demonstrates that the autoencoded diffusion model can accurately reconstruct the corresponding metamaterial surface structure based on spectral information and reflects the diversity of designs.

[0097] Table 2 Test performance of the autoencoded diffusion model

[0098]

[0099] As described above, although the invention has been shown and described with reference to specific preferred embodiments, it should not be construed as limiting the invention itself. Various changes in form and detail may be made without departing from the spirit and scope of the invention as defined in the appended claims.

Claims

1. A nanophotonic sandwich-type metamaterial surface structure, characterized in that, The structure comprises a top-layer metal resonator, a middle-layer dielectric spacer, and a lower-layer metal reflective substrate, wherein the lower-layer metal reflective substrate has a conductivity of 4.

561. The gold (Au) has a thickness of t1; the middle dielectric spacer layer is an F4B dielectric substrate with a relative permittivity of 2.65 and a width of [missing information]. The thickness is t2; the top layer of the metal is a coded pattern area, the width of which is less than t2. The coded pattern area is divided into 64 The 64-element matrix can be encoded using any one of the following antenna shapes: cross, H, open ring, ellipse, bow tie, L, rectangle, or arc.

2. The nanophotonic sandwich-type metamaterial surface structure according to claim 1, characterized in that, The coded pattern metal is the same as the underlying metal base plate, and uses a metal with a conductivity of 4.

561. The gold (Au) has a thickness of t1.

3. A reverse design method for the surface structure of nanophotonic metamaterials as described in any one of claims 1-2, based on a combination of autoencoders and diffusion models, characterized in that... Includes the following steps: S1. Construct the dataset, including 64 The surface encoding matrix of 64 is converted into a binary encoding matrix and the corresponding reflectance spectral vector, and the dataset is divided into training set, validation set and test set according to 8:1:

1. S2. Construct a positive prediction network model, feed the training set into the model for iterative training, use the validation set to verify and save the best model during the iterative process, and fix the parameters of the positive prediction network model. S3. Construct the inverse design network of AEDM that combines autoencoder and diffusion model, and initialize the network parameters; feed the training set into the AEDM model for iterative training, and use the validation set to verify and save the best AEDM model and fix the parameters during the iterative training process; S4. Input the real spectral vectors from the test set into the denoising network of the AEDM model to obtain the predicted surface structure. Then, input the predicted spectral vectors into the trained forward prediction network model to verify the overall performance of the network.

4. The method according to claim 3, characterized in that, The method for step S1 is as follows: S11. Collect grayscale pattern samples of eight shapes—cross, H, open ring, ellipse, bow tie, L, rectangle, and arc—on the surface of a nanophotonic metamaterial, and convert the grayscale patterns into 64-bit grayscale patterns. 64 1. A binary encoding matrix is ​​used to construct the corresponding metamaterial surface structure. The matrix is ​​then fed into electromagnetic simulation software to obtain the corresponding reflection spectrum curve. The frequency range is set to 60~160Thz. S12. The obtained reflectance spectrum curve is sampled at intervals within the range of 60~160Thz. Uniform frequency sampling at THz yields an N-dimensional reflectance spectral vector, where N is a positive integer. S13. The N-dimensional real part vector and N-dimensional imaginary part vector are calculated from the spectral vector. The real part Re and the imaginary part Im of the spectral vector of the metamaterial surface structure have the following correspondence with the amplitude A and the phase φ: ; The real and imaginary vectors serve as both labels for the forward prediction network and as one of the inputs to the autoencoder diffusion AEDM model.

5. The method according to claim 4, characterized in that, The method for step S2 is as follows: S21. Construct a forward prediction network model, which consists of a feature extraction network and two parallel spectral vector prediction modules. The feature extraction network is used to extract the features of the transformed binary encoding matrix and outputs a 512-dimensional feature vector. The two parallel spectral prediction modules are the real part spectral prediction module and the imaginary part spectral prediction module, respectively. Both accept the 512-dimensional feature vector and output N-dimensional real part prediction vector and imaginary part prediction vector, respectively. S22. The feature extraction network of the forward prediction network model uses the backbone convolutional network module of ResNet18, which accepts 64 inputs. 64 1. Binary encoded matrix vector, outputting a 512-dimensional feature vector; two parallel spectral prediction modules each use 4 fully connected layers to map the 512-dimensional feature vector onto an N-dimensional vector, outputting an N-dimensional real part prediction vector pred_real_spec and an imaginary part prediction vector pred_imag_spec respectively. S23, Set the training focus to 64 64 1. The binary encoded matrix vector is used as the input of the forward prediction model, and the output is the real part prediction vector and the imaginary part prediction vector. Then, the MSE is calculated with the real real part spectral vector real_spec and the real imaginary part spectral vector imag_spec respectively as the loss to train the forward prediction model. The formula for calculating MSE is as follows: in, Indicates the number of data samples. Indicates the first The true label of the nth sample, which is the nth real_spec and imag_spec in each sample. Indicates the first The predicted values ​​for each sample, namely pred_real_spec and pred_imag_spec; S24. During iterative training, the model performance is verified with a validation set in each iteration, the best model is saved, and after the model converges, the prediction accuracy of the model is tested with a test set. Once the preset conditions are met, the parameters of the sinusoidal prediction network model are fixed.

6. The method according to claim 5, characterized in that, The method for step S3 is as follows: S31. Construct an autoencoder diffusion model (AEDM), which consists of three parts: an autoencoder module, a diffusion model, and a forward prediction network model. S32, the autoencoder module consists of two parts: an encoder network and a decoder network. The encoder network maps the input image to the latent space and is composed of a series of convolutional layers and downsampling operations. The input is 64... 64 1. Binary encoded matrix vector, output is 16 16 The latent space feature tensor of 1; The decoder network is the inverse process of the encoder network; its function is to reconstruct the original-sized metamaterial structure from latent space features. Its input is 16. 16 The latent space feature tensor of 1 outputs 64. 64 The matrix vector is used to constrain the pixel values ​​to the range [0, 1] using the Sigmoid activation function. If the pixel value is less than 0.5, it is set to 0, and if it is greater than or equal to 0.5, it is set to 1. This method is used to perform binarization to generate the final metamaterial surface structure. When training the autoencoder module, the encoder network and decoder network are trained together, with an input of 64. 64 The original binary image of 1 yields 64 64 The reconstructed binary image is obtained by using the mean square error between the reconstructed binary image and the original binary image as the loss function. The performance of the autoencoder module is verified using a validation set during the iterative process, and the optimal network parameters are saved and fixed. S33. The diffusion model is used to generate structural design feature vectors in the latent space output by the encoder and output the structural design through the decoder. It includes two parts: a forward diffusion process and a backward denoising process. The forward diffusion process is a fixed Markov chain that adds Gaussian noise to the original latent space features in T steps. At each step t, the noisy features... The calculation formula is: in, These are the original latent space features. It satisfies the standard normal distribution Gaussian noise, where, It is the identity matrix. These are pre-calculated noise scheduling parameters, which change as t progresses from 0 to T. Decrease from 1 to 0; The reverse denoising process is to remove random noise. Initially, noise is gradually reduced to generate reconstructed latent space features. ,from arrive Each step is guided by noise predictions from the denoising network, and its calculation formula is as follows: in, It is noise that follows a standard normal distribution. All of these are pre-calculated coefficients. The noise is predicted by the denoising network. This process iterates from t=T to t=1, eventually obtaining the reconstructed latent space features. ; S34. The goal of the denoising network is to predict the noise added to the latent space features during the forward diffusion process. This network is a U-Net convolutional neural network composed of multiple ResNet residual network modules. A one-dimensional time step t is mapped to an M-dimensional vector through a linear layer and injected into each ResNet block, allowing the network to perceive the current denoising progress. Simultaneously, to incorporate spectral information into the denoising process, a cross-attention mechanism is introduced into the network's downsampling path. Intermediate features are used as the query, and the projection of spectral information is used as the key and value. Through attention weight calculation, the generation process is effectively guided by spectral information. The input to the entire denoising network is noisy latent features. The current time step t and spectral information spec are used as the output, which is the predicted noise. ; S35. When training the diffusion model, the encoder network in the trained autoencoder module generates latent space features for all training samples. Then, the denoising network in the diffusion model is trained, and its input is the latent space features after being annotated through the forward diffusion process. Given the current time step t and the spectral information spec, the goal is to predict the noise added at step t. Calculate its relationship with the noise added in step t. The MSE between; reconstructing the latent space features after denoising. The decoder network of the input autoencoder module obtains the reconstructed binary image, which is then input into the pre-trained forward prediction network model in S2 to obtain the corresponding real part prediction spectral vector and imaginary part prediction spectral vector. The MSE is calculated with the real part prediction spectral vector and the imaginary part prediction spectral vector respectively, and together with the noise loss, it constitutes the total loss to optimize the model parameters. During the iterative training process, the performance of the diffusion model is verified using a validation set, and the best model parameters are saved and fixed.

7. The method according to claim 6, characterized in that, The method for step S4 is as follows: S41. Extract the denoising network from the AEDM model; S42. Sample random noise from a standard Gaussian distribution. Using the true spectral vectors in the test set as a condition, The true spectral vector is input into a denoising network, and a T-step reverse denoising process is performed to gradually remove noise and obtain the generated latent space features. ; S43, will The final metamaterial surface structure is reconstructed by inputting the data into the decoder network of the pre-trained autoencoder module. S44. Input the reconstructed metamaterial surface structure into the pre-trained forward prediction network model to obtain the corresponding predicted spectral vector. Compare it with the true spectral vector in the initial input test set to verify the model performance.

Citation Information

Cited By

  • Superlens reverse design method

    CN121995626A