<?xml-model href='http://www.tei-c.org/release/xml/tei/custom/schema/relaxng/tei_all.rng' schematypens='http://relaxng.org/ns/structure/1.0'?><TEI xmlns="http://www.tei-c.org/ns/1.0">
	<teiHeader>
		<fileDesc>
			<titleStmt><title level='a'>An Innovative Solar Flare Metadata Collection for Space Weather Analytics</title></titleStmt>
			<publicationStmt>
				<publisher>IEEE</publisher>
				<date>12/15/2023</date>
			</publicationStmt>
			<sourceDesc>
				<bibl> 
					<idno type="par_id">10526388</idno>
					<idno type="doi">10.1109/icmla58977.2023.00063</idno>
					
					<author>Jinsu Hong</author><author>Chetraj Pandey</author><author>Anli Ji</author><author>Berkay Aydin</author>
				</bibl>
			</sourceDesc>
		</fileDesc>
		<profileDesc>
			<abstract><ab><![CDATA[Space weather events can have a significant impact on electric systems and health, with solar flares being one of the central events in space weather forecasting. However, existing solar flare prediction tools heavily rely on the Geostationary Operational Environmental Satellites (GOES) classification system, using maximum X-ray flux measurements as proxies to label instances. This approach becomes problematic during solar minimum, where background X-ray flux fluctuations lead to false alarms and inaccurate predictions. To address this issue, we propose a new collection of solar flare intensity labels computed from GOES X-ray flux, introducing innovative labeling regimes that incorporate relative increases and cumulative measurements over prediction windows. Our goal is to improve the accuracy of flare prediction methods by reducing false positives and enhancing overall prediction performance. Throughout this paper, we introduce the concept of relative X-ray flux increase and explain how to derive relative X-ray flux increase metadata for generating new labels. Additionally, we present new cumulative indices and data-driven categorical labels designed for active regionbased and full-disk flare prediction models. We then evaluate the effectiveness of our new labels when applied to established solar flare prediction models, demonstrating that they significantly enhance prediction capabilities and complement existing efforts. With our innovative data-driven labels, we aim to enhance flare forecasting capabilities and provide more accurate and reliable predictions for space weather phenomena.]]></ab></abstract>
		</profileDesc>
	</teiHeader>
	<text><body xmlns="http://www.tei-c.org/ns/1.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xlink="http://www.w3.org/1999/xlink">
<div xmlns="http://www.tei-c.org/ns/1.0"><head>I. INTRODUCTION</head><p>Space weather often refers to conditions and events occur in the geospace environment includes the area surrounding Earth and the Sun's magnetosphere, ionosphere, and thermosphere. Among these events, solar flares hold significant importance, especially when combined with other eruptions like coronal mass ejections (CMEs). The impacts of such events on Earth and near-Earth space are diverse and can range from power grid outages to disruption of navigation and positioning satellites. Additionally, increased radiation levels at high altitudes or during space missions pose health risks to astronauts. Consequently, accurate prediction of solar flares and associated events becomes crucial to mitigate potential negative effects caused by severe space weather events.</p><p>Solar flares are commonly identified using X-ray flux data obtained from Geostationary Operational Environmental Satellites (GOES). A heuristic approach is employed to detect such flares, triggered by a continuous and significant increase in the average X-ray flux series. This increase eventually reaches a plateau, and the flux measurements then return to background levels. The peak X-ray flux (pxf ) of a flare is defined as the maximum X-ray flux measured between the start and end time of the event. The classification of the flares is based on their observed peak X-ray flux, measured in the 1-8 &#197; passbands. Solar flares are categorized into five major classes based on GOES classification: X, M, C, B, and A <ref type="bibr">[1]</ref>. These classes are defined in a logarithmic manner, with X representing the highest flare intensity and corresponding to GOES flux in excess of 10 -4 W m -2 at Earth. These classes are further divided into sub-classes, which are ranked from 1.0 to 9.9. For instance, a C5.7 flare corresponds to approximately 5.7 &#215; 10 -6 W m -2 X-ray flux.</p><p>Solar active regions are areas of the Sun with high concentrations of magnetic flux, and they play a crucial role in driving Earth-impacting events such as flares or coronal mass ejections <ref type="bibr">[2]</ref>  <ref type="bibr">[3]</ref>. The active region-based categorical flare predictions often involve assigning one of two labels to each instance based on a user-defined threshold such as "flaring" or "non-flaring." Commonly, active regions associated with M-or X-class flares are considered as flaring, while regions with lower intensity flares or flare-quiet regions are considered non-flaring. While there are some extensions and alternatives <ref type="bibr">[4]</ref>, the most commonly adopted flare prediction schema uses discretized labels derived from maximum intensity flares and considers the flare productivity of individual active regions <ref type="bibr">[5]</ref>.</p><p>The current flare labeling techniques rely mainly on the peak X-ray flux of the largest flare in the prediction window, and they suffer from three main limitations. Firstly, quantifying the magnitude of X-ray flux for each active region is not feasible, as X-ray flux measurements are global <ref type="bibr">[1]</ref>. This global representation can be misleading, as it does not accurately reflect the emitted radiation from individual active regions. Consequently, in a common binary flare prediction scheme, this misrepresentation may lead to active regions being misclassified. Secondly, relying solely on the maximum intensity of a flare in the prediction window disregards essential factors such as the background X-ray flux, integrated flux, and information on smaller flares. This approach overlooks critical contextual information that could significantly improve prediction accuracy. Furthermore, the use of empirical thresholds, such as &#8805;M1.0 or &#8805;C5.0 <ref type="bibr">[6]</ref>, to differentiate between flaring and non-flaring instances can further diminish the generalization capabilities of prediction models.</p><p>To address these issues, we expand upon the existing flare labeling methods by introducing novel, data-driven techniques that incorporate additional information, including the relative X-ray flux increase in relation to background X-ray flux, active region-based cumulative flare index, and full-disk cumulative flare index. The cumulative flare indices are generated based on absolute X-ray flux and relative X-ray flux increase values. Relative X-ray flux increase allows us to consider background X-ray flux, while cumulative indices enable us to take the effect of small flares (which can be shadowed by large flares) into consideration. These new labels are expected to reduce the number of false positives in our operational predictions, boost the existing forecasts, and improve the overall performance. To test the feasibility of the new flare labels, we trained and evaluated prediction models for active region-based and full-disk flare prediction approaches. We demonstrate that the novel labels complement the existing ones and provide a more comprehensive view of flare activity.</p><p>The rest of the paper is organized as follows: In Sec. II, we present related work in solar flare prediction and demonstrate existing approaches. In Sec. III, we present our methodology and describe in detail the process of generating new solar flare labels based on GOES X-ray flux data. In Sec. IV, we present a case study that demonstrates the feasibility of using these newly introduced labels in solar flare prediction tasks. We discuss the results obtained from the case study and analyze the performance of our proposed approach. Finally, in Sec. V, we conclude the paper with a summary of our findings and discuss potential avenues for future research in the field of solar flare prediction using data-driven labels.</p></div>
<div xmlns="http://www.tei-c.org/ns/1.0"><head>II. RELATED WORK</head><p>The National Oceanic and Atmospheric Administration (NOAA)/GOES has maintained a comprehensive catalog of detected flares since 1975, providing valuable features such as the GOES class, peak X-ray flux, spatial location on the solar disk (when available), NOAA active region number, and temporal information (start, peak, and end times) related to the flares <ref type="bibr">[7]</ref>. When creating datasets for data-driven solar flare forecasting methods, a fixed-size interval known as the prediction window is often used to determine future flare events. Within this window, typically, the maximum intensity flare is selected and labeled, or if no flares are detected, a flarequiet label is assigned. Binary classification tasks use flaring thresholds such as &#8805;M1.0 (or &#8805;C5.0) to differentiate between flaring (M-and X-class flares) and non-flaring instances (Band C-class flares or flare-quiet instances).</p><p>In the field of solar flare forecasting, two main approaches are commonly used. The first one is referred to as active region-based models, which focus on data from active regions, represented as point-in-time vectors <ref type="bibr">[8]</ref>, time series <ref type="bibr">[9]</ref>, or images <ref type="bibr">[10]</ref>. In this approach, time series classification techniques are often employed, and flares are labeled based on their association with specific active regions <ref type="bibr">[11]</ref>. The second approach involves full-disk models, which provide predictions for the entire solar disk. In full-disk models, all flares are considered, regardless of their association with active regions <ref type="bibr">[6]</ref>. Hybrid approaches also exist in the literature <ref type="bibr">[12]</ref>. In these approaches, the primary objective is to predict the occurrence of significant flaring events within a defined prediction window, typically spanning 12, 24, or 48 hours.</p><p>In both active region-based <ref type="bibr">[11]</ref> or full-disk <ref type="bibr">[6]</ref> predictions, each instance is labeled with the maximum intensity flare in the prediction window, and previous studies in solar flare prediction primarily focus on labels derived from GOES classification, which can overlook pertinent information within the prediction windows. In <ref type="bibr">[13]</ref>, we presented a framework to create data-driven flare indices and introduced an extended dataset of flares with their associated data-driven labels. In this study, we employ these labels to predict flaring activity under both active region-based and full-disk flare prediction modes with different threshold settings. As part of our methodology, we integrate new machine learning-ready datasets and create new individual and cumulative labels associated with both active regions and full-disk data instances. We explore the performance and operational feasibility of these new labels with active region-based and full-disk predictions, considering a wide spectrum of threshold values and class weights.</p></div>
<div xmlns="http://www.tei-c.org/ns/1.0"><head>III. METHODOLOGY</head></div>
<div xmlns="http://www.tei-c.org/ns/1.0"><head>A. Relative Increase of Background X-ray Flux</head><p>Relative X-ray flux increase (rxfi) refers to the relative enhancement of X-ray flux with respect to the background Xray flux. This index is created for a flare event and represents the ratio between the peak (maximum) X-ray flux (Pxrf and background X-ray flux (bgxf ). To generate the rxfi index for solar flares, we use 1-minute averaged GOES X-ray flux data collected from multiple GOES missions and define the background X-ray flux for a specific flare. We consider the X-ray flux measurements from the previous 24 hours prior to the flare's start time. The calibrated background X-ray flux is calculated as the mean of the 24-hour X-ray flux measurements before the flare's start time. The formulas for calculating the background X-ray flux and rxfi are as follows:</p><p>In Figure <ref type="figure">1</ref>, we compare the distributions of rxfi values for major GOES-classes (C, M and X) in Solar Cycle 24 (between 2010 to 2019). Majority of the C-class flares have relatively lower rxfi values (1-30). We observe a shift towards higher rxfi values for M-, and especially, X-class flares as expected.</p></div>
<div xmlns="http://www.tei-c.org/ns/1.0"><head>B. Data-driven Labeling for Solar Flares</head><p>As mentioned earlier, we define relative X-ray flux increase (rxfi) as the ratio between the peak X-ray flux to background X-ray flux. For each C-, M-, and X-class flare in our list, we generated new rxfi labels from their peak X-ray flux and developed cumulative indices for absolute X-ray flux measurements and relative X-ray flux increase. We did not include A or B-class flares as they are severely under-detected due to the background X-ray flux in solar maximum. For each instance, using a 24h prediction window, we integrate relevant flare events and define our labels for data instances as follows:</p><p>1) GC Max : The GOES class of the flare with the maximum intensity within a given prediction window. 2) rxfi Max : The flare with the highest rxfi value within the prediction window. 3) GC &#8721;&#65025; : The weighted sum of the GOES subclass values within the prediction window, calculated as</p><p>The sum of the rxfi values within the prediction window. GC Max , serves as a baseline and represents the traditional labels, while rxfi Max , GC &#8721;&#65025; , and rxfi &#8721;&#65025; are the new labels introduced in this study. To calculate the cumulative GOES class flare indices, we apply a multiplication factor of 10 or 100 to the subclass values of M-or X-class flares, respectively. This adjustment is based on the fact that an M-class flare is 10 times stronger than a C-class flare (for the same subclass), while an X-class flare is 10 times stronger than an M-class flare. Consequently, we multiply the numeric subclass values of X-, M-, and C-class flares by 100, 10, and 1, respectively, and then combine them to obtain the cumulative indices. The cumulative indices serve as valuable indicators of solar activity, taking into account multiple smaller flares. We also note that the label integration is performed for both active region instances and full-disk instances. For full-disk, all flares are considered, while for active region-based predictions, we only consider the associated flares.</p></div>
<div xmlns="http://www.tei-c.org/ns/1.0"><head>IV. CASE STUDY: FLARE PREDICTION WITH NEW LABELS A. Data collection</head><p>To assess the impact of the newly introduced labels, we conducted a thorough analysis using both the active regionbased and full-disk approaches for solar flare forecasting. For the active region-based approach, we employed the SWAN-SF dataset <ref type="bibr">[7]</ref>. The SWAN-SF dataset consists of 24 magnetic field parameters, covering the period from 2010 to 2018. In our study, we focused on six magnetic field parameters: USFLUX, TOTUSJZ, TOTUSJH, ABSNJZH, SAVNCPP, and TOTPOT, which are relevant for solar flare prediction. We use a 12hour observation window that moves in 1-hour steps over the multivariate time series. During each iteration, we check if there is a group of flares associated with the active region within the upcoming 24-hour prediction window. We label each slice with maximum or cumulative indices based on the observation. Regarding the full-disk approach, we utilized twenty-four HMI solar magnetogram images per day, selected hourly, spanning from May 1, 2010, to Dec 30, 2018. Each image is labeled by the subsequent twenty-four hour window. The 24-hour prediction windows are marked by four different labels. To ensure a robust evaluation, we divided our data into four partitions using the tri-monthly partitioning technique introduced in <ref type="bibr">[14]</ref>. Each partition covers three months of data over the entire dataset. Specifically, Partition 1 contains data from January to March, Partition 2 from April to June, Partition 3 from July to September, and Partition 4 from October to December. In our study, we used Partition 4 for testing our models, while the other partitions were used for training. The sliced time series dataset and full-disk labels are both available in the data repository <ref type="bibr">[15]</ref>.</p></div>
<div xmlns="http://www.tei-c.org/ns/1.0"><head>B. Classification</head><p>1) Active-region based approach: Time series forest (TSF) approach employs a random forest ensemble technique <ref type="bibr">[16]</ref>. TSF trains multiple decision trees with a subset of statistical features derived from randomly selected intervals, including measures like mean, standard deviation, and slope. By utilizing this method, high dimensional feature spaces are effectively reduced, enabling efficient classification of time series data. Originally designed as a univariate classifier, TSF constructs a random forest for each parameter independently. However, in our case of analyzing multivariate time series from active region patches, we utilize a column ensemble technique to work with multiple parameters simultaneously. This involves fitting each parameter individually with a TSF classifier, and then aggregating the outputs of classifiers using equal voting based on prediction probabilities to form a final prediction.</p><p>2) Full-disk approach: The Vision Transformer (ViT) is a deep learning architecture used to analyze full-disk images. It treats the image as a sequence of fixed-size non-overlapping patches, which are then transformed into a 1D vector for input to the Transformer <ref type="bibr">[17]</ref>. Unlike traditional convolutional neural networks (CNNs), ViT does not use convolutional layers or pooling operations. Instead, it relies on self-attention mechanisms in the Transformer <ref type="bibr">[18]</ref> to capture relationships between different patches and understand the global context of the image. To exploit the pre-trained ViT models and map the magnetogram images (original size -512x512), a convolutional layer is added to reduce their resolution to 224x224. Additionally, a final linear layer with two output values is appended to the last layer of ViT for binary classification purposes. Additionally, in our ViT-based model, we use Stochastic Gradient Descent (SGD) as the optimizer and focal loss as the loss function. Focal loss is a modified version of cross-entropy loss that puts more emphasis on learning from hard misclassified examples <ref type="bibr">[19]</ref>. This setup allows ViT to efficiently analyze and classify full-disk images. For further implementation details, readers can refer to our project repository</p></div>
<div xmlns="http://www.tei-c.org/ns/1.0"><head>C. Model evaluation</head><p>To evaluate the models, we utilized a 2&#215;2 confusion matrix and computed forecast skill scores commonly used in solar flare prediction: the True Skill Statistics (TSS, shown in Eq. ( <ref type="formula">3</ref>)) and the Heidke Skill Score (HSS, shown in Eq. ( <ref type="formula">4</ref>)).</p></div>
<div xmlns="http://www.tei-c.org/ns/1.0"><head>T SS =</head><p>T P T P + F N -F P F P + T N</p><p>(3)</p><p>where P = TP + FN and N = FP + TN. In these equations, P represents instances of strong flaring classes, while N represents relatively smaller and flare-quiet regions. TP, FP, FN, and TN correspond to true positive, false positive, false negative, and true negative, respectively. To address the class imbalance issue, we explored ten different class weights (e.g., 1:1, 1:10, 1:15, ..., and 1:50) and ten thresholds (e.g., 10, 20, ..., 100) for new labels to optimize the models' performance.</p><p>For GC Max , we used a step size based on the subclass value of 2.5. The imbalance ratios present in our experiments are shown in Table <ref type="table">1</ref>.</p><p>TABLE I: Imbalance ratio of the labels THR(&#8805;) rxfi Max GC &#8721;&#65025; rxfi &#8721;&#65025; 10 62 79 46 20 122 156 92 30 187 218 137 40 229 280 192 50 331 328 263 60 394 419 296 70 620 657 405 80 674 938 494 90 711 1030 565 100 909 1216 645 THR(&#8805;) GC Max C1 13 C2.5 32 C5.0 59 C7.5 80 M1.0 104 M2.5 239 M5.0 406 M7.5 1156 X1.0 1622 X2.5 8374</p></div>
<div xmlns="http://www.tei-c.org/ns/1.0"><head>1) AR-based Models:</head><p>The results of the AR-based models using four different labels are visualized as a set of heatmaps in Figure <ref type="figure">2</ref>. Our findings indicate that using GC Max leads to slightly higher TSS and HSS scores compared to using rxfi Max . As the class weight increases, the TSS scores increase, but the HSS scores decrease for all the labels. This is because an increase in true positives boosts the TSS scores, while an increase in false positives lowers the HSS scores. Moreover, larger thresholds for labeling create higher imbalance ratios, making the prediction tasks more challenging and causing overall skill scores to drop.</p><p>This case study highlights the challenge of class imbalance in solar flare prediction. Note that direct comparison between the data instances and labels used in this study may not be entirely appropriate. The evaluation metrics used suggest that the proposed labels can enhance the performance of flare forecasting models. Moreover, with optimal thresholds and class weights, the models trained with the new labels have the potential to outperform existing labeling techniques. Therefore, the findings suggest that the proposed labels can be valuable additions to existing techniques, and their combination can improve the capabilities of flare prediction .</p><p>2) Full-disk classification: The results of the full-disk models are shown in Figure <ref type="figure">3</ref>. This figure presents the TSS and HSS scores at the last epoch for models trained with four different labels. In all labels, there is a consistent trend where HSS scores decrease as thresholds increase, as higher thresholds lead to more false positives. We observe the highest nominal TSS scores with GC . However, cumulative labels (specifically the GC &#8721;&#65025; ) provide an overall more flexible prediction performance, where we see a more robust set of forecast skills as the threshold is increasing. Note that, with higher thresholds in GC &#8721;&#65025; we capture either a very large event or multiple large events or a combination of the two. In addition, while there are some plausible results, for fulldisk models with rxfi-based indices, the overall results show relatively lower performance. This is even more evident for the rxfi index as we observe fluctuating TSS performance and consistently low HSS.</p><p>Considering full-disk models makes use of all visible active regions, the overall higher performance of cumulative indices are expected and they can be used for full-disk predictions. Nevertheless, we note that the results from different labels are not directly comparable, due to background flux fluctuations across different phases of solar cycles.</p></div>
<div xmlns="http://www.tei-c.org/ns/1.0"><head>V. CONCLUSION AND FUTURE WORK</head><p>In this research, we introduced a novel set of flare labels, including relative X-ray flux increase (rxfi), maximum relative X-ray flux value (rxfi Max ), sum of X-ray flux increase values (rxfi &#8721;&#65025; ), and weighted sum of GOES subclass values (GC</p></div>
<div xmlns="http://www.tei-c.org/ns/1.0"><head>&#8721;&#65025;</head><p>). These labels serve as valuable additions to existing ones in solar flare prediction. We integrated these new labels to both active region-based and full-disk classification models. Through a preliminary case study, we evaluated the effectiveness of these new labels in solar flare prediction. Our findings  indicate that these new labels produce plausible skill scores to well-established techniques, demonstrating their potential as an alternative approach in solar flare forecasting.</p><p>Moving forward, there are several avenues for future research. Firstly, we plan to investigate multi-class classification and regression tasks using new indices. Furthermore, understanding eruptive flares, which are flares associated with coronal mass ejections, will be a crucial aspect of our future work. Additionally, we aim to delve deeper into our models, understanding their behavior in specific cases rather than treating them as black boxes. This will enable us to improve model interpretability and make more informed decisions in space weather forecasting. Overall, by extending our research in these directions, we aim to enhance the accuracy and robustness of space weather forecasting systems, creating more reliable predictions for space weather phenomena.</p></div></body>
		</text>
</TEI>
