NeurIPS 2026Coming to NeurIPS?Explore papers, orals & directions

Nuisances via Negativa: Adjusting for Spurious Correlations via Data Augmentation

Aahlad Manas Puli, Nitish Joshi, He He, Rajesh Ranganath · OpenReview

TL;DR

This paper introduces "semantic corruptions," a novel data augmentation technique that intentionally degrades semantic features in data. By doing so, it forces models to rely on spurious correlations (nuisances) to make predictions, allowing researchers to identify and then mitigate these unwanted dependencies. This approach enables more robust out-of-distribution generalization without requiring explicit nuisance annotations.

What Problem Does This Paper Address?

In machine learning, models often learn spurious correlations between features and labels that hold true in the training data but fail in new, unseen environments. These spurious correlations, termed "nuisances," can arise from factors like background context in images or common phrasing in text. For instance, a model trained to identify cows might learn to associate them with grassy backgrounds, a nuisance that breaks down when cows are shown in different settings. Traditional methods to combat this require explicit knowledge of these nuisances, often through costly annotations. This paper addresses the challenge of building models that generalize well to out-of-distribution data by providing a principled way to identify and correct for these spurious correlations without needing prior knowledge of the nuisances themselves.

Methods

The core contribution is the concept of semantic corruptions. This involves creating augmented data where the semantic (truly predictive) features are intentionally degraded or removed, while the nuisance features are preserved. The intuition is that a model trained on this corrupted data will be forced to rely on the nuisances to make predictions. By analyzing the predictions of such a "biased model," researchers can understand how nuisances are being exploited.

The paper proposes several types of semantic corruptions:

  • Patch Randomization (PATCH-RND): Randomly permuting patches in images to disrupt global semantic structures.
  • N-gram Randomization (NGRAM-RND): Randomizing the order of n-grams in text to break semantic meaning.
  • Masking (ROI-MASK, PREM-MASK): Removing specific regions in images (ROI-MASK) or parts of text (PREM-MASK) that contain semantic information.
  • Frequency and Intensity Filters (FREQ-FILT, INT-FILT): Applying filters to images to alter frequency or intensity characteristics, thereby corrupting semantic signals.

These semantic corruptions are then used to power existing Biased-Model-Based Spurious-Correlation Avoiding Methods (B-SCAMS), such as NURD, JTT, POE, and DFL. The corrupted data is used to train a biased model, which in turn guides the main model to learn without relying on the identified nuisances.

Datasets

The paper evaluates its methods on several standard out-of-distribution (OOD) benchmarks:

  • Waterbirds: A dataset for bird classification where background (water/snow) is a nuisance correlated with bird type.
  • Chest X-rays (Cardiomegaly Detection): Used to detect cardiomegaly, where hospital scanner variations can act as a nuisance.
  • Natural Language Inference (NLI): Datasets like HANS and ANLI are used, where spurious correlations related to lexical overlap or negation words can mislead models.

The paper also mentions using modified versions of these datasets to study scenarios with weaker spurious correlations or multiple spurious features.

Key Insights and Ideas

  • Semantic Corruptions as a Proxy for Nuisance Knowledge: The paper demonstrates that by corrupting semantics, one can effectively create a scenario where a model must rely on nuisances. This provides a principled way to obtain the "biased model" needed for B-SCAMS without explicit nuisance annotations.
  • Universality of Semantic Corruptions: The proposed semantic corruptions can be applied to various B-SCAMs, enhancing their robustness across different tasks and model architectures.
  • Breaking the Semantic-Nuisance Link: The core idea is that by destroying semantic information, the model is forced to learn from the remaining nuisance information. This learned nuisance-dependent model can then be used to guide a more robust predictor.
  • The Necessity of Additional Knowledge: Theorem 1 highlights that even within a nuisance-varying family, additional knowledge beyond the training data (features and labels) is essential for achieving robust generalization. Semantic corruptions provide this new form of knowledge.

Key Results

  • Improved OOD Performance: Semantic corruption-powered B-SCAMs consistently outperform standard ERM (Empirical Risk Minimization) on OOD tasks like Waterbirds, cardiomegaly detection, and NLI.
  • Closing the Gap: On the Waterbirds dataset, semantic corruptions helped NURD close 99% of the performance gap between ERM and a known-nuisance version of NURD.
  • Outperforming Baselines: Corruption-powered JTT outperformed vanilla JTT on waterbirds and NLI tasks. Similarly, corruption-powered NURD and DFL achieved performance comparable to their known-nuisance counterparts.
  • Robustness to Hyperparameters: For many semantic corruptions (e.g., PATCH-RND, NGRAM-RND), the performance was relatively insensitive to the choice of corruption parameters, making them easier to use in practice.

Limitations and Future Work

  • Quality of Corruption: The effectiveness of semantic corruptions depends on their ability to destroy semantics while preserving nuisances. The paper acknowledges that blindly applying these corruptions might sometimes corrupt nuisances or fail to fully destroy semantics, potentially leading to degraded performance.
  • Choosing the Right Corruption: The paper suggests that knowledge of the dataset's nuisance characteristics can guide the choice of semantic corruption. For example, PATCH-RND is better for corrupting global semantics when nuisances are local.
  • Hybrid Corruptions: The authors suggest that future work could explore combining different semantic corruptions to achieve better nuisance retention and semantic destruction.
  • Validation Schemes: The paper notes that using standard validation schemes to select corruption parameters can help mitigate performance degradation from blind usage.

Summary updated

BibTeX
@article{puli2024nuisances,
  author = {Aahlad Manas Puli and Nitish Joshi and He He and Rajesh Ranganath},
  title = {{Nuisances via Negativa: Adjusting for Spurious Correlations via Data Augmentation}},
  journal = {Trans. Mach. Learn. Res.},
  year = {2024},
  url = {https://openreview.net/forum?id=Y8UIbPusI5},
}
Figure