Nanometer photon metamaterial structure reverse design method based on CVAE and PSO

Through the intelligent optimization method of combining conditional variational autoencoder and particle swarm optimization in the reverse design of nanophoton metamaterials, the problems of insufficient random sampling accuracy and large calculation overhead in reverse design are solved, and efficient and accurate material structure is achieved design.

CN119494270AActive Publication Date: 2025-02-21NANJING UNIV

Patent Information

Application Number
CN202411570143.6
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-11-06
Publication Date
2025-02-21
Estimated Expiration
2044-11-06

AI Technical Summary

Technical Problem

The prior art has problems of insufficient random sampling accuracy and high computational overhead in the reverse design of nanophoton metamaterials, which is difficult to meet the needs of high-precision design.

Method used

The intelligent optimization method based on conditional variational autoencoder (CVAE) and particle swarm optimization (PSO) is adopted to improve the accuracy of candidate structures through the precise verification of potential spatial optimization search and forward prediction networks.

Benefits of technology

Finding the material structure that best matches the target spectrum in a few seconds significantly improves the accuracy and efficiency of reverse design.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119494270A_ABST
    Figure CN119494270A_ABST
Patent Text Reader

Abstract

The invention belongs to the field of metamaterial design, and particularly relates to a nanometer photon metamaterial structure reverse design method based on CVAE and PSO. The method comprises the following specific steps: S1, constructing a data set; s2, segmenting the data set into 80% of a training set, 10% of a verification set and 10% of a test set; s3, constructing a forward prediction network model, and performing iterative loop training; s4, constructing a conditional variation auto-encoder network model; s5, the coding matrix and the reflection spectrum vector in the training set are used as data to be sent into a conditional variational auto-encoder network model, and iterative loop training is carried out; s6, searching an optimal potential vector through a particle swarm optimization algorithm, splicing the potential vector and a reflection spectrum vector, inputting the spliced potential vector and the spliced reflection spectrum vector into a conditional variational auto-encoder network model to obtain a candidate design structure, and performing screening by using a forward prediction network model; according to the invention, the problems of insufficient design diversity, low accuracy and difficulty in balancing in reverse design in the prior art are solved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The invention belongs to the field of metamaterial design, and in particular relates to a nanophotonic metamaterial structure inverse design method based on CVAE and PSO. Background Art

[0002] Metamaterials are a class of artificially designed materials with special physical properties that natural materials do not have. These materials control physical phenomena such as electromagnetic waves and sound waves by changing the geometry and arrangement of their structures rather than relying on their chemical composition. Nanophotonic metamaterials are an important branch of the field of metamaterials, focusing on manipulating the behavior of photons at the nanoscale. This type of metamaterial can achieve precise control of light waves, such as negative refractive index, optical stealth, and extreme optical imaging, by regulating the geometric size, shape, and material composition of the nanostructure. Nanophotonic metamaterials have broad application prospects in cutting-edge technologies such as photonic integrated circuits, super-resolution imaging, optical sensors, and optical communications, and have promoted the development of nanophotonics.

[0003] The forward prediction of the electromagnetic response of nanophotonic metamaterials refers to obtaining the corresponding electromagnetic response based on the provided metamaterial structure topology information. The current mainstream method for forward prediction of nanophotonic metamaterial design is still the numerical iterative calculation method. The corresponding electromagnetic response is obtained by solving the Maxwell equations through numerical calculation methods. Commonly used numerical calculation methods include the method of moments (MOM), the finite element method (FEM), the finite integral method (FIT) and the finite difference time domain method (FDTD). This method requires a large amount of numerical calculation and iteration. The simulation time of a single sample is usually in the order of minutes, and the resource consumption is large. The forward prediction of metamaterial design is greatly limited by the numerical calculation capability.

[0004] The inverse design of electromagnetic response of nanophotonic metamaterials aims to generate metamaterial structural morphology that meets the requirements according to specific electromagnetic response requirements. At present, the inverse design methods of electromagnetic metasurfaces are mainly divided into heuristic algorithms and deep learning algorithms. Heuristic algorithms such as genetic algorithms, simulated annealing algorithms and ant colony algorithms usually obtain the final result by iterative search in the solution space. However, the generalization performance of such algorithms is poor, and each time new requirements are faced, iterative search needs to be re-performed, resulting in high computational overhead. In recent years, with the rise of deep learning generative models, many emerging generative models such as generative adversarial networks (GANs), variational autoencoders (VAEs), and diffusion models have gradually been applied to the field of metamaterial design. Generative adversarial networks continuously optimize the generator through adversarial training of the generator and the discriminator, thereby generating a metamaterial structure that matches the target electromagnetic response. However, the prior noise of the GAN model lacks effective information and is difficult to converge during training. Variational autoencoders perform efficient sample generation and optimization design by mapping complex structure-performance relationships into latent space. However, VAE relies on pure random sampling in inverse design, which may lead to insufficient accuracy of the generated structure and make it difficult to meet higher precision design requirements.

[0005] Therefore, it is of great significance to develop a new inverse design method for nanophotonic metamaterial structures. Summary of the invention

[0006] The technical problem to be solved by the present invention is to provide a nanophotonic metamaterial structure reverse design method based on conditional variational autoencoder (CVAE) and particle swarm optimization (PSO) intelligent optimization in view of the shortcomings of the prior art, and to optimize and improve the random sampling problem in the design of traditional variational autoencoders. By introducing the particle swarm optimization algorithm, the latent space is deeply searched, and the generated results are accurately verified in combination with a fully trained forward prediction network. Compared with the traditional random sampling method, this method can greatly improve the accuracy of the candidate structure while ensuring diversity.

[0007] In order to solve the above technical problems, the present invention discloses a method for inverse design of nanophotonic metamaterial structure based on CVAE and PSO, and the specific steps are as follows:

[0008] S1. Constructing a data set, the data set includes a binary encoding matrix converted from a basic grayscale image and an electromagnetic reflection spectrum vector;

[0009] S2. Split the forward prediction dataset and the reverse design dataset constructed in S1 into 80% training set, 10% validation set and 10% test set respectively;

[0010] S3. Build a forward prediction network model, send the training set to the forward prediction network model for iterative cycle training, and fix the forward prediction network model parameters after the training is completed;

[0011] S4. Construct a conditional variational autoencoder network model, including an encoding network and a decoding network, and initialize network parameters;

[0012] S5. Send the encoding matrix and the reflection spectrum vector in the training set as data pairs into the conditional variational autoencoder network model for iterative cycle training;

[0013] S6. The optimal latent vector is found through the particle swarm optimization algorithm. The latent vector is concatenated with the reflection spectrum vector and then input into the conditional variational autoencoder network model to obtain the candidate design structure. The candidate design structure is then screened using the forward prediction network model to obtain the reverse design material pattern.

[0014] Among them, in S1, the specific steps of constructing the data set are:

[0015] S11. Collect grayscale pattern samples of eight shapes, namely, cross, H-shaped, open ring, ellipse, bow tie, L-shaped, rectangle, and arc, through the nanophotonic metamaterial unit, further convert the grayscale pattern into a 64×64 binary coding matrix, construct the corresponding electromagnetic metasurface unit, and send it to the electromagnetic simulation software to obtain the corresponding electromagnetic response reflection spectrum curve, and the frequency range is set to 60~160Thz; wherein, the electromagnetic reflection spectrum includes three linear polarization reflections, including the reflection coefficients Rxx and Ryy of the co-polarized incident waves in the x and y directions and the reflection coefficient Rxy of the cross-polarized incident wave;

[0016] S12. The 64×64 binary encoding matrix is ​​used as the input of the forward prediction network and is also one of the inputs of the conditional variational autoencoder;

[0017] S13. The three types of electromagnetic reflection spectrum curves Rxx, Ryy, and Rxy are sampled at a uniform frequency with a sampling interval of 2 Thz, and are represented as 51-dimensional vectors respectively. The three 51-dimensional vectors are then concatenated to finally obtain a reflection spectrum vector with a length of 153 dimensions. The reflection spectrum vector is used as a label for the forward prediction network dataset and is also one of the inputs of the conditional variational autoencoder model.

[0018] Preferably, the nanophotonic metamaterial unit comprises an upper layer, a middle layer and a lower layer; the lower layer is covered with full metal gold, has a conductivity of 4.561e+007S / m, and a thickness of t=50nm; the dielectric constant of the middle layer dielectric substrate material is 2.0 (1+0.003i), a magnetic permeability of 1.0, and a width of l 1 =2000nm, thickness h=100nm; the upper layer is divided into a coding pattern area, the width of which is less than l1 The coding pattern area is divided into a 64×64 matrix. The conductivity of the coding pattern metal gold patch is 4.561e+007S / m, the width is 31.25nm, and the thickness is t=50nm. The coding pattern style uses eight common metamaterial antenna shapes.

[0019] The specific steps in S3 are:

[0020] The constructed forward prediction network model consists of a feature extraction network and three parallel spectral prediction modules. The feature extraction network is used to extract the features of the encoding matrix and output a 512-dimensional feature vector. The parallel spectral prediction module accepts a 512-dimensional vector and outputs 51-dimensional Rxx, Ryy, and Rxy vectors respectively, which are finally merged and spliced ​​to form the network output. The feature extraction network adopts the ResNet34 structure. The network optimizer is set to Adam, and the learning rate is 1e-4.

[0021] use Represents the network loss function, where y is the true value, is the predicted value, N is the dimension, the training set is sent to the forward prediction network model for training, and the total loss value of the forward prediction network is defined as Where Rf is the reflectance spectrum vector of the forward prediction dataset, It is the reflection spectrum vector predicted by the forward prediction network. After the training is completed, the model parameters of the forward prediction network are fixed.

[0022] Among them, in said S4, the specific steps are:

[0023] The encoder of the conditional variational autoencoder includes a feature extraction network that uses the ResNet34 backbone convolutional network module, which accepts input of a 153-dimensional reflection spectrum vector and a 64×64×1 encoding matrix vector, and generates a 20-dimensional mean vector and variance vector of the posterior probability distribution parameters. The decoder is composed of a transposed convolutional layer, which concatenates the re-parameterized 20-dimensional latent space vector and the reflection spectrum as input and generates a 64×64×1 structure matrix tensor after transposed convolution of the decoder.

[0024] Among them, in said S5, the specific steps of iterative cycle training are:

[0025] S51. The encoding matrix-reflection spectrum vector of the training set is sent to the feature extraction network of the encoder in pairs to obtain a 512-dimensional compact feature vector, which is passed through two dense layers and then outputs a 20-dimensional statistical parameter mean vector and a logarithmic variance vector of the approximate posterior distribution;

[0026] S52. Obtaining a latent space vector z by resampling;

[0027] S53. The latent space vector obtained in S52 is concatenated with the 153-dimensional reflection spectrum vector, and then sent to the reconstruction network of the decoder to generate a reconstructed metamaterial design coding matrix;

[0028] S54. Calculate the reconstruction error by reconstructing the encoding matrix pattern output by the network, and calculate the KL divergence error by the statistical parameters output by the encoder, and perform a back-propagation algorithm to update the network parameters of the conditional variational autoencoder.

[0029] Among them, in S6, the specific steps of finding the optimal potential vector by using the particle swarm optimization algorithm are:

[0030] S61. Given the expected reflectance spectrum, randomly sample a 20-dimensional latent vector z from the standard normal distribution N(0,I) and concatenate the two, and feed them into the reconstruction network to obtain a candidate design;

[0031] S62. Use the forward prediction model to predict the reflectance spectrum of the candidate design, and keep the mean square error of the reflectance spectrum less than 10 -3 The sample is taken as the final design result of random sampling;

[0032] S63. The particle swarm optimization algorithm regards the 20-dimensional potential vector as a particle, first initializes the position and velocity of the particle, and sets the initial values ​​of the individual optimal and global optimal;

[0033] S64. Iterative update, according to the current position of the particle, use the decoder to obtain the image prediction, and calculate the predicted reflectance spectrum through the forward prediction network; the evaluation update process includes using the error between the predicted spectrum and the expected spectrum to update the particle fitness, including individual optimal and global optimal, and retaining the samples that meet the threshold conditions;

[0034] S65. Terminate after reaching the maximum number of iterations or searching for a sufficient number of valid samples.

[0035] The present invention also provides a computer-readable storage medium having a computer program stored thereon, which, when executed by a processor, implements the steps of the inverse design method of the nanophotonic metamaterial structure based on CVAE and PSO of the present invention.

[0036] The present invention also provides a computer device, comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein when the processor executes the program, the steps of the inverse design method of the nanophotonic metamaterial structure based on CVAE and PSO of the present invention are implemented.

[0037] Beneficial effects: By introducing latent space optimization search and using the forward prediction network model as an alternative electromagnetic simulation simulator, compared with the traditional random sampling method, the time-consuming and blind multiple sampling process is avoided, and the material structure that best matches the target spectrum can be found within seconds, thereby improving the accuracy of the final on-demand design of candidate structures. BRIEF DESCRIPTION OF THE DRAWINGS

[0038] The present invention will be further described in detail below in conjunction with the accompanying drawings and specific embodiments, and the above and / or other advantages of the present invention will become more clear.

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

[0040] Figure 2 The structure and training flow chart of the forward network model in the embodiment of the present invention;

[0041] Figure 3 The structure and training flow chart of the conditional variational autoencoder network model in an embodiment of the present invention;

[0042] Figure 4 This is a downward trend diagram of the loss function of the forward network training process in an embodiment of the present invention;

[0043] Figure 5 This is a downward trend diagram of the loss function of the conditional variational autoencoder training process in an embodiment of the present invention;

[0044] Figure 6 is the difference between the forward network prediction value and the simulation value in the embodiment of the present invention;

[0045] Figure 7 The reconstruction of a specific sample during the training process in the embodiment of the present invention;

[0046] Figure 8 It is a flow chart of the particle swarm potential space optimization search algorithm in an embodiment of the present invention;

[0047] Fig. 9 The figure is a comparison between the results of reverse design of the particle swarm latent space optimization search algorithm for a specific spectrum and the random sampling results in an embodiment of the present invention. DETAILED DESCRIPTION

[0048] The technical solution of the present invention is described in detail below with reference to the accompanying drawings and specific implementation examples.

[0049] The present invention proposes a reverse design method for nanophotonic metamaterial structure based on CVAE and PSO intelligent optimization. In order to improve the accuracy of reverse design, a latent space search strategy based on particle swarm optimization (PSO) is adopted. By searching and optimizing the smooth and continuous standard normal distribution latent space generated after training, using the pre-trained forward prediction network model as the evaluation criterion, the fitness of the particle swarm in the iterative process is evaluated and the position is updated, thereby optimizing the design goal.

[0050] The technical solution of the present invention is as follows:

[0051] Step 1: Send the nanophotonic metamaterial unit structure design and related parameter periodic arrangement structure into the electromagnetic simulation software to obtain the corresponding reflection spectrum and construct the data set required for model training; the data set includes a two-dimensional image representing the material structure and an electromagnetic reflection spectrum, wherein the electromagnetic reflection spectrum includes three polarization reflection spectra of linear polarization;

[0052] The invention aims to design nanophotonic metamaterial units such as Figure 1 As shown, Figure 1 (a) is the front view, (b) is the side view; the dielectric constant of the middle dielectric substrate material is 2.0 (1 + 0.003i), and the width is l 1 =2000nm, thickness h = 100nm; the lower layer is covered with full metal gold, with a conductivity of 4.561e+007S / m and a thickness t = 50nm. The upper layer is divided into a coding pattern area, the width of which is less than l 1 The coding pattern area can be divided into a 64×64 matrix. The conductivity of the coding pattern metal gold patch is 4.561e+007S / m, the width is 31.25nm, and the thickness is t=50nm. The coding pattern style uses eight common metamaterial antenna shapes.

[0053] In step 1, the steps for constructing the data set required for model training are as follows:

[0054] 1) 3000 basic grayscale pattern samples were collected for eight shapes, namely cross, H-shaped, open ring, ellipse, bow tie, L-shaped, rectangle, and arc. The grayscale patterns were further converted into a 64×64 binary coding matrix to construct the corresponding electromagnetic metasurface unit, which was sent to the electromagnetic simulation software to obtain the corresponding electromagnetic response. The frequency range was set to 60~160Thz;

[0055] 2) The 64×64 binary encoding matrix is ​​used as the input of the forward prediction network and is also one of the inputs of the conditional variational autoencoder;

[0056] 3) The three types of electromagnetic reflection spectrum curves Rxx, Ryy, and Rxy are sampled at a uniform frequency with a sampling interval of 2Thz, and are represented as 51-dimensional vectors respectively. The three 51-dimensional vectors are then concatenated to finally obtain a reflection spectrum vector with a length of 153 dimensions. This vector is used as the label of the forward prediction network dataset and is also one of the inputs of the conditional variational autoencoder model.

[0057] Step 2: Split the model training data set constructed in step 1 into 80% training set, 10% validation set, and 10% test set;

[0058] The input of the forward prediction dataset is a 64×64 encoding matrix, and the corresponding label is the concatenation of the 153-dimensional Rxx, Ryy, and Rxy vectors. The input of the conditional autoencoder model is a 64×64 encoding matrix vector, and the corresponding spectral data is also used as input, which is also the concatenation of the 153-dimensional Rxx, Ryy, and Rxy vectors.

[0059] Step 3: Build Figure 2 The forward prediction network model shown in the figure is constructed. The main architecture of the forward prediction network model is composed of a feature extraction network. The network adopts the backbone structure of ResNet34. The slave module contains three parallel fully connected layers to fit three different spectral line vectors respectively. The network optimizer is set to Adam, and the learning rate is 1e-4.

[0060] use Represents the network loss function, where y is the true value, is the predicted value, N is the dimension, the training set is sent to the forward prediction network model for training, and the total loss value of the forward prediction network is defined as Where Rf is the reflectance spectrum vector of the forward prediction dataset, It is the reflection spectrum vector predicted by the forward prediction network. After the training is completed, the model parameters of the forward prediction network are fixed.

[0061] Step 4: Build a conditional variational autoencoder network model, including the encoding network Encoder and the decoding network Decoder, and initialize the network parameters;

[0062] The encoder of the conditional variational autoencoder includes a feature extraction network that uses the ResNet34 backbone convolutional network module, which accepts input of a 153-dimensional reflection spectrum vector and a 64×64×1 encoding matrix vector, and generates a 20-dimensional mean vector and variance vector of the posterior probability distribution parameters. The decoder is composed of a transposed convolutional layer, which concatenates the re-parameterized 20-dimensional latent space vector and the reflection spectrum as input and generates a 64×64×1 structure matrix tensor after transposed convolution of the decoder.

[0063] Step 5: The coding pattern matrix and the 153-dimensional reflection spectrum vector in the model training data set are sent to the encoder as data pairs. At the same time, the 153-dimensional reflection spectrum vector needs to be provided as the input of the generation network at the decoder end, and iterative cycle training is performed in sequence.

[0064] The training loss function of the conditional variational autoencoder consists of two parts, namely the reconstruction loss of the hypersurface structure pattern and the KL divergence loss between the encoder output approximate posterior distribution and the standard normal prior distribution.

[0065]

[0066] Where x, y, z represent the encoding pattern matrix, 153-dimensional spectral response vector, latent vector, φ, θ represent the parameters of the encoding network and the generating network respectively. The first term represents the approximate posterior distribution q formed by the latent vector z jointly encoded by the metamaterial and the spectral response. φ (z|x,y) and the standard normal prior distribution p θ (z), β is the weight coefficient; the second term represents the reconstructed log-likelihood error between the metamaterial reconstructed pattern obtained by combining the spectral response with the output of the generative network and the real pattern.

[0067] In step 5, the iterative calculation process of each round is as follows:

[0068] Step 5.1: The encoding matrix (64×64×1)-reflection spectrum (153×1) of the training set is sent to the feature extraction network of the encoder in pairs to obtain a 512-dimensional compact feature vector. After passing through two dense layers, the vector outputs the 20-dimensional statistical parameter mean vector mean and logarithmic variance vector logvar of the approximate posterior distribution, with a size of 20×1;

[0069] Step 5.2: Obtain the latent space vector z through the traditional resampling method. The specific process of resampling is z = mean + var*ε, where ε is a 20-dimensional random vector that obeys the standard normal distribution, that is, ε ~ N(0,I)

[0070] Step 5.3: The latent space vector obtained in step 5.2 is concatenated with the 153-dimensional reflectance spectrum vector in the last dimension to form a 173×1 vector, which is then fed into the reconstruction network of the generator and subjected to a transposed convolution upsampling operation to obtain the reconstructed metamaterial design encoding matrix;

[0071] Step 5.4: Calculate the reconstruction error of each pixel through the encoding matrix pattern output by the reconstruction network, and calculate the KL divergence error through the statistical parameters output by the encoder, accumulate the errors, and perform the back propagation algorithm to update the encoder network and generator network parameters of the conditional variational autoencoder, where the KL divergence loss term needs to be multiplied by a smaller weight coefficient β to avoid posterior collapse. In the embodiment of the present invention, the weight coefficient is 10 -4 ;

[0072] Step 6: During the training process, the present invention deliberately makes the approximate posterior distribution q φ (z|x,y) approximates the prior distribution p θ (z), and the present invention assumes that the prior distribution p θ (z) obeys the standard normal Gaussian distribution, so after the model is fully trained, the latent space it constructs must be continuous and smooth. The process of inverse design is to implement conditional control generation on the fully trained conditional variational autoencoder model. Here, the particle swarm optimization algorithm is introduced to search for the optimal latent vector in the latent space.

[0073] In step 6, the particle swarm optimization algorithm potential space search calculation process is as follows:

[0074] Step 6.1: The particle swarm optimization algorithm regards the 20-dimensional latent vector as a particle. First, the position and velocity of the particle are initialized, and the initial values ​​of the individual optimum (the best position of each particle in history) and the global optimum (the best position of all particles in history) are set. Specifically, m latent vectors are randomly sampled as initialization particles. The position and velocity of the particle are random vectors of the same size as the latent vector, and are sampled from the standard normal distribution.

[0075] Step 6.2: Iterative update, according to the current position of the particle, input the particle (latent vector) and the given spectrum into the decoder to obtain the material image matrix, that is, Then the prediction matrix is ​​input into the forward prediction network to calculate the predicted reflectance spectrum The fitness function is used to calculate the score, further obtain the fitness of each particle, determine whether to update the individual optimum and the global optimum, and then calculate the particle velocity. The fitness function can be a non-differentiable function. Here we will predict the reflectance spectrum The mean square error between the true reflectance spectrum R is used as the fitness function, that is, The arbitrariness of the fitness function enhances the applicability of the algorithm in designing photonic structures with complex design objectives. The velocity and position of the particle are updated according to the following formula:

[0076] v i (t+1)=w·v i (t)+c1*r1*(pBesti -x i (t))+c2*r2*(gBest-x i (t))

[0077] x i (t+1)=x i (t)+v i (t+1)

[0078] Where: v i (t) is the velocity of particle i at time t, w is the inertia weight, which controls the degree to which the particle maintains its original velocity, c1 and c2 are learning factors, which control the degree to which the particle approaches the individual best position and the global best position respectively. r1 and r2 are random numbers, usually between [0,1], pBest i is the individual best position of particle i, gBest is the global best position, x i (t) is the position of particle i at time t.

[0079] Step 6.3: If the maximum number of iterations is reached or a sufficient number of valid samples set manually are collected, the iteration is terminated and valid samples are returned. Valid samples refer to samples whose mean square error between the predicted reflectance spectrum and the true reflectance spectrum is less than a preset threshold.

[0080] The nanophotonic metamaterial design method based on conditional variational autoencoder (CVAE) and optimization algorithm proposed in the present invention constructs a smooth and continuous latent space containing rich metamaterial structure-response by jointly encoding the metamaterial structure information and the reflection spectrum information, and then combines the particle swarm optimization algorithm to perform efficient optimization in the latent space, effectively improving the design accuracy and efficiency of the inverse design post-processing.

[0081] Examples are listed below to illustrate the present invention:

[0082] Embodiment 1:

[0083] Python programming was used to generate 3000 pattern samples for each of the eight patterns, namely, cross, H-shaped, open ring, ellipse, bow tie, L-shaped, rectangle, and arc. The generated pattern samples were sent to the electromagnetic simulation software for numerical simulation. According to the specific implementation step 1, a pair of data containing 24,000 (encoding matrix, three linear polarization reflection spectra) was constructed. According to the specific implementation steps, the data set was divided into a training set of 19,200, a validation set of 2,400, and a test set of 2,400.

[0084] According to step 3, build the forward prediction network model, and send the forward prediction data set to the forward prediction network model for iterative cycle training. The optimizer for model training is set to Adam, the initial learning rate is 1e-4, the training cycle is set to 10000, and the early stopping mechanism is specified. If the validation set loss does not decrease for 200 consecutive rounds, the training will be automatically stopped.

[0085] Figure 4 It shows the decrease of the total loss value during multiple training cycles before early stopping of training. The various parts of the forward prediction network loss function gradually decrease, and the training set loss and the test set loss are similar. Finally, they decrease synchronously and converge to a lower value. The forward prediction network has high accuracy and generalization. After 2500 cycles of training, the training set Lossforward = 2.07e-4; the test set Loss forward = 2.16e-4. Specifically, the specific values ​​of each loss value of the test set are shown in Table 1. After 2500 cycles of training, the test set is close to convergence and has achieved a high accuracy. Randomly select examples from the test set, the difference between the predicted value and the simulated value is shown in Figure 6 As shown, the predicted values ​​of the forward prediction network and the simulated values ​​on the three types of reflection curves have a high degree of fit. The forward prediction network has achieved a high degree of accuracy and can quickly and accurately predict the reflection spectrum of nanophotonic metamaterials.

[0086] Table 1 Specific numerical table of loss function during forward network training

[0087]

[0088] Fix the parameters of the trained forward prediction network. Build the encoder and decoder of the conditional variational autoencoder according to step 4. Further, according to step 4, send the dataset to the encoder network and decoder network for iterative cycle training. Set the optimizer to Adam, the initial learning rate to 1e-4, the training cycle to 10000 and set early stopping, and the KL divergence loss term weight coefficient β to 10 -4 During the training process, the reconstruction of the material structure is observed, and the changing trends of the reconstruction loss and KL divergence loss are recorded.

[0089] Figure 5 The total loss and the changes in the reconstruction loss and KL divergence loss during the training cycle are shown. The total loss and reconstruction loss of the model are on a downward trend, indicating that the model effectively realizes the reconstruction process of encoding and decoding. At the same time, the KL divergence loss shows a trend of first decreasing and then increasing, indicating that the model effectively pushes the approximate posterior distribution to the pre-defined standard normal Gaussian distribution. This fully demonstrates that the conditional variational autoencoder model has high accuracy and generalization. After more than a thousand rounds of training cycles, the training set Losstotal = 2.12e-2, MSErecon =1.44e-2, KL_Loss=67.49; test set Losstotal=2.42e-2, MSE recon =1.74e-2, KL_Loss=67.39; Specifically, the specific values ​​of the loss values ​​of the test set are shown in Table 2. After thousands of rounds of training, the test set also tends to converge and achieves a higher accuracy in reconstruction loss. Figure 7 The reconstruction effect diagram of the model for a certain sample changing with rounds is given.

[0090] Table 2 Specific numerical table of loss function during conditional variational autoencoder network training

[0091]

[0092]

[0093] After the variational autoencoder network is trained, this embodiment uses an optimization algorithm to iteratively search for latent space samples. Figure 8 The algorithm flow of particle swarm optimization search is shown. In this embodiment, a sample in the test set is extracted, the number of particles is set to 30, and the iterative search is started after the particle population is initialized. After 100 rounds of iterative search within seconds, the target sample that meets the spectral threshold is obtained. Fig. 9 As shown in Figure 2, it can be seen that the proposed latent space particle swarm optimization algorithm search can achieve efficient and accurate reverse design and meet the needs of fast and accurate design.

[0094] The specific parameter settings are as follows:

[0095]

[0096] Embodiment 2:

[0097] The computer-readable storage medium of this embodiment stores a computer program thereon, and when the program is executed by a processor, the steps in the inverse design method of nanophotonic metamaterial structure based on CVAE and PSO of Example 1 are implemented.

[0098] The computer-readable storage medium of this embodiment may be an internal storage unit of the terminal, such as a hard disk or memory of the terminal; the computer-readable storage medium of this embodiment may also be an external storage device of the terminal, such as a plug-in hard disk, a smart memory card, a secure digital card, a flash memory card, etc. equipped on the terminal; further, the computer-readable storage medium may also include both an internal storage unit of the terminal and an external storage device.

[0099] The computer-readable storage medium of this embodiment is used to store computer programs and other programs and data required by the terminal. The computer-readable storage medium can also be used to temporarily store data that has been output or is to be output.

[0100] Embodiment 3:

[0101] The computer device of this embodiment includes a memory, a processor, and a computer program stored in the memory and executable on the processor. When the processor executes the program, the steps of the inverse design method of nanophotonic metamaterial structure based on CVAE and PSO in Example 1 are implemented.

[0102] In this embodiment, the processor may be a central processing unit, or other general-purpose processors, digital signal processors, application-specific integrated circuits, readily available programmable gate arrays or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, etc. The general-purpose processor may be a microprocessor or the processor may also be any conventional processor, etc. The memory may include a read-only memory and a random access memory, and provide instructions and data to the processor. A portion of the memory may also include a non-volatile random access memory. For example, the memory may also store information about the device type.

[0103] Those skilled in the art will appreciate that the disclosed content of the embodiments may be provided as methods, systems, or computer program products. Therefore, the present solution may adopt the form of hardware embodiments, software embodiments, or embodiments combining software and hardware. Moreover, the present solution may adopt the form of a computer program product implemented on one or more computer-usable storage media (including but not limited to disk storage and optical storage, etc.) containing computer-usable program codes.

[0104] The present solution is described with reference to the flowchart and / or block diagram of the method and computer program product according to the embodiment of the present solution. It should be understood that each process and / or block in the flowchart and / or block diagram, as well as the combination of the processes and / or blocks in the flowchart and / or block diagram, can be implemented by computer program instructions; these computer program instructions can be provided to a processor of a general-purpose computer, a special-purpose computer, an embedded processor or other programmable data processing device to generate a machine, so that the instructions executed by the processor of the computer or other programmable data processing device generate instructions for implementing the processes in the flowchart and / or block diagram. Figure 1 A process or multiple processes and / or boxes Figure 1 A device that provides the functions specified in a block or multiple blocks.

[0105] These computer program instructions may also be stored in a computer-readable memory capable of directing a computer or other programmable data processing device to operate in a specific manner, so that the instructions stored in the computer-readable memory produce an article of manufacture comprising an instruction device, which implements the process Figure 1 A process or multiple processes and / or boxes Figure 1 A function specified in one or more boxes.

[0106] These computer program instructions can also be loaded onto a computer or other programmable data processing device so that a series of operating steps are executed on the computer or other programmable device to produce a computer-implemented process, thereby providing instructions for implementing the process. Figure 1 A process or multiple processes and / or boxes Figure 1 The steps for the functions specified in one or more boxes.

[0107] Those skilled in the art can understand that all or part of the processes in the above-mentioned embodiments can be implemented by instructing the relevant hardware through a computer program, and the program can be stored in a computer-readable storage medium, and when the program is executed, it can include the processes of the embodiments of the above-mentioned methods. The storage medium can be a disk, an optical disk, a read-only memory (ROM) or a random access memory (RAM), etc.

[0108] The present invention provides a method for reverse design of nanophotonic metamaterial structure based on CVAE and PSO. There are many methods and ways to implement the technical solution. The above is only a preferred embodiment of the present invention. It should be pointed out that for ordinary technicians in this technical field, several improvements and modifications can be made without departing from the principle of the present invention. These improvements and modifications should also be regarded as the protection scope of the present invention. All components not specified in this embodiment can be implemented by existing technologies.

Claims

1. A nanophotonic metamaterial structure inverse design method based on CVAE and PSO, characterized in that: The specific steps are: S1. Constructing a data set, the data set includes a binary encoding matrix converted from a basic grayscale image and an electromagnetic reflection spectrum vector; S2. Split the dataset constructed in S1 into 80% training set, 10% validation set and 10% test set; S3. Build a forward prediction network model, send the training set to the forward prediction network model for iterative cycle training, and fix the forward prediction network model parameters after the training is completed; S4. Construct a conditional variational autoencoder network model, including an encoding network and a decoding network, and initialize network parameters; S5. Send the binary encoding matrix and the reflection spectrum vector in the training set as data pairs into the conditional variational autoencoder network model for iterative cycle training; S6. The optimal latent vector is found through the particle swarm optimization algorithm. The latent vector is concatenated with the reflection spectrum vector and then input into the conditional variational autoencoder network model to obtain the candidate design structure. The candidate design structure is then screened using the forward prediction network model to obtain the reverse design material pattern.

2. The design method according to claim 1, characterized in that: In S1, the specific steps of constructing the data set are: S11. Collect grayscale pattern samples of eight shapes, namely, cross, H-shaped, open ring, ellipse, bow tie, L-shaped, rectangle, and arc, through the nanophotonic metamaterial unit, further convert the grayscale pattern into a 64×64 binary coding matrix, construct the corresponding electromagnetic metasurface unit, and send it to the electromagnetic simulation software to obtain the corresponding electromagnetic response reflection spectrum curve, and the frequency range is set to 60~160Thz; wherein, the electromagnetic reflection spectrum includes three linear polarization reflections, including the reflection coefficients Rxx and Ryy of the co-polarized incident waves in the x and y directions and the reflection coefficient Rxy of the cross-polarized incident wave; S12. The 64×64 binary encoding matrix is ​​used as the input of the forward prediction network and is also one of the inputs of the conditional variational autoencoder; S13. The three types of electromagnetic reflection spectrum curves Rxx, Ryy, and Rxy are sampled at a uniform frequency with a sampling interval of 2 Thz, and are represented as 51-dimensional vectors respectively. The three 51-dimensional vectors are then concatenated to finally obtain a reflection spectrum vector with a length of 153 dimensions. The reflection spectrum vector is used as a label for the forward prediction network dataset and is also one of the inputs of the conditional variational autoencoder model.

3. The design method according to claim 2, characterized in that: The nanophotonic metamaterial unit includes an upper layer, a middle layer and a lower layer; the lower layer is fully covered with metal gold, has a conductivity of 4.561e+007S / m, and a thickness of t=50nm; the dielectric constant of the middle layer dielectric substrate material is specified to be 2.0(1+0.003i), a magnetic permeability of 1.0, a width of l1=2000nm, and a thickness of h=100nm; the upper layer is divided into a coding pattern area, the width of which is less than l1, and is divided into a 64×64 matrix in the coding pattern area. The conductivity of the coding pattern metal gold patch is 4.561e+007S / m, the width is 31.25nm, and the thickness is t=50nm. The coding pattern style selects eight common metamaterial antenna shapes.

4. The design method according to claim 1, characterized in that: The specific steps in S3 are: A forward prediction network model was constructed, which consisted of a feature extraction network and three parallel spectral prediction modules. The feature extraction network was used to extract the features of the encoding matrix and output a 512-dimensional feature vector. The parallel spectral prediction module accepted the 512-dimensional vector and output 51-dimensional Rxx, Ryy, and Rxy vectors respectively, which were finally merged and spliced ​​to form the output of the network. The feature extraction network adopted the ResNet34 structure. The network optimizer was set to Adam, and the learning rate was 1e-4. use Represents the network loss function, where y is the true value, is the predicted value, N is the dimension, the training set is sent to the forward prediction network model for training, and the total loss value of the forward prediction network is defined as Where Rf is the reflectance spectrum vector of the forward prediction dataset, It is the reflection spectrum vector predicted by the forward prediction network. After the training is completed, the model parameters of the forward prediction network are fixed.

5. The design method according to claim 1, characterized in that: In said S4, the specific steps are: The encoder of the conditional variational autoencoder includes a feature extraction network that uses the ResNet34 backbone convolutional network module, which accepts input of a 153-dimensional reflection spectrum vector and a 64×64×1 encoding matrix vector, and generates a 20-dimensional mean vector and variance vector of the posterior probability distribution parameters. The decoder is composed of a transposed convolutional layer, which concatenates the re-parameterized 20-dimensional latent space vector and the reflection spectrum as input and generates a 64×64×1 structure matrix tensor after transposed convolution of the decoder.

6. The design method according to claim 1, characterized in that: In S5, the specific steps of iterative cycle training are: S51. The encoding matrix-reflection spectrum vector of the training set is sent to the feature extraction network of the encoder in pairs to obtain a 512-dimensional compact feature vector, which is passed through two dense layers and then outputs a 20-dimensional statistical parameter mean vector and a logarithmic variance vector of the approximate posterior distribution; S52. Obtaining a latent space vector z by resampling; S53. The latent space vector obtained in S52 is concatenated with the 153-dimensional reflection spectrum vector, and then sent to the reconstruction network of the decoder to generate a reconstructed metamaterial design coding matrix; S54. Calculate the reconstruction error by reconstructing the encoding matrix pattern output by the network, and calculate the KL divergence error by the statistical parameters output by the encoder, and perform a back-propagation algorithm to update the network parameters of the conditional variational autoencoder.

7. The design method according to claim 1, characterized in that: In S6, the specific steps of finding the optimal potential vector by using the particle swarm optimization algorithm are: S61. Given the expected reflectance spectrum, randomly sample a 20-dimensional latent vector z from the standard normal distribution N(0, I) and concatenate the two, and feed them into the reconstruction network to obtain a candidate design; S62. Use the forward prediction model to predict the reflectance spectrum of the candidate design, and keep the mean square error of the reflectance spectrum less than 10 -3 The sample is taken as the final design result of random sampling; S63. The particle swarm optimization algorithm regards the 20-dimensional potential vector as a particle, first initializes the position and velocity of the particle, and sets the initial values ​​of the individual optimal and global optimal; S64. Iterative update, according to the current position of the particle, use the decoder to obtain the image prediction, and calculate the predicted reflectance spectrum through the forward prediction network; the evaluation update process includes using the error between the predicted spectrum and the expected spectrum to update the particle fitness, including individual optimal and global optimal, and retaining the samples that meet the threshold conditions; S65. Terminate after reaching the maximum number of iterations or searching for a sufficient number of valid samples.

8. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the program is executed by a processor, the inverse design method of nanophotonic metamaterial structure based on CVAE and PSO as described in any one of claims 1 to 7 is implemented.

9. A computer device comprising a memory, a processor and a computer program stored in the memory and executable on the processor, characterized in that: When the processor executes the program, the inverse design method of nanophotonic metamaterial structure based on CVAE and PSO as described in any one of claims 1 to 7 is implemented.

Citation Information

Patent Citations

  • Multi-metamaterial inverse design method based on transfer learning

    CN116415504A

  • Dense time-varying array construction method and system based on controllable variational auto-encoder

    CN116449305A

  • Superatom reverse design method based on LDM-PNN and particle swarm optimization

    CN116913436A

  • Hyperspectral abnormal target detection method based on multi-scale analysis and variational auto-encoder

    CN118279747A

  • Neural network-based apparatus parameter acquisition method and system, and related component

    WO2023098053A1

Cited By

  • Superconducting magnet optimization method based on multi-modal deep learning and reverse design

    CN121413459A

  • Photonic device parameter reverse extraction model construction method and device, terminal, medium and characterization method

    CN122469998A

  • A metasurface reverse design method based on SDF and double-seed evolution

    CN122758865A