Artificial intelligence generated solar farside magnetogram using conditional generative adversarial network

A solar flare occurs due to a magnetic field reconnection above the active region. The active region magnetic complexity observed in the magnetogram could be used as proxies for solar flare forecasting. It is also known that solar flares that occur from emerging active regions located near the solar disk eastern limb can still have an impact on the Earth. Therefore, magnetic observation of active regions in the solar farside is important to forecast east limb flares occurrences. This study utilizes the conditional Generative Adversarial Network (cGAN) model to generate Artificial Intelligence (AI) solar farside magnetogram. Our model was trained using the solar frontside observations dataset from Solar Dynamic Observatory (SDO)/Atmospheric Imaging Assembly (AIA) 304 Angstrom as input images and SDO/Helioseismic and Magnetic Imager (HMI) magnetogram as output images. Our model generates solar farside magnetogram using solar farside observation from Solar Terrestrial Relations Observatory (STEREO)/Extreme Ultraviolet Imager (EUVI) 304 Angstrom. We also conducted validation on the similarity of our AI-generated magnetogram with the magnetogram observation from SDO/HMI using the Structural Similarity Index (SSIM) method. SSIM obtained an average similarity value of 0.61±0.06 for training data and 0.47±0.02 for validation data which contain active regions producing flares.


Introduction
Continuous solar observations have captured many active regions producing flares on the frontside of the Sun. The evolution of active regions and the history of flares emerging from observed active regions are often used as an input in the solar flares forecasting. Nevertheless, the active regions that produce flare near the solar limb cannot be identified until they appear in front of the solar disk. Thus, the evolution of active region on the solar farside cannot be observed optimally. Several studies found that solar flares that occur near the solar limb still cause an impact on the Earth's ionosphere. For examples, the X1.0 flare of August 3, 2002 [1], M9.0 flare of October 20, 2012, on the eastern solar limb triggered by a filament eruption [2], X1.7 flare of May 13, 2013, on the eastern solar limb [3], and the X8.2 flare of September 10, 2017, on the western solar limb [4] [5]. Therefore, it is important to understand the magnetic configuration of active regions in the solar farside, especially emerging active regions, which have more probability of producing flares, that are located near the east limb solar disk.
There are recent works that use cGAN with various architectures and hyperparameters to generate solar farside magnetograms. One from [6] used Pix2Pix cGAN to generate solar farside magnetogram using STEREO-B/EUVI304 as an input from a model trained using frontside observation dataset (SDO/AIA304 and SDO/HMI magnetogram). The same data type was also used by [7] with different GAN methods, called Pyramid GAN. Another study from [8] adopted Pix2PixHD cGAN to generate solar farside magnetogram using a model obtained from multiwavelength SDO training datasets as an input, i.e., SDO/AIA304, SDO/AIA193, SDO/AIA171. Those studies used modified cGAN from [9] and obtained different results of quantification on the generated magnetogram images. In this study, we used the cGAN from [9] without any modification except for the training iteration to generate solar farside AI magnetogram and compared the results with those studies.

Data
1096 image pairs of full-disk daily solar frontside observation data from SDO/AIA304 [10] [11] which observed the transition region of solar atmosphere (chromosphere) and from SDO/HMI Magnetogram [12] in 2012 -2014 were used as the training dataset. The range of the dataset is limited by our computing capability but still adequate to represent magnetic variations around the peak of the 24th solar cycle. The data pair from SDO/AIA304 and SDO/HMI magnetogram in 2016 -2017 were used as testing data, whereas the same type of data pair in 2011, 2015 -2021 were used as validation data. These data were obtained from AIA-HMI Joint Science Operations Center (JSOC) (http://jsoc2.stanford.edu). STEREO-A/EUVI304 data obtained from STEREO Science Center/Sun-Earth-Connection Coronal and Heliospheric Investigation (SECCHI) instrument (https://stereossc.nascom.nasa.gov) [13] [14] were used as input data to generate the solar farside AI magnetogram using our model which was trained using the solar frontside dataset.

Methods
All the FITS data was preprocessed to eliminate all features outside the solar disk limb, then plotted and saved as JPG format using Sunpy module in Python. Image-to-Image Translation based on conditional Generative Adversarial Network (cGAN) developed by [9] was used to train the model using the solar frontside training dataset. The obtained optimum model then tested with the testing data. As for the quantification of our model, the AI-generated magnetogram compared with the validation dataset using SSIM (Structural Similarity Index) method. Our model was also tested to generate the solar farside AI Magnetogram using input from STEREO/EUVI304 data which observed the solar farside.
2.2.1. Image-to-Image Translation cGAN. [9] adapt the cGAN network architecture from [15] with both generator and discriminator use convolution-BatchNorm-ReLu modules. The Generator is an encoder-decoder model with U-Net architecture with skip connections between mirrored layers. The Discriminator is a Convolutional Neural Network (CNN) which is usually used for image classification and has a 70x70 image patch or known as Markovian Discriminator (PatchGAN). More detailed architecture and hyperparameters of the method can be found at [9]. The cGAN code is using the Python programming language by utilizing Tensorflow and Keras which is a high-level Deep Learning library API for artificial neural networks and TensorFlow support Graphical Processing Unit (GPU) as a backend [16].

Structural Similarity Index (SSIM)
. [17] proposed the use of structural similarity as an alternative motivating principle for the design of image quality measures. SSIM tries to model the information changes that occur in the image structure based on three parameters, i.e., luminance, contrast, and structure. SSIM calculates a similarity between two given images and has a value between -1 and +1. A value of +1 indicates that the two given images are very similar/same and vice versa.  Figure 1 shows the training results after 1000 epochs using the SDO/AIA304 as an input. The output shows the magnetic structure of the active region both from AI-generated magnetogram images and the expected magnetogram from SDO/HMI magnetogram. The AI-Generated magnetogram reconstructed the active region magnetic structure very well and was highly comparable with HMI magnetogram. All the active region's location and bipolar structure follow Hale's law for both hemispheres are well generated by the model.  A careful comparison shows the tilt angle between the preceding and the following polarity and overall magnetic field distributions are well generated. The dissimilarity in the detailed active regions is in image resolutions, which is higher for HMI magnetogram (1024x1024 pixels) compared to AI-generated ones (512x512 pixels). Our model has a limitation to generate a higher image resolution than 512 x 512 pixels.   Figure 3 shows another detailed example from the training results of NOAA 12192 on October 23, 2014. This region is very active and produces six X-class flares and 31 M-class flares. The AIgenerated magnetogram shows the tilt angle between the preceding and the following polarity is well generated. Also, overall magnetic field distributions are well generated.

Testing
The model testing results of magnetogram generating process using three SDO/AIA304 data as an input shown in Figure 4. The AI-generated magnetogram reconstructed the active region magnetic structure and the tilt angle between the preceding and the following polarity is well generated regardless of the magnetic field distribution is not very clear and not so similar compared to the HMI magnetogram.  The detailed active region magnetic structure generated by the model is shown in figures 5 -7. All the magnetogram from the model is compared with the SDO/HMI Magnetogram 1024x1024 pixels image resolution. The first example in figure 5 from NOAA12564 located in the northern hemisphere shows different magnetic field distributions between HMI magnetogram and AI-generated ones. Preceding polarity in AI-generated shows smaller magnetic area while the following polarity is not too subtle compared to HMI magnetogram. Unsatisfied results are shown in figure 6 from NOAA12615 located in the southern hemisphere. Magnetic field distribution polarity was poorly generated compared to the magnetogram observation from SDO/HMI. Similar results are shown in figure 7 for NOAA12645 located in the southern hemisphere. The magnetic field distribution is also poorly generated by the model. Although for both cases, the tilt angle between preceding and following polarity is still comparable with the observation results. We believe that the AI finds it difficult to determine and generate the magnetic polarity of the active region which is quite complex where the polarity is mixed between positive and negative, as shown in figures 6 and 7. As for figure 5, since the active region is only a simple dipole, the results are fairly good. In addition, the input data resolution that we used is also considered as one of contributing factors where the AI is not generating the magnetogram well.

SSIM
We also quantitatively evaluate our model based on the similarity of the AI-generated magnetogram with the SDO/HMI magnetogram using the Structural Similarity Index (SSIM) method shown in table 1. SSIM for the training dataset obtained an average value of 0.61±0.06 with the range from 0.50 to 0.78. This value is equal to 80.05% of AI-generated magnetograms that are comparable to HMI magnetograms. These are good results considering the model is obtained purely from [9] without any change in hyperparameter or network configuration. 216 validation datasets from the active region that produces at least M class flares and above are selected. We obtained an average SSIM value of  [6] which obtained SSIM value of 0.82 ± 0.032, and from [7] which obtained 0.90 ± 0.01.  The whole disk magnetic distribution on the farside AI-generated magnetogram shows less magnetic distribution compared with the frontside SDO/HMI magnetogram observation. This is also shown in the bright region observed in 304 Angstrom, both from SDO and STEREO. We highlight two active regions, i.e., NOAA12042 (red circle) and NOAA12035 (blue circle) for the analysis. NOAA12042 shows clear magnetic field distribution during its passage in front of the solar disk compared to the farside AI-magnetogram. This means that NOAA12042 most likely has a simpler magnetic structure 11 days later when located in the farside of the solar disk. NOAA12035 shows a slight change in magnetic distribution when in the farside compared to when in the frontside of the solar disk. NOAA12035 also has Beta-Gamma magnetic configuration when in the solar frontside and re-emerge again in the frontside as NOAA12054 with Alpha magnetic configuration. The change in the magnetic configuration when re-emerging is confirmed by the farside AI-generated magnetogram results. Figure 9 shows another comparison between the solar frontside and farside observation with the difference of 12 days. Magnetic field distribution between HMI magnetogram and AI-generated ones shows NOAA12194 magnetic pair structures were in decay when located in the farside solar disk (green circle). This is explained that this magnetic pair structure is decayed when in the farside since there is a 12-day difference between frontside and farside observation. This is also confirmed from bright regions observation in 304 Angstrom, both from SDO and STEREO. We highlight three active regions i.e., NOAA12195 (red circle), NOAA12197 (yellow circle), and NOAA12192 (blue circle). NOAA12195 and NOAA12197 show less magnetics pair distribution in the next 12 days when located on the farside of the solar disk. Frontside observation of NOAA12192 has Beta-Gamma-Delta magnetic configuration but shows less magnetic distribution when in the farside of the solar disk. This was confirmed when NOAA12192 re-emerge as NOAA12208 with Beta magnetic configuration.

Conclusions
We have successfully generated solar farside AI magnetogram from STEREO/EUVI304 using a model trained from the solar frontside observation (SDO/AIA304 and SDO/HMI magnetogram dataset). Realistic results from the model show promising applications to generate multiwavelength solar observation using only one observation input such as sunspot observations. The generalization capability of the Image-to-Image cGAN with no modification at all gives good results. Our model may be improved with modification on the cGAN network architecture and tuning on the hyperparameters.