{'fraction_non_alphanumeric': 0.024938501993383662, 'fraction_numerical': 0.012469250996691831, 'mean_word_length': 5.058581706063721, 'pattern_counts': {'":': 0, '<': 0, '<?xml version=': 0, '>': 0, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
A deep learning approach for inverse design of the metasurface for dual-polarized waves

Compared to the conventional metasurface design, machine learning-based methods have recently created an inspiring platform for an inverse realization of the metasurfaces. Here, we have used the Deep Neural Network (DNN) for the generation of desired output unit cell structures in an ultra-wide working frequency band for both TE and TM polarized waves. To automatically generate metasurfaces in a wide range of working frequencies from 4 to 45 GHz, we deliberately design an 8 ring-shaped pattern in such a way that the unit-cells generated in the dataset can produce single or multiple notches in the desired working frequency band. Compared to the general approach, whereby the final metasurface structure may be formed by any randomly distributed"0"and"1", we propose here a restricted output structure. By restricting the output, the number of calculations will be reduced and the learning speed will be increased. Moreover, we have shown that the accuracy of the network reaches 91\%. Obtaining the final unit cell directly without any time-consuming optimization algorithms for both TE and TM polarized waves, and high average accuracy, promises an effective strategy for the metasurface design; thus, the designer is required only to focus on the design goal.


Introduction
Metamaterials have attracted widespread attention due to their peculiar assets to modify the permittivity and permeability. 1,2,[27][28][29] Recently, many novel functionalities have been implemented by metamaterials and their 2D counterpart, metasurfaces, such as intelligent surfaces for communication, 3,4 real-time wavefront manipulation, 5-8 perfect absorption, 9,10 and machine learning metasurface design. 11,12 However, all of these works are founded on conventional approaches including trial-anderror methods, brute force optimization methods, and parameter sweep, which are timeconsuming processes. Therefore, to solve the above challenges and to seek a fast, effective, and programmed route for designing a metasurface, we have benefited from machine learning.
Deep learning is an efficient approach for learning the relationship between input and wanted information from the samples of past experiences. To be more specific, deep learning as a special section of machine learning can infer the basic rules based on formerly specified data; then, for different assigned inputs, the designed network can estimate reasonable decisions.
With expanding development of machine learning and its possible future applications to address some important problems such as signal processing 13 and through the wall imaging, 14 we are now witnessing the opening of machine learning in wave-interaction phenomena.
Owing to its potential capacity to provide higher accuracy, less design time, and enhance the productivity of a modeling procedure, machine learning has been introduced in numerous electromagnetic phenomena, for instance, all-dielectric metasurfaces, 15 antenna design, 16,17 acoustic metamaterials, 18,19 and computational electromagnetics. 20,21 T. Cui et al. presented an inverse metasurface realization that can recognize the inter-nal principles between input metasurface structures and their S-parameters with 76.5% of accuracy. 22 Zhang et al. have proposed an approach based on machine learning for designing anisotropic coding metasurfaces with a connection between deep learning and BPSO to explore the ideal reflection phases of two-unit cells for the desired target. 23 Shan et al.
have introduced conditional deep convolutional generative adversarial networks to code the programmable metasurface for multiple beam steering, with accuracy higher than 94%. 24 A machine learning-based inverse metasurface design has been provided, in 25 which is capable of directly computing the output metasurface structure by entering the sought design targets into the model. Recently, a double deep Q-learning network has been introduced for distinguishing the ideal type of material and optimizing a hologram structure to increase its efficiency. 26 Here, benefiting from Deep Neural Network (DNN), we propose a network scheme for automatic metasurface design for dual-polarized waves with an average accuracy of up to 92%. Our network is capable of generating any desired metasurface based on the input data for both TE and TM polarized waves which its working frequency can reach up to 45 GHz. The works presented in 22,25 can generate the output structure in the frequency range of 5 to 20 GHz and 16-20 GHz, respectively. To broaden the working frequency, we consider 8 annular models with the purpose of generating single or multiple resonances in the desired working frequency. Besides, to enhance the speed of the training, shorten the number of computations, and boost the effectiveness of our network, the output of the network is confined; thus, the DNN should generate the metasurface structure by employing the proposed 8 annular models. We demonstrate that the accuracy of this network also reaches 91%. Consuming less computational resources, having a wide frequency band, generating desired output metasurface without resorting to optimization procedure, and working for both TE and TM polarized waves make our method promising for boosting the speed of computations and designs. Figure 1 demonstrates the proposed 8 annular models, each of them is composed of three layers of copper, a substrate (FR4 with permittivity of 4.2+0.025i, and thickness of 1.5mm), and a ground plane to block the incident electromagnetic waves. Each annular model is 1.6 mm and is composed of 8 × 8 lattices named as "1" and "0" to indicate the spaces with and without the copper. Each meta-atom consists of 4 × 4 arbitrarily distributed annular models and the final unit-cell is 6.4 mm. Therefore, each unit cell generated as an input of DNN comprises 32×32 lattices with a length of 0.2 mm. The reason for using 8 annular patterns is to produce single or multiple resonances in the generated S-parameters in a broad frequency range from 4 to 45 GHz. Since it is almost impossible to attain the relationship between the input "0" and "1" matrix and its equivalent S-parameter, the machine learning method can be considered as an encouraging solution to shorten the computational operations for obtaining the ideal results.

Deep learning
Nowadays, neural network algorithms have appeared to solve some fundamental challenges especially in optimization and artificial intelligence. Schematic representation of an artificial neuron is depicted in Figure 2, in which A n denotes the input neurons. Since each A is connected to a weight, the multiplication of A i 's by W i 's has emerged in the input of the summation. By considering φ(x) as an activation function, eventually, the output of this process is determined by:

Confined output configuration
In this paper, we have benefited from a DNN to find out the intrinsic connections between the output generated metasurface and its S-parameters features. To establish our dataset,
In our model, we have used dense and dropout layers successively as depicted in Figure   1. To escape from the misdirecting in the learning section and decreasing the chance of overfitting, we randomly neglected specified numbers of neurons in the dropout layer. On the other hand, we have defined the dense layer in such a way that each neuron has a connection to all the neurons in the former layers. Throughout the training section, we have used Adam optimizer to calculate the variances between the predetermined and output data repeatedly. By defining a loss function as a Mean Square Error (Eq. 2), we have observed the differences between the original and generated data; thus, when it reaches the specified criterion, the training step will stop.
In the above equation, m, Y i andŶ i represent the number of data points, observed and predicted values, respectively. To increase the rate of accuracy, we adopted the sigmoid activation function in the layer number of 11 (see Table 1) since our wanted output in the DNN is 0 or 1. Eq. 3 and Eq. 4 show the expression of the activation of relu and sigmoid operators.
When it comes to evaluating the model, different design targets of S-parameters are expected to determine whether the designed network can generate corresponding metasurface structures. To establish our model, the Tensorflow and Keras frameworks have been adopted, while our network is performed using Python 3.8.0. Finally, after the design steps are completed, it is only needed to insert the wanted S-parameter features, and the designed DNN can form the final unit cell in accordance with the learned information obtained through the training process.  first row of Table II). Observe in Figure   3(b,c) that the full-wave simulation successfully reaches the design targets. Similarly, for instance in the last example (see Figure 4(d-f)), a metasurface is designed in such a way that its S-parameters contain one and three resonances in pre-determined frequencies (see the last row of Table II). Full-wave simulation results are in accordance with our sought design goals. Moreover, the diagrams of the accuracy and loss function of our presented DNN confined output architecture are depicted in Figure 5. In addition, the details of training and evaluation time, and the model size for our proposed DNN are presented in Table III. These results are captured utilizing Google Colab with the model of Tesla T4 and 15 MB of RAM. As can be seen, the design time of our approach to generating a unit cell is 0.038 sec. Therefore, compared to the conventional method, which takes about 700 to 800 minutes, our presented approach is much faster and more efficient. Note that we cannot directly compare our method to other inverse designs of the metasurface since the employed GPU and RAM are different.
Accordingly, we have proven that our machine learning-based approach is a promising candidate for inverse design of the metasurfaces in terms of calculation repetitions, accuracy and speed. Establishing a DNN-confined output configuration based on the input data for both TE and TM polarized waves is the innovation to form a specified metasurface structure for dual orthogonal polarizations.

Conclusion
In conclusion, adopting a deep neural network, we have presented an inverse metasurface design approach for dual orthogonal polarized waves. By merely specifying four design goals for both TE and TM cases (number of notches, notch frequencies, notch depths, and notch bandwidths), the designed DNN can create the final metasurface structure in the output. To broaden the working frequency, we have considered 8 annular models; so that the created unit cells in the output can produce different resonances over wide frequencies up to 45 GHz. The numerical simulations illustrate that our DNN can successfully generate the desired metasurface compared to our pre-determined designed targets, with an average accuracy higher than 91%. We have shown that the speed of our presented approach is much higher than conventional metasurface design, and by proposing the confining output configuration, our approach equips an encouraging platform as an efficient technique with respect to computational repetitions, training and evaluation time, and average accuracy.
We believe that our used deep neural network approach is a suitable candidate for inverse metasurface design for dual-polarized waves and complex wave-interaction phenomena.

CONFLICT OF INTEREST
The authors declare that there is no conflict of interest

DATA AVAILABILITY
The data that support the findings of this study are available from the corresponding author upon reasonable request.