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

CCRL: Contrastive Cell Representation Learning

Ramin Nakhli, Amirali Darbandsari, Hossein Farahani, Ali Bashashati

TL;DR

CCRL (Contrastive Cell Representation Learning) is a new self-supervised framework that identifies and clusters different cell types in histopathology images without requiring manual annotations. By using an asymmetric contrastive architecture, it significantly outperforms existing unsupervised methods, proving that self-supervised learning can be highly effective even in datasets with very few distinct classes.

What Problem Does This Paper Address?

In digital pathology, identifying individual cells within Hematoxylin & Eosin (H&E) stained slides is the "first building block" for complex tasks like cancer grading and predicting patient outcomes. However, manual identification by pathologists is slow, expensive, and prone to human error.

While deep learning offers a solution, standard supervised models require massive, cell-level annotated datasets—pathologists would have to manually label tens of thousands of cells for every new tissue type. Self-Supervised Learning (SSL) offers a way to learn from unlabeled data, but while it has been successful for general tissue classification, its utility for fine-grained cell identification and clustering remained largely unexplored until now.

Methods

The authors propose CCRL, a contrastive learning framework designed specifically for cell representations. The core idea is to learn a robust "fingerprint" for a cell by ensuring that different augmented views of the same cell result in similar mathematical representations, while views of different cells are pushed apart.

Key technical components include:

  • Asymmetric Architecture: The framework uses two branches: a Query branch and a Key branch. The Query branch includes an extra "prediction head" (a small neural network), which creates a deliberate asymmetry that helps the model learn more flexible representations.
  • Momentum Encoder: The Key branch isn't trained directly via backpropagation. Instead, its weights are a "momentum-based" moving average of the Query branch's weights. This acts like an ensemble of previous versions of the model, leading to more stable training.
  • Local-Global Connection: To ensure the model understands both the fine details and the overall structure of a cell, one augmentation pipeline generates local crops (partial views), while the other maintains the whole-cell view (global).
  • Memory Bank: The model maintains a large queue (65,536 samples) of previously processed cell representations to serve as "negative samples" for the contrastive loss function.

![Fig.

  1. Overview of the Framework](/figures/art_1edf2b50d06648fa9381372bcf61a2fe)

Datasets

The model was evaluated on two publicly available datasets representing different tissue types:

  • CoNSeP: 24,319 cells from colorectal tissue, grouped into 4 categories (epithelial, inflammatory, spindle-shaped, and miscellaneous).
  • NuCLS: 51,986 cells from breast cancer images, grouped into 5 superclasses (tumor, stromal, sTILs, apoptotic, and others).
Table 1. Dataset details

Key Insights and Ideas

  • The "Few-Class" Success: Contrastive SSL is typically benchmarked on datasets like ImageNet, which has 1,000 classes. In such cases, the chance of a random "negative" sample actually being the same class as the query is tiny (0.1%). In this study, with only 4-5 classes, that "false-negative" rate jumps to 20-25%. Surprisingly, CCRL still performed exceptionally well, suggesting SSL is more robust to class collisions than previously thought.
  • Ensembling is Essential: The ablation study showed that using the momentum encoder (the "ensemble" version of the model) for inference provided better results than using the standard encoder, highlighting the value of temporal weight averaging in medical imaging.
  • Beyond Human Labels: Because the model is unsupervised, it has the potential to discover "novel" cell types or sub-types that might be overlooked by human pathologists during routine examination.

Key Results

CCRL outperformed all existing unsupervised baselines—including ImageNet pre-trained models, morphological feature extractors, and generative models like InfoGAN—by a large margin.

  • Clustering Accuracy: On the CoNSeP dataset, CCRL achieved an Adjusted Mutual Information (AMI) of 24.2%, nearly double the performance of standard morphological features (12.7%).
  • Consistency: The model showed strong performance across both colorectal and breast tissue, proving its generalizability.
  • Purity: In the NuCLS dataset, the model achieved a cluster purity of 68.3%, outperforming the state-of-the-art InfoGAN (62%).
Table 2. Unsupervised clustering performance comparison.

Limitations and Future Work

While CCRL eliminates the need for cell classification labels, it still relies on instance segmentation (knowing where the cells are) to crop the initial images. Future work could look into fully end-to-end systems that detect and represent cells simultaneously. Additionally, while the model handles rare cell populations well due to its SSL nature, further testing on extremely "long-tailed" datasets (where some cell types are very rare) would be beneficial. The authors hope this work motivates further exploration of unsupervised learning for cell-level discovery in pathology.

Summary updated

BibTeX
@inproceedings{nakhli2022ccrl,
  author = {Ramin Nakhli and Amirali Darbandsari and Hossein Farahani and Ali Bashashati},
  title = {{CCRL: Contrastive Cell Representation Learning}},
  booktitle = {Workshops @ ECCV},
  year = {2022},
  doi = {10.1007/978-3-031-25082-8\_26},
}
Figure