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

Automatic Shortcut Removal for Self-Supervised Representation Learning

Matthias Minderer, Olivier Bachem, Neil Houlsby, Michael Tschannen

Abstract

Self-supervised representation learning (SSL) often suffers from models exploiting low-level "shortcuts"—such as chromatic aberration or watermarks—to solve pretext tasks without learning semantic features. We propose an adversarial framework that automatically identifies and removes these shortcuts. By placing a lightweight "lens" network before the feature extractor, we force the model to ignore easy-to-exploit patterns and focus on high-level concepts. Our approach demonstrates consistent improvements in downstream task accuracy and transferability across multiple datasets, including ImageNet and YouTube-8M.

Introduction

In self-supervised learning, networks are trained on pretext tasks where labels are derived from the data itself (e.g., predicting image rotation). The goal is to learn robust features useful for downstream applications. However, neural networks are prone to "shortcut learning," where they exploit trivial low-level patterns to solve the task. For instance, a model might predict rotation by looking at the color fringes caused by a camera lens rather than understanding the object's orientation. Traditionally, researchers have relied on hand-crafted data augmentations to mitigate these issues. This work introduces an automated method to discover and neutralize such shortcuts.

The Shortcut Removal Framework

The proposed method introduces a lightweight image-to-image translation network, termed the lens ($L$), which precedes the main feature extractor ($F$).

The Automatic Shortcut Removal framework: an adversarial lens $L$ perturbs input $x_i$ to challenge the feature extractor $F$ while maintaining a reconstruction loss.

The system is trained using an adversarial objective:

  1. Adversarial Perturbation: The lens $L$ modifies the input image $x_i$ just enough to maximize the loss of the pretext task $\mathcal{L}(y_i, F(L(x_i)))$. This forces the lens to "hide" the easiest features the extractor uses to solve the task.
  2. Reconstruction Constraint: To ensure the lens does not simply destroy the image or turn it into noise, a reconstruction loss ($\ell_2$) is applied between the original and lensed images. This forces the lens to retain as much semantic information as possible while removing shortcuts.
  3. Architecture: A U-Net-style architecture is used for the lens. Its limited receptive field ensures it focuses on local, low-level features rather than global semantic restructuring.

Experimental Evaluation

The framework was tested on several benchmarks to ensure broad applicability:

  • CIFAR-10: Used for initial proof-of-concept with synthetic shortcuts.
  • ImageNet: The standard benchmark for large-scale visual representation learning.
  • YouTube-8M: A "noisy" dataset containing real-world shortcuts like logos and aspect-ratio bars.
  • Places205: Used to evaluate the transferability of learned features to scene recognition tasks.

Visualizing Shortcut Discovery

A key advantage of this method is its ability to visualize what the model considers a "shortcut." By examining the difference between the input and the lens output, researchers can see exactly which features were suppressed.

Visual examples of the lens removing synthetic arrow shortcuts and natural chromatic aberration shortcuts.

As shown in the figure above, the lens successfully identifies and suppresses synthetic arrows added to images. More importantly, it automatically discovers natural shortcuts like chromatic aberration, often by desaturating specific color channels—an augmentation that was previously manually engineered by researchers over years of trial and error.

Key Results and Discussion

  • Performance Gains: The inclusion of the lens improved downstream accuracy across all tested pretext tasks (Rotation, Jigsaw, Exemplar, and Relative Patch Location). On ImageNet Jigsaw tasks, the lens provided a 3.69% accuracy boost, significantly outperforming standard adversarial attacks like FGSM.
  • Shape Bias: Shortcut removal shifts the network's focus from local textures to global shapes. This shift is significant as shape-based understanding is generally considered more human-like and semantic than texture-based understanding.
  • Robustness to Noise: On the YouTube-8M dataset, the lens effectively removed overlaid text and black bars, closing the performance gap between models trained on "clean" versus "messy" data.

Conclusion

Automatic Shortcut Removal provides a scalable, data-driven alternative to manual augmentation design. By using an adversarial lens to "blind" the model to trivial patterns, we force the learning of deeper, more transferable semantic representations. Future work will explore applying this framework to other modalities, such as audio and natural language processing, where shortcut learning remains a significant challenge.

Summary updated

BibTeX
@inproceedings{minderer2020automatic,
  author = {Matthias Minderer and Olivier Bachem and Neil Houlsby and Michael Tschannen},
  title = {{Automatic Shortcut Removal for Self-Supervised Representation Learning}},
  booktitle = {International Conference on Machine Learning},
  year = {2020},
  url = {https://openreview.net/forum?id=YXZM_JTdDbv},
}
Figure