# Self-Attention GAN for Electromagnetic Imaging of Uniaxial Objects
## 2 Theoretical Formulation
### Inverse Problem  
In solving the inverse problem, the scattered field is collected from the region exterior to the object. It is noteworthy that, for the TM mode, the only unknown parameter is the dielectric component \(\epsilon_{1z}\), whereas for the TE mode, both \(\epsilon_{1x}\) and \(\epsilon_{1y}\) must be reconstructed. As a result, we treat the estimation of the dielectric distribution separately, recovering \(\epsilon_{1z}\) under TM illumination and \(\epsilon_{1x}\), \(\epsilon_{1y}\) under TE excitation. The method of moments is employed to discretize the integral formulation into a matrix system. Subsequently, the BPS and Dominant Current Scheme (DCS) are used to generate an initial guess for the dielectric tensor. This coarse reconstruction is then refined using a U-Net-based deep learning architecture, allowing for improved accuracy in estimating the spatial permittivity distribution. _BPS_  
In this section, the measured scattered field data is utilized to estimate an initial permittivity distribution using BPS, which helps streamline the learning process for U-Net training. Our findings indicate that BPS is particularly effective in reconstructing the scattered field for weak scatterers. This approach operates under the assumption that the back-propagated field maintains a proportional relationship with the induced current \(l_{z}^{b}\), \(l_{x}^{b}\), and \(l_{y}^{b}\). \[\left(l_{z}^{b}\right)=Y_{m}\cdot[G_{2}]^{H}(E_{z}^{s}) \tag{23}\]where H denotes the conjugate transpose. Similarly, the induced current \(I_{x}^{b}\) and \(I_{y}^{b}\) can be written as the following equation:  
\[ \begin{pmatrix}I_{z}^{b}\\ I_{y}^{b}\end{pmatrix} =Y_{e}. \begin{bmatrix}[G_{6}]&[G_{7}]\\ [G_{7}]&[G_{8}]\end{bmatrix} ^{H} \begin{pmatrix}E_{x}^{s}\\ E_{y}^{s}\end{pmatrix}  \tag{24}\]  
Based on (12), the loss function can be defined as:  
\[L_{m}^{b}(Y)=\left\|(E_{z}^{s})-[G_{2}].Y_{m}.[G_{2}]^{H}(E_{z}^{s})\right\|^{2} \tag{25}\]  
Similarly, L\({}_{e}^{b}\) based on (14), the loss function can be defined as:  
\[L_{e}^{b}(Y)=\left\| \begin{pmatrix}E_{x}^{s}\\ E_{y}^{s}\end{pmatrix} - \begin{bmatrix}[G_{6}]&[G_{7}]\\ [G_{7}]&[G_{8}]\end{bmatrix} .Y_{e}. \begin{bmatrix}[G_{6}]&[G_{7}]\\ [G_{7}]&[G_{8}]\end{bmatrix} ^{H} \begin{pmatrix}E_{x}^{s}\\ E_{y}^{s}\end{pmatrix} \right\|^{2} \tag{26}\]  
The loss function reaches its minimum when its gradient equals zero. Under this condition, the closed-form solutions for Y\({}_{\text{m}}\) and Y\({}_{\text{e}}\) can be derived as follows:  
\[Y_{m}=\frac{(E_{z}^{s})^{\text{T}}.\begin{pmatrix}[G_{2}]\Big{(}[G_{2}]^{H}.( E_{z}^{s})\Big{)}\Big{)}^{*}}{\left\|[G_{2}]\Big{(}[G_{2}]^{H}.(E_{z}^{s})\Big{)} \right\|^{2}} \tag{27}\]  
\[Y_{e}=\frac{ \begin{pmatrix}E_{x}^{s}\\ E_{y}^{s}\end{pmatrix} ^{T}.\begin{pmatrix} \begin{bmatrix}[G_{6}]&[G_{7}]\\ [G_{7}]&[G_{8}]\end{bmatrix}\begin{pmatrix}\begin{bmatrix}[G_{6}]&[G_{7}]\\ [G_{7}]&[G_{8}]\end{bmatrix}^{H}.\begin{pmatrix}E_{x}^{s}\\ E_{y}^{s}\end{pmatrix}\end{pmatrix} \right)^{*}}{\left\| \begin{bmatrix}[G_{6}]&[G_{7}] \\ [G_{7}]&[G_{8}]\end{bmatrix}\begin{pmatrix}\begin{bmatrix}[G_{6}]&[G_{7}]\\ [G_{7}]&[G_{8}]\end{bmatrix}^{H}.\begin{pmatrix}E_{x}^{s}\\ E_{y}^{s}\end{pmatrix}\end{pmatrix} \right\|^{2}} \tag{28}\]  
where T represents the transpose operation, while the asterisk * indicates the complex conjugate. Once Y\({}_{\text{m}}\) is determined, the corresponding induced current can be evaluated using Equation (23). The back-propagated total field \(E_{z}^{b}\) is subsequently calculated from Equation (11) as follows:  
\[ \begin{pmatrix}E_{z}^{b}\end{pmatrix} = \begin{pmatrix}E_{1z}^{i}\end{pmatrix} +[G_ {1}] \begin{pmatrix}I_{z}^{b}\end{pmatrix}  \tag{29}\]  
In a similar manner, the induced current is derived from Equation (24). The back-propagated total field components \(E_{x}^{b}\) and \(E_{y}^{b}\) are then computed based on Equation (13), given by:  
\[ \begin{pmatrix}E_{x}^{b}\\ E_{y}^{b}\end{pmatrix} = \begin{pmatrix}E_{1x}^{i}\\ E_{1y}^{i}\end{pmatrix} +