Physics-informed neural networks for inverse problems in nano-optics and metamaterials

In this paper we employ the emerging paradigm of physics-informed neural networks (PINNs) for the solution of representative inverse scattering problems in photonic metamaterials and nano-optics technologies. In particular, we successfully apply mesh-free PINNs to the difficult task of retrieving the effective permittivity parameters of a number of finite-size scattering systems that involve many interacting nanostructures as well as multi-component nanoparticles. Our methodology is fully validated by numerical simulations based on the Finite Element Method (FEM). The development of physics-informed deep learning techniques for inverse scattering can enable the design of novel functional nanostructures and significantly broaden the design space of metamaterials by naturally accounting for radiation and finite-size effects beyond the limitations of traditional effective medium theories.


I. INTRODUCTION
demonstrate the ability to efficiently reconstruct the spatial distribution of the electric permittivity of unknown objects from synthetic scattering data. Finally, we apply our method to the determination of the optimal dielectric permittivity of optical cloaking layers beyond the quasi-static limit. All our results are validated using numerical simulations based on the Finite Element Method (FEM) in two spatial dimensions.
Our work provides a novel and powerful framework for the inverse design of scattering nanostructures and photonic metamaterials based on the inversion of their scattered fields.
Moreover, this ability establishes remote sensing functionalities in the optical regime whereby the unknown dielectric permittivity of complex optical nanostructures can be unambiguously retrieved from near-field optical imaging data.

II. PHYSICS-INFORMED NEURAL NETWORKS
Our approach leverages the capabilities of deep neural networks as universal function approximators. However, differently from standard deep learning approaches, PINNs restrict the space of admissible solutions by enforcing the validity of partial differential equation (PDE) models governing the actual physics of the problem. This is achieved within relatively simple feed-forward neural network architectures leveraging automatic differentiation (AD) techniques readily available in the TensorFlow learning package [11]. Moreover, PINNs use only one training dataset to achieve the desired solutions, thus relaxing the burdens often imposed by the massive training datasets necessary in alternative, i.e. non physicsconstrained, deep learning approaches. Moreover, PINNs do not require any data on the inverse parameters it predicts, and thus it belongs to unsupervised learning. These unique features of PINNs are greatly beneficial for the solution of inverse scattering problems either with measured field data or with synthetic ones generated by forward simulations. Importantly, PINNs solve highly-nonlinear and dispersive inverse problems on the same footing as forward problems, by the simple addition of an extra loss term to the overall loss function for the minimization of the residuals of PDEs and their boundary conditions [9]. Therefore, PINNs are particularly effective in solving ill-posed inverse problems, which are often intractable with available mathematical formulations.
In this section, we introduce the algorithm for solving inverse PDE models with PINNs.
The main idea of PINNs is schematically illustrated in Fig. 1 (a). We first construct a neural Ω ⊂ R d : ∂û ∂x 1 , . . . , ∂û ∂x d ; ∂ 2û ∂x 1 ∂x 1 , . . . , ∂ 2û ∂x 1 ∂x d ; . . . ; λ = 0, x ∈ Ω. (1) We denote T i ⊂ Ω be the points where we have the PDE solution u(x). The loss function is then defined as: where: and w f , w b , and w i are the weights. T f , T i , T b denote the residual points from partial differential equations, training dataset, and ICs and BCs, respectively. Here, T f ⊂ Ω is a set of predefined points to measure the matching degree of the neural network outputû to the PDE. T f can be chosen as grid points or random points, see more details and discussion in reference [10]. In the last step, we optimize θ and λ by minimizing the loss function L(θ, λ).
Note that using PINNs the only difference between a forward and an inverse problem is the addition of an extra loss term L i to Eq. 2, which comes at an insignificant computational cost. We use DeepXDE [10], a user-friendly Python library, for the code implementation in this paper.

ALS
Photonic metamaterials are artificial structures composed of designed subwavelength building blocks that can achieve unusual optical properties [12]. The current underpinning of metamaterials design relies on the effective medium theory (EMT) [13][14][15], which is actively investigated in electromagnetic research from different perspectives such as the methods of coherent potential approximation (CPA) [16,17], the multipole expansion method [18], or the field averaging procedure [19] are used to homogenize metamaterials properties. Here we propose to use PINNs for the homogenization of dielectric metamaterials formulated as an inverse medium problem for finite-size systems. Specifically, we set up large clusters composed of several hundreds dielectric nanocylinders arranged in periodic and aperiodic geometries and demonstrate, using PINNs, direct retrieval of the effective permittivity distribution that gives rise to the same scattered field as the original cluster. We refer to this approach as "inverse metamaterials design".
In order to achieve our goals we constrained PINNs using the Helmholtz equation for weakly inhomogeneous two-dimensional (2D) media under TM polarization excitation: where E z is the electric field z component, ε r (x, y) is the space dependent relative permittivity, and k 0 = 2π λ 0 is the wavenumber in free space. We first consider dielectric materials with real permittivity values and ignore the radiation losses in the effective medium, which will be addressed later in this section. However, as discussed at the end of the section, our method can be easily generalized to include lossy component materials as well. As schematically illustrated in Fig. 1(b), the problem at hand is the one to retrieve the function ε(x, y), which corresponds to the unknown parameters λ in Fig. 1(a), by training PINNs on synthetic data obtained via the forward solution u(x, y) of the scattering problem using FEM. Validation of the permittivity spatial profile predicted by PINNs is obtained using the retrieved ε(x, y) within a forward scattering FEM simulation. The resulting electric field distribution is then compared to the one of the original forward FEM simulation used to generate the training (synthetic) scattering data. The discrepancy between these two datasets is quantified by computing the L 2 error norm of the corresponding total field distributions. It is important to realize that in this section we train PINNs to predict the permittivity profile across the entire computational domain and therefore in this case we do not need to explicitly consider the loss term for the boundary conditions T b .
We show in Fig. 2 (a) the representative schematics of a square lattice structure used for inverse metamaterial design, where a denotes the center-to-center distance of the nanocylinders in the array, and r is radius of each nanocylinder. The array pattern is truncated using a circular window with diameter d. Fig. 2 (b) illustrates the real part of the computed electric field distribution E z using FEM for a square lattice with parameters: a = 500nm, r = 125nm, d = 10µm, number of particles N = 317, and permittivity of nanocylinder ε = 3. The array is illuminated by a plane wave with wavelength λ = 2.1µm. In the forward FEM simulation we used a minimum element size of 0.6 nm with Perfectly Matching Layer (PML) boundary with 3µm thickness, resulting in 2742129 total degrees of freedom. We used the electric field data shown in Fig. 2 (b) as the synthetic train dataset for PINNs. In all simulations we sampled the electric field using a 150 × 150 spatial resolution. The utilized PINN architecture is composed of a feed-forward neural networks with 4 hidden layers and 64 neurons in each hidden layers. We used the hyperbolic tangent activation function and chose the Glorot uniform method for the weight initialization. The learning rate for the training was set to 10 −3 . Finally, we train the neural networks using the Adam methods and train for 150000 iterations (epochs) before reaching a satisfactory loss value of 10 −2 . The predicted ε(x, y) profile obtained by this PINN is shown in Fig. 2 (c). We note that for the considered parameters of the scattering array PINN retrieves the permittivity distribution of a single dielectric nanocylinder with an effective dielectric function. Therefore, training PINNs to predict the permittivity distribution of the finite-size cluster of scattering cylinders that yield the same field distribution of the forward FEM scattering calculation has resulted in the effective homogenization of a finite-size metamaterial. Since we are working here under the conditions of small size parameter for the nanocylinders (r, a << λ) and weak scattering (ε = 3), we can also estimate the effective medium permittivity using the classical Bruggeman mixing formula [15]: where ε e is the effective permittivity, f i and ε i are the filling fraction and permittivity of each component, respectively. By using Eq. 7, we predicted ε e = 1.25. The epsilon distribution ε(x, y) from PINNs averaged inside the cylindrical windowed region (r < 5µm) This error is 2.82%, indicating a very good retrieval of the permittivity profile using PINNs.
To further study the role on the homogenization of the radiation effects introduced by the cylindrical scatterers we increased the permittivity of each nanocylinder in the array by considering ε = 12. Fig. 3 (a) illustrates the real part of the total electric field distribution obtained from the plane wave excitation of such an array using FEM simulations with the same parameters as for the case in Fig. 2. However, in the present case we observe a strong perturbation of the electric field around the array indicating the presence of stronger scattering effects. Using the same parameters and training method as in the previous case, PINN predicts now the permittivity profile displayed in Fig. 3 (b). Differently from the results previously shown in Fig. 2 (c), now PINN retrieves a non-homogeneous effective medium that contains a spatial region of negative effective permittivity. We implemented this permittivity profile in the FEM simulation and obtained the electric field distribution shown in Fig. 3 (c). The quality of the PINN prediction is again quantified by considering the L 2 error norm between data in Fig. 3 (a) and (c), which is now 5%. Our findings indicate that PINNs effectively account for scattering and radiation effects in the array by retrieving a non-homogeneous effective medium with resonant permittivity profile, beyond the capabilities of traditional effective medium theory.
The proposed PINNs framework for metamaterial inverse design is not limited by the periodic arrangement of the scattering nanocylinders in the array. In fact, the exact same procedure can be utilized for the synthesis of non-homogeneous effective media corresponding to scattering arrays with arbitrary aperiodic morphology. In order to prove this point we consider next the case of a Vogel spiral array. Vogel spirals have been intensively investigated in plasmonics and nanophotonics literature thanks to their unique light scattering and localization properties that stimulated novel device applications [20][21][22][23][24][25][26][27]. Vogel spirals are defined in polar coordinates by following parametric equations: where n = 0, 1, 2, ... is an integer, a 0 is a positive constant called scaling factor, and α is an irrational number, known as the divergence angle [28]. This angle specifies the constant aperture between successive point particles in the array. Since the divergence angle is an irrational number, Vogel spiral point patterns lack both translational and rotational symmetry.
Here we studied PINNs homogenization of a Vogel spiral array in the radiative (scattering) limit. The Vogel spiral pattern considered here is shown in Fig. 4 (a) and is characterized by an averaged center-to-center interparticle distanceā = 500nm, d = 10µm, r = 125nm, ε = 12, and N = 300. The corresponding total electric field distribution computed with FEM under plane wave excitation with λ = 2.1µm is shown in Fig. 4 (b). We can appreciate immediately the asymmetric distribution of the total field around the Vogel spiral array and also the strong perturbation of the field due to the strong scattering effects of the nanocylinder. By training with the same network parameters established in previous case, PINN now predicts the effective permittivity distribution ε(x, y) illustrated in Fig. 4 (c).
We note that the ε profile recovered from PINN is asymmetric, which results from the asymmetric nature of the Vogel spiral structure. It also contains a negative permittivity region that effectively accounts for the strong radiation effects in the Vogel array. Finally, we show in Fig. 4 (d) the electric field distribution obtained from FEM forward simulations by using as an input the effective permittivity profile obtained from PINN. The L 2 error norm between the total electric fields shown in Fig. 4 (b) and (d) is found to be 3.8%.
The proposed method can naturally be generalized to account for radiation losses in the multiple scattering medium by retrieving the complex permittivity of the effective medium.
In this case we need to consider Eq. 6 with both E z and r (x, y) as complex variables.
Separating real and imaginary parts, we then obtain the following PDE model for PINNs: where Re{·} and Im{·} denote the real and imaginary parts of the corresponding quantities.
We can now train PINNs using both the real and the imaginary parts of E z computed from the FEM simulations. This will enable PINNs to predict independently Re{ε r (x, y)} and Im{ε r (x, y)} for the effective medium and therefore to quantify its radiation losses. We have implemented this more general model using the same neural network parameters and training method described in the previous cases and we have applied them to the structure shown in Fig. 2−4 in order to predict Im{ε r (x, y)} for the respective effective media.
The maximum values of Im{ε r (x, y)} obtained in these three cases are 10 −4 , 0.6, and 0.3, respectively. Finally we notice that the real parts Re{ε r (x, y)} of the predicted complex permittivity remain very close, within a total 3% error, to the values previously obtained considering only the real part of the effective medium. However, the more general approach outlined above allows one to investigate arrays of nanocylinders with even larger refractive index contrast where radiation losses, which are difficult to account using traditional effective index theory [15], are expected to play a very important role.
Therefore, our results demonstrate that the general PINNs framework is suitable to systematically study the effects of morphology and radiation coupling in arbitrary non-periodic effective media and metamaterials, beyond the limitations of effective medium theory. The ability to reliably identify the effective media that yield the same total field as arbitrary scattering arrays using PINNs can not only greatly stimulate the development of novel finite-size metamaterials and resonant nanostructures but also provides fundamental insights to advance the current status of advanced homogenization theory with radiation effects [29,30].

IV. PINN FOR INVERSE MIE SCATTERING
We showed in previous section that PINNs are capable of homogenizing arrays composed of sub-wavelength particles arranged in arbitrary aperiodic geometries. In this section we will further show that, based on the knowledge of the field values around compound optical nanostructures of known morphology, PINNs can successfully retrieve their optical parameters. This specific application requires the solution of an inverse problem with a PINN that, differently from the previous sections, includes the specific boundary conditions in the definition of the appropriate PDE model. The results shown in this section demonstrate that PINNs framework can potentially be applied to retrieve the optical properties of complex nanostructures from near-field imaging data [31].
We start our analysis by considering the case of retrieving the permittivity of a single resonant nanocylinder from its external total field. We compute the external electric field distribution, shown in Fig. 5 (a), using the analytical Mie scattering theory [32] for a cylinder with radius r = 2µm and permittivity ε = 4 under TM wave excitation at a wavelength λ = 3µm. Note that the field inside the cylinder is not specified here. In order to retrieve the internal field distribution along with the unknown permittivity parameter of the nanocylinder, we implemented the following PDE model: Moreover, we set ε r2 = 1 while ε r1 is a trainable variable that PINNs retrieve through the training process fed by the analytically computed external field. The same network architecture and hyperparameters as in the previous training cases are utilized here. However, we multiplied the loss term T i by a factor 100 in order to enforce a stronger penalty and obtain better train results. We stop training after 10 5 steps that we found sufficient to achieve a 10 −4 train loss value. The retrieval of ε r2 during the training process is illustrated in Fig. 5 (b), where the dashed line indicates the true solution from analytical Mie theory. We can see clearly that PINNs successfully retrieve the true solution when fed with only information on the external field. Furthermore, the reconstructed field from PINNs, displayed in Fig. 5 (c), shows a very small difference from the Mie theory ( Fig.   5 (d)) that is quantified by an L 2 error norm of 0.51%. Therefore, we show that PINNs can successfully retrieve both the internal field and the cylinder permittivity when constrained by a physical PDE model. Furthermore, we now extend PINNs to the retrieval of multiple materials parameters by considering the case of a coated nanocylinder. The geometry of the studied coated nanocylinder is schematically illustrated in Fig. 6 (a). The spatial distribution of the real part of the total electric field of the coated nanocylinder with a = 0.5µm, b = 1µm, ε i = 3, ε c = 2 is shown in Fig. 6 (b). The corresponding PDE model that we implemented within PINNs framework to solve this inverse problem is reported below: denote the z components of the real parts of the electric fields inside the inner core, coated layer, and outside coating layer, respectively. ε i , ε c , ε 0 are the relative permittivities of the inner-core, coated layer, and host medium, respectively. µ i , µ c , µ 0 are the relative magnetic permeabilities of the corresponding regions that are here set equal to unity since we are considering non-magnetic materials. In the parameter retrieval process, we fix ε 0 = 1 and train PINNs to predict ε i and ε c based on the field distribution from Fig. 6 (b). Specifically, We utilize the same neural network architecture and training method as for the single nanocylinder case. Figure 6 (c) shows clearly the parameter retrieval during the training process, which converges to the exact values used to create the training data. Figure   6 (d) shows the reconstructed field. The L 2 error norm between Fig. 6 (b) and (d) is only 1%.
Therefore, we showed that PINNs can successfully retrieve multiple material parameters for compound resonant nanostructures uniquely based on the total field information surrounding the objects.
We show next that in addition to retrieving the optical parameters of individual nanostrucutres, PINNs can additionally extract the parameters in systems composed of multiple objects. Inspired from the scattering target FoamDielExtTM [33] frequently used in diffraction tomography at GHz frequencies [3,4,7], we study parameter retrieval in the setup shown in Fig. 7 (a). The real part of the total electric field distribution for the considered structure under incident plane wave illumination at wavelength λ = 2.1µm is illustrated in Fig. 7 (b). Using this field as the train dataset, we couple PINNs with the PDE homogenization model in Eq.6 and directly retrieve the permittivity profile over the entire computational window that gives rise to the same total field as the asymmetric dimer in 7 (a). In order to improve the quality of the reconstruction here we utilize the ResNet architecture with two residual blocks and each residual block has two fully-connected layers with width 64. We used the same activation function and initialization strategy as in all previous simulations. We multiply again the loss term T i by a factor 100 to obtain better train results. The training process uses the Adam optimizer and is stopped after 150000 iterations resulting in 10 −4 training losses. The retrieved ε(x, y) profile from this PINN is shown in Fig. 7 (c). We observe that the PINN reconstructed two object permittivities localized within regions that qualitatively correspond to the input target. The electric field distribution obtained by FEM using the permittivity profile retrieved by PINN is illustrated in Fig. 7 (d), where the L 2 error norm between these two field profiles is 0.3%. Notice that in the PDE homogenization model used here there are no boundary conditions specified to constrain the PINN solution. As a result, PINN found an equivalent permittivity profile that gives rise to the same field distribution as the train dataset but this solution may not be unique. This is the reason why the retrieved permittivity distribution is quite different in this case from the input target, despite the two share the same scattering behavior within the considered window. In all cases, when the morphology of a scattering object is known or characterized experimentally, PINNs framework can be utilized to retrieve nanomaterial properties based on scattered fields that can, for instance, be measured from scanning near-field optical microscopy (SNOM) [34]. The ability to infer material properties directly from imaging data using PINNs can provide unique opportunities for remote sensing and detection in the optical regime.

V. PINN FOR INVISIBLE CLOAKING DESIGN
In this section, we will show how to reformulate the well-known invisible cloaking problem into a general parameter retrieval problem that can be accurately solved using PINNs. The cloaking problem has stimulated significant interest in recent years [35,36], and admits an analytical solution in the limit of small objects compared to the incoming wavelength (quasi-static limit). The considered geometry is illustrated in Fig. 8 (a) and consists of an inner nanocylinder with radius a and permittivity ε i coated by a cloaking material with thickness equals to b − a and unknown permittivity ε c that cancels the scattering for a given plane wave incidence condition. We chose the following parameters for our cloaking example: a = 0.12µm, b = 0.3µm, i = 4. Notice that for nanocylinders of small size parameters (k 0 b << 1), we can obtain the permittivity of the cloaking layer ε c using the following analytical formula [37]: enabling verification of PINN-predicted results.
In order to generate the training data for PINNs we computed the electric field distribution of the coated nanocylinder using Mie theory with ε c that satisfies the cloaking Eq. 12.
The obtained field distribution (excluding the internal field) is then used as the train dataset for PINNs as illustrated in Fig. 8 (b). In this example we used the PDE model previously defined by Eq. 11. We again employ a simple feed-forward neural network with 4 hidden layers and 64 neurons in each hidden layers. Hyperbolic tangent activation function and Glorot uniform initializer are used as in previous cases. However, here we utilized a learning rate for the training equal to 10 −4 . We trained the PINN neural networks with the Adam optimizer and considered 2 × 10 5 iteration steps, resulting in overall training losses equal to 10 −4 . In order to obtain better accuracy we multiply the loss term T i as well as the loss term from the E z continuity at interface r = b by a factor 100. We let the PINN retrieves both the electric permittivity and the magnetic permeability. The parameter retrieval curves as a function of the iteration number are shown in Fig. 8 (c). These data demonstrate that PINNs correctly find the true solution of the coating layer permittivity in complete agreement with the analytical expression. Moreover, it is important to note that the considered PINN obtains a magnetic (relative) permittivity equal to unity, confirming that no magnetic response is necessary for perfect scattering cancellation in this geometry for a small particle size. Fig. 8 (d) displays the reconstructed electric field from PINN, showing clearly that the electric field propagates the coated nanocylinder without any perturbation.
Finally, we address the conditions to achieve radiation cloaking in coated nanocylinders whose diameter equals the incoming wavelength. Although no perfect cloaking condition is theoretically expected in this case, it is still very interesting to use PINNs to discover the coating parameters for the optimal scattering reduction. The geometry of the problem is the same as in Fig. 8 (a) but here we additionally let the permittivity of the coating layer to be spatially dependent ε c (x, y) (within the layer) in order to obtain better cloaking results. Figure 9 (a) shows the training dataset for PINN under plane wave illumination with wavelength λ = 2.1µm, and corresponds to a wave that propagates through the coated nanocylinder undisturbed. We emphasize that this situation cannot physically occur when the particle size is comparable to the wavelength. However, we will show that training under such a desirable condition allows PINNs to discover a permittivity profile that substantially reduces the scattering cross section of the cylinder.
We used the same PDE model as defined by Eq. 11 but we fixed the value to the magnetic permeability to unity in order to design a purely dielectric device. Given the complexity of this problem we modified the neural network architecture by considering 5 hidden layers while keeping all the other parameters as in previous cases. We additionally multiply the loss term T i by a factor of 20 in order to obtain better training quality. The neural network is trained up to 2 × 10 5 steps and training loss values around 10 −4 are achieved in the end. distribution. The PINN-predicted c (x, y) is then used in the FEM simulations resulting in the total electric field profile shown in Fig. 9 (d). For comparison, we also show the electric field distribution for the bare nanocylinder without the coating layer in Fig. 9 (e). It is clear that PINNs identified the dielectric properties of the coating layers that significantly reduce the far-field scattering of the device under plane wave excitation. Specifically, we quantified this by computing the far-field scattering efficiency of the coated cylinder and confirmed a 75% reduction in the scattering efficiency due to the coating layer characteristics identified using PINNs, as shown in Fig. 9 (f). In summary, using the flexible PINNs framework we have established not only a powerful approach to retrieve material parameters based on scattering data (synthetic or measured) but also to design novel dielectric devices with strongly reduced scattering properties.

VI. CONCLUSIONS
We demonstrated in this paper the solution of representative inverse scattering problems that are particularly interesting in photonic metamaterials and nano-optics technologies. In particular, we successfully introduced and validated the PINNs framework for the effective medium reconstruction of scattering arrays where finite-size and radiation effect significantly perturb the classical homogenization picture. Our approach leverages recent advances in deep-learning algorithms constrained by the wave physics of the problems, which dramatically simplifies data training procedures compared to alternative machine learning approaches. Our findings have been fully validated using Finite Element Method (FEM) numerical simulations. In addition, we developed the PINNs framework for the retrieval of multiple optical parameters based on the field distribution around nanomaterials, which suggests a method to directly access material information from near-field imaging data.
Finally, we use PINNs to address the problem of invisible cloaking with coated cylinders and show 75% scattering abatement in dielectric coated cylinders with size comparable to the wavelength of the incoming radiation. We believe that further PINNs development for inverse scattering and remote sensing of nanostructures can significantly broaden current design capabilities and also provide fundamental insights to advance the current state of homogenization theory with radiation effects. Although the PINNs architectures employed here are based on empirical tuning, recent advances in meta-learning [38][39][40] can enable future automated selection of the optimum architectures.

FUNDING
This research was sponsored by the Army Research Laboratory and was accomplished