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
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
Figure 1. Overview of the SWXAI architecture, showing multimodal inputs, the unified API, registry and validation layers, backend model support, and explanation outputs. Output structure (API schema, visualization templates) is consistent across runs; attribution values are run-specific. Overview of the SWXAI architecture with multimodal inputs, a unified API, registry and validation layers, model backends, and reusable explanation outputs.
Figure 2. SWXAI coverage across data modalities, explanation methods, modeling and feature-extraction extensions, and utility and reproducibility resources. Coverage figure for SWXAI showing supported image, time-series, and tabular explanation methods, plus extensions and reproducibility resources.
Figure 3. Original HMI active-region magnetogram and Grad-CAM explanation with top-5 high-importance locations for HARP #856 (Label: M1.6). Two-panel figure showing the original HMI active-region magnetogram on the left and the Grad-CAM attribution overlay with a colorbar and top-5 attribution points on the right for HARP 856.
Figure 4. SWXAI occlusion importance for a SWAN-SF active-region instance (HARPNUM 5456). Per-feature ΔPflare curves are shown for TOTUSJH, MEANSHR, and R_VALUE across the observation window. Light per-curve shading emphasizes the magnitude under each feature curve, the vertical shaded band marks the highest aggregate-importance peak window, and rug strips identify time steps above the attribution threshold. Temporal occlusion importance visualization for HARP 5456, showing per-feature importance curves, a shaded peak window, and rug strip markers.
Figure 5. SHAP feature attribution on the geomagnetic storms dataset, ranked by mean absolute SHAP value. The prediction target is severe-storm occurrence (Dst ≤−150 nT); orange bars denote features that increase the predicted storm probability (positive mean SHAP effect) and blue bars denote features that decrease it (negative mean SHAP effect). SHAP-based feature attribution on the geomagnetic storms dataset showing ranked feature importances with positive and negative mean SHAP effects.
SETI Institute, Mountain View, CA, USA 94043 · Lockheed Martin Solar and Astrophysics Laboratory, Palo Alto, CA, USA · Air Force Research Lab, Albuquerque, New Mexico, USA
Department of Mechanical Engineering, IIITDM Kancheepuram, Chennai, Tamil Nadu, India · Department of Mechanical Engineering, Indian Institute of Technology Kanpur, Kanpur, Uttar Pradesh, India
Meteorological Institute Munich, Ludwig-Maximilians-Universität, 80333 Munich, Germany · Deutsches Zentrum für Luft- und Raumfahrt, Oberpfaffenhofen, Germany