cs.LGNov 7, 2026

SWXAI: A Unified Multimodal Explainability Library for Space Weather Forecasting and Heliophysics

Authors: Benedict Antonio Mervyn, Anli Ji, Manolis K. Georgoulis, Berkay Aydin

Organizations: Georgia State University, Atlanta, GA, USA · California State University, Fullerton, Fullerton, CA, USA · Johns Hopkins University Applied Physics Laboratory, Laurel, MD, USA

Abstract

Space weather forecasting and heliophysics increasingly rely on machine learning models that process heterogeneous inputs such as multi-viewpoint multi-wavelength solar images and rasters, multivariate time series, spatial annotations, and tabular event-level data. However, explainability workflows remain fragmented across libraries, model interfaces, and output formats, limiting reuse and reproducibility. We present SWXAI, an open-source library that unifies explainable AI (XAI) workflows for image, time-series, and tabular data in space weather forecasting and heliophysics. SWXAI provides a common, extensible interface across commonly used vision, time-series, and tabular learning models, with validation, adaptation, and persistent explanation objects. It also includes domain-grounded examples, reproducible notebooks, tests, and documentation, enabling users to inspect outputs, swap models or explainers, and extend workflows to new heliophysics datasets. SWXAI reduces modality-specific engineering overhead and supports comparable, reusable explanations across heterogeneous scientific machine learning pipelines. A benchmark against direct backend implementations shows that SWXAI substantially reduces the code users write to produce an explanation, with no practical runtime cost.

Figures & tables

Explore similar work

Oct 27, 2026

Machine learning applications in the heliosphere

Space weather is the study of the near-Earth impact of the processes on the Sun. In a this era of technology, space weather emerges as a crucial area of study wherein the state of the near-Earth conditions need to be modeled and forecasted. Crucially, the advent of machine learning provides us with opportunities to study this subject in a rather comprehensive manner. In this chapter, we treat the the processes arising from Sun to the impact on the ground as a set of coupled systems, which can be studied in isolation or in a coupled manner. We define these individual systems in terms of their state vector S⃗\vec{S}, which provides us with an opportunity to define the physical variables determining the system. This also allows us to consider the systems in terms of their observables, obtained through the action of operators as O⃗[S⃗]\vec{O}[\vec{S}]. In such a formalism, the machine learning algorithms serve as {\it learned operators}, defined generally as inference (I\mathcal{I}), propagation (P\mathcal{P}), and emulation (E\mathcal{E}). Through such a formalism, we present how machine learning helps advance our understanding of the physical systems under study, while also accelerating the development of operational models for space weather forecasting.
Nov 11, 2026

PhysXAI: A Theoretical Framework for Diagnosing Physical Hallucinations in Weather Foundation Models

Modern machine learning models for global weather forecasting achieve remarkable predictive accuracy, yet they frequently produce states that violate fundamental physical laws, including conservation of mass, hydrostatic balance, or spectral energy scaling. We term these outputs physical hallucinations and propose PhysXAI, a rigorous diagnostic framework that detects, localises, and attributes such inconsistencies. Unlike existing post-hoc metric suites, PhysXAI is a learnable system that explicitly decouples forecast error from physical plausibility. We formalise the problem through a novel joint condition on numerical and physical residuals, and introduce a multi-branch encoder that extracts representations from conservation, dynamical, spectral, cross-variable, and spatiotemporal residuals. A key innovation is a physics-consistency contrastive learning objective, which we theoretically show the latent representation to be approximately isometric to the physical residual space, ensuring that diagnostic decisions remain grounded in physically meaningful deviations. We further derive an adaptive multi-objective loss with gradient-based weighting to balance competing diagnostic objectives. The framework produces spatially resolved hallucination maps, violation-type classifications, and calibrated Bayesian uncertainty, enabling both detection and interpretable attribution of physical inconsistencies. We conduct a comprehensive comparative evaluation of PhysXAI across ERA5, WeatherBench 2, and MERRA-2, using forecasts from GraphCast, Pangu-Weather, and NeuralGCM, with Python-written code and a fully reproducible experimental protocol. Our theoretical analysis and empirical evaluation establish PhysXAI as a principled framework for diagnosing physical hallucinations and advancing trustworthy AI for weather forecasting.
Apr 22, 2026

Mechanistic Interpretability Tool for AI Weather Models

Artificial Intelligence (AI) weather models are improving rapidly, and their forecasts are already competitive with long-established traditional Numerical Weather Prediction (NWP). To build confidence in this new methodology, it is critical that we understand how these predictions are generated. This is a huge challenge as these AI weather models remain largely black boxes. In other areas of Machine Learning (ML), mechanistic interpretability has emerged as a framework for understanding ML predictions by analysing the building blocks responsible for them. Here we present an open-source, highly adaptable tool which incorporates concepts from mechanistic interpretability. The tool organises internal latent representations from the model processor and allows for initial analyses, including cosine similarity and Principal Component Analysis (PCA), enabling the user to identify directions in latent space potentially associated with meteorological features. Applying our tool to the graph neural network GraphCast, we present preliminary case studies for mid-latitude synoptic-scale waves and specific humidity. These demonstrate the tool's ability to identify linear combinations of latent channels that appear to correspond to interpretable features.