The Group Robustness is in the Details: Revisiting Finetuning under Spurious Correlations

Tyler LaBonte, John C. Hill, Xinchen Zhang, Vidya Muthukumar, Abhishek Kumar

TL;DR

Common class-balancing techniques like upsampling and loss upweighting suffer from a "catastrophic collapse" in worst-group accuracy (WGA) during extended finetuning. To fix this, the authors introduce mixture balancing—a technique that outperforms traditional methods—and demonstrate that scaling up pretrained models only improves group robustness when paired with the right class-balancing strategy.

What Problem Does This Paper Address?

Machine learning models trained with Empirical Risk Minimization (ERM) routinely take shortcuts by relying on spurious correlations—features that happen to predict the label in the training set but fail at test time (e.g., associating a bird's species with its background). This over-reliance disproportionately harms performance on under-represented "minority groups" within the dataset.

To protect these minority groups, practitioners often use class-balancing techniques during finetuning. However, the long-term training dynamics of these techniques and how they interact with modern, large-scale pretrained models have remained poorly understood. This paper investigates these nuances to understand what truly drives worst-group accuracy (WGA).

Methods

The authors systematically evaluate three standard class-balancing approaches alongside a novel alternative:

  1. Subsetting: Reducing the size of larger classes by randomly removing data until all classes match the size of the smallest one.
  2. Upsampling: Adjusting mini-batch sampling probabilities so each class is equally represented in expectation.
  3. Upweighting: Multiplying the loss of minority class samples by a class-imbalance ratio.
  4. Mixture Balancing (Proposed): A hybrid approach designed to mitigate the downsides of the others. It first creates a moderately imbalanced subset by randomly removing some majority class data, and then applies upsampling on that subset to achieve perfect class balance. This increases exposure to majority data without excessively repeating minority samples.

Additionally, the authors perform a spectral analysis on the feature representations (the penultimate layer outputs) by computing the empirical covariance matrices for each group to study feature-level disparities.

Datasets

The paper evaluates models on four well-established group robustness benchmarks:

  • Waterbirds (Vision): Classifying landbirds vs. waterbirds where the background (land vs. water) acts as a spurious cue.
  • CelebA (Vision): Classifying celebrities as blond vs. non-blond, where gender acts as the spurious feature.
  • CivilComments (Language): Classifying online comments as toxic vs. non-toxic, where mentions of specific demographic identities act as spurious features.
  • MultiNLI (Language): Classifying sentence pairs by logical relationship, where the presence of negation words is a spurious cue.

Key Insights and Ideas

  • Catastrophic Collapse of Upsampling/Upweighting: When models are trained to completion (rather than early-stopped), upsampling and upweighting cause WGA to degrade drastically over time, eventually performing no better than standard imbalanced training. This happens because the model severely overfits to the heavily repeated minority group data.
WGA dynamics showing catastrophic collapse over training epochs
  • The Subsetting Trap: While subsetting avoids this collapse, it introduces a different flaw: if a small minority group exists within a majority class (like landbirds on water backgrounds), subsetting shrinks that class and decimates the already-scarce minority group data, tanking WGA.
  • Scaling is a Double-Edged Sword: Bigger models generally possess the capacity for better WGA, but only if trained with proper class balancing. Scaling a model on an imbalanced dataset or using an unstable balancing method can actually stagnate or decrease robustness.
  • Spectral Imbalance: By looking at the eigenspectrum of the group covariance matrices, the authors discovered that minority groups consistently exhibit a larger spectral norm (top eigenvalue) than majority groups within the same class. This inherent spectral imbalance explains why minority groups are so highly susceptible to overfitting.

Key Results

  • Mixture Balancing Superiority: The proposed mixture method successfully prevents catastrophic WGA collapse. It outperforms all three traditional class-balancing baselines on Waterbirds and CivilComments, and matches the top-performing subsetting method on CelebA.
Performance of Mixture Balancing compared to standard techniques
  • Quantifiable Scaling Gains: When paired with appropriate class balancing, scaling up pretrained models (e.g., ConvNeXt-V2 and BERT variants) yielded WGA improvements of up to 12% for models that interpolate the training data, and up to 40% for non-interpolating language models.
  • Unsupervised Validation Success: The authors demonstrated that mixture balancing can be reliably tuned using unsupervised validation metrics (like worst-class accuracy), removing the unrealistic requirement of having group annotations on a validation set.

Limitations and Future Work

A key limitation of mixture balancing is that it still requires tuning the optimal class-imbalance ratio on a validation set to achieve peak performance. Furthermore, the insights from this paper rely on the presence of at least some minority group data; the authors note that these findings likely would not transfer to settings with complete correlation (where minority group counts are exactly zero).

Future work includes theoretically investigating the optimization discrepancy between subsetting and upsampling in overparameterized regimes, as well as exploring global properties of the feature eigenspectrum like power-law decay.

Summary updated

BibTeX
@inproceedings{labonte2024group,
  author = {Tyler LaBonte and John C. Hill and Xinchen Zhang and Vidya Muthukumar and Abhishek Kumar},
  title = {{The Group Robustness is in the Details: Revisiting Finetuning under Spurious Correlations}},
  booktitle = {Advances in Neural Information Processing Systems},
  year = {2024},
  url = {https://openreview.net/forum?id=eHzIwAhj06},
}
Figure