ExMap: Leveraging Explainability Heatmaps for Unsupervised Group Robustness to Spurious Correlations

Rwiddhi Chakraborty, Adrian Sletten, Michael Kampffmeyer

Abstract

Deep neural networks often exploit spurious correlations—shortcuts like background cues—to achieve high average accuracy, resulting in poor performance on minority subgroups. Mitigating this "shortcut learning" typically requires expensive, manually annotated group labels. We introduce ExMap, a novel unsupervised framework that discovers these hidden subgroups by clustering explainability heatmaps. By analyzing the model's internal focus rather than raw input features, ExMap generates pseudo-labels that effectively guide robust retraining strategies. Our approach achieves state-of-the-art results on several benchmarks, including a 92.5% worst-group accuracy on Waterbirds, effectively closing the gap between unsupervised and supervised group robustness.

Introduction: The Challenge of Spurious Correlations

Deep learning models are frequently "lazy," latching onto spurious correlations or shortcuts instead of learning causal features. For instance, a model might identify a duck based on a watery background rather than the bird's morphology. While this strategy yields high average accuracy, it fails in "worst-group" scenarios, such as a duck in a park.

Traditional "Group Robustness" strategies mitigate this by training models to perform well across all subgroups. However, these methods usually rely on explicit group labels—metadata that identifies which images contain specific shortcuts. Such labels are costly and often unavailable in real-world datasets.

Taxonomy of group label selection methods, highlighting ExMap's position as an unsupervised, explainability-based approach.

As shown in the taxonomy above, ExMap represents a shift toward unsupervised, explainability-based group discovery, moving away from reliance on ground-truth labels or raw feature clustering.

Methodology: From Heatmaps to Pseudo-Labels

ExMap employs a two-stage mechanism that shifts focus from what the data is to how the model perceives it.

  1. Explainability Heatmap Extraction: Using a pre-trained (but biased) model, ExMap generates pixel-attribution heatmaps via Layer-wise Relevance Propagation (LRP). These heatmaps pinpoint the exact pixels the model prioritized for its prediction.
  2. Clustering for Pseudo-labels: Instead of clustering raw image features—which are often "entangled" with both object and background information—ExMap clusters the generated heatmaps. Images where the model relies on the same shortcut (e.g., focusing on grass instead of the animal) produce similar heatmaps and are grouped together.
  3. Robust Retraining: These clusters serve as pseudo-labels for existing group robustness algorithms like Deep Feature Reweighting (DFR) or Just Train Twice (JTT). The model is then retrained to ensure consistent performance across all identified clusters.
The ExMap training strategy uses pseudo-labels derived from heatmap clustering to produce a group-robust model with high accuracy across diverse subgroups.

Experimental Evaluation

The authors evaluated ExMap on several standard benchmarks:

  • C-MNIST (Colored MNIST): A synthetic dataset where digit color is 99% correlated with the label.
  • Waterbirds: Photos where the background (land vs. water) serves as a primary shortcut.
  • CelebA: A face dataset where gender acts as a spurious attribute for hair color prediction.
  • UrbanCars: A complex dataset with multiple shortcuts (background and co-occurring objects), testing robustness in "Whac-A-Mole" scenarios.

ExMap consistently outperformed previous unsupervised state-of-the-art methods. On Waterbirds, it achieved a 92.5% worst-group accuracy (WGA), surpassing the previous best unsupervised method, GEORGE (91.7%), and even slightly exceeding the supervised DFR baseline (92.1%). On CelebA, it reached 84.4% WGA, a significant improvement over the standard ERM model's 41.1%.

Discussion and Key Insights

  • Heatmaps as a Noise Filter: Raw features often contain irrelevant information. By clustering heatmaps, ExMap focuses solely on the features the model actually utilized, effectively denoising the group discovery process.
  • Strategy Agnostic: ExMap acts as a group discovery tool that can be integrated with various supervised robustness strategies by providing the necessary labels.
  • Mitigating Multi-Shortcut Dilemmas: In environments with multiple shortcuts, supervised methods may fail if they only account for one. ExMap discovers groups based on actual model behavior, allowing it to identify and mitigate multiple shortcuts simultaneously.

Conclusion and Future Directions

ExMap demonstrates that explainability is not just for post-hoc analysis but can be a powerful tool for improving model training. While it faces challenges in highly complex or occluded scenes and carries some computational overhead for heatmap generation, it represents a significant step toward label-efficient, robust AI. Future work may explore the intersection of group robustness and fair clustering to ensure balanced performance across sensitive attributes without explicit supervision.

Summary updated

BibTeX
@inproceedings{chakraborty2024exmap,
  author = {Rwiddhi Chakraborty and Adrian Sletten and Michael Kampffmeyer},
  title = {{ExMap: Leveraging Explainability Heatmaps for Unsupervised Group Robustness to Spurious Correlations}},
  booktitle = {IEEE/CVF Conference on Computer Vision and Pattern Recognition},
  year = {2024},
}
Figure