Views Can Be Deceiving: Improved SSL Through Feature Space Augmentation

Kimia Hamidieh, Haoran Zhang, Swami Sankaranarayanan, Marzyeh Ghassemi

Introduction: The Shortcut Problem in SSL

Machine learning models often take the path of least resistance by learning "spurious correlations"—shortcuts that rely on background cues rather than the actual objects of interest. For instance, a model trained to identify waterbirds might simply learn that "blue background = bird." While this issue is well-documented in supervised learning, it presents a unique challenge in Self-Supervised Learning (SSL).

SSL typically learns by comparing two different "views" (augmentations) of the same image to ensure their representations are similar. However, if standard augmentations like cropping or color jittering fail to break the link between an object and its background, the model develops spurious connectivity. In these cases, the network finds it easier to connect images based on shared shortcuts rather than core semantic features, baking these biases into the foundation of the model.

Methods: LATETVG and Feature Space Augmentation

To combat this, the authors introduce LATETVG (Late-layer Transformation-based View Generation). Instead of only augmenting the input image, LATETVG augments the model's internal feature space during the unlabeled pre-training phase.

LATETVG dual-encoder architecture with feature space transformation.

The method utilizes a dual-encoder setup where one view is processed by a standard encoder $f$, and the second view is processed by a transformed encoder $\tilde{f}$. This transformation involves magnitude pruning, where a percentage of weights in the network's later layers are set to zero.

The intuition is that high-level features—both core and spurious—reside in the final layers. By pruning these layers and forcing the model to maintain a consistent representation, the network is compelled to "forget" easy spurious shortcuts and rely on more robust, difficult-to-prune core features. This process requires no prior knowledge of the specific spurious groups in the dataset.

Experimental Setup and Datasets

The researchers evaluated LATETVG across five benchmarks specifically designed to test resilience to spurious correlations:

  • CelebA: Gender prediction where hair color acts as a spurious cue.
  • Waterbirds: Bird species classification vs. land/water backgrounds.
  • CMNIST (Colored MNIST): Digit recognition where color is a shortcut.
  • MetaShift: Cat vs. Dog classification where indoor/outdoor settings are spurious cues.
  • Hard ImageNet: A subset of ImageNet where models typically over-rely on background textures.

Key Results

LATETVG consistently outperformed standard SSL baselines, particularly in worst-group accuracy, which measures performance on the most challenging data subsets (e.g., a waterbird on land).

Comparison of worst-group accuracy between baseline SSL and LATETVG across varying minority group percentages.

Key highlights include:

  • MetaShift Gains: Standard SimSiam achieved a worst-group accuracy of 42.3%, while LATETVG boosted this to 79.6%.
  • Surpassing Supervised Learning: On CelebA, representations learned via LATETVG led to better downstream performance than standard supervised training (ERM).
  • Visual Validation: Grad-CAM visualizations confirmed that LATETVG models focus on core objects, whereas baseline models are frequently distracted by backgrounds.

Discussion and Future Work

While LATETVG shows significant promise in medium-sized benchmarks, several avenues for future research remain. These include scaling the method to massive "in-the-wild" datasets like LAION-5B, exploring its efficacy with Vision Transformer (ViT) architectures, and testing its compatibility with other SSL paradigms such as Masked Autoencoders (MAE). Nevertheless, the success of late-layer pruning suggests that feature space augmentation is a powerful tool for building more robust and fair machine learning models.

Summary updated

BibTeX
@inproceedings{hamidieh2024views,
  author = {Kimia Hamidieh and Haoran Zhang and Swami Sankaranarayanan and Marzyeh Ghassemi},
  title = {{Views Can Be Deceiving: Improved SSL Through Feature Space Augmentation}},
  booktitle = {International Conference on Learning Representations},
  year = {2024},
  url = {https://openreview.net/forum?id=mutJBk3ILg},
}
Figure