Breaking Spurious Correlations via Generative Randomization and Cross-Variant Self-Supervised Learning

Suraj Yadav, Anjaneya Sharma, Siddharth Yadav
7/7/2026
cs.CV
contrastive-ssl

Official code: surajyadav-research/GRSSL (0 stars, Python, last commit 2026-07-06).

Abstract

Deep neural networks trained with Empirical Risk Minimization (ERM) often fail under distribution shifts because they exploit spurious correlations between object labels and background context. Recent generative approaches address this issue by creating counterfactual images with altered contexts, but typically use these samples as standard data augmentation, leaving the model free to retain background-sensitive representations.

Show full abstract

We propose a two-stage framework that uses generative intervention to explicitly learn background-invariant visual representations. First, we isolate the foreground object using zero-shot segmentation and generate context-shifted variants with a structure-preserving diffusion model, preserving object identity while varying the surrounding environment. We then introduce Cross-Variant Self-Supervised Learning, where variants of the same object under different backgrounds form positive pairs in a contrastive objective. This encourages the encoder to align object-centric representations while suppressing background-specific cues. Then, we fine-tune the pretrained encoder using an ERM warm-up followed by GroupDRO with layer-wise learning rates. Experiments on distribution-shift benchmarks demonstrate best worst-group performance, achieving 92.5% on Waterbirds, 81.7% on MetaShift, and 87.4% on NICO++. Code: https://github.com/surajyadav-research/GRSSL

View on arXivView PDF

Code Implementations(1)

01PythonJul 6, 20264 months ago

Similar Papers

Cite this paper

@article{yadav2026breaking,
  title  = {Breaking Spurious Correlations via Generative Randomization and Cross-Variant Self-Supervised Learning},
  author = {Suraj Yadav and Anjaneya Sharma and Siddharth Yadav},
  year   = {2026},
  eprint = {2607.05850},
  archivePrefix = {arXiv},
  url    = {http://arxiv.org/abs/2607.05850v1}
}

Add a badge to your README

Shows whether official code is linked for this paper.

Code of Paper badge
[![Code of Paper](https://codeofpaper.com/badge/2607.05850.svg)](https://codeofpaper.com/paper/2607.05850)

Discussion