When a pathologist clicks on a point in a tissue image, the click is ambiguous. The same pixel belongs to a nucleus, to the cell around it, to a gland or tumor nest, and to a tissue compartment such as "cancer area" or "stroma." Promptable segmentation models such as SAM (the Segment Anything Model, which turns a click into a mask) settle this ambiguity by guessing, and they guess unstably. Shifting the click by a few pixels can flip the output from a part to a whole (TETRIS, Moskalenko et al.). Prototype classifiers explain a decision by showing the stored examples a region "looks like." They could make that choice visible, but in pathology they are flat, working at a single scale, and they are fragile.
We propose a model in which every click resolves to a path through a tree of prototypes: "this nucleus matches tumor-cell prototype 7, which sits inside a region matching cancer-area prototype 2." A prototype here is a learned feature vector backed by real training patches the user can inspect. Each tier of the answer is one match against a persistent, nested prototype hierarchy, so it is both the segmentation and its case-based justification. The user resolves the ambiguity by choosing a tier on the path rather than by re-clicking. The central bet is that tying each fine-scale prototype to a parent prototype in a lower-magnification view does three things: it makes tier assignments stable under click jitter, it keeps cell-level predictions consistent with tissue context, and it makes prototype matches harder to hijack. It should do this without giving up the accuracy that opaque context-injection models get from tissue context.
Core Claim
A cell-level prototype should only "fire" where its parent tissue prototype also fires in the surrounding low-magnification context. Let $z_{hi}(x)$ be the high-magnification feature at location $x$, and $z_{lo}(\pi(x))$ the low-magnification feature at the location $\pi(x)$ that contains $x$. Let $p_c$ be a child (cell) prototype and $p_{a(c)}$ its assigned parent (tissue) prototype. Let $\mathrm{sim}$ be the similarity used by part-prototype networks and $\sigma$ a sigmoid. The child's evidence at $x$ is then
$$s_c(x) = \mathrm{sim}\big(z_{hi}(x), p_c\big)\cdot \sigma\Big(\mathrm{sim}\big(z_{lo}(\pi(x)), p_{a(c)}\big) - \tau\Big),$$
where $\tau$ is a learned threshold. This containment gate is the key ingredient. Everything else (the backbone, how masks are produced, the aggregation of evidence) is borrowed. Our claim is that this gate, kept at inference, turns tissue context from a hidden feature, as in OCELOT, into an auditable step of case-based reasoning. It also directly reduces tier-flipping under clicks.
Where This Sits
Several papers motivate the gap. OCELOT pairs cell points with tissue masks. It shows that 93% of tumor cells lie inside annotated cancer areas, and that injecting low-magnification tissue predictions into a cell detector lifts mean F1 from 64.44 to 71.23. Its architecture, however, is an opaque dual-branch DeepLabV3+. ADPv2 provides a three-level, 32-label colon tissue taxonomy but explains its VMamba classifier only with post-hoc GradCAM heatmaps. These two papers show that scale hierarchy matters clinically. Neither offers case-based explanations.
Other papers supply parts of the method. HiPoSeg keeps parent and child prototypes aligned with a margin constraint and a top-down curriculum. It found that unconstrained multi-level losses interfere with each other, but it throws the prototypes away after training. We reuse its alignment and curriculum and keep the prototypes as the inference-time explanation. P²SAM and SPROUT convert prototype similarity maps into point prompts for SAM. P²SAM clusters a reference object into a flat number of parts, and SPROUT uses slide-level color centroids at the nucleus scale only, filtered by partial optimal transport. We reuse their prompt-generation step so that each tier's mask can be refined by SAM, but our prototypes form an explicit cell-inside-tissue tree. Proto2Seg lets pathologists name flat clusters of tissue prototypes. We adopt that labeling workflow to name prototypes at each tier. PhraseClick disambiguates clicks with text. We instead disambiguate with visual prototype cards, because words like "gland" hide the benign-versus-malignant differences that make the GlaS challenge hard on its malignant test split.
Three papers constrain the design. Hoffmann et al. show that small perturbations can move ProtoPNet prototype matches to absurd regions, with 99.5% attack success for a ResNet-18 on CUB, and that adversarial training cuts accuracy from 75.8% to 56.3%. We therefore do not rely on adversarial training, and we test whether the containment gate raises the cost of such attacks. The part-prototype evaluation paper shows that part prototypes attach inconsistently to different structures across images and that negative final-layer weights produce paradoxical reasoning. We adopt its consistency metric and its non-negative score aggregation. ProtoMask reduces background shortcuts by cropping inputs to SAM masks, but it reports instability when masks are inconsistent across images. That is an argument against making our prototypes depend on externally produced masks, so our gate relies on learned tissue prototypes instead. ProtoEHR builds a similar code-to-visit-to-patient prototype hierarchy for health records, which suggests the nesting idea transfers, but it has no spatial grounding.
Research Program
We will build a two-tier model (nucleus/cell and tissue compartment) on OCELOT's paired high- and low-magnification fields. We will then extend it to a three-tier model (nucleus, gland, tissue class) using GlaS gland masks and ADPv2's taxonomy. The encoder is a frozen self-supervised model, trained with SimCLR on unlabeled patches as in Proto2Seg, with a shared projection head for both magnifications. Prototypes at each tier are initialized by clustering. Each child is assigned to a parent by the co-occurrence of their matches, then trained with the gated score above, HiPoSeg's parent-child margin, and non-negative aggregation.
After training, prototypes are projected onto their nearest real training patches, and a pathologist names them in a Proto2Seg-style labeling session. At inference, a click returns the matched prototype at every tier together with a mask for each tier. The mask comes from the connected component of the similarity map that contains the click, optionally refined by feeding prototype-derived points to SAM.
Baselines
The naive reference is SAM (and MedSAM) with a single click, using its default output. It shows how much ambiguity and instability exist before any intervention. MedSAM's reported AJI on MoNuSeg is 0.502, against 0.621 for SPROUT (SPROUT).
For cell detection, the strongest existing method is OCELOT's Pred-to-inter-2 tissue-injection model, with a reported mean F1 of 71.23 against 64.44 for the cell-only baseline (OCELOT). We will retrain it on the same splits with the same frozen encoder where possible and the same tuning budget. Beating it is not required. Coming within about two F1 points while adding faithful case-based explanations counts as success. Exceeding 71.23 would be a bonus.
The strongest competitor for click disambiguation is "segment then explain." SAM's three multi-mask outputs are shown to the user, and each candidate is labeled by an independent flat prototype classifier trained at the matching scale. It gets the same encoder, the same prototype budget, and the same pathologist naming time.
The decisive ablation keeps our full model and removes only the containment gate, by setting the parent factor to 1. This yields independently trained prototypes at two scales with HiPoSeg alignment but no inference-time nesting, and it isolates whether the gate is doing the work.
For hierarchical classification on ADPv2, the reference is the reported fine-tuned VMamba mAP of 0.88 (ADPv2). For gland segmentation on GlaS, the reference is the challenge's top F1 of about 0.91 on Test Part A (Sirinukunwattana et al.). The file reports no clean Part B number, so we report Part B relative to our own rerun of the baselines.
Why not just…?
Why not just use SAM's multi-mask output and let the pathologist pick? This is the most serious threat. For raw mask quality on a single image it may match us. What it cannot do is keep the choice stable: TETRIS shows the candidates themselves shift tiers under small click moves (Moskalenko et al.). Its candidates also carry no semantic identity that could be audited across patients. The jitter and cross-patient consistency experiments below settle this directly. If segment-then-explain matches us on tier stability and consistency, we will drop the gated architecture and adopt that simpler pipeline, with the prototype classifier as the explanation layer.
Why not just use OCELOT's dual-branch model with GradCAM? It likely wins on raw F1. However, a heatmap does not say which tissue context the cell decision used, and post-hoc maps tend to smear into background, as ProtoMask's object-overlap comparisons suggest (Meinert et al.). The comparison is framed as an accuracy-versus-faithfulness trade-off, and deletion tests will show whether GradCAM's context attribution matches what the model actually relies on.
Why not just train flat prototypes at each magnification? That is exactly our no-gate ablation. HiPoSeg's finding of interference between unconstrained levels predicts that it will lose, but the prediction is untested in pathology. If the ablation matches the full model on consistency and attack robustness, the nesting claim fails.
Proposed Experiments
The first decisive check is click stability. We adapt TETRIS's adversarial click search to OCELOT and GlaS by searching over clicks within a 5-pixel radius inside each annotated nucleus and gland. We measure the tier-flip rate, meaning how often the returned tier or prototype changes. We predict that the gated model flips markedly less often than SAM and than segment-then-explain. The file reports no TETRIS numbers for pathology, so every rate will be measured fresh.
The second check is cross-tier consistency. We measure the fraction of cell predictions whose parent prototype agrees with OCELOT's tissue label at that location, compared against the 93% prior. We also compute the prototype consistency score from the part-prototype evaluation paper across patients.
The third check is robustness to a cross-tier version of Hoffmann's attack. We use PGD to push a tumor-cell prototype match into stroma while holding the prediction fixed, and compare attack success with and without the gate, both at matched clean accuracy.
Accuracy is reported as cell F1 on OCELOT, AJI on MoNuSeg, object F1 on GlaS Parts A and B, and hierarchical mAP on ADPv2. Finally, a small reader study has pathologists judge whether each returned prototype path is anatomically correct for held-out clicks, blinded to condition.
The proposal succeeds if the gate reduces tier flips and cross-tier inconsistency while cell F1 stays within about two points of 71.23. It fails, and we would report the simpler pipeline instead, if segment-then-explain or the no-gate ablation matches it on stability and consistency.
References
- TETRIS: Towards Exploring the Robustness of Interactive Segmentation
- OCELOT: Overlapped Cell on Tissue Dataset for Histopathology
- ADPv2: A Hierarchical Histological Tissue Type-Annotated Dataset for Potential Biomarker Discovery of Colorectal Disease
- Hierarchical Prototype Learning for Semantic Segmentation
- Part-aware Prompted Segment Anything Model for Adaptive Segmentation
- Supervise Less, See More: Training-free Nuclear Instance Segmentation with Prototype-Guided Prompting
- Human-Machine Interactive Tissue Prototype Learning for Label-Efficient Histopathology Image Segmentation
- PhraseClick: Toward Achieving Flexible Interactive Segmentation by Phrase and Click
- Gland segmentation in colon histology images: The glas challenge contest
- This Looks Like That... Does it? Shortcomings of Latent Space Prototype Interpretability in Deep Networks
- Evaluation and Improvement of Interpretability for Self-Explainable Part-Prototype Networks
- ProtoMask: Segmentation-Guided Prototype Learning
- ProtoEHR: Hierarchical Prototype Learning for EHR-based Healthcare Predictions