The problem

Solar flares are a notoriously tough to predict phenomena; these outbursts of energy happen when huge amounts of magnetic energy are released in the form of an intense radiation burst on the surface of the Sun. It is very important to gain an understanding of these events, since they may signal coronal mass ejections, events during which the sun sheds huge amounts of high energy material into the solar system. If these reach earth, they can cause a geomagnetic storm, interactions with the earth’s magnetic field that could potentially fry every electronic on the planet in an instant. I think it’s obvious that this would be a problem… but if we can predict coronal mass ejections before they hit earth, we can prepare and protect most of our stuff.

The attempted solution

It is believed that solar flares are closely tied to solar spots - colder regions of the Sun’s surface - and to the Sun’s magnetic field. So, we attempted to train a convolutional neural network (or CNN) to recognize features on the sun that seem to precede a solar flare. We picked 500 regularly spaced images of the sun between 2010 and 2016. These images were taken with a specific wavelength which highlight solar spots and solar flares. Since the image was made up of only one color anyways, we grayscaled it to simplify treatment of the data. We also ran transformations on the image to make it easier to read, without losing too much information. We then found data of every “major” solar flare in the same time frame. This allowed us to match each image we had with the most imminent solar flare. The AI took each pixel of the image as an input, and gave out a single output, i.e. the amount of time until the next predicted flare. It then compares its guess with the actual delay that we measured in the database. If it’s wrong (which it will be), the model adjusts the weight it gives to each pixel, in the hope of closing in on the regions and patterns which could indicate a solar flare.

The result

Spoiler alert: it didn’t work. Our model was running, it was looking at the images alright, but it never recognized a pattern. Its predictions stagnated pretty quickly and never got better. This may be because there could be no correlation between the image and incoming flares, or simply because such networks are hard to make, and we didn’t have time to tweak every value in the hopes of enhancing performance. We learned, later on, that refining these models can take an entire PhD to do! So perhaps this was too ambitious.

Another path forward

We then applied a logistic regression stochastic gradient model to the dataset in order to classify the intensity of the solar flares given the data. This is essentially a simpler neural network whose goal was simply to sort solar flare data and recognize when it’s relevant to our analysis. We trained the model on various training sets and recorded the accuracy on the respective test sets. We received accuracies of around 60% on the testing sets. Accuracy was calculated to take into account correct predictions as well as false negatives/positives. We found this to be pretty solid considering the short time scale of the project as well as the distribution of the data. Namely, the dataset classified each flare as a 0 or 1, depending on whether the flare was a significant (1), or insignificant (0) flare. However, the dataset was heavily saturated with 0 flares, making training the model a bit more difficult due to the lack of presence of significant flares. With more time, we would look to embed more significant flares in our dataset in order to train the model more effectively.

Sources:

Data set

DATA SET FOR SOLAR FLARE PREDICTION USING HMI DATA. (2021). Zenodo. https://doi.org/10.5281/zenodo.4603412

Images

Courtesy of NASA/SDO and the AIA, EVE, and HMI science teams.

What is a solar flare:

What is a solar flare ? - NASA. (s. d.). NASA. https://www.nasa.gov/image-article/what-solar-flare/

What are sunspots:

Sunspots. (s. d.-b). https://www.rmg.co.uk/stories/topics/sunspots

Sunspots classification:

The Zurich Classification System of Sunspot Groups | AAVSO. (s. d.). https://www.aavso.org/zurich-classification-system-sunspot-groups NOAA’s National Weather Service - Glossary. (s. d.). https://forecast.weather.gov/glossary.php?word=SUNSPOT

Relationship between solar flares and sunspots:

Song, Y., & Zhang, M. (2016). ON THE RELATIONSHIP BETWEEN SUNSPOT STRUCTURE AND MAGNETIC FIELD CHANGES ASSOCIATED WITH SOLAR FLARES. The Astrophysical Journal, 826(2), 173. https://doi.org/10.3847/0004-637x/826/2/173

Why are flares dangerous:

Beck, S. (s. d.). Space Technology 5. https://www.jpl.nasa.gov/nmp/st5/SCIENCE/effects2.html

Built With

Share this project:

Updates