Superclass-Guided Representation Disentanglement for Spurious Correlation Mitigation

Chenruo Liu, Hongjun Liu, Zeyu Lai, Yiqiu Shen, Chen Zhao, Qi Lei

TL;DR

This paper introduces SupER, a novel framework that tackles the challenge of spurious correlations in machine learning by leveraging "superclasses" – broader categories that encompass the actual task labels. SupER uses a vision-language model to guide feature disentanglement, ensuring that the model focuses on truly relevant features rather than spurious correlations, leading to significantly improved robustness and generalization.

What Problem Does This Paper Address?

Machine learning models often learn spurious correlations between input features and target labels during training. These correlations, while helpful on the training data, can lead to poor performance when the data distribution shifts, a common problem in real-world applications (domain generalization). Existing methods to combat this often rely on explicit group annotations or assume identical group compositions across training and testing, which are often unavailable or impractical. This paper addresses the critical need for a robust method that can mitigate spurious correlations even when group information is absent and when test-time groups differ from training data.

Methods

SupER's core innovation lies in its use of superclass guidance. Instead of relying on specific group labels, it leverages broader, semantically richer "superclass" labels (e.g., "bird" instead of "waterbird" or "landbird"). This superclass information is obtained from a pretrained vision-language model (like CLIP) through gradient-based attention alignment.

The framework consists of:

  • B-VAE for Feature Disentanglement: A Beta-Variational Autoencoder is used to disentangle the input features into two components: Z_rel (superclass-relevant features) and Z_irr (superclass-irrelevant features).
  • Superclass Guidance via CLIP: CLIP's ability to map semantic information from text to images is used to guide the disentanglement process. Gradient-based attribution maps from CLIP are used to encourage Z_rel to capture superclass-relevant information and Z_irr to capture superclass-irrelevant information.
  • Principled Feature Usage: A theoretically grounded strategy is employed to utilize the disentangled features. This strategy prioritizes the use of superclass-relevant features while discarding superclass-irrelevant ones, ensuring optimal performance in worst-case scenarios. This is achieved by training two separate classifiers, one for Z_rel and one for Z_irr, and then strategically combining their outputs.

Datasets

The paper evaluates SupER on a variety of challenging datasets designed to expose spurious correlations:

  • Waterbirds-95% and Waterbirds-100%: These datasets are standard benchmarks for spurious correlation research, where bird species are correlated with background types. Waterbirds-100% is particularly challenging as it omits certain test groups entirely.
  • SpuCo Dogs: This dataset involves spurious correlations between dog breeds and environmental attributes.
  • MetaShift: This benchmark consists of four subsets with increasing degrees of spurious correlation and introduces novel group compositions at test time.
  • Spawrious: This dataset features six subsets with both one-to-one and many-to-many spurious correlation regimes, offering complex scenarios.
  • BFFHQ, CelebA, and Color MNIST: These datasets are used to evaluate SupER in a special case where spurious correlations arise within the superclass, demonstrating its adaptability.

Key Insights and Ideas

  • Superclasses as Intrinsic Signals: The paper argues that superclasses are more intrinsic and reliable signals for mitigating spurious correlations than explicit group labels, especially when group information is scarce or unreliable.
  • CLIP as a Weak Supervisor: SupER leverages CLIP not to replicate its predictions, but as a "weak supervisor" to guide feature disentanglement. This allows SupER to learn robust features while mitigating CLIP's own potential biases.
  • Theoretical Justification for Feature Usage: The paper provides theoretical analysis that supports the strategy of prioritizing superclass-relevant features, offering a principled approach to feature utilization.
  • Robustness to Unseen Groups: SupER demonstrates strong performance even when test-time groups are entirely absent from the training data, a significant limitation of many prior methods.

Key Results

  • Superior Worst Group Accuracy: SupER consistently outperforms strong baselines, including those that use group information, across various datasets, particularly on challenging scenarios like Waterbirds-100%, Spawrious, and MetaShift. For example, it achieves a 17.6% improvement in worst group accuracy on Waterbirds-100% compared to the best baseline.
  • Reduced Variance: SupER exhibits significantly smaller variance in accuracy across groups, indicating more consistent performance and less susceptibility to spurious features.
  • Effective Feature Disentanglement: Visualizations (GradCAM maps) clearly show that SupER successfully disentangles superclass-relevant and irrelevant features, with w_rel focusing on relevant aspects and w_irr on irrelevant ones, unlike ERM which often relies on spurious cues.
  • Mitigation of CLIP Biases: SupER's attention maps demonstrate its ability to correct for potential biases in CLIP's guidance, leading to more accurate feature focus.

Limitations and Future Work

  • Prompt Engineering: While the framework is designed to be flexible with prompts, the performance can be sensitive to the specificity and quality of the superclass text prompts used with CLIP. The paper explores automatic superclass extraction using LLMs as a promising direction to alleviate this.
  • Trade-off in Guidance Strength: The paper highlights a trade-off between superclass guidance strength (λ2) and model autonomy. Over-reliance on guidance can hinder learning discriminative features, while too little can lead to spurious correlations. Finding the optimal balance is crucial.
  • Combining with Other Methods: The paper suggests that SupER can be effectively combined with other methods (like JTT) that identify spurious samples, leading to further performance gains. This integration is a promising avenue for future work.
  • Computational Cost: While not explicitly detailed as a limitation, the use of B-VAE and CLIP suggests a higher computational cost compared to simpler ERM models.

Summary updated

BibTeX
@inproceedings{liu2025superclass,
  author = {Chenruo Liu and Hongjun Liu and Zeyu Lai and Yiqiu Shen and Chen Zhao and Qi Lei},
  title = {{Superclass-Guided Representation Disentanglement for Spurious Correlation Mitigation}},
  booktitle = {CPAL (Proceedings Track)},
  year = {2025},
  url = {https://openreview.net/forum?id=7lbU2myr7C},
}
Figure