Exploring self-supervised learning biases for microscopy image representation

Ihab Bendidi, Adrien Bardes, Ethan D. Cohen, Alexis Lamiable, Guillaume Bollot, Auguste Genovesio

Abstract

Self-supervised representation learning (SSRL) in computer vision relies heavily on simple image transformations such as random rotation, crops, or illumination to learn meaningful and invariant features. Despite acknowledged importance, there is a lack of comprehensive exploration of the impact of transformation choice in the literature. Our study delves into this relationship, specifically focusing on microscopy imaging with subtle cell phenotype differences. We reveal that transformation design acts as a form of either unwanted or beneficial supervision, impacting feature clustering and representation relevance. Importantly, these effects vary based on class labels in a supervised dataset. In microscopy images, transformation design significantly influences the representation, introducing imperceptible yet strong biases. We demonstrate that strategic transformation selection, based on desired feature invariance, drastically improves classification performance and representation quality, even with limited training samples.

Introduction

In Self-Supervised Representation Learning (SSRL), models learn by identifying that different "views" or transformations of the same image represent the same underlying concept. Standard augmentation recipes—including random cropping, color jittering, and flipping—were largely optimized for natural image datasets like ImageNet. However, a critical gap exists in understanding how these choices impact different classes within a dataset or translate to specialized domains like microscopy. In biological imaging, differences between phenotypes (e.g., healthy vs. drug-treated cells) are often subtle. A transformation optimized for identifying a "cat" might inadvertently destroy diagnostic features of a "cell." This paper investigates how these transformations act as a form of weak supervision and how they can be engineered for specific scientific tasks.

Methodology

The researchers conducted a systematic exploration using several state-of-the-art SSRL frameworks, including SimCLR, MoCo v2, BYOL, VICReg, and Barlow Twins, across architectures such as ResNet, ConvNeXt, and VGG. The core methodology involved a sensitivity analysis, varying the intensity and probability of transformations like hue, crop size, and rotation to observe their effects on individual class accuracies.

Sensitivity analysis of various SSRL frameworks across different image transformations and datasets.

The study also utilized MNIST as a controlled environment to demonstrate how different transformation sets force models to focus on distinct features, such as "digit identity" versus "handwriting style." Finally, the team tested "standard" versus "tailored" transformation sets on microscopy data (BBBC021v1) to identify which invariances, such as rotation, are most beneficial for biological discovery.

Key Insights: Transformations as Weak Supervision

A central finding is that the choice of invariance is effectively a set of instructions. By telling a model to ignore color via jittering, the researcher is supervising it to focus on shape. This "one-size-fits-all" approach often introduces significant inter-class bias.

Differential impact of random crop size on Caterpillar and Crocodile classes in CIFAR-100.

As shown in the analysis of CIFAR-100, smaller crop sizes can improve accuracy for classes with repetitive patterns, like "Caterpillars," while simultaneously degrading performance for classes like "Crocodiles," where a small crop might resemble a generic snake. This demonstrates that augmentations are not neutral; they favor certain features over others depending on the class.

Domain-Specific Optimization for Microscopy

The study highlights the "destructive" nature of standard cropping in biological contexts. While random cropping is a staple in natural image CV, it often removes cell edges or surrounding context necessary for phenotype identification. Conversely, rotation is a critical invariance for microscopy. Unlike a "house," a cell in a dish has no inherent "up" or "down."

On the BBBC021 dataset, replacing standard random cropping with strong rotations and center-focused crops nearly doubled clustering performance. For Nocodazole-treated cells, the Adjusted Mutual Information (AMI) jumped from 0.19 to 0.37, reaching 0.51 with further optimization. Notably, models trained from scratch using these domain-optimized transformations outperformed those pre-trained on ImageNet, challenging the common practice of relying on natural image backbones for biological tasks.

Conclusion

This research advocates for a shift away from "blind" augmentation selection toward a principled, feature-driven approach in SSRL. While the study focused on CNNs and medium-sized datasets, it opens the door for future exploration into Vision Transformers (ViTs) and more complex downstream tasks like organelle segmentation. By strategically selecting transformations based on desired feature invariance, researchers can drastically improve model performance and representation quality in specialized domains.

Summary updated

BibTeX
@inproceedings{bendidi2024exploring,
  author = {Ihab Bendidi and Adrien Bardes and Ethan D. Cohen and Alexis Lamiable and Guillaume Bollot and Auguste Genovesio},
  title = {{Exploring self-supervised learning biases for microscopy image representation}},
  booktitle = {Biological},
  year = {2024},
  doi = {10.1017/s2633903x2400014x},
}
Figure