Unbiased single-cell morphology with self-supervised vision transformers

Michael Doron, Théo Moutakanni, Zitong Chen, Nikita Moshkov, Mathilde Caron, Hugo Touvron, Piotr Bojanowski, Wolfgang M. Pernice, Juan C. CaicedobioRxiv 2023

TL;DR

This paper introduces DINO, a self-supervised vision transformer, as a powerful tool for analyzing single-cell morphology from microscopy images. By learning rich, unbiased representations without manual labels, DINO can uncover complex biological variations and outperform traditional methods in various downstream tasks like cell-cycle staging and protein localization.

What Problem Does This Paper Address?

Accurately characterizing cell morphology is crucial for understanding biological processes, but current methods often rely on manual annotations or engineered features that may miss subtle variations. This limits the scalability and unbiased nature of image-based biological discovery. The challenge is to develop methods that can automatically learn meaningful morphological features from images without prior biological knowledge or extensive labeling, enabling broader exploration of cellular phenotypes.

Methods

The core of this work is the application of DINO (self-DIstillation with NO labels), a self-supervised learning framework that utilizes vision transformers (ViTs). DINO trains two networks (student and teacher) to match feature representations from different views of the same image. ViTs, with their self-attention mechanisms, are particularly adept at capturing long-range dependencies within images, making them suitable for learning complex visual patterns. The authors applied DINO to microscopy images, leveraging various augmentations to encourage the model to learn invariant features, effectively ignoring irrelevant variations like illumination or minor spatial shifts.

Datasets

The study utilized three publicly available, diverse microscopy datasets:

  • Allen Institute WTC-11 hiPSC dataset: Human induced pluripotent stem cells with fluorescently tagged proteins and cell cycle stage annotations.
  • Human Protein Atlas (HPA) dataset: Human cell lines with multiple fluorescent channels for visualizing cellular structures and protein localization annotations.
  • Cell Painting datasets: A collection of datasets (LINCS, BBBC036) using the Cell Painting assay, which stains multiple cellular compartments, for compound perturbation studies.

Key Insights and Ideas

  • Unsupervised Discovery of Biological Variation: DINO can uncover meaningful biological and technical factors of variation in microscopy images without any explicit labels, revealing a hierarchical structure of these factors.
  • Beyond Engineered Features: DINO features capture a richer set of morphological variations compared to traditional engineered features, which are often designed for specific tasks.
  • Subcellular to Population-Level Insights: The learned DINO features are effective across various scales, from subcellular patterns to multi-cellular and experimental group analyses.
  • Handling Technical Variation: DINO features can be harmonized (e.g., using Harmony) to mitigate technical variations (like batch effects) while preserving biological signals, making them more robust for downstream analysis.
  • Predictive Power: DINO features demonstrate strong performance in predicting expert-defined phenotypes, often matching or exceeding supervised methods, even without task-specific fine-tuning.
  • Cellular Heterogeneity: DINO effectively captures single-cell heterogeneity, enabling the ranking of genes based on their variability in protein localization patterns.
  • Vision Transformers for Microscopy: The study highlights the suitability of ViTs within a self-supervised framework for extracting biologically relevant information from complex microscopy images.

Key Results

  • Competitive Performance in Downstream Tasks: DINO features achieved competitive or superior performance compared to engineered features and supervised models in tasks like cell-cycle stage classification (outperforming engineered features by up to 18%), cell line classification (achieving 0.93 accuracy), and protein localization classification.
  • Improved Compound Bioactivity Prediction: DINO features improved MoA classification and compound bioactivity prediction on Cell Painting datasets, showing 10-23% improvement in precision-recall scores over baseline methods.
  • Uncovering Hierarchical Factors: In the WTC-11 dataset, DINO identified cell structures as a main factor of variation and cell cycle as a nested factor. Similarly, in HPA, cell lines were a main factor and protein localization a nested one.
  • Correlation with Orthogonal Data: DINO-derived cell line similarity matrices showed a Mantel statistic of 0.47 with RNAseq data, outperforming supervised CNN features (0.31).
  • Subcellular Feature Encoding: Attention maps from the ViT model trained with DINO showed significant overlap with specific fluorescent channels, indicating that ViT heads learn to attend to biologically relevant subcellular structures.

Limitations and Future Work

  • Confounder Mitigation: While DINO features can be transformed to correct for unwanted variation, effectively mitigating confounders remains an open challenge.
  • Generalizability: The study systematically evaluated DINO across diverse imaging problems, but further exploration of its applicability to even more varied biological contexts and imaging modalities could be beneficial.
  • Computational Cost: Training large ViT models can be computationally intensive, although DINO's self-supervised nature reduces the need for extensive labeled data.
  • Future Directions: The authors suggest that DINO's ability to uncover biological variation and its potential for unbiased profiling make it a valuable tool for advancing high-throughput drug discovery and other image-based biological discovery projects. The work also opens avenues for exploring how DINO's learned representations can be further leveraged for more complex analyses, such as understanding interactions between subcellular components.

Summary updated

Abstract

Accurately quantifying cellular morphology at scale could substantially empower existing single-cell approaches. However, measuring cell morphology remains an active field of research, which has inspired multiple computer vision algorithms over the years. Here, we show that DINO, a vision-transformer based, self-supervised algorithm, has a remarkable ability for learning rich representations of cellular morphology without manual annotations or any other type of supervision. We evaluate DINO on a wide variety of tasks across three publicly available imaging datasets of diverse specifications and biological focus. We find that DINO encodes meaningful features of cellular morphology at multiple scales, from subcellular and single-cell resolution, to multi-cellular and aggregated experimental groups. Importantly, DINO successfully uncovers a hierarchy of biological and technical factors of variation in imaging datasets. The results show that DINO can support the study of unknown biological variation, including single-cell heterogeneity and relationships between samples, making it an excellent tool for image-based biological discovery.
BibTeX
@misc{doron2023unbiased,
  author = {Michael Doron and Théo Moutakanni and Zitong Chen and Nikita Moshkov and Mathilde Caron and Hugo Touvron and Piotr Bojanowski and Wolfgang M. Pernice and Juan C. Caicedo},
  title = {{Unbiased single-cell morphology with self-supervised vision transformers}},
  year = {2023},
  doi = {10.1101/2023.06.16.545359},
  howpublished = {bioRxiv},
}
Figure