Abstract
The problem of spurious correlations (SCs) arises when a classifier relies on non-predictive features that happen to be correlated with the labels in the training data. For example, a classifier may misclassify dog breeds based on the background of dog images. This happens when the backgrounds are correlated with other breeds in the training data, leading to misclassifications during test time. Previous SC benchmark datasets suffer from varying issues, e.g., over-saturation or only containing one-to-one (O2O) SCs, but no many-to-many (M2M) SCs arising between groups of spurious attributes and classes. In this paper, we present Spawrious-{O2O, M2M}-{Easy, Medium, Hard}, an image classification benchmark suite containing spurious correlations between classes and backgrounds. To create this dataset, we employ a text-to-image model to generate photo-realistic images and an image captioning model to filter out unsuitable ones. The resulting dataset is of high quality and contains approximately 152k images. Our experimental results demonstrate that state-of-the-art group robustness methods struggle with Spawrious, most notably on the Hard-splits with none of them getting over 70% accuracy on the hardest split using a ResNet50 pretrained on ImageNet. By examining model misclassifications, we detect reliances on spurious backgrounds, demonstrating that our dataset provides a significant challenge.
What Problem Does This Paper Address?
Machine learning models are notorious for taking "shortcuts." If most training images of Bulldogs are taken in the jungle, a classifier might learn to associate "green foliage" with "Bulldog" rather than learning the actual features of the dog. This is a spurious correlation (SC). When the model encounters a Bulldog on a beach at test time, it fails.
While researchers have developed many methods to mitigate this, existing benchmarks (like Waterbirds or CelebA) have become "saturated"—meaning modern models already perform very well on them. Furthermore, as shown in the comparison below, most existing datasets lack the complexity of Many-to-Many (M2M) correlations, where a group of related classes might all be found in a group of similar environments.
Methods
The authors developed the Spawrious Pipeline to create a high-quality, photo-realistic dataset from scratch:
- Generation: They used Stable Diffusion v1.4 to generate images based on specific prompt templates. These templates controlled for factors like dog breed (class), fur color, pose, location (spurious attribute), and time of day.
- Cleaning: To ensure quality, they used an image-to-text model (ViT-GPT2) to caption the generated images. If the caption didn't contain the keyword (e.g., "dog"), the image was discarded.
- Experimental Framework: They tested six popular robustness algorithms—including ERM (standard training), GroupDRO, IRM, and CORAL—across different model architectures (ResNet18, ResNet50, and Vision Transformers).
Datasets
The primary contribution is the Spawrious dataset, which contains 152,064 images of four dog breeds (Bulldog, Dachshund, Corgi, Labrador) across six background locations (Beach, Desert, Dirt, Jungle, Mountain, Snow).
The benchmark is divided into two main challenges, each with three difficulty levels (Easy, Medium, Hard):
- O2O (One-To-One): Each dog breed is predominantly paired with one specific background during training, but that correlation is flipped or randomized during testing.
- M2M (Many-To-Many): Disjoint groups of breeds are paired with disjoint groups of backgrounds. For example, Bulldogs and Dachshunds might only appear in Deserts or Jungles during training, while the test set puts them in Mountains or Snow.
Key Insights and Results
- M2M is a unique challenge: The authors argue that M2M correlations cannot be simplified into a collection of O2O correlations. They represent a higher-level structural bias that models find much harder to overcome.
- Class balancing isn't a silver bullet: Unlike some older benchmarks where simply balancing the number of examples per class fixes the bias, Spawrious is class-balanced by design. Models still fail because they rely on the background feature itself.
- Architecture doesn't guarantee robustness: Interestingly, larger models or different architectures (like Vision Transformers) didn't consistently solve the problem. In some cases, ViTs performed worse than ResNets.
- The "Hard" splits are truly hard: Standard Empirical Risk Minimization (ERM) performed the worst, dropping as low as 47.02% accuracy on the ResNet18 M2M-Hard split. Even advanced methods like CORAL and CausIRL struggled significantly on the M2M-Hard splits, hovering around 67-68% accuracy with a ResNet50.
Conclusion
The primary takeaway is that current "robust" algorithms are insufficient for complex, real-world-style spurious correlations. Spawrious highlights a massive gap for future researchers to fill, particularly in addressing Many-to-Many structural biases that persist even in high-quality, photo-realistic data.
Summary updated