Generalization of Self-Supervised Vision Transformers for Protein Localization Across Microscopy Domains

Ben Isselmann, Dilara Göksu, Andreas WeinmannarXiv 2026 · DOI

TL;DR

This paper demonstrates that self-supervised Vision Transformers (specifically the DINO architecture) pretrained on large-scale datasets generalize remarkably well to specialized microscopy tasks. Surprisingly, a model pretrained on the Human Protein Atlas (HPA) outperformed a model trained directly on the target OpenCell dataset, proving that domain-specific "foundation models" can overcome the limitations of small, task-specific biological datasets.

What Problem Does This Paper Address?

In the world of cell biology, high-throughput microscopy generates vast amounts of data, but labeling that data (e.g., identifying exactly where a protein is located) is expensive, slow, and requires expert knowledge. Consequently, many task-specific datasets are too small to train deep learning models from scratch without overfitting.

While self-supervised learning (SSL) allows models to learn from unlabeled data, a major "generalization gap" exists. Microscopy datasets vary wildly in staining protocols (which dyes are used), imaging modalities (the type of microscope), and channel configurations (how many "colors" or markers are captured). The authors ask: Can a model trained on natural images (like cats and dogs) or a different microscopy dataset still "understand" the features of a new, unseen microscopy domain?

Methods

The researchers employed DINO (Self-distillation with no labels), a popular SSL framework, using a Vision Transformer (ViT-Base/8) as the backbone.

The core of their experiment involved comparing three different sets of pretrained weights:

  1. Natural Images: Pretrained on ImageNet-1k.
  2. Domain-Specific (Large): Pretrained on a subset of the Human Protein Atlas (HPA).
  3. Task-Specific (Small): Trained from scratch on the OpenCell dataset.

A major technical challenge was handling the different number of image channels (ImageNet has 3 RGB channels, HPA has 4, and OpenCell has 2). They tested two strategies:

  • Channel Replication: Extracting features for each channel independently and concatenating them.
  • Channel Mapping: Aligning biological markers (like the nucleus or protein of interest) to specific input channels and padding missing ones with zeros.

Finally, they froze the DINO "backbone" and trained a simple 3-layer MLP classifier head to predict 17 protein localization classes on the OpenCell dataset.

Datasets

  • ImageNet-1k: 1.2 million natural images (used for general-purpose pretraining).
  • Human Protein Atlas (HPA): 117,882 images with 4 channels (protein, microtubules, nucleus, ER).
  • OpenCell: 6,301 images with 2 channels (tagged protein and nucleus). This served as the target "downstream" dataset for evaluation.

Key Insights and Ideas

  • The Power of Domain-Specific Pretraining: The model pretrained on HPA achieved the best results. This suggests that while "cell images" vary, there are underlying morphological "laws" that the model learns during large-scale pretraining that apply across different labs and protocols.
  • Quantity vs. Specificity: The HPA-pretrained model actually beat the model trained specifically on OpenCell. This is a crucial "aha" moment: having more data from a related domain is often better than having less data from the exact target domain.
  • Early Fusion Wins: "Channel mapping" (early fusion) performed better than "channel replication" (late fusion). Mapping the nucleus channel to the same input slot across datasets allows the model to preserve the spatial relationship between different cellular structures.
  • ImageNet is Surprisingly Robust: Even the model trained on natural images (ImageNet) performed competitively with the model trained on OpenCell. This indicates that low-level features like edges, textures, and shapes in natural images are still highly relevant to microscopy.

Key Results

The primary metric used was the mean macro $F_1$ score (which accounts for class imbalance):

Pretraining Source Embedding Strategy Mean Macro $F_1$
HPA FOV Channel Mapping 0.8221 (Best)
ImageNet-1k Channel Mapping 0.8057
OpenCell (Trained from scratch) 0.7918
HPA FOV Channel Replication 0.7681

The HPA-pretrained model showed a significant lead, particularly when using the channel mapping strategy. Qualitative visualizations (Figure 2 in the paper) confirmed the model could accurately distinguish between tricky compartments like the nucleoplasm and cytoplasm.

Limitations and Future Work

  • Overfitting: There was a significant gap between training performance ($\geq 0.94$ $F_1$) and test performance ($\sim 0.82$), suggesting the classifier head or the embeddings are still prone to some overfitting.
  • Static Architecture: The study used a fixed ViT-Base architecture and a static classifier. The authors suggest that exploring more flexible, "channel-adaptive" architectures could further improve results.
  • Fine-tuning: The study focused on "linear probing" (keeping the backbone frozen). Future work could explore end-to-end fine-tuning on even smaller subsets of data to see if the performance ceiling can be raised further.

Summary updated

Abstract

Task-specific microscopy datasets are often too small to train deep learning models that learn robust feature representations. Self-supervised learning (SSL) can mitigate this by pretraining on large unlabeled datasets, but it remains unclear how well such representations transfer across microscopy domains with different staining protocols and channel configurations. We investigate the cross-domain transferability of DINO-pretrained Vision Transformers for protein localization on the OpenCell dataset. We generate image embeddings using three DINO backbones pretrained on ImageNet-1k, the Human Protein Atlas (HPA), and OpenCell, and evaluate them by training a supervised classification head on OpenCell labels. All pretrained models transfer well, with the microscopy-specific HPA-pretrained model achieving the best performance (mean macro $F_1$-score = 0.8221 $\pm$ 0.0062), slightly outperforming a DINO model trained directly on OpenCell (0.8057 $\pm$ 0.0090). These results highlight the value of large-scale pretraining and indicate that domain-relevant SSL representations can generalize effectively to related but distinct microscopy datasets, enabling strong downstream performance even when task-specific labeled data are limited.
BibTeX
@misc{isselmann2026generalization,
  author = {Ben Isselmann and Dilara Göksu and Andreas Weinmann},
  title = {{Generalization of Self-Supervised Vision Transformers for Protein Localization Across Microscopy Domains}},
  year = {2026},
  eprint = {2602.05527},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2602.05527},
}
Figure