Introduction
Deep learning models are often criticized for being "black boxes," a limitation that becomes particularly problematic when dealing with imbalanced data. In scenarios where one class significantly outnumbers another—such as rare disease detection—standard eXplainable AI (XAI) tools fail to provide the global insights necessary to understand why entire classes are consistently misidentified. Most existing XAI methods, like Grad-CAM, focus on individual instance heatmaps rather than the global health of a dataset.
The Proposed XAI Framework
In a study published in Machine Learning, Damien Dablain and colleagues introduce a novel framework that bridges the gap between XAI and imbalanced learning. By leveraging a Convolutional Neural Network’s (CNN) internal "latent representations" or Feature Embeddings (FE), the framework provides class-level explanations for data complexity.
The framework consists of four primary components designed to reveal why a model might struggle with specific categories:
- Class Archetypes: Categorizes data points into Safe, Border, Rare, or Outlier buckets based on their neighborhood in the latent space.
- Nearest Adversaries (NNB): Predicts future inference errors by identifying "neighboring" classes in the training set's latent space.
- Feature Map Overlap: Measures "entanglement" by identifying shared neurons (feature maps) between different classes.
- Class Saliency Colors: Aggregates gradient-based saliency to reveal the specific colors and textures the model associates with a class.
Experimental Evaluation
The authors evaluated their framework across five diverse image datasets featuring various types of imbalance, including exponential, step, and natural distributions found in the real world.
Key Insights
Training Data as a Performance Predictor
A significant finding is that the latent space organization of training data serves as a remarkably accurate mirror for test performance. The Nearest Neighbor (NNB) method was able to predict validation error distributions significantly better than random—up to 34 times better in the case of the iNaturalist dataset. If two classes are close together in the training latent space, they are highly likely to produce mutual false positives during testing.
Texture and Color Bias
The framework highlights a "texture bias" in CNNs. For instance, in CIFAR-10, "Trucks" and "Cars" were found to share 5 of their top 10 feature maps and possessed nearly identical color profiles. This explains their high mutual confusion. Furthermore, the framework reveals that "outlier" images often lack the background textures (like blue sky for airplanes) that the model uses as a classification crutch.
Limitations of Cost-Sensitive Losses
While popular techniques like LDAM address numerical imbalance, they do not necessarily resolve "feature entanglement." The study shows that even when models are made "fairer" through cost-sensitive loss adjustments, they may still rely on the same overlapping features to distinguish between classes, leaving the underlying confusion unaddressed.
Conclusion and Future Work
This framework provides a powerful set of tools for developers to diagnose and mitigate the effects of data imbalance by moving beyond instance-level heatmaps to class-level structural analysis. Future research aims to extend these techniques to object detection and adversarial analysis to further understand how feature embeddings are affected by perturbations and complex scenes.
Summary updated