The surface of the Sun is etched with invisible magnetic fields. These fields form patterns you could compare to hasty handwriting — magnetic handwriting. Encoded in those patterns are signs of solar flares: colossal explosions that blast clouds of plasma and radiation into space. When these disturbances, known as the Solar wind, reach Earth, they disrupt satellites and power grids. Predicting a flare in time has become a pressing challenge.
For a long time, physicists couldn't crack which patterns spell trouble. The basic laws linking magnetism and electricity, known as electromagnetism (discovered by Michael Faraday and James Clerk Maxwell), are well understood. Yet near the Sun, the picture is far too complex. Help came from Machine Learning, and in particular Convolutional Neural Networks — systems that recognize patterns in images. They were trained on thousands of magnetograms, high-resolution snapshots of the magnetic field captured by a special polarimetry instrument on a satellite. The network learned to forecast a flare 24 hours ahead, but its inner logic remained a black box. Grad-CAM, a tool from explainable artificial intelligence, lit up the parts of each image that most influenced the network's decision.
It turns out the network unconsciously picks out regions where the magnetic field is structured in a peculiar way. In those spots, one polarity (the "plus") clearly dominates the other (the "minus"), with the plus area roughly twice as large. This imbalance is a telltale sign that magnetic reconnection is about to happen there — a sudden rearrangement of field lines that unleashes tremendous energy. The network had grasped a physical principle without ever opening a textbook.
Now explainable AI is evolving from a debugging tool into an instrument of scientific discovery. By peering into the magnetic handwriting of the Sun, researchers can do more than just hunt for known signs; they can uncover new ones spotted by the algorithm. In the future, this promises early-warning systems that will alert pilots, satellite operators, and power-grid managers of an approaching solar storm.
The energy of a strong solar flare is comparable to the explosion of a billion hydrogen bombs. And a neural network can predict it just 24 hours in advance by spotting a tiny imbalance in a magnetic pattern.