Let Samples Speak: Mitigating Spurious Correlation by Exploiting the Clusterness of Samples
Weiwei Li, Junzhuo Liu, Yuanyuan Ren, Yuchen Zheng, Yahao Liu, Wen Li
TL;DR
Spurious correlations limit deep models, especially when bias attributes are unknown. The paper proposes NSF, a four-step, bias-label-free debiasing pipeline that identifies bias presence from dispersed samples in feature space, estimates a bias-invariant mean, learns a linear transform $t(\vec{x})$ to neutralize spurious features, and finetunes the classifier on the transformed features. The authors provide theoretical justification under a strong spurious assumption and demonstrate substantial improvements in Worst Group Accuracy (WGA) across image and NLP benchmarks, including medical imaging, with fast training times. NSF is architecture-agnostic, non-intrusive, and practical for real-world deployments where bias labels are unavailable.
Abstract
Deep learning models are known to often learn features that spuriously correlate with the class label during training but are irrelevant to the prediction task. Existing methods typically address this issue by annotating potential spurious attributes, or filtering spurious features based on some empirical assumptions (e.g., simplicity of bias). However, these methods may yield unsatisfactory performance due to the intricate and elusive nature of spurious correlations in real-world data. In this paper, we propose a data-oriented approach to mitigate the spurious correlation in deep learning models. We observe that samples that are influenced by spurious features tend to exhibit a dispersed distribution in the learned feature space. This allows us to identify the presence of spurious features. Subsequently, we obtain a bias-invariant representation by neutralizing the spurious features based on a simple grouping strategy. Then, we learn a feature transformation to eliminate the spurious features by aligning with this bias-invariant representation. Finally, we update the classifier by incorporating the learned feature transformation and obtain an unbiased model. By integrating the aforementioned identifying, neutralizing, eliminating and updating procedures, we build an effective pipeline for mitigating spurious correlation. Experiments on image and NLP debiasing benchmarks show an improvement in worst group accuracy of more than 20% compared to standard empirical risk minimization (ERM). Codes and checkpoints are available at https://github.com/davelee-uestc/nsf_debiasing .
