# Application of Physics-Informed Neural Networks to Maxwell equations

Alexandre Pugin, Stéphane Lanteri, Stéphane Descombes

► To cite this version:

Alexandre Pugin, Stéphane Lanteri, Stéphane Descombes. Application of Physics-Informed Neural Networks to Maxwell equations. Numerical Analysis School 2025 - Solving partial differential equations in fields physics faster with physics-based machine learning, Jun 2025, Palaiseau, France. hal-05288924

HAL Id: hal-05288924

https://inria.hal.science/hal-05288924v1

Submitted on 29 Sep 2025

HAL is a multi-disciplinary open access
archive for the deposit and dissemination of sci-
entific research documents, whether they are pub-
lished or not. The documents may come from
teaching and research institutions in France or
abroad, or from public or private research centers.

L'archive ouverte pluridisciplinaire HAL, est
destinée au dépôt et à la diffusion de documents
scientifiques de niveau recherche, publiés ou non,
émanant des établissements d'enseignement et de
recherche français ou étrangers, des laboratoires
publics ou privés.

<figure><img src="image_1.png" /></figure>

Distributed under a Creative Commons Attribution 4.0 International License
<figure><img src="image_2.png" /></figure>

<figure><img src="image_3.png" /></figure>

<figure><img src="image_4.png" /></figure>

## Context

* Metasurfaces are synthetic optical materials composed of sub-wavelength elements.

* Such devices have many useful applications: Metalenses, antennas, color filtering, anti-counterfeting...

* Designing those metamaterials require solving an inverse problem with the Maxwell equations.

* Classic approach is to test many designs with simulations using numerical methods such as Finite Elements and Discontinuous Galerkin.

* Physics-Informed Neural Network have the potential to make this process seamless by solving either the parametric problem or the inverse problem.

## Physics-Informed Neural Network for Maxwell equations

<figure><img src="image_5.png" /></figure>

### Imposing periodicity (PT)

<figure><img src="image_6.png" /></figure>

We replace the input $t$ by sine functions of $t$ with the right frequency

### Scattering Problem (SP)

$$ \vec{E}_{total} = \vec{E}_{incident} + \vec{E}_{scatter} $$

We solve the scattered field instead of the total field

## Techniques

### Fourier embeddings (FE)

<figure><img src="image_7.png" /></figure>

We replace the inputs $x$ and $y$ by random Fourier modes

### Homogeneous domain decomposition

<figure><img src="image_8.png" /></figure>

We decompose the heterogeneous domain in homogeneous sub-domains

## Physical case considered

<figure><img src="image_9.png" /></figure>

<figure><img src="image_10.png" /></figure>

Relative error in function of the number of epochs during training for multiple configurations (2000 epochs with Adam and 5000 with L-BFGS)

## Results

<figure><img src="image_11.png" /></figure>

Results for the best configuration

## Notations

* $\varepsilon$: medium permittivity

* $\mu$: medium permeability

* $c$: celerity in the medium

* $E$: electric field

* $H$: magnetic field

* $n$: normal to the boundary

* $x, y, z$: cartesian coordinates

* $t$: time

## Conclusion

### Pros:

- The problem is solved without generating a mesh

- The solution is continuous

- The solution is fully-differentiable

- The time of inference is very short

### Cons:

- The training is very slow (over 1000s)

- Accuracy is not as good as classic numerical methods

- There is no guarantee to converge which results in trial and error approach

We solved a simple forward problem on a physical case with heterogeneity to test PINNs ability to solve the Maxwell equations. In the future, we will attempt to solve the parametric problem.