The Sun continuously scribbles magnetic fields across its surface. These patterns are not mere ripples but a handwriting in which nature has encoded warnings of flares. A flare is an explosion that releases the energy of billions of nuclear bombs in minutes, ejecting streams of plasma and radiation into space. When they reach Earth, such Solar wind disturbances disrupt satellites and power grids. Predicting them is a task upon which our technological civilization depends.
Physicists have long known the laws connecting magnetic fields and electricity: they were derived by Michael Faraday and James Clerk Maxwell within the framework of electromagnetism. But the capricious nature of the Sun proved too complex for direct calculations. Machine Learning and Convolutional Neural Networks came to the rescue. They were trained on thousands of magnetograms — magnetic field maps captured with high resolution by the polarimetry instrument on the SDO satellite. The network learned to predict flares, but its internal logic remained a mystery. This gave rise to methods of explainable AI (XAI). One of them, Grad-CAM, highlights the pixels of an image that most influenced the network's verdict. It turned out that the neural network does not simply guess: it accurately identifies special zones on magnetograms, called 'model-focused regions' (MFRs).
Further analysis revealed a striking detail. In MFR zones that inclined the network toward an alarm response, the magnetic polarities were distributed asymmetrically: the area of one polarity roughly doubled the area of the other. The researchers reduced this to a simple polar imbalance index: PII = |N₊ − N₋| / (N₊ + N₋). It is zero at perfect balance and one when one sign completely dominates. For 'flare-prone' regions, PII was about 0,33. This is a precise indication of a configuration prone to magnetic reconnection — a process where field lines abruptly reconfigure, releasing stored energy. Conversely, zones that the network ignored were almost unipolar, with PII close to 1.
Thus, the Convolutional Neural Network intuitively grasped a physical principle without ever having touched an electrodynamics textbook. This result turns XAI from a debugging tool into a window for scientific discovery. Now, peering at magnetic scribbles, scientists can not only search for known signs but also notice new ones spotted by the algorithm. Looking ahead, next-generation telescopes like DKIST and Solar Orbiter will produce magnetograms of unprecedented resolution. Paired with more refined XAI methods, they will help identify the microstructures that trigger a flare. Another avenue is to add time series so the network learns from the evolution of magnetic handwriting in the hours before an event.
Returning to the image of magnetic handwriting, we see how the machine learned to read meaning in seemingly abstract patterns. And this is not just a metaphor: we stand on the threshold of early warning systems that will alert pilots, satellite operators, and power grid managers about an impending solar storm. And in fundamental science, the method promises to approach the answer to why one active region erupts while another, nearly identical, remains quiet, a key mystery of solar physics.
The energy of a major solar flare is on the order of 10²⁵ joules — equivalent to a billion hydrogen bombs. Yet a subtle imbalance in magnetic polarities is enough for a neural network, ignorant of physics, to predict such a cataclysm a day in advance.