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

HASSL: Hierarchy-Aware Self-Supervised Learning Framework for Single Cell Microscopy

Julius Riel, Vishwa Mohan Singh, Sai Anirudh Aryasomayajula, Anuun Chinbat, Hannes Leonhard, Moritz Ladenburger, Frederik Alexander, Vishisht Choudhary, Fabio Laredo, Giacomo Masserdotti, Thorben Prein, Carsten Marr, Amirhossein KardoostarXiv 2026

TL;DR

Standard self-supervised learning (SSL) models often fail in single-cell microscopy because dominant factors like imaging modality and batch effects obscure subtle biological variations. HASSL solves this by introducing a double-teacher distillation framework and an HDBSCAN-based hierarchy-aware contrastive loss that preserves fine-grained morphological structures. This approach significantly improves cell retrieval, clustering, and downstream drug-perturbation classification without requiring manual labels.

What Problem Does This Paper Address?

In computer vision, self-supervised learning models (like DINO) excel at learning representations by grouping similar images together. However, applying these models to biological cell imaging reveals a major flaw: the models tend to cluster images based on how they were acquired (imaging modality, staining techniques, or batch effects) rather than the actual underlying biology.

These dominant technical factors create massive "superclusters" in the latent space. For instance, a neuron and an oligodendrocyte progenitor cell (OPC) captured via brightfield microscopy might look more similar to the model than two neurons captured via different modalities (brightfield vs. fluorescence). This modality bias suppresses the subtle morphological and textural cues needed to distinguish closely related cell types or detect drug-induced changes.

Fig. 1. Hierarchy in cell imaging (left) and the objective with HASSL’s embedding model (right). HASSL learns a more hierarchical embedding space, leading to improved morphological representation and tighter subclusters.

Methods

The authors propose HASSL (Hierarchy-Aware Self-Supervised Learning), a framework designed to break up modality-driven superclusters and enforce a biology-centric hierarchy. It introduces two novel components on top of a Vision Transformer (ViT) backbone:

  1. Double-Teacher DINO Distillation: Instead of the standard single-teacher setup, HASSL uses two self-supervised teachers to guide a student network.
  2. An Image Teacher provides global semantic targets from the raw image.
  3. A Segmentation Teacher conditions on zero-shot segmentation masks (pre-computed using a generalist model like CellposeSAM). By forcing the student to align its local views with both teachers, the model incorporates geometric and shape priors, effectively steering its attention away from raw pixel/modality statistics and toward cell morphology.

  4. Hierarchy-Aware Contrastive Loss: To structure the latent space without human labels, HASSL applies HDBSCAN clustering to in-memory batch embeddings during training. This dynamically generates a condensed cluster tree representing the latent hierarchy.

  5. Prototype Mining: For any given cell (anchor), the model identifies its positive ancestors (parent clusters up the tree) and its negative siblings (competing subclusters under the same parent).
  6. Stability Weighting ($\lambda$): Rather than treating all clusters equally, HASSL scales the contrastive loss using HDBSCAN’s cluster persistence (stability). Highly stable, deep subclusters receive higher confidence weights. This prevents the model from aggressively repelling closely related cell subtypes, preserving natural biological gradients.
Overview of the HASSL representation learning pipeline

Datasets

The authors consolidated 20 scattered instance-segmentation benchmarks into a massive, unified single-cell corpus called HASSL-SingleCellBench.

  • Scale: 2,390,832 single-cell crops.
  • Diversity: 8 imaging modalities, covering 208 labeled cell classes.
  • Evaluation: Evaluated on the curated test split as well as completely unseen generalization datasets, including the Human Protein Atlas (HPA) and the Allen Institute of Cell Science Perturbation Set.

Key Insights and Ideas

  • Noisy Masks as Weak Priors: The zero-shot segmentation masks don't need to be perfect. Even with acceptable levels of noise, they provide a strong enough geometric bias to kickstart the formation of morphology-based subclusters.
  • Moving Beyond Flat Clustering: Standard flat clustering methods (like DBSCAN) force a single resolution, which either over-fragments or merges distinct cell subtypes. Utilizing hierarchical clustering (HDBSCAN) allows the model to naturally handle multi-resolution biological structures.
  • The Power of Stability Weighting: Uniformly weighting contrastive pairs in an unsupervised hierarchical setting distorts the latent space. Weighting by cluster persistence ensures that the model sharpens boundaries at ambiguous edges while maintaining the integrity of the overarching supercluster.

Key Results

HASSL consistently outperformed state-of-the-art self-supervised baselines (including DINOv3, scDINO, and HCSC) across multiple evaluation metrics:

  • Retrieval & Clustering: On deeply hierarchical datasets, HASSL improved top-9 neighborhood retrieval accuracy by +6.3% and achieved the highest clustering agreement (NMI and AMI).
  • Downstream Drug Perturbation: In a highly relevant task predicting how cells were affected by drugs (paclitaxel vs. brefeldin), HASSL boosted the classification F1-score by +7.8% over the next best model.
  • Minimal Compute Overhead: Despite the dual-teacher setup and dynamic clustering, HASSL only added +2.3% to wall-clock training time and +10.2% VRAM overhead compared to the baseline DINOv3, thanks to efficient frozen teacher passes and optimized memory footprinting.

Limitations and Future Work

While highly effective, the authors note a few areas for expansion:

  • Framework Agnosticism: The current implementation is built on top of DINO, but the core components (segmentation embeddings and the HDBSCAN loss term) are modular. Future work could explore dropping these components into other self-supervised frameworks like BYOL or SimCLR.
  • Alternative Loss Formulations: The hierarchy loss currently relies on a hinge loss variant; exploring alternative formulations like InfoNCE could yield further optimization and performance gains.

Summary updated

BibTeX
@misc{riel2026hassl,
  author = {Julius Riel and Vishwa Mohan Singh and Sai Anirudh Aryasomayajula and Anuun Chinbat and Hannes Leonhard and Moritz Ladenburger and Frederik Alexander and Vishisht Choudhary and Fabio Laredo and Giacomo Masserdotti and Thorben Prein and Carsten Marr and Amirhossein Kardoost},
  title = {{HASSL: Hierarchy-Aware Self-Supervised Learning Framework for Single Cell Microscopy}},
  year = {2026},
  eprint = {2607.04353},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2607.04353},
}
Figure