HASSL: Hierarchy-Aware Self-Supervised Learning Framework for Single Cell Microscopy
Abstract
Hierarchical structure is common in image data, where finegrained clusters often merge into larger, coarser semantic clusters. In biological cell images, current self-supervised learning models tend to suppress the inherent hierarchical structure, as coarse factors (such as the imaging modality) systematically obscure finer attributes (e.g., morphological details) in the latent space. We propose a novel hierarchy-aware self-supervised training framework to address this problem. Our method integrates two components: we propose (i) a distillation framework by introducing a segmentation teacher that improves the latent space’s morphological awareness, and (ii) a hierarchy-aware contrastive loss based on HDBSCAN to improve decision boundaries between closely related yet distinct subtypes at each hierarchical level. Both components counteract the self-supervised learning’s tendency to overemphasize coarse factors by aligning embeddings with semantic and morphological cues, yielding biologically meaningful sub-clusters driven by fine morphological detail. We train and evaluate our method on a curated corpus of 2.3M single cells aggregated from 20 microscopy datasets (labeled and unlabeled), covering 208 cell classes. Our method improves upon the counterparts and baseline, with the average top-K accuracy up by +2.8%, top-9 retrieval on the dataset with a deeper hierarchy up by +6.3%, and an F1-score on biologically relevant classification of administered drug from perturbed cell morphology downstream up by +7.8%.