Panoptic segmentation with highly imbalanced semantic labels

Josef Lorenz Rumberger, Elias Baumann, Peter Hirsch, Andrew Janowczyk, Inti Zlobec, Dagmar KainmuellerarXiv 2022

TL;DR

Automated nuclei analysis in pathology is often crippled by extreme class imbalance, where rare but clinically significant cell types are easily ignored by standard models. This paper presents a panoptic segmentation framework that combines a "Hovernet-like" dual-decoder architecture with specialized importance sampling and weighted focal loss to successfully identify rare cells that make up less than 1% of the dataset.

What Problem Does This Paper Address?

In digital pathology, identifying and counting different types of nuclei in Hematoxylin and Eosin (H&E) stained images is crucial for understanding the tumor microenvironment. However, this task faces two major hurdles:

  1. Dense Clustering: Nuclei are often packed tightly together, making it hard for algorithms to distinguish individual boundaries.
  2. Extreme Class Imbalance: In colon tissue, epithelial cells are abundant, while cells like neutrophils and eosinophils are "needles in a haystack," representing less than 1% of the total population.

Standard deep learning models tend to over-optimize for the common classes, effectively "forgetting" how to identify the rare ones. The authors aim to create a robust system that handles both the geometry of dense nuclei and the statistical challenge of rare labels.

Methods

The authors propose a multi-task architecture based on an EfficientNet encoder (scaling up to the massive L2 variant) paired with two U-Net decoders.

Overview of the proposed model architecture, showing the dual-decoder setup for instance and semantic tasks.

Key technical innovations include:

  • Importance Sampling: Instead of picking training images at random, the system calculates the probability of an image being selected based on the presence of rare classes. This ensures the model sees rare cells frequently during training.
  • Weighted Focal Loss: They adapted the focal loss function to include an exponential moving average (EMA) class prior. This dynamically adjusts pixel-level weights, forcing the model to pay more attention to classes that occupy very few pixels.
  • Instance Segmentation Strategy: One decoder predicts three labels (nucleus interior, boundary, and background) while simultaneously regressing "center-point vectors." This auxiliary task helps the model learn the topology of nuclei, preventing common errors like false merges in dense regions.
  • Test-Time Refinement: They used Test-Time Augmentation (TTA) and kept "dropout" active during inference to produce an ensemble of 16 predictions, which were then averaged for a more stable final result.

Datasets

The study utilizes the Lizard Dataset, a large-scale collection of colon nuclei.

  • Scale: 4,981 tiles (256x256 pixels).
  • Classes: Six cell types (epithelial, connective-tissue, lymphocyte, plasma-cell, neutrophil, and eosinophil) plus background.
  • Imbalance: As shown in the table below, background and epithelial cells dominate, while eosinophils represent a mere 0.1% of the pixel data.
Dataset statistics highlighting the extreme imbalance between common and rare cell types.

Key Insights and Ideas

  • Bigger Backbones Don't Always Overfit: Despite the relatively small number of tiles, moving from an EfficientNet-B5 to the much larger L2 variant provided a significant performance boost without evidence of overfitting to individual image characteristics.
  • Sampling is the Secret Sauce: The ablation study revealed that importance sampling was the single most impactful factor for rare classes. Without it, the model's ability to detect neutrophils and eosinophils plummeted.
  • The "Center-Point" Advantage: By predicting vectors pointing to the center of each nucleus, the model gains a geometric understanding that simple pixel classification lacks, which is vital for separating touching nuclei.

Key Results

The combination of importance sampling and weighted loss led to dramatic improvements in mPQ+ (multi-class Panoptic Quality), the primary metric for this task.

Ablation study showing how performance on rare classes (neu, eos) collapses without sampling and loss weighting.
  • Rare Class Boost: For eosinophils, the PQ+ score jumped from a negligible 0.046 (baseline) to 0.421 with the proposed methods.
  • Model Scaling: The U-Net L2 reached a top mPQ+ of 0.572, outperforming the B7 and B5 variants.
  • Generalization: When tested on a completely different subset (the GlaS dataset) to check for "center-to-center" generalization, the model still outperformed smaller variants, though it faced a performance drop due to domain shift (different staining/scanners).

Limitations and Future Work

The authors identify several areas for improvement:

  • Domain Shift: The model's performance decreases when applied to images from different medical centers. Future work will likely involve explicit domain adaptation techniques.
  • Fine-Grained Errors: Small, roundish muscle nuclei are still occasionally mistaken for lymphocytes, and necrotic debris can trigger false positive detections.
  • Resolution: The current study used 0.5µpp resolution; the authors suggest that higher resolution might be necessary to distinguish certain cell types based on internal nuclear textures (chromatin patterns).

Summary updated

BibTeX
@misc{rumberger2022panoptic,
  author = {Josef Lorenz Rumberger and Elias Baumann and Peter Hirsch and Andrew Janowczyk and Inti Zlobec and Dagmar Kainmueller},
  title = {{Panoptic segmentation with highly imbalanced semantic labels}},
  year = {2022},
  eprint = {2203.11692},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2203.11692},
}
Figure