A gland segmentation model trained at one hospital often fails at another, and the failures are not spread evenly. Most of the damage plausibly lands on the thin, pale strips of stroma (the connective tissue that separates neighbouring glands). When a different stain batch or slide scanner washes out one of those strips, the model draws one blob where there should be two glands. The pixel score barely moves, but the tissue's structure has changed. Fused, crowded glands are one of the visual signs pathologists use to call colon tissue malignant. A segmentation error caused by domain shift can therefore make benign tissue look malignant to any downstream measurement. In other words, the shift manufactures a morphological mimic, meaning a benign pattern that resembles cancer.
This note proposes to test that claim directly and to build a targeted fix. We treat the stroma between glands as a thin branching network, much like a vessel tree, and reduce it to a skeleton graph. In that graph, junctions and endpoints are nodes and stromal strips are edges, so a merge error is exactly a missing edge. The fix is a training signal on unlabeled images from the new site. Several re-stainings of the same image must produce the same stroma graph, and we only enforce the edges that stay stable across re-stainings. Three questions follow. Does shift-induced error concentrate at these topological breaks? Does it flip benign-looking structure toward malignant-looking structure? Does location-aware graph consistency repair it better than existing topology-aware semi-supervised methods given the same augmentation?
Core Claim
The claim has a diagnostic half and a method half, and they can succeed or fail separately. The diagnostic half says that under stain or scanner shift, topological error measured by Betti Matching Error grows proportionally faster than pixel error. Betti Matching Error compares counts and positions of connected components and holes. The claim further says the excess error sits on "topologically critical" stromal pixels, and that the resulting merges move gland-graph statistics in the direction that separates benign from malignant tissue. The method half says that a consistency loss across re-stained views of unlabeled target-site images closes more of that gap than three alternatives. The first is enforcing topology against labels alone, as in Enhancing Boundary Segmentation for Topological Accuracy with Skeleton-based Methods. The second is location-free persistence matching, as in TopoSemiSeg. The third is plain pixel consistency. The loss is defined on an explicit, spatially anchored stroma skeleton graph, and an edge counts as signal only if it survives multiple re-stainings.
Where This Sits
Four lines of work frame the proposal, and each plays a different role.
Two papers supply the topological machinery. TA-Net adds a medial-axis decoder for gland instance segmentation. The medial axis is the centerline of each shape, and this decoder beats an otherwise identical contour-branch model by 35% Obj-H on CRAG. Its skeleton, however, stays a pixel map and is never tested off-domain. Skea-Topo (Enhancing Boundary Segmentation…) finds the pixels where foreground and background skeletons meet prediction errors and penalizes them in linear time. We reuse its critical-pixel idea. Skea-Topo was run only on single-domain electron microscopy, materials and road data, and it needs labels at those pixels. We instead derive the critical locations from a teacher network's graph on unlabeled data.
TopoSemiSeg is the closest prior work and the method we must beat. It aligns persistence diagrams between a student and a teacher network on unlabeled histology. A persistence diagram summarizes which components and loops appear and disappear as a threshold is swept. On CRAG with 20% labels it reaches a Betti Matching Error of 8.575. We differ from it in three ways. First, persistence diagrams discard where a feature is, so two different merges with the same Betti numbers look identical to that loss, whereas our loss is anchored to graph edges at specific locations. Second, the authors note that their signal-versus-noise threshold is set by hand, and we replace it with stability across re-stainings. Third, TopoSemiSeg was evaluated only in-distribution, while our unlabeled data come from a shifted domain.
Several papers motivate the shift problem without addressing topology. They report cross-distribution AUC drops of 20–40% for CNNs and ViTs (From Modern CNNs to Vision Transformers). They also report cross-scanner mIoU drops of up to 0.38 on identical tissue scanned by five scanners (Multi-Scanner Canine Cutaneous SCC Dataset). HistAuGAN (Structure-Preserving Multi-Domain Stain Color Augmentation) supplies our re-staining operator. It recombines a content code with sampled stain codes. It was validated only on tile classification, so whether it preserves one-to-two-pixel stromal strips is itself an open question that we measure.
The mimicry framing comes from work showing that diagnostic look-alikes cause expert disagreement (Discordance… melanocytic tumors). It also draws on the observation that graph abstractions of biological networks support downstream prediction (Predicting Stroke through Retinal Graphs). No paper in the file shows segmentation shift producing mimics, and that is the first thing we test. We deliberately do not claim a vascular histology benchmark, because the file contains none with usable numbers. The stroma network is our curvilinear structure. Microvascular graphs, which matter in gliomas (Deep learning-based identification of… microvascular proliferation), are a later extension.
Research Program
The first component is the stroma graph. Given a gland probability map, we threshold it and skeletonize the complement inside the tissue mask. Junctions and endpoints are found with neighbourhood masks of the kind used for vessel trees (Analyse des Herzkranzgefäßbaums). Each skeleton segment becomes an edge annotated with its pixel path, mean width and mean predicted probability. A merged pair of glands then appears in the graph as a missing edge, or as an edge whose path crosses predicted foreground.
The second component is the stability-filtered teacher graph. For an unlabeled image $x$ from the target domain, we create $K$ re-stained views $x_1,\dots,x_K$. These come from HistAuGAN stain codes and CycleGAN recoloring, and both are geometry-preserving, so pixel coordinates match across views. A teacher network, an exponential moving average of the student, predicts on each view and we build $K$ stroma graphs. An edge enters the target set $\mathcal{E}^\ast$ only if its path is matched, within a few pixels' tolerance, in at least $\tau K$ of the graphs. Here $\tau$ is a fixed agreement fraction that we sweep once on source validation data. This rule replaces TopoSemiSeg's hand-set persistence threshold with a criterion that has a physical meaning: real stroma should not depend on the stain.
The third component is the critical-pixel consistency loss. For a student prediction $p$ on a randomly chosen view, we penalize foreground probability along the paths of stable teacher edges, weighting most heavily the pixels where the student's own skeleton breaks the edge:
$$ \mathcal{L}_{\text{graph}} = \frac{1}{|\mathcal{E}^\ast|}\sum_{e \in \mathcal{E}^\ast} \sum_{i \in \text{path}(e)} w_i \, p_i , $$
Here $p_i$ is the student's gland probability at pixel $i$. The weight $w_i$ is large at the critical pixels where the student's foreground connects across edge $e$, which is the BoRT construction transplanted from labels to teacher graphs, and small elsewhere on the path. A symmetric term discourages spurious stroma edges that the teacher graphs do not support. The total objective is supervised loss on labeled source images plus $\lambda \mathcal{L}_{\text{graph}}$ on unlabeled target images. The cost is one skeletonization per view, which is linear in pixel count. This avoids the persistent-homology overhead flagged as a scaling bottleneck in the file.
The fourth component tests the mimicry link. We fit a deliberately simple, interpretable benign-versus-malignant classifier, logistic regression, on graph statistics computed from ground-truth GlaS masks. The statistics are gland count per area, mean gland area, stroma-graph degree distribution, and the fraction of glands containing more than one lumen. We then apply this frozen classifier to graphs built from each model's predictions on shifted images and count label flips. If shift manufactures mimics, flips should run disproportionately from benign to malignant, and they should be explained by missing stroma edges rather than by other error types.
Baselines
The naive reference point is a UNet with a ResNet-18 encoder trained with Dice plus cross-entropy and ordinary color jitter. This is the same architecture the multi-scanner paper uses, which reports in-domain mIoU of 0.82–0.86 and a cross-domain drop of up to 0.38 (Multi-Scanner Canine Cutaneous SCC Dataset). It anchors how much damage shift does without any intervention.
The stain-only baseline is the same UNet trained with HistAuGAN augmentation. It isolates how much of the gap stain diversity closes before any topological term is added. HistAuGAN reports mixing Camelyon17 centers from mLD 0.20 to 0.85 but gives no segmentation number. For segmentation under shift, we found no reported result on Lacuna.
The supervised-topology baselines are TA-Net and the Skea-Topo loss, each trained with HistAuGAN augmentation. They test whether enforcing topology against labels, without target data, is enough. TA-Net's in-domain CRAG result is reported only as a relative gain of 35% Obj-H over its contour variant. Skea-Topo has no reported histology or cross-domain number.
The strongest competitor is TopoSemiSeg. We give it exactly the same unlabeled target images and the same HistAuGAN and CycleGAN views as our method, so the only difference is how topological agreement is measured. Its reported in-distribution CRAG result at 20% labels is Betti Matching Error 8.575 and object Dice 0.898. The comparable figures are 10.900 for XNet and object Dice 0.928 for full supervision. For TopoSemiSeg under cross-domain evaluation, we found no reported result on Lacuna.
Two ablations isolate our ingredients. The first is pixel consistency: mean-teacher Dice consistency across the same re-stained views. It asks whether any cross-style consistency would do, or whether the graph matters. The second keeps our pipeline but swaps the stability filter for a fixed probability threshold, and separately swaps the location-anchored edge loss for persistence matching.
All methods share the backbone, the labeled split, the unlabeled pool, the augmentation views, the number of training iterations, and a tuning budget of the same number of hyperparameter trials, all selected on source-domain validation only. Every model is run with three seeds. Beating the strongest baseline means a lower cross-domain Betti Matching Error than TopoSemiSeg-with-views, with seed-level confidence intervals that do not overlap. Object Dice must also be no worse, and benign-to-malignant flips must be fewer.
Why not just…?
Why not just use stain augmentation or normalization and keep a standard loss? This is the first thing the stain-only baseline measures, and it is a real threat. HistAuGAN is clearly better than color jitter at mixing domains for classification. However, its own evaluation never checks whether thin boundaries survive the re-styling. Skea-Topo's results suggest that pixel losses sever thin structures even in-domain. If HistAuGAN plus a UNet already brings cross-domain Betti Matching Error down to in-domain levels, the diagnostic half of our claim fails, and we would report that as the finding.
Why not just train a bigger backbone or a foundation model? The file gives two reasons to doubt this. ViTs lose up to 18% under CycleGAN recoloring (From Modern CNNs to Vision Transformers). Vanilla SAM reaches only 15.60% mIoU on OCT1600 and 24.03% on OCTA-500 for low-contrast curvilinear structures (CaPro). We nonetheless include a ConvNeXt-L-encoder UNet with HistAuGAN augmentation as a capacity check. If it matches our method's topological error, the problem is capacity rather than objective, and the method claim is withdrawn.
Why not just run TopoSemiSeg with the same augmented target data? This is the most serious alternative, which is why it is the strongest baseline rather than a straw man. Our argument for the graph is specific. Persistence diagrams cannot tell which strip of stroma was lost, so a student can fix one merge while creating another and still be scored as consistent. A fixed threshold also cannot adapt to a scanner that lowers contrast everywhere. The location-free ablation tests the first point directly, and the fixed-threshold ablation tests the second. If neither ablation hurts, then our contribution reduces to the diagnosis plus "use target-domain views", and we would say so.
Why not just enforce pixel-level consistency across re-stainings? Mean-teacher consistency is cheaper and requires no skeleton. Its weakness is that it spreads its penalty over all pixels, and the interiors of large glands dominate that sum. A one-pixel stromal gap contributes almost nothing even though it changes the graph. The pixel-consistency ablation settles this. If it matches our Betti Matching Error, the topology-specific machinery is unnecessary.
Proposed Experiments
We use three shift settings. The first is synthetic stain shift: we train on GlaS or CRAG and test on the held-out split recolored by CycleGAN and by HistAuGAN stain codes held out from training. The second is cohort shift between GlaS and CRAG, in both directions, and our labels for these come from the respective datasets. Neither dataset paper in the file documents the acquisition details, so we describe this as a cohort difference rather than a known scanner difference. The third is pure hardware shift on the canine multi-scanner dataset. Each of the five scanners serves in turn as the target. Unlabeled target tiles are drawn from sections not used for evaluation, and registered annotations provide exact ground truth. The canine annotations mark tumor regions rather than glands, so there we measure component and hole topology of the tumor and non-tumor partition rather than gland graphs. Separately, as an upper-bound ablation, we replace synthetic views with the real registered scanner pairs that this dataset uniquely provides. Comparing the two tells us whether HistAuGAN's re-stainings preserve thin stroma, which was the unverified assumption flagged in Gap 3.
The metrics are object Dice and Obj-H, the object-level Hausdorff distance, following the GlaS protocol (GlaS Challenge). We add Betti Matching Error, counts of merged and split glands, mIoU on the canine data, and the benign/malignant flip rate from the frozen graph classifier on GlaS.
The diagnostic experiment runs first and decides whether the rest is worth doing. For the naive and stain-only baselines, we plot the relative increase in Betti Matching Error against the relative drop in object Dice across shift severities. We also measure what fraction of new errors lie on critical stroma pixels and what fraction of flips go from benign to malignant. If topological error does not outpace pixel error, or if flips are symmetric, then the mimicry hypothesis is false. The project would then be reduced to a standard robustness comparison.
If the diagnosis holds, the method experiment compares all baselines and ablations under the matched budget described above. The decisive result is a pattern of four outcomes together. Our method beats TopoSemiSeg-with-views on cross-domain Betti Matching Error and on flip rate. The location-free and pixel-consistency ablations lose most of that advantage. The gain is largest on the low-contrast canine scanner targets, where Gap 4 predicts that gradient-driven boundary extractors fail most. Finally, synthetic views come close enough to the real-pair upper bound that the method is usable when paired scans do not exist, which is the usual case in clinical deployment.
References
- Enhancing Boundary Segmentation for Topological Accuracy with Skeleton-based Methods
- Semi-supervised Segmentation of Histopathology Images with Noise-Aware Topological Consistency
- TA-Net: Topology-Aware Network for Gland Segmentation
- From modern CNNs to vision transformers: Assessing the performance, robustness, and classification strategies of deep learning models in histopathology
- Multi-scanner Canine Cutaneous Squamous Cell Carcinoma Histopathology Dataset
- Structure-Preserving Multi-domain Stain Color Augmentation Using Style-Transfer with Disentangled Representations
- Discordance, accuracy and reproducibility study of pathologists’ diagnosis of melanoma and melanocytic tumors
- Predicting Stroke Through Retinal Graphs and Multimodal Self-supervised Learning
- Deep learning-based identification of necrosis and microvascular proliferation in adult diffuse gliomas from whole-slide images
- Analyse des Herzkranzgefäßbaums für die prä- und post-operative Diagnose
- CaPro: Curvilinear-aware Prompt Learning with Single Unlabeled Image for Cost-effective Curvilinear Structure Segmentation
- Gland segmentation in colon histology images: The glas challenge contest