Assessing reliability of explanations in unbalanced datasets: a use-case on the occurrence of frost events

Ilaria Vascotto, Valentina Blasone, Alex Rodriguez, Alessandro Bonaita, Luca Bortolussi

Introduction

In high-risk domains such as climate science, healthcare, and finance, the events of greatest interest—natural disasters, rare diseases, or fraudulent transactions—are often the least frequent in the data. While Machine Learning (ML) models can achieve 99% accuracy on these unbalanced datasets, such metrics are frequently misleading; a model can achieve high accuracy simply by consistently predicting the majority class.

Explainable AI (XAI) is intended to mitigate this by providing transparency into the model's decision-making process. However, most XAI evaluation frameworks are designed for balanced datasets. This paper addresses the critical need for reliable explanations in the "1%"—the minority class—where standard XAI tools may prove fragile or inconsistent. We propose a framework to measure the robustness and consistency of explanations specifically for rare events, using the prediction of frost events as a real-world use-case.

The Problem: The Fragility of Rare Event Explanations

When evaluating the reliability of an explanation, researchers often perturb an input and observe if the explanation remains stable. In unbalanced scenarios, standard methods of adding random Gaussian noise are problematic. Such "off-manifold" noise can push a rare event into a region of the data space that resembles the majority class, leading to nonsensical explanations that do not reflect the model's true reasoning for the minority class. If a minor change to a rare-event input leads to a radically different explanation, the model's reasoning cannot be trusted for high-stakes decision-making.

Proposed Methodology

To address these challenges, we introduce a three-step evaluation pipeline focused on the minority class:

1. On-Manifold Neighborhood Generation

Rather than using random noise, we employ a k-medoids clustering approach to identify "real" neighbors that exist on the actual data manifold. This ensures that the alternative versions of a rare event represent physically plausible scenarios (e.g., weather patterns that could actually occur) rather than mathematical artifacts.

2. Local Averaging

We compute a weighted average of explanations for a specific data point and its on-manifold neighbors. This aggregated explanation serves as a stable baseline for evaluating the quality of individual attributions.

3. Reliability Metrics

We define two primary metrics to quantify explanation quality:

  • Local Robustness ($\hat{\mathcal{R}}(x)$): This measures the similarity between the explanations of neighboring points using Spearman rank correlation. High robustness indicates that the model's reasoning is stable across similar inputs.
  • Consistency ($\hat{\mathcal{C}}(x)$): This measures how well the original explanation aligns with the locally weighted average, indicating how faithful the explanation is to the local data structure.

Experimental Setup: Frost Event Prediction

We applied this framework to a real-world dataset focused on frost events in Poland (2009–2024).

  • Data Source: 8 numerical atmospheric variables derived from ERA5 reanalysis data (ECMWF).
  • Target: Binary occurrence of frost, derived from insurance claim data.
  • Imbalance: The dataset is highly skewed, with a 99% to 1% ratio between non-frost (majority) and frost (minority) events.

We evaluated four neural-network-specific XAI methods: Integrated Gradients (IG), DeepLIFT (DL), Layerwise Relevance Propagation (LRP), and an Ensemble of all three.

Key Insights and Results

The Failure of Random Noise

Our findings confirm that random perturbations are significantly more damaging to minority class explanations than majority ones. Random noise creates a larger "distribution shift" for rare events, making standard robustness tests misleading for unbalanced data. The use of on-manifold neighbors is essential for a fair assessment.

Comparative Performance of XAI Methods

  • DeepLIFT as the Gold Standard: In the frost-prediction use-case, DeepLIFT emerged as the most reliable method. It achieved the highest mean robustness (97.69%) and consistency (99.40%) with the lowest standard deviation.
  • Integrated Gradients: IG followed closely behind DeepLIFT, showing strong performance but slightly less stability.
  • LRP Stability Issues: Layerwise Relevance Propagation (LRP) was the least stable method. It frequently suffered from "vanishing gradients," resulting in zero-vector attributions that provided no useful information for the minority class (76.77% robustness).
  • The Ensemble Advantage: The ensemble approach provided a reliable middle ground, successfully mitigating the inconsistencies of individual methods by averaging their insights.

Conclusion and Future Work

This study demonstrates that XAI reliability is not uniform across classes in unbalanced datasets. For rare events like frost, DeepLIFT provides the most trustworthy explanations, while LRP exhibits significant fragility.

As this is preliminary work, future research will investigate how varying the "unbalancing ratio" affects these metrics and extend the analysis to spatio-temporal models. Understanding how weather events move through time and space will be crucial for improving the reliability of climate-related AI explanations.

Summary updated

BibTeX
@inproceedings{vascotto2025assessing,
  author = {Ilaria Vascotto and Valentina Blasone and Alex Rodriguez and Alessandro Bonaita and Luca Bortolussi},
  title = {{Assessing reliability of explanations in unbalanced datasets: a use-case on the occurrence of frost events}},
  booktitle = {xAI (Late-breaking Work, Demos, Doctoral Consortium)},
  year = {2025},
}
Figure