A Fast Prediction Method for Two-Dimensional Field Distribution on a Full-Surface Metasurface
By using a multi-channel matrix and a convolutional neural network to process the coupling between metasurface structures, the problem of electromagnetic coupling effect of metaatoms was solved, enabling fast and accurate prediction of metasurface electric field distribution, and reducing design costs and time.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- TIANJIN UNIV
- Filing Date
- 2026-01-06
- Publication Date
- 2026-07-31
AI Technical Summary
Existing metasurface design methods fail to effectively consider the electromagnetic coupling effect between metaatoms, leading to deviations in electromagnetic response prediction. Furthermore, traditional methods are costly, or machine learning methods lack sufficient coupling modeling.
We employ multi-channel matrix modeling and convolutional neural networks, using 1×1 and 3×3 convolutions to handle the coupling between metasurface structures, and combine this with a unique dataset augmentation method to construct a neural network model for rapid prediction.
It enables efficient and accurate prediction of the two-dimensional field distribution of the entire metasurface, shortening design time, reducing costs, and improving prediction accuracy.
Smart Images

Figure CN121905372B_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of metasurface electric field distribution prediction technology, and in particular to a rapid method for predicting the two-dimensional field distribution of an entire metasurface. Background Technology
[0002] Metasurfaces are two-dimensional metamaterials composed of planar subwavelength structures, namely metaatoms or superatoms. By precisely setting the geometric dimensions and arrangement of metaatoms, it is possible to enable functional devices to be very thin while possessing the ability to arbitrarily control the amplitude, phase, polarization, and frequency of electromagnetic waves, which is not available in traditional optical materials.
[0003] Existing metasurface design methods mainly fall into two categories: one is the traditional method, which uses electromagnetic simulation software (such as CST, Lumerical FDTD, COMSOL, etc.) to repeatedly calculate the electromagnetic responses of metaatoms with different structural parameters, establishing a one-to-one correspondence between metaatomic structures and electromagnetic responses. Then, based on the distribution of the target electromagnetic response, the metaatoms are arranged to form a metasurface with the target function, but this method is costly. The other category uses various neural networks to fit the mapping relationship between metaatoms and their electromagnetic responses, thereby eliminating the reliance on electromagnetic simulation software during metasurface design and greatly accelerating the design time.
[0004] However, all of the above methods neglect the electromagnetic coupling effect between metaatoms. Whether using simulation software to build a database or neural networks for prediction, the underlying data usually comes from the analysis of the electromagnetic response of individual metaatoms under periodic boundary conditions. These methods assume that each metaatom in the final metasurface array will still maintain its electromagnetic response in its isolated state. However, in the actual designed metasurfaces, the boundary conditions of each metaatom are not periodic, and it will have varying degrees of near-field coupling with surrounding metaatoms of different structures. This will lead to a deviation between the actual electromagnetic response and the predicted value under periodic boundary conditions.
[0005] To address this issue, several improvements have been proposed in existing technologies. For example, one approach uses neural networks to predict the field distribution of a local unit composed of 3×3 metaatoms, treating this local unit as a single "pixel" to construct the entire metasurface. This method alleviates the coupling problem between adjacent metaatoms to some extent, but it doesn't completely eliminate it, as coupling still exists between the 3×3 local units. Another approach proposes using adjoint optimization to solve this coupling problem, but this method also requires multiple simulations of the entire metasurface's field distribution, resulting in high time costs. Summary of the Invention
[0006] The purpose of this invention is to provide a fast prediction method for the two-dimensional field distribution of a whole metasurface, which can efficiently and accurately predict the overall electromagnetic response of a metasurface including coupling effects, and quickly and accurately predict the electric field distribution of a large-scale metasurface, overcoming the technical defects of high computational cost of traditional numerical simulation and insufficient coupling modeling of existing machine learning methods.
[0007] To achieve the above objectives, this invention provides a method for rapid prediction of two-dimensional field distribution on a whole-surface metasurface, comprising the following steps: S1. Metasurface Modeling: The entire metasurface is modeled as a multi-channel matrix. Each pixel of the multi-channel matrix corresponds to a superatomic structure. The channel information of each pixel is composed of the structural parameters of the superatomic structure. The multi-channel matrix is used as the input of the neural network. S2. Construct a neural network model, which includes a first local feature encoding layer, a neighborhood coupling modeling layer, a second local feature encoding layer, a data processing layer, and a field distribution smoothing layer. S3. Generate a dataset with coupling effects: Randomly generate several full-surface metasurface structures within the preset variation range of the metaatomic structure parameters. Obtain the near-field electric field distribution of each metasurface under preset incident conditions using electromagnetic simulation software. Make the structural parameter distribution of the metasurface correspond one-to-one with the corresponding near-field electric field distribution, and divide it into training set, validation set and test set. S4. Train the constructed neural network model based on the dataset to obtain the trained field distribution prediction model; S5. Input the quantized multi-channel matrix of the metasurface to be predicted into the trained field distribution prediction model to quickly output the corresponding two-dimensional field distribution.
[0008] Preferably, in S2, the first local feature encoding layer uses 1×1 convolution and ReLU activation function to encode the feature parameters at each position of the multi-channel matrix, i.e., non-linear mapping, to mine its high-dimensional information; specifically, the channel information of the data at each position is weighted and summed, and then the sum is non-linearly mapped, which is equivalent to weighting and summing the channel information of the data at each position, and performing a fully connected neural network processing on the data in the channel; finally, the initial features and the mapped high-dimensional latent features are spliced together through skip connections.
[0009] Preferably, in S2, the neighborhood coupling modeling layer uses 3×3 convolution to aggregate the features of neighboring superatoms and generate new high-dimensional features at the center position. The matrix size is kept unchanged by skip connections and boundary padding with zeros. Each additional 3×3 convolution layer increases the aggregation radius of the central superatom by 1. The second local feature encoding layer performs a nonlinear mapping on the aggregated features, which is equivalent to a fully connected neural network, and outputs a preliminary field distribution prediction. The resolution of the preliminary field distribution prediction is a preset multiple of the input metasurface structure, and it predicts the real and imaginary parts of the three components of the electric field x, y, and z, respectively.
[0010] Preferably, in S2, the data processing layer transforms the size of the preliminary field distribution prediction to obtain the target input size; the field distribution smoothing layer uses a 5×5 convolution kernel to smooth the obtained preliminary field distribution prediction and outputs the final two-dimensional field distribution.
[0011] Preferably, in S3, when generating the dataset, the simulation results of the entire metasurface structure are slide-cut to expand the dataset. The size of the input metasurface is set to N×N superatoms, and only the central N-2r region of the output field distribution is selected for model training, where r is the number of 3×3 convolution layers in the neighborhood coupling modeling layer.
[0012] Preferably, in S4, the PyTorch deep learning framework is used to train the model. The hyperparameter settings include the initial learning rate, decay standard, decay coefficient, number of iterations, and early stopping mechanism. A step-size learning rate decay strategy is adopted, the optimizer is the Adam optimizer, and the loss function is the mean squared error (MSE) loss.
[0013] Based on the rapid prediction method for the two-dimensional field distribution of the entire metasurface, this invention also provides a metasurface reverse design method, specifically: Step A: Freeze the parameters of the field distribution prediction model after training; Step B: Randomly generate and arrange the dimensions of the desired metasurface within the specified range of metaatomic structure parameters, and then convert them into the input form of a neural network; Step C: The neural network outputs the near-field distribution of the entire metasurface, calculates the field distribution of the target region using the Rayleigh-Sommerfeld diffraction formula, and calculates the mean square error Loss with the preset target field distribution; Step D: Solve the gradient of Loss with respect to the superatomic structure parameters using the backpropagation algorithm, update the superatomic structure parameters using the gradient descent algorithm, and randomly sample and assign values to parameters that exceed the preset range within the preset range. Step E: Repeat steps BD until the loss converges to the preset threshold or the maximum number of iterations is reached, to obtain a metasurface structure with the target function.
[0014] Therefore, this invention employs the aforementioned method for rapid prediction of the two-dimensional field distribution of a whole-surface metasurface. It cleverly uses convolutional neural networks to handle the coupling problem between metasurface structures, resulting in smaller design errors. It utilizes 1×1 convolutions to independently mine high-dimensional information of the metasurface structure at each location, and uses 3×3 convolutions to ensure that the field distribution prediction of superatoms takes into account the influence of neighboring structures. It adopts a unique dataset expansion method, including simulating a small number of super-large-surface metasurfaces during simulation and then cropping them. It can quickly predict the field distribution of a whole-surface metasurface, greatly shortening the design time of the metasurface.
[0015] The technical solution of the present invention will be further described in detail below with reference to the accompanying drawings and embodiments. Attached Figure Description
[0016] Figure 1 Here are (a) a superatomic structure diagram and (b) a schematic diagram of a metasurface, representing embodiments of the present invention. Figure 2 This is a neural network structure diagram according to an embodiment of the present invention; Figure 3 This is a schematic diagram of the convolution operation according to an embodiment of the present invention; Figure 4 This is a schematic diagram of the convolution operation in the neighborhood coupling modeling layer of this invention. Figure 5 This is a dataset expansion method according to an embodiment of the present invention; Figure 6 These are the neural network training results of embodiments of the present invention; Figure 7 This refers to the prediction performance of the model in this embodiment on the validation set; Figure 8 This is a reverse-engineered S-shaped holographic result diagram of an embodiment of the present invention; Figure 9 This is an overall flowchart of the method described in the embodiments of the present invention. Detailed Implementation
[0017] The technical solution of the present invention will be further described below with reference to the accompanying drawings and embodiments.
[0018] Unless otherwise defined, the technical or scientific terms used in this invention shall have the ordinary meaning understood by one of ordinary skill in the art to which this invention pertains. The terms "first," "second," and similar terms used in this invention do not indicate any order, quantity, or importance, but are merely used to distinguish different components. Terms such as "comprising" or "including" mean that the element or object preceding the word encompasses the elements or objects listed following the word and their equivalents, without excluding other elements or objects. Terms such as "connected" or "linked" are not limited to physical or mechanical connections, but can include electrical connections, whether direct or indirect. Terms such as "upper," "lower," "left," and "right" are used only to indicate relative positional relationships; when the absolute position of the described object changes, the relative positional relationship may also change accordingly.
[0019] Example 1 This embodiment uses a constructed convolutional neural network to predict the near-field distribution of a full-surface metasurface. In this example, the near-field is located 25 μm from the top of the metasurface. The network input is the quantization matrix of the entire metasurface, and the output is the electric field distribution along each xyz component. Figure 1 (a) The rectangular superatomic structure shown is used as an example to describe this method. Note that this method is applicable to superatomic structures with arbitrary energy parameterization. Figure 1 The superatom structure uses lossless silicon in the terahertz band and is a rectangular cubic prism. The length and width of the silicon pillars are variable parameters, ranging from 20 μm to 180 μm, with a period of 200 μm. The substrate thickness is 600 μm, and the operating wavelength is 0.5 THz. Terahertz waves are incident from below the substrate, passing through the substrate and the rectangular superatom structure. The electric field distribution at this location is detected by a field monitor at a distance of 25 μm above the structure; this location is also the predicted field distribution location by the neural network. After obtaining this near-field field distribution, the field distribution at any subsequent arbitrary location can be calculated using the Rayleigh-Sommerfeld diffraction formula. The overall process is as follows: Figure 9 As shown, the specific content is as follows: S1. Metasurface Modeling: The entire metasurface is modeled as a multi-channel matrix. Each pixel in the multi-channel matrix corresponds to a superatomic structure, and the channel information of each pixel is composed of the structural parameters of the superatomic structure. The multi-channel matrix serves as the input to the neural network. In this embodiment, the entire metasurface is modeled as a multi-channel matrix, where each superatomic structure corresponds to a pixel, and each pixel is composed of the structural parameters of the superatomic structure, such as... Figure 1 (b) shows a full-surface hypersurface composed of N×N rectangular structures. This hypersurface can be modeled as a 2-channel N×N image, i.e., a matrix of size 2×N×N, which is the input of the neural network.
[0020] S2. Construct a neural network model, which includes a first local feature encoding layer, a neighborhood coupling modeling layer, a second local feature encoding layer, a data processing layer, and a field distribution smoothing layer.
[0021] The first local feature encoding layer uses 1×1 convolution and ReLU activation function to encode the feature parameters at each position of the multi-channel matrix, i.e., non-linear mapping, to mine its high-dimensional information. Specifically, the channel information of the data at each position is weighted and summed, and then the sum is non-linearly mapped, which is equivalent to weighting and summing the channel information of the data at each position, and performing a fully connected neural network processing on the data in the channels. Finally, the initial features and the mapped high-dimensional latent features are concatenated through skip connections.
[0022] The neighborhood coupling modeling layer uses 3×3 convolution to aggregate features of neighboring superatoms and generate new high-dimensional features at the center position. The matrix size is kept unchanged by skip connections and zero padding at the boundaries. Each additional 3×3 convolution layer increases the aggregation radius of the central superatom by 1. The second local feature encoding layer performs a nonlinear mapping on the aggregated features, which is equivalent to that of a fully connected neural network, and outputs a preliminary field distribution prediction. The resolution of the preliminary field distribution prediction is a preset multiple of the input metasurface structure, and it predicts the real and imaginary parts of the three components of the electric field x, y, and z respectively.
[0023] The data processing layer transforms the initial field distribution prediction size to obtain the target input size; the field distribution smoothing layer uses a 5×5 convolution kernel to smooth the initial field distribution prediction and outputs the final two-dimensional field distribution.
[0024] In this embodiment, the network model is as follows: Figure 2 As shown. The first local feature encoding layer uses 1×1 convolution and ReLU activation function to encode the feature parameters at each location, i.e., non-linear mapping, or mining of its high-dimensional information. Its working principle is as follows: Figure 3 As shown, the channel information of each location data is weighted and summed, and then the sum is nonlinearly mapped. This is equivalent to weighting and summing the channel information of each location data, which means that the data on the channels is processed by a fully connected neural network. Figure 3 In the diagram, 6×N×N represents 6 channels, with both the length and width being N. The role of the first local feature encoding layer is to perform nonlinear mapping on the structural parameters of each superatom, providing more potential features for the subsequent model to predict the coupling between structures. Finally, the initial features and the high-dimensional potential features are concatenated through skip connections and then input into the neighborhood coupling modeling layer.
[0025] The neighborhood coupling modeling layer uses 3×3 convolutions to aggregate features from neighboring superatoms and generate new high-dimensional features at the central location, such as... Figure 4As shown, taking a 5×5 matrix as an example, each additional layer of convolution is equivalent to increasing the radius range aggregated by the central superatom by 1, such as... Figure 4 The output 55 is obtained by convolving the 3×3 region of the previous layer with the 3×3 convolution kernel of this layer. This region is in turn obtained by convolving the 5×5 region of the layer before that with its 3×3 convolution kernel. Therefore, with each additional layer of convolution, the radius range of the central superatom increases by 1. Figure 4 The matrix is padded with zeros on the outermost ring to ensure that the size of the matrix obtained after using 3×3 convolution remains unchanged. In addition, the neighborhood coupling modeling layer also uses skip connections.
[0026] The second local feature encoding layer performs a nonlinear mapping on the aggregated features, equivalent to the operation of a fully connected neural network, ultimately outputting a preliminary field distribution prediction. In this implementation, the resolution of the output field is set to be 14 times that of the input metasurface structure, meaning that one superatom corresponds to a 14×14 pixel field distribution matrix. The field distributions of the x, y, and z components need to be predicted. Each component's field distribution is a complex number, and its real and imaginary parts are predicted separately. The final output size of this part of the network model is (1176, N, N). Between the second local feature encoding layer and the field distribution smoothing layer is a data processing layer. This layer transforms the output of the second local feature encoding layer, changing the output size (1176, N, N) to the input size of the fourth part (6, N×14, N×14). The field distribution smoothing layer uses a 5×5 convolutional kernel to smooth the obtained preliminary field distribution.
[0027] S3. Generate a dataset with coupling effects: Randomly generate several full-surface metasurface structures within a preset range of variation of the superatomic structure parameters. Obtain the near-field electric field distribution of each metasurface under preset incident conditions using electromagnetic simulation software. Assign a one-to-one correspondence between the structural parameter distribution of the metasurface and the corresponding near-field electric field distribution, and divide the dataset into training, validation, and test sets. When generating the dataset, slide cut the simulation results of the full-surface metasurface structure to expand the dataset. Set the size of the input metasurface to N×N superatoms, and select only the central N-2r region of the output field distribution for model training, where r is the number of 3×3 convolution layers in the neighborhood coupling modeling layer.
[0028] In this embodiment, the field distribution of a 100-facet 50×50 metasurface was simulated using FDTD, and the metasurface was then slide-cut into 32×32 sections to expand the dataset. Figure 5As shown, a final dataset of 36,000 sets was obtained. Due to the varying cutting locations—some at the center of the large hypersurface, others at its edges—the boundary conditions became inconsistent; some boundary conditions were open, while others were randomly distributed rectangular structures. The neural network's input and output were set to a standard size of 32×32 hyperatoms, but only the central 26×26 region of the output was considered. Since the neighborhood coupling modeling layer used three convolutional layers with a convergence radius of r=3, if the network input size was N, the predicted region should be N-2r. This means only the values from this region were used to generate the loss to guide the neural network's training. This ensured consistent boundary conditions for the red regions to be predicted across all datasets, all being three randomly distributed hyperatomic layers.
[0029] S4. Train the constructed neural network model based on the dataset to obtain the trained field distribution prediction model. The model is trained using the PyTorch deep learning framework. The hyperparameter settings include initial learning rate, decay standard, decay coefficient, number of iterations, and early stopping mechanism. A step-size learning rate decay strategy is adopted, the optimizer is the Adam optimizer, and the loss function is the mean squared error (MSE) loss.
[0030] S5. Input the quantized multi-channel matrix of the metasurface to be predicted into the trained field distribution prediction model to quickly output the corresponding two-dimensional field distribution.
[0031] In this embodiment, the Python version of the PyTorch deep learning framework was used. The hyperparameters for training the network were set as follows: the initial learning rate was 1e... -3 The training employed a step-wise learning rate decay strategy, decaying the learning rate every 1000 training epochs with a decay coefficient gamma of 0.9. The maximum number of training iterations was 10,000 epochs, and an early stopping mechanism was implemented: training was stopped if the test set loss did not decrease after 10 consecutive iterations. The batch size for each epoch was 64. The optimizer was the Adam optimizer in PyTorch, and the loss function was defined as the mean squared error (MSE) between the network's output electromagnetic response and the true label value. The hardware used to train the neural network model was an Nvidia RTX 3090 graphics card. The network training results are as follows: Figure 6 As shown, the blue curve represents the loss on the training set, the red curve represents the loss on the validation set, and the horizontal axis represents the number of network iterations. From Figure 6 It can be observed that the network training performance is good, and the loss functions of the training set and the validation set are highly consistent and eventually converge to around 0.11. Figure 7 This demonstrates the predictive performance of the neural network model on the validation set. Figure 7 (a) shows the prediction results of the trained neural network model. Figure 7(b) shows the corresponding FDTD simulation results. This embodiment uses x-polarized incident light and does not involve polarization conversion. Figure 7 Only the electric field intensity distribution of the x-polarization component in the output field is shown. Comparison with randomly selected samples from the validation set reveals that the electric field distribution predicted by the model highly matches the simulation results in overall trend, verifying the excellent generalization ability of the proposed neural network model. Furthermore, this model obtains the near-field distribution of the entire metasurface in milliseconds, while traditional simulation software requires hours to days, significantly shortening the time required to acquire the electric field distribution of large-scale metasurfaces.
[0032] This neural network model can be used to reverse-engineer metasurfaces and obtain the structural parameters of all metaatoms of a metasurface with a specified function. Taking the combination of this neural network model with backpropagation and gradient descent algorithms as an example, we can implement the reverse design of metasurfaces: Step A: Freeze the parameters of the trained neural network.
[0033] Step B: Randomly generate and arrange the dimensions of the desired metasurface within the specified range of metaatomic structural parameters, and then convert them into the input form of a neural network.
[0034] Step C: The neural network quickly outputs the near-field distribution of the entire metasurface at this point, i.e., at a distance of 25 μm from the top of the superatomic structure. Then, the Rayleigh-Sommerfeld diffraction formula is used to calculate the field distribution of the target region and the mean square error (Loss) is calculated with the field distribution of the target.
[0035] Step D: By applying the backpropagation algorithm to the loss, the gradient of the superatomic structure parameters can be obtained. The gradient descent algorithm can then be used to update the superatomic structure parameters in one round. For parameters that exceed the specified design parameter range after the update, random sampling and assignment are performed within the design parameter range.
[0036] Step E: Repeat the entire design loop until the loss converges to the threshold or the maximum number of iterations is reached.
[0037] Figure 8 The S-shaped holographic result image designed using this method is shown. The hologram is located 3.5 mm above the metasurface. (a) is the target holographic pattern, (b) is the light intensity distribution at the target position calculated by Rayleigh-Sommerfeld diffraction formula after the near-field distribution of the metasurface obtained by reverse design is output by the prediction model, and (c) is the simulation result image of the metasurface obtained by reverse design. It can be found that the reverse design effect of this model is very good and the target pattern is clearly displayed.
[0038] Therefore, this invention employs the aforementioned method for rapid prediction of the two-dimensional field distribution of a whole-surface metasurface. It cleverly uses convolutional neural networks to handle the coupling problem between metasurface structures, resulting in smaller design errors. It utilizes 1×1 convolutions to independently mine high-dimensional information of the metasurface structure at each location, and uses 3×3 convolutions to ensure that the field distribution prediction of superatoms takes into account the influence of neighboring structures. It adopts a unique dataset expansion method, including simulating a small number of super-large-surface metasurfaces during simulation and then cropping them. It can quickly predict the field distribution of a whole-surface metasurface, greatly shortening the design time of the metasurface.
[0039] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention and not to limit them. Although the present invention has been described in detail with reference to preferred embodiments, those skilled in the art should understand that modifications or equivalent substitutions can still be made to the technical solutions of the present invention, and these modifications or equivalent substitutions cannot cause the modified technical solutions to deviate from the spirit and scope of the technical solutions of the present invention.
Claims
1. A method for fast prediction of two-dimensional field distribution of a perfect metasurface, characterized in that, Includes the following steps: S1. Metasurface Modeling: The entire metasurface is modeled as a multi-channel matrix. Each pixel of the multi-channel matrix corresponds to a superatomic structure. The channel information of each pixel is composed of the structural parameters of the superatomic structure. The multi-channel matrix is used as the input of the neural network. S2. Construct a neural network model, which includes a first local feature encoding layer, a neighborhood coupling modeling layer, a second local feature encoding layer, a data processing layer, and a field distribution smoothing layer. The first local feature encoding layer uses 1×1 convolution and ReLU activation function to encode the feature parameters at each position of the multi-channel matrix, i.e., non-linear mapping, to mine its high-dimensional information. Specifically, it performs a weighted summation of the channel information of the data at each position, and then performs a non-linear mapping on the summation result, which is equivalent to performing a weighted summation of the channel information of the data at each position, and performing a fully connected neural network processing on the data of the channels. Finally, the initial features and the mapped high-dimensional latent features are concatenated through skip connections. The neighborhood coupling modeling layer uses 3×3 convolutions to aggregate features of neighboring superatoms and generate new high-dimensional features at the center position. The matrix size is kept unchanged by skip connections and zero padding at the boundaries. Each additional 3×3 convolution layer increases the aggregation radius of the central superatom by 1. The second local feature encoding layer performs a nonlinear mapping on the aggregated features, equivalent to a fully connected neural network, and outputs a preliminary field distribution prediction. The resolution of the preliminary field distribution prediction is a preset multiple of the input metasurface structure, and it predicts the real and imaginary parts of the three components of the electric field x, y, and z respectively. The data processing layer transforms the initial field distribution prediction size to obtain the target input size; the field distribution smoothing layer uses a 5×5 convolution kernel to smooth the initial field distribution prediction and outputs the final two-dimensional field distribution. S3. Generate a dataset with coupling effects: Randomly generate several full-surface metasurface structures within the preset variation range of the metaatomic structure parameters. Obtain the near-field electric field distribution of each metasurface under preset incident conditions using electromagnetic simulation software. Make the structural parameter distribution of the metasurface correspond one-to-one with the corresponding near-field electric field distribution, and divide it into training set, validation set and test set. S4. Train the constructed neural network model based on the dataset to obtain the trained field distribution prediction model; S5. Input the quantized multi-channel matrix of the metasurface to be predicted into the trained field distribution prediction model to quickly output the corresponding two-dimensional field distribution.
2. The method of claim 1, wherein the method is characterized by: In S3, when generating the dataset, the simulation results of the entire metasurface structure are slide-cut to expand the dataset. The size of the input metasurface is set to N×N superatoms, and only the central N-2r region of the output field distribution is selected for model training, where r is the number of 3×3 convolution layers in the neighborhood coupling modeling layer.
3. The method for rapid prediction of two-dimensional field distribution on a whole-surface metasurface according to claim 1, characterized in that, In S4, the PyTorch deep learning framework is used to train the model. The hyperparameter settings include initial learning rate, decay standard, decay coefficient, number of iterations, and early stopping mechanism. A step-size learning rate decay strategy is adopted, the optimizer is the Adam optimizer, and the loss function is mean squared error (MSE) loss.
4. The method for rapid prediction of two-dimensional field distribution on a whole-surface metasurface according to any one of claims 1-3, characterized in that, It also includes metasurface reverse engineering, specifically: Step A: Freeze the parameters of the field distribution prediction model after training; Step B: Randomly generate and arrange the dimensions of the desired metasurface within the specified range of metaatomic structure parameters, and then convert them into the input form of a neural network; Step C: The neural network outputs the near-field distribution of the entire metasurface, calculates the field distribution of the target region using the Rayleigh-Sommerfeld diffraction formula, and calculates the mean square error Loss with the preset target field distribution; Step D: Solve the gradient of Loss with respect to the superatomic structure parameters using the backpropagation algorithm, update the superatomic structure parameters using the gradient descent algorithm, and randomly sample and assign values to parameters that exceed the preset range within the preset range. Step E: Repeat steps BD until the loss converges to the preset threshold or the maximum number of iterations is reached, to obtain a metasurface structure with the target function.