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
- 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.