---
title: 'Mitosis Algorithm: VM-UNet & Stain Augmentation'
url: https://www.emergentmind.com/topics/mitosis-algorithm
type: topic
---

# Mitosis Algorithm: VM-UNet & Stain Augmentation

Searching arXiv for the cited paper and closely related mitosis-detection work to ground the article.
The Mitosis Algorithm, in the sense developed in "Mitosis detection in domain shift scenarios: a Mamba-based approach," is a computational pathology pipeline for mitosis detection in histopathology images under domain shift. It reframes mitosis detection as segmentation, uses a VM-UNet architecture with Vision Mamba blocks, and augments training with stain style perturbations to improve robustness across scanners, laboratories, tissue-processing conditions, and related acquisition domains. The method was developed on MIDOG++ under a leave-one-domain-out protocol and, on the preliminary test set for MIDOG 2025 track 1, reached an F1-score of 0.754 [2508.21033].

## 1. Problem definition and domain-generalization setting

Mitosis detection identifies nuclei undergoing cell division in histopathology images, a task that is critical for tumor grading. A mitotic count is typically reported per area, for example 2 mm². The detection problem is difficult because mitotic figures exhibit substantial intra-class variability across prophase, metaphase, anaphase, and telophase, and because several confounders, including hyperchromatic non-mitotic nuclei, can resemble true mitoses [2508.21033].

Within digital pathology, the central difficulty addressed by the algorithm is domain shift. In the reported formulation, domain shift arises from differences in staining protocols, reagents, tissue processing, scanner vendors and optics, image compression, tumor morphologies, and species. The MIDOG track 1 task is explicitly scanner- and site-agnostic and evaluates performance on unseen domains without training on the target domain. This is therefore a domain generalization setting rather than a domain adaptation setting [2508.21033].

A recurrent misconception in this literature is that mitosis detection must be posed as direct object detection. The Mamba-based method instead treats the task as segmentation followed by conversion of pixel-wise predictions into point detections. This design choice places it in the same broader family as other segmentation-driven mitosis pipelines, while differing from anchor-based detectors such as RetinaNet or Cascade R-CNN and from proposal-classification cascades [2508.21033].

## 2. Data, annotations, and evaluation protocol

The reported system was developed and evaluated on MIDOG++, which aggregates annotations for 11,937 mitoses over 503 tumor cases spanning 7 domains. Each domain differs by tumor type, acquisition scanner, laboratory protocol, and often species, making the dataset a broad test bed for domain shift. Training and validation follow a leave-one-domain-out protocol: in each run, 6 domains serve for training, and the held-out domain serves strictly for validation, with model selection performed by validation loss [2508.21033].

MIDOG++ provides point annotations corresponding to mitosis centers. For this algorithm, those point annotations are converted into segmentation masks with NuClick, an interactive nuclei segmentation method driven by point clicks. This conversion is fundamental because the method optimizes a supervised segmentation objective rather than a direct detection objective [2508.21033].

The challenge itself evaluates detection rather than segmentation. Predictions are matched to ground-truth mitosis centers using a distance-tolerance rule based on nearest-neighbor matching within a fixed radius around the annotated center. Precision, recall, and F1-score are then computed, with F1-score serving as the primary metric in the reported experiments. When segmentation quality is considered, Intersection over Union can also be reported. The standard definitions are

$$
\mathrm{Prec} = \frac{TP}{TP + FP}, \qquad
\mathrm{Rec} = \frac{TP}{TP + FN},
$$

$$
\mathrm{F1} = \frac{2\,\mathrm{Prec}\,\mathrm{Rec}}{\mathrm{Prec} + \mathrm{Rec}}, \qquad
\mathrm{IoU} = \frac{|P \cap G|}{|P \cup G|},
$$

where $P$ is the predicted mask and $G$ is the ground-truth mask [2508.21033].

## 3. VM-UNet and Vision Mamba formulation

The architectural core is VM-UNet, a Vision Mamba U-Net pretrained on ImageNet. It is a U-shaped encoder-decoder with skip connections, in which the principal feature extractors are Mamba-based Visual State Space blocks. The algorithm decomposes the input image into non-overlapping $4 \times 4$ patches, projects each patch to a 96-D feature vector, and forms an embedded tensor of shape $\frac{H}{4} \times \frac{W}{4} \times 96$ [2508.21033].

The encoder contains four stages with VSS blocks for feature extraction. After the first three stages, patch merging reduces spatial resolution by a factor of 4 and doubles the channel dimension, thereby increasing the receptive field while compressing spatial detail. The decoder mirrors the encoder with four stages; patch expanding increases spatial resolution by a factor of 4 at the start of the first three stages, and VSS blocks reduce channels accordingly. Skip connections bridge encoder and decoder stages and preserve fine-grained spatial information, which is especially important for small-object segmentation such as mitoses. A projection layer restores decoder feature maps to input resolution and produces the final segmentation mask [2508.21033].

At the sequence-modeling level, Mamba replaces self-attention with a selective state space model. The reported conceptual form is

$$
x_{t+1} = A x_t + B u_t, \qquad
y_t = C x_t + D u_t,
$$

where $u_t$ is the input at step $t$, $x_t$ is the latent state, and $y_t$ is the output. The selective mechanism dynamically modulates the state-space parameters conditioned on the input, enabling content-dependent long-range modeling with linear complexity. Vision Mamba adapts this scheme to images by scanning features as sequences, which provides large receptive fields and context aggregation while remaining more memory/computation-efficient than transformer-based U-Nets for high-resolution pathology tiles. This suggests an efficiency–context trade-off that is particularly relevant for whole-slide pathology processing [2508.21033].

## 4. Training objective, stain-style augmentation, and detection pipeline

Training uses $512 \times 512$ pixel tiles with 80% overlap during both training and inference. Because mitoses are rare, each batch is balanced to contain equal numbers of positive tiles, defined as tiles containing at least one mitosis, and negative tiles. Optimization uses AdamW with learning rate $5 \times 10^{-4}$, 100 training epochs, and batch size 24 [2508.21033].

The segmentation objective combines Dice loss and Focal loss. The Dice loss is

$$
\mathcal{L}_\mathrm{Dice} =
1 - \frac{2 \sum_i p_i y_i + \epsilon}{\sum_i p_i + \sum_i y_i + \epsilon},
$$

where $p_i \in [0,1]$ is the predicted probability, $y_i \in \{0,1\}$ is the ground truth at pixel $i$, and $\epsilon$ stabilizes the ratio. The Focal loss is

$$
\mathcal{L}_\mathrm{Focal}
=
-\alpha (1-p)^\gamma y \log p
-(1-\alpha) p^\gamma (1-y)\log(1-p),
$$

where $\alpha \in [0,1]$ balances classes and $\gamma > 0$ focuses the loss on hard examples. The paper references Focal loss but does not specify the $\alpha$ and $\gamma$ values [2508.21033].

To improve domain generalization, the method applies stain style augmentation using Vahadane’s structure-preserving stain separation. An image $I_0$ is decomposed into stain basis $S$ and concentration matrix $C$, and random scaling and shifting are then used to mimic stain intensity and concentration variation:

$$
I = I_0 \exp\left(-S(\alpha C + \beta)\right),
$$

where $\alpha$ and $\beta$ are random coefficients. The intended effect is invariance to color and stain shifts while preserving tissue structure [2508.21033].

Inference converts segmentation into detections through a fixed postprocessing chain. Overlapping tile predictions are aggregated into a full-slide mask. Morphological dilation is then applied to merge closely spaced daughter nuclei in late mitosis stages into a single connected component. Connected components are extracted, and for each component the center of the minimum-area bounding box is computed and reported as the final mitosis detection. The paper also states that predictions from top cross-validation models are combined through model ensembling. Several implementation details remain unspecified, including the exact tile-aggregation rule, dilation kernel, and thresholding [2508.21033].

## 5. Empirical performance and relation to adjacent mitosis-detection paradigms

Under leave-one-domain-out validation on MIDOG++, the reported ablation shows a progression from a standard U-Net baseline to the Mamba-based variant and then to the full model with stain augmentation. The corresponding F1 values are summarized below [2508.21033].

| Method | Validation setting | Reported F1 |
|---|---|---|
| U-Net | MIDOG++ LODO | $0.656 \pm 0.094$ |
| VM-UNet | MIDOG++ LODO | $0.710 \pm 0.073$ |
| VM-UNet + Stain Aug | MIDOG++ LODO | $0.736 \pm 0.063$ |
| Proposed approach | MIDOG 2025 track 1 preliminary test | $0.754$ |

The reported improvement from U-Net to VM-UNet indicates better performance under domain shift, and the additional improvement from stain augmentation indicates that stain variability remains a dominant source of failure [2508.21033].

The broader literature contains several distinct mitosis-detection paradigms. "Mitosis Detection for Breast Cancer Pathology Images Using UV-Net" formulates the task as Gaussian heatmap regression on $512 \times 512$ patches and reports an F1 score of 0.6721 on MIDOG 2021 test patches [2109.01526]. "Domain Adversarial RetinaNet as a Reference Algorithm for the MItosis DOmain Generalization Challenge" uses RetinaNet with gradient reversal and a multi-class scanner discriminator and reports F1 = 0.7183 on the final MIDOG test set [2108.11269]. "Mitosis Detection, Fast and Slow" uses a two-stage EUNet-plus-EfficientNet-B7 pipeline with stain normalization and HED augmentation, reporting F1 = 0.747 on the external MIDOG21 test and F1 = 0.764 on MIDOG22 [2208.12587]. "A Two-Stage Strategy for Mitosis Detection Using Improved YOLO11x Proposals and ConvNeXt Classification" reports F1 = 0.882 on a fused dataset comprising MIDOG++, MITOS_WSI_CCMCT, and MITOS_WSI_CMC [2509.02627].

These reports span different datasets and protocols, including MIDOG++, MIDOG21, MIDOG22, TUPAC16, ICPR 2012, and fused multi-dataset settings. This suggests that direct ranking across papers should be interpreted cautiously. What is consistent across them is the recurrence of three design pressures: small-object sensitivity, hard-negative suppression, and robustness to domain shift.

## 6. Limitations, reproducibility, and deployment considerations

The paper explicitly states that the preliminary experiments show “large room for improvement.” The listed future directions include multi-scale context, improved stain normalization or learned stain-invariant features, semi-/self-training on unlabeled target domains, domain-adversarial training, style transfer or synthetic data, more refined postprocessing such as watershed or non-maximum suppression, uncertainty estimation, and better calibration and thresholding per domain and per scanner [2508.21033].

Reproducibility is partially specified and partially open. Reported implementation details include MIDOG++ data statistics, ImageNet pretraining, NuClick-derived ground-truth masks, $512 \times 512$ tiles with 80% overlap, balanced batches, AdamW with learning rate $5 \times 10^{-4}$, 100 epochs, batch size 24, Dice plus Focal losses, Vahadane-based stain separation, leave-one-domain-out validation, and inference with dilation, connected components, bounding-box centers, and ensembling across best cross-validation models. However, seeds, exact augmentation parameter ranges, dilation kernel size, aggregation rule, and thresholding are not specified [2508.21033].

For deployment across laboratories and scanners, the paper recommends reserving a small validation set per site or scanner for tuning postprocessing and checking performance drift, periodically tracking precision and recall on quality-control sets, standardizing slide preparation and scanning settings, adjusting probability thresholds and morphological parameters to clinical priorities, and reviewing detections around tissue folds, pen marks, necrotic areas, and out-of-focus regions [2508.21033].

A further point of clarification is terminological. The phrase “Mitosis Algorithm” is not a unique identifier for a single method across arXiv. In computational pathology it can denote segmentation-based, detector-based, weakly supervised, teacher-student, or two-stage proposal-classification pipelines [2508.21033; 2208.12587; 2211.16852; 2509.03614]. In the present usage, it most precisely denotes the VM-UNet-plus-stain-augmentation method for mitosis detection under domain shift introduced in 2025 [2508.21033].

Source: https://www.emergentmind.com/topics/mitosis-algorithm