Abstract
In this paper, we develop five machine learning models, neural network (NN), long short-term memory (LSTM), LSTM based on attention mechanism (LSTM-A), bidirectional LSTM (BLSTM), and BLSTM based on attention mechanism (BLSTM-A), for predicting whether a ≥C class or ≥M class flare will occur in an active region in the next 24 hr. We use the data base provided by the Space-weather Helioseismic and Magnetic Imager Active Region Patches of Solar Dynamic Observatory, including 10 magnetic field features of active regions from 2010 May 1 to 2018 September 13. The samples are labeled flare information (i.e. No-flare/C/M/X) using solar flare events catalogue provided by the Geostationary Operational Environmental Satellite and Solar Geophysical Data solar event reports. In addition, we generated 10 cross-validation sets from these data using the cross-validation method. Then, after training, validating, and testing our models, we compare the results with the true skill statistics (TSS) as the assessment metric. The main results are as follows. (1) The TSS scores for ≥C class are 0.5472 ± 0.0809, 0.6425 ± 0.0685, 0.6904 ± 0.0575, 0.6681 ± 0.0573, and 0.6833 ± 0.0531 for NN, LSTM, LSTM-A, BLSTM and BLSTM-A, respectively. The TSS scores for ≥M class are 0.5723 ± 0.1139, 0.6579 ± 0.0758, 0.5943 ± 0.0712, 0.6493 ± 0.0826, and 0.5932 ± 0.0723, respectively. (2) For the first time, we add an attention mechanism to BLSTM for flare prediction, which improves the performance of the model for ≥C class. (3) Among the five models, the prediction model based on deep learning algorithms is generally superior to the model based on the traditional machine learning algorithm. The performance of the LSTM models is comparable to that of the BLSTM models. In general, LSTM-A for ≥C class performs better than other models. In addition, we also discuss the influence of 10 features on LSTM-A, and we find that removing the least significant feature will result in better performance than using all 10 features together, and the TSS score of the model will improve to 0.7059 ± 0.0440.
![](http://media.springernature.com/m312/springer-static/image/art%3A10.1007%2Fs10509-023-04209-y/MediaObjects/10509_2023_4209_Fig1_HTML.png)
![](http://media.springernature.com/m312/springer-static/image/art%3A10.1007%2Fs10509-023-04209-y/MediaObjects/10509_2023_4209_Fig2_HTML.png)
![](http://media.springernature.com/m312/springer-static/image/art%3A10.1007%2Fs10509-023-04209-y/MediaObjects/10509_2023_4209_Fig3_HTML.jpg)
![](http://media.springernature.com/m312/springer-static/image/art%3A10.1007%2Fs10509-023-04209-y/MediaObjects/10509_2023_4209_Fig4_HTML.png)
![](http://media.springernature.com/m312/springer-static/image/art%3A10.1007%2Fs10509-023-04209-y/MediaObjects/10509_2023_4209_Fig5_HTML.png)
![](http://media.springernature.com/m312/springer-static/image/art%3A10.1007%2Fs10509-023-04209-y/MediaObjects/10509_2023_4209_Fig6_HTML.png)
![](http://media.springernature.com/m312/springer-static/image/art%3A10.1007%2Fs10509-023-04209-y/MediaObjects/10509_2023_4209_Fig7_HTML.png)
![](http://media.springernature.com/m312/springer-static/image/art%3A10.1007%2Fs10509-023-04209-y/MediaObjects/10509_2023_4209_Fig8_HTML.png)
![](http://media.springernature.com/m312/springer-static/image/art%3A10.1007%2Fs10509-023-04209-y/MediaObjects/10509_2023_4209_Fig9_HTML.png)
![](http://media.springernature.com/m312/springer-static/image/art%3A10.1007%2Fs10509-023-04209-y/MediaObjects/10509_2023_4209_Fig10_HTML.png)
Similar content being viewed by others
References
Ahmed, O.W., Qahwaji, R., Colak, T., Higgins, P.A., Gallagher, P.T., Bloomfield, D.S.: Solar flare prediction using advanced feature extraction, machine learning, and feature selection. Sol. Phys. 283(1), 157–175 (2013)
Bloomfield, D.S., Higgins, P.A., McAteer, R.J., Gallagher, P.T.: Toward reliable benchmarking of solar flare forecasting methods. Astrophys. J. Lett. 747(2), L41 (2012)
Bobra, M.G., Couvidat, S.: Solar flare prediction using SDO/HMI vector magnetic field data with a machine-learning algorithm. Astrophys. J. 798(2), 135 (2015)
Bobra, M.G., Ilonidis, S.: Predicting coronal mass ejections using machine learning methods. Astrophys. J. 821(2), 127 (2016)
Bobra, M.G., Sun, X., Hoeksema, J.T., Turmon, M., Liu, Y., Hayashi, K., et al.: The Helioseismic and Magnetic Imager (HMI) vector magnetic field pipeline: SHARPs–space-weather HMI active region patches. Sol. Phys. 289(9), 3549–3578 (2014)
Cinto, T., Gradvohl, A.L.S., Coelho, G.P., da Silva, A.E.A.: A framework for designing and evaluating solar flare forecasting systems. Mon. Not. R. Astron. Soc. 495(3), 3332–3349 (2020)
Fleishman, G.D., Gary, D.E., Chen, B., Kuroda, N., Yu, S., Nita, G.M.: Decay of the coronal magnetic field can release sufficient energy to power a solar flare. Science 367(6475), 278–280 (2020)
Florios, K., Kontogiannis, I., Park, S.-H., Guerra, J.A., Benvenuto, F., Bloomfield, D.S., Georgoulis, M.K.: Forecasting solar flares using magnetogram-based predictors and machine learning. Sol. Phys. 293(2), 1–42 (2018)
Graves, A., Schmidhuber, J.: Framewise phoneme classification with bidirectional LSTM and other neural network architectures. Neural Netw. 18(5–6), 602–610 (2005)
Huang, X., Zhang, L., Wang, H., Li, L.: Improving the performance of solar flare prediction using active longitudes information. Astron. Astrophys. 549, A127 (2013)
Huang, X., Wang, H., Xu, L., Liu, J., Li, R., Dai, X.: Deep learning based solar flare forecasting model. I. Results for line-of-sight magnetograms. Astrophys. J. 856(1), 7 (2018)
Jaseena, K., Kovoor, B.C.: Decomposition-based hybrid wind speed forecasting model using deep bidirectional LSTM networks. Energy Convers. Manag. 234, 113944 (2021)
Kim, T., Park, E., Lee, H., Moon, Y.-J., Bae, S.-H., Lim, D., et al.: Solar farside magnetograms from deep learning analysis of STEREO/EUVI data. Nat. Astron. 3(5), 397–400 (2019)
Leka, K., Barnes, G.: Photospheric magnetic field properties of flaring versus flare-quiet active regions. II. Discriminant analysis. Astrophys. J. 595(2), 1296 (2003)
Li, R., Zhu, J.: Solar flare forecasting based on sequential sunspot data. Res. Astron. Astrophys. 13(9), 1118 (2013)
Li, X., Zheng, Y., Wang, X., Wang, L.: Predicting solar flares using a novel deep convolutional neural network. Astrophys. J. 891(1), 10 (2020)
Liu, G., Guo, J.: Bidirectional LSTM with attention mechanism and convolutional layer for text classification. Neurocomputing 337, 325–338 (2019)
Liu, C., Deng, N., Wang, J.T., Wang, H.: Predicting solar flares using SDO/HMI vector magnetic data products and the random forest algorithm. Astrophys. J. 843(2), 104 (2017)
Liu, H., Liu, C., Wang, J.T., Wang, H.: Predicting solar flares using a long short-term memory network. Astrophys. J. 877(2), 121 (2019)
Luong, M.-T., Pham, H., Manning, C.D.: Effective approaches to attention-based neural machine translation. ar**v preprint (2015). ar**v:1508.04025
Mason, J.P., Hoeksema, J.: Testing automated solar flare forecasting with 13 years of Michelson Doppler Imager magnetograms. Astrophys. J. 723(1), 634 (2010)
Nishizuka, N., Sugiura, K., Kubo, Y., Den, M., Ishii, M.: Deep Flare Net (DeFN) model for solar flare prediction. Astrophys. J. 858(2), 113 (2018)
Park, E., Moon, Y.-J., Shin, S., Yi, K., Lim, D., Lee, H., Shin, G.: Application of the deep convolutional neural network to the forecast of solar flare occurrence using full-disk solar magnetograms. Astrophys. J. 869(2), 91 (2018)
Pesnell, W.D., Thompson, B.J., Chamberlin, P.: The Solar Dynamics Observatory (SDO). Sol. Phys. 275, 3–15 (2012)
Sadykov, V.M., Kosovichev, A.G.: Relationships between characteristics of the line-of-sight magnetic field and solar flare forecasts. Astrophys. J. 849(2), 148 (2017)
Schou, J., Scherrer, P.H., Bush, R.I., Wachter, R., Couvidat, S., Rabello-Soares, M.C., et al.: Design and ground calibration of the Helioseismic and Magnetic Imager (HMI) instrument on the Solar Dynamics Observatory (SDO). Sol. Phys. 275(1), 229–259 (2012)
Sinha, S., Gupta, O., Singh, V., Lekshmi, B., Nandy, D., Mitra, D., et al.: A comparative analysis of machine-learning models for solar flare forecasting: identifying high-performing active region flare indicators. Astrophys. J. 935(1), 45 (2022)
Song, H., Tan, C., **g, J., Wang, H., Yurchyshyn, V., Abramenko, V.: Statistical assessment of photospheric magnetic features in imminent solar flare predictions. Sol. Phys. 254(1), 101–125 (2009)
Sun, W., Xu, L., Huang, X., Zhang, W., Yuan, T., Yan, Y.: Bidirectional LSTM for ionospheric vertical Total Electron Content (TEC) forecasting. In: 2017 IEEE Visual Communications and Image Processing (VCIP), pp. 1–4 (2017)
Sun, Z., Bobra, M.G., Wang, X., Wang, Y., Sun, H., Gombosi, T., et al.: Predicting solar flares using cnn and LSTM on two solar cycles of active region data. Astrophys. J. 931(2), 163 (2022)
Veronig, A.M.: Can we predict solar flares? Science 369(6503), 504–505 (2020)
Wheatland, M., Ashamari, O., Barnes, G., Colak, T., et al.: A comparison of flare forecasting methods. I. Results from the “all-clear” workshop (2016)
Yuan, Y., Shih, F.Y., **g, J., Wang, H.-M.: Automated flare forecasting using a statistical learning technique. Res. Astron. Astrophys. 10(8), 785 (2010)
Zheng, Y., Li, X., Wang, X.: Solar flare prediction with the hybrid deep convolutional neural network. Astrophys. J. 885(1), 73 (2019)
Author information
Authors and Affiliations
Contributions
Zheng Yanfang and Qin Weishu wrote the main manuscript text. Li Xuebao, Ling Yi, Huang Xusheng, and Li Xuefeng prepared tables and figures. Yan Pengchao, Yan Shuainan, and Lou Hengrui participated in the manuscript writing and revision. All authors reviewed the manuscript.
Corresponding author
Ethics declarations
Competing interests
The authors declare no competing interests.
Additional information
Publisher’s Note
Springer Nature remains neutral with regard to jurisdictional claims in published maps and institutional affiliations.
Rights and permissions
Springer Nature or its licensor (e.g. a society or other partner) holds exclusive rights to this article under a publishing agreement with the author(s) or other rightsholder(s); author self-archiving of the accepted manuscript version of this article is solely governed by the terms of such publishing agreement and applicable law.
About this article
Cite this article
Zheng, Y., Qin, W., Li, X. et al. Comparative analysis of machine learning models for solar flare prediction. Astrophys Space Sci 368, 53 (2023). https://doi.org/10.1007/s10509-023-04209-y
Received:
Accepted:
Published:
DOI: https://doi.org/10.1007/s10509-023-04209-y