Elastic Representation: Mitigating Spurious Correlations for Group Robustness

Tao Wen, Zihan Wang, Quan Zhang, Qi Lei · DOI

Abstract

Deep learning models frequently rely on "shortcuts" or spurious correlations—non-predictive features that happen to correlate with labels in the training set—leading to poor generalization on minority groups. While existing group robustness methods often require expensive group annotations or suffer from over-regularization, we present Elastic Representation (ElRep). ElRep is a group-blind, plug-and-play regularizer that applies a combination of Nuclear- and Frobenius-norm penalties to a model's internal representations. This approach encourages the model to prioritize diverse, invariant features while pruning redundant shortcuts. Our experiments across benchmarks like Waterbirds, CelebA, and CivilComments demonstrate that ElRep significantly improves worst-group accuracy without requiring group labels during training.

1. Introduction

The tendency of neural networks to exploit spurious correlations is a well-documented hurdle in machine learning. For instance, a model trained to identify waterbirds might rely on the presence of a water background rather than the bird's physical characteristics. While this strategy yields high average accuracy on datasets where the majority of waterbirds appear in aquatic settings, it fails on minority groups, such as a waterbird on land.

Achieving "group robustness"—consistent performance across all subgroups—typically requires explicit group annotations during training. However, such labels are often unavailable or costly to obtain. Furthermore, existing "group-blind" methods that attempt to learn invariant features often over-regularize, discarding subtle but useful features alongside spurious ones. To address these challenges, we introduce Elastic Representation (ElRep), a regularization technique inspired by the Elastic Net that balances feature selection with representation stability.

2. The Elastic Representation (ElRep) Method

ElRep operates on the principle that the internal representations ($\Phi$) of a neural network should be both informative and robust. Instead of penalizing model weights, ElRep applies a dual-penalty structure to the representation matrix at the penultimate layer.

2.1 Dual Penalty Structure

The ElRep objective function incorporates two primary components:

  1. Nuclear-norm Penalty ($\|\cdot\|_*$): This term encourages the representation matrix to be low-rank. By promoting sparsity in the singular values of the representation, the model is forced to prune redundant or spurious features that do not consistently contribute to the underlying task.
  2. Frobenius-norm Penalty ($\|\cdot\|_F$): To counteract the aggressive pruning of the nuclear norm, the Frobenius norm ensures that the model retains a diverse set of features. This prevents the "Lasso problem," where the model might discard one of two highly correlated but useful invariant features.

This "elastic" combination allows the model to perform effective feature selection while maintaining a stable and diverse feature space. As a simple addition to the loss function, ElRep is a plug-and-play solution compatible with standard Empirical Risk Minimization (ERM) and more complex frameworks like GroupDRO.

3. Theoretical and Conceptual Insights

A key insight of this work is that standard ERM models often do learn invariant features; however, the final classifier layer tends to overweight easier-to-find spurious features. ElRep addresses this by cleaning the representation before it reaches the classifier.

Furthermore, the authors provide theoretical grounding for ElRep's efficiency. Theorem 5.1 in the study demonstrates that ElRep has a "minimum negative impact" on in-distribution performance. This addresses a common trade-off in robustness research where improving worst-group accuracy (WGA) typically results in a significant drop in overall average accuracy.

4. Experimental Evaluation

We evaluated ElRep across a variety of synthetic and real-world benchmarks designed to test robustness against spurious correlations.

4.1 Performance Gains

ElRep consistently improved WGA across all tested datasets:

  • Waterbirds: Adding ElRep to standard ERM increased WGA from 70.0% to 79.8%.
  • CelebA: In facial recognition tasks where gender acts as a spurious correlation for hair color, ElRep combined with Progressive Data Expansion (PDE) achieved a state-of-the-art WGA of 91.4%.
  • CivilComments-WILDS: On this large-scale toxicity detection dataset, ElRep helped achieve a WGA of 71.7%, demonstrating its efficacy in natural language processing tasks.

4.2 Group-Blind Robustness

Crucially, ElRep achieves these gains without requiring group labels during the training phase. This makes the method highly viable for real-world applications where minority groups may not be pre-defined or labeled.

5. Discussion and Limitations

While ElRep provides a robust and flexible framework, it is not without limitations. The method introduces two hyperparameters ($\lambda_1$ and $\lambda_2$) that require careful tuning via cross-validation. Additionally, while empirical results on deep networks are strong, the current theoretical proofs primarily address linear and multi-task settings. Future work will focus on extending these theoretical guarantees to non-linear architectures and exploring ElRep's performance under extreme out-of-distribution (OOD) shifts where invariant features themselves may change.

6. Conclusion

Elastic Representation offers a simple yet effective mechanism for mitigating the influence of spurious correlations. By leveraging the strengths of both Nuclear- and Frobenius-norm penalties, ElRep enables models to learn robust, diverse representations that generalize better to minority groups without the need for expensive group annotations.

Summary updated

BibTeX
@inproceedings{wen2025elastic,
  author = {Tao Wen and Zihan Wang and Quan Zhang and Qi Lei},
  title = {{Elastic Representation: Mitigating Spurious Correlations for Group Robustness}},
  booktitle = {International Conference on Artificial Intelligence and Statistics},
  year = {2025},
  url = {https://openreview.net/forum?id=xmllRK5QWi},
}
Figure