Space weather forecasters currently count and track sunspots only after they break through the solar surface. A new AI model from NASA's COFFIES (Consequence Of Fields and Flows in the Interior and Exterior of the Sun) DRIVE Science Center can predict the emergence of these active regions up to 12 hours before they appear — a potential early-warning system for the solar flares and coronal mass ejections that can threaten astronauts, disable satellites and disrupt radio communications on Earth.

The team, bringing together researchers from the New Jersey Institute of Technology, Princeton University and NASA's Ames Research Center, trained a sliding-window transformer architecture on data from NASA's Solar Dynamics Observatory, processed on Ames supercomputers. Instead of scanning the entire solar disk at once like earlier deep-learning approaches, the model moves a fixed-size "viewing window" across a long timeline of the Sun's activity, catching the tiny drops in acoustic power and magnetic-field strength that mark an active region rising from the solar interior.

"We cannot directly see the magnetic structure while it is still rising through the solar interior," said Alexander Kosovichev, a COFFIES co-investigator at NJIT. "We must look for indirect effects — very small changes in the magnetic field and in the pattern of acoustic waves continually traveling through the Sun. The developed technique identifies precursors associated with an emerging active region in slight changes of the Sun's acoustic power — more like a slight change in rhythm within a very noisy orchestra."

The work, published in the Journal of Geophysical Research: Machine Learning and Computation, is not yet ready for operational real-time forecasting, but the team plans to validate the approach across many more known solar events. If refined, it could supplement the models used today by NOAA's Space Weather Prediction Center, the U.S. Air Force and NASA's Moon to Mars Space Weather Analysis Office — giving forecasters a heads-up about where flaring locations may form, including on the Sun's far side, which is invisible from Earth.

As NASA prepares to send astronauts back to the Moon and onward to Mars, anticipating storm-causing regions before they surface could prove vital for protecting both crews and the technology they rely on.