Examining and Combating Spurious Features under Distribution Shift

Chunting Zhou, Xuezhe Ma, Paul Michel, Graham Neubig

Overview

This paper formalizes why machine learning models latch onto "spurious correlations"—such as associating a green grass background with the label "cow"—and introduces a novel solution: Group-Conditional DRO (GC-DRO). Unlike previous methods that require perfect knowledge of which data points contain biased features, GC-DRO remains robust even when data partitions are "imperfect" or messy, significantly improving performance on shifted test sets.

The Problem: The Trap of "Imperfect" Groups

Standard machine learning models are inherently "lazy." They minimize average training loss via Empirical Risk Minimization (ERM) by finding the easiest path to a correct prediction. Often, that path involves spurious features—attributes that correlate with the label in the training set but aren't actually related to the core task. For example, a model identifying "water" as a feature for "boat" will fail when it encounters an image of a boat parked on a trailer.

To combat this, researchers frequently use Group Distributionally Robust Optimization (Group DRO). This technique ensures the model performs well across all predefined "groups" (e.g., different demographics or backgrounds). However, Group DRO has a major Achilles' heel: it requires "clean partitions." You must know exactly which samples contain the spurious features.

In the real world, we rarely have these perfect labels. If the groups are "imperfect"—containing a mix of biased and unbiased samples—standard Group DRO can actually fail, sometimes performing even worse than simple ERM.

Methods: A Two-Pronged Approach

The authors tackle this issue through two primary contributions:

1. Information-Theoretic Framework

Using the concept of Minimal Sufficient Statistics (MSS), the authors mathematically define robust versus spurious features. They prove that even if the relationship between features and labels stays the same (covariate shift), a model can still learn spurious features simply because the training data doesn't cover the full "support" of the ideal, real-world distribution.

2. Group-Conditional DRO (GC-DRO)

This is the core algorithmic contribution. While standard Group DRO assigns a single weight to an entire group, GC-DRO introduces a more flexible "uncertainty set." It applies reweighting at two distinct levels:

  • Group-level: How much should the model prioritize this broad category?
  • Instance-level: Within this group, which specific examples is the model failing on?
The GC-DRO algorithm utilizing online greedy updates for instance-level reweighting.

By allowing fine-grained, instance-level weights conditioned on the group, the model can "hunt" for minority subgroups that are being ignored, even if those subgroups aren't explicitly labeled in the dataset.

Key Insights

  • Covariate Shift is Enough: A common misconception is that spurious features only appear when the underlying "rules" change between training and testing. This paper proves that simply having a biased sample of the world is enough to lead a model to learn non-causal features.
  • The "Imperfect" Trap: If you try to use Group DRO on messy groups, the algorithm treats the group as a monolith. If a group contains both "easy" spurious samples and "hard" robust samples, the model might just get even better at the spurious ones to lower the group's average loss, completely missing the point of robustness.
  • Agnostic to Partitions: GC-DRO is much more "partition-agnostic." Because it can reweight individual instances, it can find the "right" samples to focus on even if the human-provided group labels are rough or generated by unsupervised clustering (like K-means).

Key Results

The authors evaluated their method on three distinct tasks: CelebA (image classification with gender bias), MultiNLI (language inference with negation bias), and FDCL18 (toxicity detection with dialect bias).

The results demonstrate that GC-DRO is a "best of both worlds" solution:

  • On Clean Partitions: It performs as well as, or slightly better than, standard Group DRO.
  • On Imperfect Partitions: This is where GC-DRO truly shines. On the CelebA dataset with imperfect groups, GC-DRO achieved 82.8% robust accuracy, while standard Group DRO plummeted to ~46% (barely better than ERM's 40%).
  • Toxicity Detection: On the FDCL18 dataset, GC-DRO improved robust accuracy by over 12 percentage points (48.4% vs 36.2%) compared to the best Group DRO baseline.
  • Unsupervised Success: The authors showed that even with zero group labels—relying entirely on K-means to cluster the data—GC-DRO still significantly outperforms other methods.
Comparison of decision boundaries for ERM, Group DRO, and GC-DRO under clean and imperfect partitions.

Limitations and Future Work

While powerful, GC-DRO introduces two main hyperparameters ($\alpha$ and $\beta$) that control the "size" of the uncertainty set. The model is somewhat sensitive to these, and finding the optimal values requires a validation set with some group information. Additionally, the algorithm requires sorting instance losses to determine weights, adding computational overhead compared to standard ERM.

Ultimately, while GC-DRO handles imperfect groups exceptionally well, it still benefits from some initial partitioning. Future work could explore how to move toward completely group-free robust optimization, further reducing the reliance on human-annotated bias labels.

Summary updated

BibTeX
@inproceedings{zhou2021examining,
  author = {Chunting Zhou and Xuezhe Ma and Paul Michel and Graham Neubig},
  title = {{Examining and Combating Spurious Features under Distribution Shift}},
  booktitle = {International Conference on Machine Learning},
  year = {2021},
  url = {https://openreview.net/forum?id=VEf0KAgBzKj},
}
Figure