Leveraging background augmentations to encourage semantic focus in self-supervised contrastive learning

Chaitanya K. Ryali, David J. Schwab, Ari S. MorcosarXiv 2021

Introduction

Self-supervised learning (SSL) has emerged as a powerful paradigm for training deep neural networks without human-annotated labels. By learning to recognize different views of the same image, models like MoCo, BYOL, and SwAV develop rich feature representations. However, a significant challenge remains: these models often rely on spurious background correlations—such as a blue sky indicating a bird—rather than focusing on the semantic foreground object. This research introduces "background augmentations" to mitigate this "lazy" learning behavior and improve model robustness.

The Problem: Spurious Background Correlations

Example of a typical ImageNet-style input image where the foreground object (airplane) is distinct from the background (desert). Leveraging background augmentations to encourage semantic focus in self-supervised contrastive learning, page 6

Example of a typical ImageNet-style input image where the foreground object (airplane) is distinct from the background (desert).

Modern SSL frameworks reward models for identifying that two different crops (views) belong to the same image. While effective, this approach treats the entire image as a holistic block of pixels. If a specific object consistently appears against a particular background, the model may learn to associate the background features with the object's identity. This reliance on environmental context makes models brittle when faced with distribution shifts, such as seeing a familiar object in an unfamiliar setting.

Methodology: Background Augmentations

To force models to prioritize foreground features, the authors propose three levels of background-specific augmentations:

  1. BG_RM (Background Removal): Replaces the background with a neutral grayscale value, eliminating background signals entirely.
  2. BG_Random: Replaces the original background with a random scene from another image in the training batch, breaking the consistent correlation between subject and environment.
  3. BG_Swaps: A novel contribution specifically for contrastive learning. In this method, a "negative" image (representing a different object) is given the same background as the "query" image. To distinguish the two, the model must ignore the shared background and focus exclusively on the unique foreground objects.
Architectural overviews of MoCo-v2, BYOL, and SwAV, showing the student-teacher dynamics where background augmentations are integrated.

A key technical hurdle in applying these augmentations is identifying the foreground without human-provided segmentation masks. The authors developed DeepUSPS², a completely unsupervised saliency detection method. DeepUSPS² automatically generates masks to separate subjects from backgrounds, ensuring the pipeline remains entirely self-supervised.

Experimental Results and Robustness

The proposed augmentations were evaluated across standard benchmarks and specialized robustness tests, yielding several key insights:

  • Accuracy Gains: The methods provided a 1–2% boost on standard ImageNet linear evaluation. In low-label settings (where only 1% of ImageNet labels were available), the BG_Swaps method improved MoCo-v2 accuracy by a substantial 4.0%.
  • State-of-the-Art Robustness: On the Mixed-Next test, which involves pasting foregrounds onto misleading backgrounds, MoCo-v2 with background augmentations improved from 67% to 82.2% accuracy, outperforming even supervised baselines.
  • Training Efficiency: Models trained with these augmentations achieved performance parity with standard models in significantly fewer epochs (e.g., matching 800-epoch performance in only 100 epochs).

Discussion and Limitations

The research highlights that background augmentations encourage a "shape bias" similar to human perception, where objects are identified by form rather than texture or color. However, the authors note that these techniques are less effective for scene recognition tasks (like Places-205), where the background itself is the primary semantic signal. Future work includes exploring these augmentations within Vision Transformer (ViT) architectures and improving saliency detection in highly cluttered, multi-object scenes.

Summary updated

BibTeX
@misc{ryali2021leveraging,
  author = {Chaitanya K. Ryali and David J. Schwab and Ari S. Morcos},
  title = {{Leveraging background augmentations to encourage semantic focus in self-supervised contrastive learning}},
  year = {2021},
  eprint = {2103.12719},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2103.12719},
}
Figure