Python Codes

The reference catalog provides the foundation for constructing the training and validation datasets. To prevent leakage, that is, the use of test observations in training \citep{de2018advances}, the catalog is partitioned by day in chronological order, with the first 80\% of the 145 days allocated to training and the remaining reserved for validation. Within each day, the GOES SXR flux signal is segmented into overlapping windows of fixed length (600 samples) with a stride of 120 samples, corresponding to 20\% of the window size. Each window is normalized using z-score standardization (i.e., the mean is subtracted and the result is divided by the standard deviation, thereby producing inputs with zero mean and unit variance). The corresponding label sequences are derived directly from the reference catalog: rise episode are labeled as positive (1), whereas all other intervals are assigned to the negative class (0). This procedure yields 65,955 training and 15,727 validation sets, spanning a wide range of flare morphologies and activity levels. The performance of the CNN during training and validation is summarized in Table~\ref{tab:cnn_metrics}.

The network architecture integrates convolutional, recurrent, and attention-based modules to capture both local and global temporal patterns \citep{goodfellow2016deep, vaswani2017attention, bai2018empirical, el2025hybrid} in the GOES SXR flux signal. The model processes input windows (i.e., fixed-length segments of the flux time series) in parallel through four branches with different kernel sizes and each branch including four convolutional layers, enabling the extraction of features across multiple temporal scales. Unlike conventional CNN pipelines, no pooling or downsampling operations are applied. This design choice is motivated by the need to preserve precise flare start and peak times. To prevent overfitting, a single dropout layer is introduced after the convolutional blocks.

The feature maps are then modeled sequentially by a bidirectional long short-term memory (BiLSTM) layer, which captures gradual flux changes and short-range dependencies by incorporating information from both past and future time steps \citep{huang2015bidirectional, siami2019performance}. To complement this, the sequence is further processed by a Transformer encoder, whose self-attention mechanism captures long-range relations \citep{vaswani2017attention, han2021transformer}. Although the BiLSTM and Transformer are often used independently, their combination here is deliberate: the BiLSTM provides local sequence modeling, while the Transformer supplies global context, and together they achieve better performance in our experiments than either module alone \citep{khan2024transformer, xiong2024load, WANG2025137654}. The final classification is performed by a fully connected layer \citep{ma2017equivalence}, trained with a weighted cross-entropy loss to address class imbalance \citep{phan2020resolving}. The reader is referred to Appendix~\ref{app4} for more details on architectural specifications and training settings.

The trained model is applied to the full GOES SXR dataset spanning 01 January 2018 to 22 August 2025, following an initial preprocessing stage. This period of study corresponds to 2,757 calendar days, with eleven days excluded due to missing satellite observations. For each day, the primary GOES satellite is used as the baseline. Whenever intervals are affected by data gaps or flagged as low quality, the corresponding segments from the secondary satellite are substituted, provided valid measurements are available. Over the study period, 417 days relied on data from only a single operational satellite. After substitution, any timestamps still carrying low-quality flags are discarded. As a result, most daily series contain fewer than the nominal 86,400 one-second samples. Moreover, 15 days with fewer than twelve hours of valid data are removed entirely. Test sets are then constructed from the cleaned daily series and passed to the CNN.

The model is specifically designed to identify the flare rise episode rather than the complete rise–decay profile of events. In other words, the aim is to prevent overlaps during the rise episode of an ongoing flare, while allowing subsequent events that are initiated during the decay episode of a preceding flare. In practice, however, the CNN occasionally detects overlaps during rise episodes. Most of these correspond to spurious transitions introduced by classification error rather than genuine flares. Accordingly, overlapping detections during the rise episodes are merged into a single event during post-processing, whereas detections occurring during the decay episode of a preceding flare are recorded as separate events, allowing overlaps that start (or start and finish) within that decay phase.