Manuscript Offprint
arXiv:2611.04337Mitigating Spatial Blindness in Multiple Instance Learning for Whole-Slide Image Analysis
arXiv:2611.04337v1
Medical Image Analysis (2026)

ELSEVIER
Contents lists available at ScienceDirect
Medical Image Analysis
journal homepage: www.elsevier.com/locate/media

Mitigating Spatial Blindness in Multiple Instance Learning for Whole-Slide Image Analysis
Xiangyu Li^{a,b,}, Jincheng Li^{b,d,c,}, Xing Xie^{b,e}, Bin Guan^{b,f}, Shaohua Kevin Zhou^{c,d,†}, Rui Yan^{c,d,1,†}, Ran Su^{a,†}
College of Intelligence and Computing, Tianjin University, Tianjin, China
Shanghai Artificial Intelligence Laboratory, Shanghai, China
School of Biomedical Engineering, University of Science and Technology of China, Hefei, China
Medical Imaging, Robotics, Analytic Computing & Learning (MIRACLE) Lab, USTC Suzhou Institute for Advanced Research, Suzhou, China
Engineering Training Center, Nantong University, Nantong, China
School of Information Science and Engineering, University of Jinan, Jinan, China
Keywords: Computational pathology, Whole-slide images, Multiple instance learning, Spatial modeling
ABSTRACT
Whole-slide multiple instance learning can predict diagnostic and prognostic labels from tissue composition while making limited use of spatial organization. Providing coordinates or a graph does not establish that a trained predictor uses tissue neighborhoods. We examine this gap as spatial blindness and hypothesize that early composition learning can weaken supervision of a spatial pathway. We introduce ResTopoMIL, which freezes a learned composition predictor before training a graph residual with a coordinate-reassignment separation loss. Permutation and information analyses distinguish architectural symmetry, available spatial information and the proposed optimization mechanism. On a controlled spatial task, staged training achieved an AUC of 0.987, compared with 0.684 for the same jointly trained architecture. Performance remained high on a composition-only task. Across four WSI classification and five survival benchmarks, ResTopoMIL improved mean primary performance on eight tasks; four improvements remained significant after Holm-adjusted patient-cluster tests. Coordinate-free residual controls recovered some of the gains, while neighborhood destruction reduced performance close to the composition anchor. Neighborhood-preserving transformations and anatomy-stratified perturbations further characterized this dependence. These results support fixing a composition reference as a practical intervention for learning spatial corrections, while retaining additional appearance capacity as a contributing explanation.
© 2026 Elsevier B. V. All rights reserved.
1. Introduction
Tissue composition and spatial organization provide complementary evidence for whole-slide prediction. Multiple instance learning (MIL) addresses this task using bags of patch features and slide-level labels [1–4]. This weak supervision makes large histopathology images tractable without dense annotations [5–7].
However, a high diagnostic or prognostic score does not reveal which tissue evidence supports the prediction. Tumor abundance can be informative, whereas gland formation, invasive fronts and tumor–stroma interfaces depend on spatial relationships [8–10].
Accurate prediction from an unordered bag therefore leaves an unresolved question about spatial learning. Attention pooling is invariant to instance order, and self-attention without positional encoding is equivariant before invariant readout [11–13]. These properties allow rich appearance statistics to support prediction without physical coordinates. They do not imply that every order-invariant model ignores space. A graph predictor
Corresponding authors: Shaohua Kevin Zhou, Rui Yan and Ran Su.
Xiangyu Li and Jincheng Li contributed equally to this work and share first authorship.
(a) Spatial Blindness of Traditional MIL

(b) Our Decoupling Framework

(c) Coordinate-reassignment diagnostic
Fig. 1: Motivation and coordinate-reassignment diagnostic. (a) Coordinate-free MIL receives the same appearance multiset after coordinate reassignment and therefore gives the same prediction; joint relabeling of paired features and coordinates is a different operation. The schematic AUC values are illustrative. (b) ResTopoMIL separates a composition reference from a graph correction constrained to distinguish intact from disrupted neighborhoods. (c) The TCGA-BRCA diagnostic holds patch embeddings fixed while reassigning coordinates. Near-invariance is expected when a model's effective inputs do not change; it does not itself establish failed spatial learning. Table 6 tests spatial baselines with rebuilt coordinate-derived inputs.
can remain invariant to node relabeling while depending on its adjacency. The relevant intervention changes feature–coordinate associations, rather than merely changing the order in which paired instances are listed.
Spatial architectures provide access to neighborhoods, but access alone does not establish learned use. Graph networks, positional Transformers, hierarchical aggregators and state-space models introduce spatial or contextual pathways [14–20]. Their predictors can still exploit appearance signals that are easier to learn. We use spatial blindness to describe weak prediction or performance response to neighborhood destruction on a structure-dependent task. Figure 1(c) motivates this behavioral distinction, while comparisons with spatial baselines explicitly rebuild their coordinate-derived inputs. The unresolved gap concerns how training can increase useful neighborhood dependence beyond simply adding another prediction branch.
Our optimization hypothesis is that composition can reduce prediction error before a spatial pathway learns useful relations. For additive logits, the supervised graph update is multiplied by the model's current prediction error. This creates a conditional route to weak spatial supervision, consistent with shortcut-learning and gradient-starvation accounts [21–24]. The gradient identity motivates an intervention; it does not prove that composition always learns first or that freezing must increase gradients.
ResTopoMIL fixes a composition reference before learning a graph-conditioned correction (Figure 1). A prototype histogram first predicts from the appearance multiset. After this predictor is frozen, a graph branch learns residual logits, while a margin loss separates intact and coordinate-reassigned graph representations. This design makes the training schedule testable within the same architecture and makes neighborhood dependence testable independently of appearance capacity.
The contributions of this study are threefold:
-
We formulate spatial blindness as weak neighborhood dependence in WSI MIL and distinguish it from permutation symmetry. A conditional gradient analysis motivates the proposed optimization hypothesis.
-
We introduce ResTopoMIL, which freezes a prototype-based composition predictor before learning an additive graph residual. A coordinate-reassignment separation loss encourages the graph branch to distinguish intact from disrupted neighborhoods.
-
We evaluate the intervention using controlled composition and spatial tasks, nine WSI prediction benchmarks and matched ablations. Coordinate-free residual controls, neighborhood perturbations and anatomy-stratified tests distinguish spatial dependence from additional appearance capacity.
2. Related work
2.1. Appearance aggregation under slide-level supervision
MIL learns bag predictions without requiring a label for every instance. Early pathology methods combined patch classifiers, clustering, global pooling or multi-view CNN representations [25–30]. Attention MIL learns instance weights within an order-invariant readout [4, 11]. Later approaches use dual streams, bag distillation, hard-instance mining and attention regularization to improve discrimination [31–40]. These methods show that appearance aggregation is a strong predictive baseline, making its contribution essential to isolate when evaluating spatial models.
Stronger patch encoders increase the information available to any aggregator. Pathology foundation models and self-supervised representations improve local embeddings [41–46]. Vision-language and prompt-based methods also broaden slide supervision [47–51]. We therefore hold the patch encoder fixed within each comparison and evaluate classification with both UNI and CTransPath. This protocol targets aggregation and training rather than additional encoder capacity.
2.2. Spatial and contextual aggregation
Structured MIL recognizes that relations between instances can affect bag labels [52, 53]. Graph methods represent tissue as a point cloud or neighborhood graph [14–16, 54]. Transformers and low-rank attention model interactions across large bags [17, 18, 55–57]. Hierarchical and context-aware methods exploit WSI pyramids and regional organization [58–63], while state-space models address long-sequence computation [19, 20, 64]. Our question complements these architectural developments by testing whether a trained predictor uses the spatial input it receives.
2.3. Spatial learning and optimization
Prior work has explicitly examined order symmetry and positional information. Chen et al. [13] analyzed these properties and proposed restoring instance arrangement through a Siamese formulation. NcIEMIL addressed feature-extraction and aggregation redundancy using filtering and spatial/channel attention [65]. ResTopoMIL instead tests a training intervention when appearance and graph pathways coexist. Its permutation arguments build on established set-model analysis, rather than constituting a new general theory of MIL.
The intervention combines established representation ideas with a different optimization schedule. Deep Sets, histograms and morphological prototypes motivate the composition reference [12, 66–68]. Shortcut learning motivates testing whether easy signals dominate joint training [21, 24]. Conditional-information identities describe what remains beyond a fixed reference [69, 70]. The contribution lies in connecting these ideas through a staged model and evaluating its neighborhood dependence under matched controls.
3. Problem formulation and analysis
The analysis separates three questions: what a model can represent, what spatial information is available, and what optimization may encourage it to learn. This distinction prevents permutation symmetry from being treated as proof of spatial blindness.
3.1. Permutation symmetry and neighborhood dependence
A slide is a paired bag , where is a patch feature and its coordinate. Let and stack these quantities by row. The appearance multiset is . Composition denotes statistics of , whereas spatial organization depends on the feature-coordinate pairing.
Proposition 1 (Permutation symmetry does not imply spatial blindness). Let be a permutation matrix and an invariant readout. An equivariant coordinate-free map satisfies . An equivariant graph map satisfies
Neither identity requires invariance when A changes while H remains fixed.
Proof. Attention pooling provides a coordinate-free example. For a shared scorer , define and . Its pooled representation obeys
because . Shared gated scorers have the same property [11].
Self-attention without positional encoding is equivariant before pooling. Let , and . Row-wise softmax satisfies , including permutation of each row's normalization sum. Consequently,
Shared tokenwise feed-forward maps, activations and layer normalization preserve equivariance. Invariant pooling gives an invariant bag predictor. A class token is handled with , which leaves its output row unchanged [13].
For a GCN, let . Joint relabeling gives and . Each shared-weight layer satisfies
Induction establishes stack equivariance, and invariant readout gives Eq. (1).
Coordinate reassignment tests a different property from joint relabeling. For an equivariant graph constructor with consistently resolved distance ties, . Reindexing together preserves the paired bag. Holding fixed and permitting only instead changes which appearances occupy adjacent locations. The coordinate set and unlabeled geometric graph remain unchanged, but feature–neighborhood associations differ. Proposition 1 imposes no equality between the resulting predictions. These symmetry statements assume deterministic evaluation and do not describe stochastic dropout differences.
3.2. Positional access does not ensure learned sensitivity
Positional encoding can remove an architectural invariance guarantee without guaranteeing different predictions. For an invariant aggregator F and slot-attached encodings E,
The right-hand side need not equal . However, distinct inputs can share an output. Mean pooling gives the counterexample
Repeated encoding rows can also admit nontrivial invariant permutations. Conversely, jointly permitting features and their encodings preserves the output of any invariant .
Sensitivity must therefore be evaluated for the trained model and the intervention actually supplied. Physical-coordinate reassignment may leave a padded positional grid unchanged. Such a model is an input-preserving control in that test, rather than evidence that its positional module failed to learn. Spatial baselines are evaluated by rebuilding their graph or coordinate-derived sequence.
3.3. Spatial information beyond appearance
An appearance predictor can be accurate even when coordinates contain additional label information. Since is a deterministic projection of , standard conditional-information identities yield
For discrete labels, this also equals [13, 70]. It vanishes precisely when these posteriors agree almost surely.
Positive conditional information establishes a potential reduction in optimal expected log loss. It does not require a strict reduction in zero-one classification error, because the most probable class may remain unchanged. A predictor with access to X can always ignore coordinates, so its optimal classification risk cannot exceed that using B. Neither statement guarantees that a finite-data network learns the available spatial signal. We reserve spatial blindness for weak behavioral dependence on neighborhoods on a task where those neighborhoods matter.
3.4. A conditional optimization hypothesis
An additive predictor exposes one route by which composition may weaken spatial supervision. Write
This logit decomposition does not identify separate appearance and topology factors. The graph term can also encode appearance information omitted by the statistical predictor.
Proposition 2 (Residual-error gating of the graph update). For binary cross-entropy, let . Assume finite second moments and valid interchange of differentiation and expectation. Then
and
Proof. Set . Differentiating the binary loss with respect to f gives . The chain rule gives Eq. (9). The norm inequality and Cauchy–Schwarz give Eq. (10).
The bound contracts if composition reduces the squared prediction error early while the graph Jacobian remains bounded. This condition motivates testing whether a fixed composition reference improves subsequent graph learning. It does not establish that composition always learns first or compare staged and joint gradient magnitudes. The toy experiment tests the schedule within one architecture, while gradient traces and WSI controls examine its empirical consequences.
4. ResTopoMIL
ResTopoMIL separates a fixed composition reference from a trainable graph correction. Figure 2 shows the three design choices needed for this intervention: an order-invariant anchor, staged additive prediction and a coordinate-specific representation constraint. The constraint tests graph dependence beyond the residual objective itself.
4.1. A prototype histogram as the composition reference
The statistical stream estimates how much the appearance multiset explains without coordinates. A constrained prototype histogram provides an inspectable reference without assuming that it exhausts all appearance information. Let be a learnable codebook. For each patch, the soft assignment is
The temperature controls assignment sharpness. Averaging gives the bag histogram and statistical logits,
The histogram records soft prototype proportions, rather than diagnostic class probabilities or spatial locations. Its entries sum to one because each patch assignment is normalized.
Prototype frequencies summarize recurring appearance patterns [68]. MiniBatch K-Means initializes the codebook from training patch embeddings, after which both the prototypes and temperature are learned. A 512-dimensional hidden representation precedes the statistical prediction head. Anchor-convergence tests examine the warm-up duration, and coordinate-free residual controls quantify usable appearance information omitted by this reference.
4.2. A graph-conditioned correction
The graph stream gives the correction access to physical neighborhoods while retaining the same patch features. Each patch forms a node, and a coordinate KNN graph supplies the adjacency A. We use two GCN layers,
where , is its degree matrix and . Global mean pooling and a linear head give
Coordinate neighborhoods distinguish visually similar patches occupying different tissue contexts. The default graph has eight nearest neighbors per node before self-loops, and its hidden features have dimension 512. ReLU and dropout with probability 0.25 follow the graph transformations. The shallow branch remains fixed in the joint-versus-staged comparison, allowing the training schedule to be evaluated without changing architecture.

Fig. 2: ResTopoMIL framework. A frozen patch encoder supplies shared appearance features. The statistical stream averages soft prototype assignments into a composition histogram and is trained in Stage 1, then frozen in Stage 2. The topological stream constructs KNN graphs from intact and reassigned coordinates and processes both views with a shared, trainable two-layer GCN. A margin loss separates their pooled representations. The statistical and intact-graph prediction logits are added before probability conversion, as specified in Eq. (15). The reassigned view and separation loss are used only during training; inference uses the intact graph.
4.3. Additive logits with a fixed reference
Fixing the anchor prevents the composition predictor from changing throughout residual learning. Stage 1 trains the statistical stream alone for ten epochs. Stage 2 freezes its codebook, temperature, MLP and prediction head, then optimizes the graph branch through
where sg stops gradients. Both heads produce logits in the same output space. Classification probabilities are obtained only after summation, using Softmax for multiclass prediction or a sigmoid for a single binary logit.
The residual is defined by the predictive objective, rather than by subtracting hidden features or fitting a separate residual label. The supervised error evolves as the graph learns, but the anchor cannot absorb changes in that error. Larger graph learning rates, statistical dropout, curricula and hard-instance mining alter joint optimization while leaving the reference trainable. Table 5 compares these interventions. Freezing changes the learning problem, although Proposition 2 provides no guarantee that its gradients are larger.
4.4. Separating intact and reassigned neighborhoods
Residual prediction alone can recover appearance information that the anchor missed. We therefore use a coordinate-specific constraint to discourage the graph stream from ignoring its adjacency. A corrupted bag retains and reassigns coordinates as , after which the KNN graph is rebuilt. The same trainable GCN processes both views and produces and .
The auxiliary objective separates these representations using a cosine-distance margin,
The loss decreases as similarity falls, and vanishes once the cosine distance reaches m. At the default m = 0.3, the zero-loss condition is similarity at most 0.7. This is a separation constraint without an explicit positive-pair attraction term. Coordinate reassignment is not assumed to preserve the tissue label.
Supervision uses the intact view, while the reassigned view enters only the representation comparison. The Stage-2 classification objective is
Survival prediction replaces classification loss with the discrete-time survival objective. A deterministic graph-ignoring representation cannot distinguish the two views, but representation separation alone does not ensure that prediction uses the difference. Inference therefore uses only the intact graph and sums the two logits once; perturbation experiments test the learned predictor's dependence on neighborhoods.
4.5. Information captured beyond the anchor
The residual objective targets information beyond a fixed reference without identifying that information as spatial. Let and denote the branch representations as random variables. The chain rule gives
Stage 2 fixes the first term, while the graph branch and its head parameterize
For binary prediction, the positive-class probability is .
Proposition 3 (Residual conditional-information bound). With and fixed, minimizing the decoder's cross-entropy maximizes the variational lower bound
Proof. Let . The decoder's expected cross-entropy decomposes as
Nonnegative KL divergence bounds the conditional entropy by cross-entropy. Substitution into gives Eq. (20). The first term is constant during Stage 2, so maximizing this lower bound is equivalent to minimizing the expected negative log likelihood.
Increasing the bound does not itself guarantee an increase in true conditional mutual information. The graph representation can also encode omitted appearance statistics. Equation (16) supplies a separate spatial constraint, while coordinate-free residuals, graph perturbations and anatomical tests assess the interpretation empirically.
5. Experiments
The experiments test the argument at three levels. Controlled bags isolate composition from spatial labels, WSI benchmarks measure predictive utility, and matched ablations and perturbations examine the source of the gains. This order separates successful prediction from evidence of neighborhood use.
5.1. Evaluation protocol
5.1.1. WSI datasets and prediction tasks
Nine public WSI benchmarks cover diagnostic classification and survival prediction. TCGA-NSCLC contains 1,053 slides, comprising 541 LUAD and 512 LUSC cases, for lung cancer subtyping. TCGA-BRCA contains 1,021 slides for invasive ductal versus invasive lobular carcinoma, contrasting ductal architecture with single-file infiltration patterns. BRACS uses 525 slides in three classes: benign, atypical and malignant [71]. PANDA contains 10,616 slides for Gleason grading, where gland formation and fused-gland architecture are relevant tissue features.
Five TCGA cohorts test survival prediction: KIRC (519 slides), KIRP (259), LUAD (516), STAD (441) and UCEC (537). The cohorts span diverse morphological factors without assuming that all prognostic information is spatial. LUAD includes lepidic, acinar, papillary, micropapillary and solid growth patterns. STAD includes gland differentiation, structural abnormalities and signet-ring morphology, while UCEC includes variation in the glandular-to-solid component ratio. KIRC includes nuclear-grade variation, and KIRP includes papillary-core organization. Models predict discrete time-to-event risk over four non-overlapping intervals. CAMELYON-16 provides a separate localization evaluation using tumor masks and is not counted among the nine prediction benchmarks.
5.1.2. Controlled composition and spatial tasks
Spatial-MNIST-Bag isolates the training hypothesis without pathology-specific annotation. Each bag contains 50 digit instances represented by 512-dimensional pretrained ResNet-18 embeddings and assigned coordinates in . Dataset A samples coordinates independently from and labels a bag positive if it contains at least one digit “9”. Coordinates therefore provide no systematic label information.
Dataset B matches the digit-composition distribution across classes and varies their spatial arrangement. Each bag contains one each of “1,3,5,7,9” and 45 even digits sampled from
{0, 2, 4, 6, 8}. Background digits and individual embeddings vary across bags according to the same class-independent sampling rule. Positive bags draw a centroid and place the five odd digits around it using Gaussian noise with . Background coordinates remain uniform. Negative bags scatter all 50 instances uniformly. The positive construction encourages a compact odd-digit neighborhood; Gaussian sampling does not guarantee a particular KNN clique.
5.1.3. Preprocessing, baselines and implementation
All comparisons within an encoder setting share patch features, patient-level splits and evaluation procedures. Patient-level stratification prevents slides from the same patient appearing in training, validation and test partitions. Tissue is identified using Otsu thresholding in HSV space and divided into non-overlapping patches at magnification. The primary evaluation uses frozen 1024-dimensional UNI embeddings. UNI uses a ViT-Large architecture pretrained with DINOv2 on Mass-100K, comprising more than patches. A separate classification comparison uses frozen CTransPath features to assess consistency across encoders.
The classification and survival tables compare ResTopoMIL with AB-MIL, CLAM-SB, DS-MIL, TransMIL, ILRA-MIL, MHIM-MIL, DGR-MIL and 2DMambaMIL. DTFD-MIL is additionally included in the localization comparison. PatchGCN supplies a graph baseline in the coordinate-reassignment diagnostic. Optimizer family, preprocessing and evaluation protocols are matched within the reported comparisons.
The default model uses , , and . Prototype initialization uses MiniBatch K-Means on a random subset of training patches; the learnable temperature starts at 1.0. After ten statistical warm-up epochs, refinement trains the graph branch for 30 classification epochs or 20 survival epochs. Optimization uses Lookahead with an Adam base, learning rate , weight decay and cosine annealing. Experiments use PyTorch 1.13, PyTorch Geometric and one NVIDIA RTX 3090 with 24 GB memory.
5.1.4. Metrics and statistical analysis
Classification is assessed with accuracy, F1 and AUC; survival prediction uses the concordance index. Unless a caption states otherwise, tables report means and standard deviations over five matched runs. Representative trajectories and endpoints without run-level dispersion are identified separately. Bold and underlined values rank reported means rather than statistical significance.
Patient-cluster inference compares each primary UNI endpoint with the baseline having the highest original mean AUC or C-index. All slides and repeated appearances of a patient are grouped, with shared weights and method-label swaps across methods and runs. We use 10,000 bootstrap samples for marginal 95% confidence intervals and 100,000 permutations for two-sided . Holm adjustment covers the nine primary endpoints. These intervals quantify patient-sampling uncertainty, while seed standard deviations describe run-to-run variability.
Table 1: Controlled composition and spatial tasks. Dataset A requires instance detection without useful coordinates; Dataset B matches digit composition and varies spatial arrangement. Bold and underlined AUCs denote the highest and second-highest reported values per task. Run-level dispersion is unavailable for these endpoints.
| Method | A: Comp. AUC | B: Topo. AUC |
|---|---|---|
| AB-MIL | 0.998 | 0.505 |
| TransMIL | 0.995 | 0.532 |
| ResTopoMIL (Joint) | 0.991 | 0.684 |
| ResTopoMIL | 0.994 | 0.987 |
5.2. Staged training recovers a controlled spatial rule
The toy tasks test whether the training schedule improves spatial learning while retaining appearance-based prediction. Dataset A rewards instance detection, whereas Dataset B removes a systematic digit-composition rule. Table 1 reports the resulting AUCs.
On Dataset B, staged ResTopoMIL achieved AUC 0.987, compared with 0.684 for the same architecture trained jointly. AB-MIL and TransMIL were near chance at 0.505 and 0.532. Both performed well on Dataset A, with AUCs of 0.998 and 0.995, respectively. ResTopoMIL retained AUC 0.994 on that composition task, although it did not exceed AB-MIL. The matched-architecture contrast isolates the schedule's contribution to learning the controlled spatial label.
5.3. Predictive utility across WSI classification tasks
The four classification benchmarks test whether the intervention has value beyond synthetic bags. Table 2 compares aggregation methods under two frozen encoders, holding the feature source fixed within each block.
With UNI, ResTopoMIL achieved the highest mean F1 on all four datasets. Its AUC margins over the strongest baseline were 0.0166 on BRACS, 0.0117 on PANDA and 0.0024 on BRCA. On NSCLC, MHIM-MIL had slightly higher AUC, 0.9759 versus 0.9753, while ResTopoMIL had higher accuracy and F1. The method's relative performance therefore depended on both task and metric.
With CTransPath, ResTopoMIL led all 12 reported dataset-metric combinations. AUC margins were 0.0135, 0.0053, 0.0075 and 0.0065 on BRACS, PANDA, NSCLC and BRCA, respectively. The model used 1.15 million trainable parameters, compared with 2.67 million for TransMIL and 4.35 million for DGR-MIL. Parameter counts describe model size and are not runtime measurements.
5.4. Survival prediction and patient-level reliability
The survival tasks evaluate transfer from diagnostic categories to time-to-event prediction. ResTopoMIL achieved the highest mean C-index on all five cohorts in Table 3. Gains were clearest on LUAD and STAD; the KIRC margin over the strongest baseline was only 0.0002.
Patient-cluster tests bounded the reliability of the primary predictive comparisons (Table 4). BRACS, PANDA, LUAD and STAD retained significance after Holm adjustment. The

(c) BRCA: Impact of Texture Loss Removal
(d) PANDA: Impact of Texture Loss Removal
Fig. 3: Gradient dynamics on BRCA and PANDA. Upper panels compare joint and staged optimization; the dashed vertical line marks the transition after ten warm-up epochs. The statistical stream is then frozen and graph training begins. Lower panels compare joint graph training with and without . The plotted gradient norms are not separated into supervised and auxiliary components and provide descriptive optimization evidence.
remaining positive estimates had confidence intervals containing zero, while NSCLC had a small negative estimate. Across classification AUC and survival C-index, mean primary performance improved on eight of nine endpoints, with statistically supported gains confined to four.
5.5. Training schedule, residual capacity and design controls
The ablations test whether gains require the proposed training schedule and exceed added appearance capacity. Table 5 contains 28 settings on PANDA and BRCA, including branch, fusion, graph and hyperparameter controls. Figure 3 provides descriptive training traces for the optimization interpretation.
Training dynamics. In the upper panels, staged training switched from the statistical stream to the graph stream after ten epochs. The graph gradient rose when graph optimization began, while the statistical gradient became zero because that stream was frozen. Joint-training graph gradients generally declined earlier and were weaker after this transition. The lower panels specifically compared joint graph training with and without ; removing the constraint produced faster gradient decay. These curves do not separate supervised and auxiliary gradients, so they do not identify the source of every gradient increase.
Schedule beyond branch capacity. The staged model exceeded joint optimization in AUC by 0.0127 on PANDA and 0.0065 on BRCA. Neither branch alone matched the complete model's AUC. Statistical dropout, curriculum scheduling, hard-instance mining and a tenfold graph learning rate narrowed the gap. Hard-instance mining was strongest among these alternatives, reaching 0.9372/0.9792 versus 0.9426/0.9838 for the default. Joint training nevertheless gave slightly higher BRCA F1, 0.9318 versus 0.9308. These comparisons support the schedule's predictive contribution without establishing superiority on every metric.
Table 2: WSI classification with frozen UNI and CTransPath (CPath) features. Entries are mean±standard deviation over five runs. Params is the trainable parameter count in millions. Bold and underlined means mark the best and second-best distinct values within each encoder block; smaller parameter counts are preferred. Ties share formatting. Rankings do not establish significance.
| Feature | Method | Params | BRACS | PANDA | TCGA-NSCLC | TCGA-BRCA | ||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| Acc | F1 | AUC | Acc | F1 | AUC | Acc | F1 | AUC | Acc | F1 | AUC | |||
| UNI | AB-MIL | .59 | .7275±.0759 | .6748±.0185 | .8806±.0091 | .7322±.0059 | .6876±.0079 | .9306±.0017 | .8988±.0066 | .8680±.0068 | .9569±.0073 | .9414±.0062 | .9187±.0106 | .9727±.0019 |
| CLAM-SB | .79 | .7371±.0182 | .7051±.0287 | .8840±.0131 | .7318±.0041 | .6814±.0050 | .9215±.0009 | .8836±.0085 | .8529±.0084 | .9635±.0064 | .9314±.0062 | .9268±.0112 | .9814±.0027 | |
| DS-MIL | 1.20 | .6460±.0189 | .6068±.0436 | .8054±.0225 | .7394±.0207 | .6911±.0231 | .9309±.0070 | .8836±.0085 | .8627±.0099 | .9579±.0083 | .9409±.0124 | .9058±.0208 | .9777±.0039 | |
| TransMIL | 2.67 | .6506±.0174 | .5592±.0398 | .8450±.0098 | .7090±.0088 | .6667±.0133 | .9288±.0038 | .8933±.0132 | .8822±.0132 | .9692±.0084 | .9409±.0095 | .9016±.0163 | .9787±.0154 | |
| ILRA-MIL | 3.68 | .6230±.0286 | .5526±.0368 | .8012±.0219 | .7402±.0096 | .6880±.0094 | .9266±.0034 | .8912±.0157 | .8829±.0159 | .9628±.0095 | .9455±.0051 | .9108±.0091 | .9621±.0148 | |
| MHIM-MIL | 2.67 | .6690±.0358 | .5874±.0508 | .8340±.0128 | .6970±.0123 | .6372±.0158 | .9155±.0020 | .8908±.0183 | .8703±.0183 | .9759±.0030 | .9465±.0095 | .9117±.0155 | .9769±.0129 | |
| DGR-MIL | 4.35 | .7126±.0363 | .6684±.0509 | .8258±.0386 | .6964±.0129 | .6399±.0178 | .9043±.0082 | .9036±.0225 | .8829±.0225 | .9390±.0224 | .9455±.0051 | .9099±.0098 | .9724±.0197 | |
| 2DMambaMIL | 1.27 | .7185±.0290 | .6710±.0450 | .8315±.0310 | .7012±.0115 | .6450±.0160 | .9105±.0075 | .9008±.0190 | .8855±.0210 | .9450±.0180 | .9490±.0060 | .9150±.0110 | .9755±.0180 | |
| ResTopoMIL | 1.15 | .7494±.0286 | .7142±.0420 | .9006±.0055 | .7546±.0094 | .7097±.0098 | .9426±.0010 | .9157±.0085 | .9135±.0087 | .9753±.0029 | .9568±.0095 | .9308±.0166 | .9838±.0049 | |
| CPath | AB-MIL | .59 | .7250±.0210 | .6415±.0225 | .8512±.0105 | .6854±.0092 | .6652±.0085 | .9185±.0042 | .8810±.0075 | .8510±.0082 | .9412±.0085 | .9250±.0075 | .9010±.0115 | .9605±.0035 |
| CLAM-SB | .79 | .7185±.0195 | .6120±.0215 | .8580±.0125 | .6820±.0088 | .6610±.0065 | .9150±.0038 | .8955±.0092 | .8580±.0095 | .9485±.0075 | .9150±.0085 | .9085±.0125 | .9685±.0045 | |
| DS-MIL | 1.20 | .7305±.0285 | .6525±.0320 | .8550±.0152 | .6815±.0065 | .6612±.0052 | .9205±.0068 | .8850±.0115 | .8530±.0098 | .9430±.0092 | .8910±.0125 | .9110±.0135 | .9622±.0041 | |
| TransMIL | 2.67 | .6150±.0185 | .5255±.0415 | .8125±.0128 | .6855±.0105 | .6420±.0150 | .9024±.0055 | .8950±.0145 | .8655±.0140 | .9515±.0075 | .9250±.0115 | .8850±.0175 | .9645±.0160 | |
| ILRA-MIL | 3.68 | .5900±.0250 | .5105±.0385 | .7850±.0210 | .7255±.0080 | .6710±.0115 | .9120±.0045 | .8820±.0165 | .8710±.0162 | .9485±.0082 | .9310±.0065 | .8950±.0105 | .9525±.0115 | |
| MHIM-MIL | 2.67 | .6350±.0380 | .5510±.0520 | .8015±.0165 | .6750±.0135 | .6155±.0185 | .8985±.0035 | .8910±.0195 | .8550±.0195 | .9610±.0048 | .9310±.0105 | .8950±.0165 | .9658±.0142 | |
| DGR-MIL | 4.35 | .6800±.0350 | .6350±.0485 | .7950±.0305 | .6720±.0145 | .6815±.0195 | .8845±.0095 | .8850±.0235 | .8650±.0245 | .9220±.0150 | .8950±.0115 | .8950±.0155 | .9605±.0210 | |
| 2DMambaMIL | 1.27 | .6905±.0285 | .6420±.0465 | .8080±.0255 | .6255±.0185 | .6815±.0125 | .8912±.0082 | .8910±.0185 | .8750±.0215 | .9315±.0195 | .9350±.0075 | .9010±.0125 | .9640±.0185 | |
| ResTopoMIL | 1.15 | .7385±.0255 | .6952±.0435 | .8715±.0085 | .7350±.0110 | .6885±.0105 | .9258±.0025 | .9010±.0095 | .8955±.0095 | .9685±.0032 | .9420±.0105 | .9150±.0175 | .9750±.0052 | |
Table 3: Survival prediction results. Each cell reports mean±std concordance index over five random seeds on five TCGA cohorts. Higher is better. Bold and underlined means denote the best and second-best values per cohort, respectively.
| Method | KIRC | KIRP | LUAD | STAD | UCEC |
|---|---|---|---|---|---|
| AB-MIL | 0.5694±.0279 | 0.7091±.0592 | 0.5942±.0120 | 0.5871±.0090 | 0.6220±.0241 |
| CLAM-SB | 0.5705±.0101 | 0.7034±.0565 | 0.6192±.0108 | 0.5829±.0243 | 0.6034±.0398 |
| DS-MIL | 0.5832±.0207 | 0.6875±.0456 | 0.5669±.0145 | 0.6090±.0187 | 0.6368±.0417 |
| TransMIL | 0.5677±.0162 | 0.7000±.0238 | 0.6148±.0124 | 0.6204±.0359 | 0.6595±.0486 |
| ILRA-MIL | 0.7276±.0271 | 0.7272±.1322 | 0.6067±.0156 | 0.6589±.0354 | 0.6767±.0308 |
| MHIM-MIL | 0.7170±.0143 | 0.8073±.0545 | 0.5491±.0205 | 0.6357±.0321 | 0.6474±.0704 |
| DGR-MIL | 0.7298±.0068 | 0.8071±.0265 | 0.6245±.0117 | 0.6625±.0122 | 0.6976±.0104 |
| 2DMambaMIL | 0.7311±.0110 | 0.8027±.0250 | 0.6290±.0095 | 0.6515±.0150 | 0.7020±.0140 |
| ResTopoMIL | 0.7313±.0104 | 0.8182±.0227 | 0.6457±.0070 | 0.6807±.0086 | 0.7058±.0128 |
Table 4: Paired patient-cluster inference against the strongest original UNI baseline. Δ is ResTopoMIL minus comparator. Confidence intervals are marginal 95% intervals; is Holm-adjusted across nine endpoints.
| Endpoint | Comparator | Δ | 95% CI | pH |
|---|---|---|---|---|
| BRACS AUC | CLAM-SB | +0.0166 | [0.0082,0.0249] | 0.0025 |
| PANDA AUC | DS-MIL | +0.0117 | [0.0063,0.0170] | 0.0016 |
| NSCLC AUC | MHIM-MIL | -0.0006 | [-0.0024,0.0012] | 1.0000 |
| BRCA AUC | CLAM-SB | +0.0024 | [-0.0015,0.0061] | 0.2582 |
| KIRC C-index | 2DMambaMIL | +0.0002 | [-0.0062,0.0067] | 1.0000 |
| KIRP C-index | MHIM-MIL | +0.0109 | [-0.0240,0.0460] | 1.0000 |
| LUAD C-index | 2DMambaMIL | +0.0167 | [0.0113,0.0221] | <0.001 |
| STAD C-index | DGR-MIL | +0.0182 | [0.0108,0.0255] | <0.001 |
| UCEC C-index | 2DMambaMIL | +0.0038 | [-0.0049,0.0121] | 0.9580 |
Appearance capacity beyond the anchor. Coordinate-free residuals improved prediction even without physical neighborhoods (Panel H). They shared anchor logits, UNI features, five patient-level splits, optimizer family and Stage-2 budget. A parameter-matched two-layer node MLP with mean pooling increased PANDA/BRCA AUC by 0.0086/0.0111 over the anchor. An AB-MIL residual reached 0.9289/0.9752, remaining 0.0137/0.0086 below the full model. The anchor therefore left usable appearance information, but these controls did not recover all graphmodel gains.
Fusion and graph design. Additive prediction gave higher PANDA AUC and higher accuracy on both datasets than the tested fusion alternatives. However, MoE, independent classifiers and Concat + MLP achieved higher BRCA AUCs, respectively 0.9897, 0.9845 and 0.9862 versus 0.9838. Replacing GCN with GAT gave similar PANDA AUC and higher BRCA AUC, 0.9419/0.9889. Training on random graphs reduced AUC to 0.8286/0.8563, while fixing the prototypes also reduced performance. The intervention was not restricted to GCN, and its default fusion was not universally optimal.
Coordinate-specific constraint and sensitivity. Removing reduced PANDA/BRCA AUC by 0.0279/0.0076 (Panel D). Across the prototype-count, neighbor-count and margin sweeps, PANDA AUC ranged over 0.9285–0.9426, 0.9312–0.9426 and 0.9325–0.9426. The defaults were not uniformly best: margin 0.4 gave BRCA AUC 0.9898, compared with 0.9838. The sweeps varied one parameter at a time and did not test interactions or loss-weight sensitivity.
5.6. Prediction depends on the supplied neighborhoods
Coordinate perturbations test whether the trained predictor uses spatial inputs. Patch embeddings remain fixed, coordinate assignments are permuted, and coordinate-derived inputs are rebuilt without retraining. Figure 4 reports progressive perturbations, while Table 6 retains endpoint comparisons for 2DMambaMIL and PatchGCN.
Performance generally declined, with local fluctuations, as shuffling increased on BRCA, PANDA, KIRP and LUAD. On PANDA, complete reassignment reduced 2DMambaMIL/PatchGCN AUC by 0.0073/0.0147, compared with 0.0374 for ResTopoMIL under identical embeddings and permutations. Mean absolute probability changes were 0.0090/0.0170 versus 0.0390; label-flip rates were 1.8%/3.2% versus 7.8%. Larger responses indicated stronger dependence on the supplied arrangement, rather than a ranking of clinical reasoning.
Table 5: Consolidated ablation on PANDA and TCGA-BRCA with UNI features. Reported dispersion is standard deviation over five matched runs. All metrics are higher-is-better; bold and underlined values denote the highest and second-highest distinct reported means in each column, respectively, without implying significance. The default uses , , and ; each sweep changes only the named parameter.
| Variant | PANDA | TCGA-BRCA | ||||
|---|---|---|---|---|---|---|
| Accuracy | F1 | AUC | Accuracy | F1 | AUC | |
| Reference model | ||||||
| ResTopoMIL (default) | ||||||
| A. Branches and optimization | ||||||
| Statistical only | ||||||
| Topological only | ||||||
| Joint optimization | ||||||
| Joint + statistical dropout | ||||||
| Joint + curriculum schedule | ||||||
| Joint + hard-instance mining | ||||||
| Joint optimization (multi-LR) | ||||||
| B. Fusion alternatives | ||||||
| Gated fusion | ||||||
| Mixture of experts | ||||||
| Concat + MLP | ||||||
| Independent classifiers | ||||||
| C. Graph and prototype controls | ||||||
| GAT backbone | ||||||
| Random graph (training control) | ||||||
| Fixed prototypes | ||||||
| D. Coordinate-specific constraint w/o | ||||||
| E. Prototype count | ||||||
| F. Graph degree | ||||||
| G. Shuffle margin | ||||||
| Margin | ||||||
| Margin | ||||||
| Margin | ||||||
| Margin | ||||||
| H. Coordinate-free residuals and inference corruption | ||||||
| Parameter-matched DeepSets residual | ||||||
| AB-MIL residual | ||||||
| Default, shuffled graph at inference | ||||||
Table 6: Spatial-baseline AUC before and after complete coordinate reassignment with fixed patch embeddings. Clean and Shuf. denote original and shuffled endpoints; . Reported endpoints have no run-level dispersion and are not five-seed aggregate estimates.
| Method | BRACS | PANDA | NSCLC | BRCA | ||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|
| Clean | Shuf. | Clean | Shuf. | Clean | Shuf. | Clean | Shuf. | |||||
| 2DMambaMIL | 0.8315 | 0.8237 | -0.0078 | 0.9105 | 0.9032 | -0.0073 | 0.9450 | 0.9418 | -0.0032 | 0.9755 | 0.9709 | -0.0046 |
| PatchGCN | 0.8738 | 0.8520 | -0.0218 | 0.9274 | 0.9127 | -0.0147 | 0.9711 | 0.9642 | -0.0069 | 0.9801 | 0.9700 | -0.0101 |
PatchGCN rebuilds its graph; 2DMambaMIL rebuilds its coordinate-derived 2D sequence. measures sensitivity, not a performance ranking.
Five-run inference corruption confirmed the contrast with coordinate-free residual capacity. Shuffling the full model's graph reduced PANDA/BRCA AUC to 0.9052/0.9509 (Table 5, Panel H), close to the anchor's 0.9027/0.9486. Coordinate-free controls in Figure 1(c) were nearly invariant because their effec-
tive inputs were unchanged. TransMIL's padded positional grid also need not change under physical-coordinate reassignment [17].
The composition-only toy task provided a negative control for unnecessary spatial dependence. ResTopoMIL's clean/shuffled

(c) KIRP: Robustness Analysis
(d) LUAD: Robustness Analysis
Fig. 4: Progressive coordinate shuffling with fixed patch embeddings. Panels report AUC on TCGA-BRCA/PANDA and C-index on TCGA-KIRP/TCGA-LUAD. Curves are representative-seed trajectories, with no uncertainty bands; they are not five-seed aggregate estimates.
Table 7: PANDA neighborhood controls. Edge retention refers to original KNN edges; is perturbed minus clean AUC. Only AUC is ranked, with the best and second-best distinct values bold and underlined; retention and are diagnostics.
| Perturbation | Retention | AUC | |
|---|---|---|---|
| None | 100% | 0.9426 | 0.0000 |
| Translation/rotation/reflection/scaling | 100% | 0.9426 | 0.0000 |
| Jitter ( ) | 98.8% | 0.9425 | -0.0001 |
| Jitter ( ) | 96.1% | 0.9421 | -0.0005 |
| Degree-preserving rewiring, 25% | ≈75% | 0.9349 | -0.0077 |
| Degree-preserving rewiring, 50% | ≈50% | 0.9237 | -0.0189 |
| Degree-preserving rewiring, 100% | ≈0% | 0.9070 | -0.0356 |
| Complete coordinate permutation | ≈0% | 0.9052 | -0.0374 |
Dataset A AUC was 0.9940/0.9938. Its mean absolute probability change was 0.0012, with 0.2% label flips. The model thus showed little perturbation response in this controlled setting without a spatial label signal.
5.7. Neighborhood-preserving and neighborhood-damaging controls
Preserving neighborhoods left PANDA performance nearly unchanged, while graph damage reduced it (Table 7). Translation, rotation, reflection and uniform scaling retained AUC 0.9426. Jitter at retained 96.1% of edges and produced AUC 0.9421. Here denotes the nearest-neighbor distance used to scale coordinate jitter.
Connectivity- and degree-preserving double-edge swaps within original components reduced AUC to 0.9349, 0.9237 and 0.9070 at 25%, 50% and 100% rewiring. Affected-node counts were controlled, with approximately matched edge-length and node-feature-similarity distributions. These controls associated prediction changes with neighborhood damage, while allowing higher-order or non-pathological correlations to contribute. Run-level dispersion was unavailable for these endpoints.
Table 8: CAMELYON-16 localization (upper panel) and post-hoc anatomy-stratified graph perturbation (lower panel). FROC uses the reported seven-point patch-grid summary. Masks stratify perturbations after training; higher values are better. Best and second-best values are bold and underlined within each panel; ties share formatting.
| Method | Dice | Specificity | FROC |
|---|---|---|---|
| AB-MIL | 0.412 | 0.985 | 0.3952 |
| CLAM-SB | 0.459 | 0.987 | 0.4257 |
| DS-MIL | 0.259 | 0.863 | 0.4506 |
| TransMIL | 0.103 | 0.999 | 0.4866 |
| DTFD-MIL | 0.525 | 0.999 | 0.4712 |
| MHIM-MIL | 0.548 | 0.992 | 0.4815 |
| 2DMambaMIL | 0.475 | 0.995 | 0.4520 |
| ResTopoMIL | 0.624 | 0.999 | 0.5483 |
| Graph condition | Slide AUC | Dice | FROC |
| Original | 0.973 | 0.624 | 0.5483 |
| Random-edge rewiring | 0.944 | 0.581 | 0.5210 |
| Normal-interior rewiring | 0.950 | 0.593 | 0.5290 |
| Tumor-interior rewiring | 0.941 | 0.570 | 0.5120 |
| Tumor-normal interface | 0.921 | 0.522 | 0.4810 |
5.8. Localization and anatomy-stratified perturbations
CAMELYON-16 tested whether learned patch scores aligned with annotated anatomy [72]. Classifier training used slide labels alone. Official tumor masks were used for localization evaluation, validation-threshold selection and post-hoc perturbation stratification, without entering classifier inputs.
Patch scoring and localization protocol. Evaluation used patches at , excluding patches outside the Otsu tissue mask. A patch was positive when at least 1% of its area overlapped the tumor mask. ResTopoMIL scored each patch using its pre-pooling target-class residual logit, . Baselines used their native attention or instance scores. All scores were min-max normalized within each slide, without smoothing, morphological refinement or a tumor-shape prior.
Each method's Dice threshold maximized mean validation Dice and was then fixed for testing. Connected components in thresholded patch grids defined FROC candidates. A candidate was a true positive if its maximum-score patch lay inside an annotated tumor. The reported FROC summary averaged seven operating points: 1/8, 1/4, 1/2, 1, 2, 4 and 8 false positives per slide. This patch-grid summary differs from the official six-point CAMELYON-16 score, which excludes 1/8 [72].
Localization results. ResTopoMIL exceeded the strongest baseline by 0.076 Dice and 0.0617 FROC (Table 8). TransMIL and DTFD-MIL matched its specificity of 0.999, but had lower Dice. These comparisons measured patch-grid lesion coverage and background suppression; run-level uncertainty was unavailable. Figure 5 illustrates native heatmaps for four selected cases, including tumor-core concentration, boundary continuity, invasive-front patterns and background leakage. The cases complement mask-based metrics without estimating cohort-wide visual reliability.
Anatomical perturbation and score relevance. Post-hoc tumor masks stratified connectivity- and degree-preserving graph rewiring. Rewiring tumor-normal interfaces produced the

Fig. 5: Qualitative H&E and native heatmap comparisons across five MIL methods. Warmer colors indicate higher within-slide normalized scores. Non-tissue patches are masked, with no smoothing, morphological refinement, or tumor-shape prior. The examples illustrate contiguity and background leakage, rather than segmentation accuracy. Case labels are internal to this figure.
largest AUC, Dice and FROC losses among the reported conditions (Table 8, lower panel). Removing the highest-scoring 10% of patches reduced slide AUC from 0.973 to 0.835, compared with 0.961 after matched-size random removal. Retaining only those patches gave AUC 0.903. These checks linked scores and neighborhood dependence to annotated anatomy, without identifying a unique causal mechanism or providing a full deletion curve.
5.9. Anchor convergence and patch-scale robustness
Longer warm-up did not materially alter the composition reference in the tested histogram family. Extending Stage 1 from ten to twenty epochs or using early stopping changed anchor AUC by at most 0.0002 and final AUC by 0.0001 (Table 9). This comparison addressed premature freezing within the chosen anchor, while the coordinate-free residuals showed that the anchor still omitted appearance information.
Across five matched runs, the anchor retained 91.0%±1.2% and 92.7%±1.0% of full-model AUC improvement over a class-prior predictor on PANDA and BRCA. The ratio was (AUC_stat - .5)/(AUC_full - .5). The corresponding cross-entropy fraction, (CE_prior - CE_stat)/(CE_prior - CE_full), was 86.9%±2.0% and 91.4%±1.6%. These ratios describe normalized predictive improvements rather than a decomposition of label information.
Matched patch-scale comparisons retained the relative advantage over 2DMambaMIL on BRACS (Table 10). Patient-level
Table 9: Warm-up schedule analysis. Cells give reported AUC without run-level dispersion. Stat./Full denote the anchor and complete model. Bold and underlined AUCs mark the best and second-best distinct values per column; ties share formatting.
| Schedule | PANDA | BRCA | ||
|---|---|---|---|---|
| Stat. | Full | Stat. | Full | |
| 10 epochs | 0.9027 | 0.9426 | 0.9486 | 0.9838 |
| 20 epochs | 0.9029 | 0.9425 | 0.9488 | 0.9839 |
| Early stopping | 0.9028 | 0.9427 | 0.9487 | 0.9838 |
Table 10: Three-class BRACS under matched patch-scale protocols. Entries are mean±standard deviation over five runs. Best and second-best means are bold and underlined within each patch size.
| Patch | Method | Accuracy | F1 | AUC |
|---|---|---|---|---|
| 256² | 2DMambaMIL | 0.7185±0.0290 | 0.6710±0.0450 | 0.8315±0.0310 |
| ResTopoMIL | 0.7494±0.0286 | 0.7142±0.0420 | 0.9006±0.0055 | |
| 512² | 2DMambaMIL | 0.7420±0.0250 | 0.6860±0.0280 | 0.8840±0.0210 |
| ResTopoMIL | 0.7670±0.0220 | 0.7210±0.0250 | 0.9060±0.0180 |
splits, UNI extraction, training procedures and five seeds were shared. ResTopoMIL exceeded the comparator on all three mean metrics at both patch sizes. With 512×512 patches, its accuracy, F1 and AUC margins were 0.0250, 0.0350 and 0.0220. Both methods gained accuracy with larger patches, but field of view, instance count and graph granularity changed together.

Fig. 6: BRACS feature-space projections. The upper panel uses PCA and the lower uses t-SNE; each shows statistical-stream features above topological-stream features across five reference splits. Colors denote classes, hollow circles denote statistically hard samples, and stars denote cases corrected by the topological stream. Class separation is descriptive evidence, rather than a test of coordinate dependence.
5.10. Representation diagnostics and computational scope
BRACS feature projections showed complementary class information across streams (Figure 6). PCA silhouette scores were approximately -0.05 to -0.09 for the statistical stream and 0.87–0.89 for the graph stream. The graph stream's Davies–Bouldin indices were 0.16–0.18, and its t-SNE silhouettes reached 0.92–0.93. Stars identify cases corrected after statistical-stream errors. These two-dimensional projections describe class separation, while perturbation tests provide the direct evidence of coordinate dependence.
The training constraint requires an additional shuffled-graph pass. Deployment constructs one intact graph, runs each stream once and adds their logits. No shuffled view, test-time ensemble or patch annotation is required. Wall-clock time, peak-memory measurements and matched-compute comparisons were unavailable, so parameter counts alone do not establish computational efficiency.
6. Discussion
The central finding is that the training of a spatial pathway deserves separate evaluation from its architectural availability. The controlled task showed that changing the schedule could substantially improve learning of a spatial label within the same architecture. WSI comparisons established predictive value across several diagnostic and survival endpoints. Residual-capacity and neighborhood tests then bounded what could be attributed to spatial dependence. Together, these findings support fixing a composition reference before learning a graph correction.
The evidence also narrows the optimization interpretation. Proposition 2 gives a conditional explanation for weak supervised graph gradients when prediction error becomes small. It
does not establish a universal composition-first learning trajectory. The gradient traces changed after graph training began, but the auxiliary loss also supplied gradients. Their increase cannot therefore be read as isolated recovery of spatially informative classification supervision. The matched toy and schedule comparisons provide the more direct evidence for the proposed training intervention.
Appearance capacity remains part of the residual's contribution. Coordinate-free residuals improved over the histogram anchor, showing that warm-up convergence did not exhaust the appearance multiset's predictive information. The full graph model exceeded those controls, and inference corruption reduced performance toward the anchor. Neighborhood-preserving transformations caused little change, whereas anatomical-interface rewiring produced larger losses. These observations connect prediction to supplied neighborhoods while allowing incidental correlations and unmodeled appearance information to contribute.
The approach is most relevant when spatial organization supplies information beyond composition. On a composition-dominant task, a strong appearance predictor may already be sufficient, and a graph branch could fit incidental layout. Dataset A provided a controlled negative test, but realistic composition-dominant WSI cohorts remain underrepresented. Anchor capacity and training duration remain design choices. An underfit anchor leaves appearance errors, while overfitting may weaken the useful residual-learning signal. Warm-up stability was established only for the histogram family on PANDA and BRCA; adaptive schedules and stronger appearance references require separate evaluation.
Predictive and clinical scope remain limited by the evaluated data and measurements. Only four of nine primary comparisons remained significant after multiplicity adjustment, and several alternative configurations achieved higher BRCA AUC. All WSI studies were retrospective and used frozen encoders. CAMELYON-16 supplied patch-grid localization and post-hoc anatomical evidence, rather than a segmentation system or clinical validation. Prospective cohorts, jointly tuned encoders and measured computational cost would clarify the intervention's practical limits. More realistic perturbations and composition-dominant WSI negative controls would further test when neighborhood use is beneficial.
7. Conclusion
ResTopoMIL addresses the gap between providing spatial inputs and learning to use them in whole-slide MIL. It fixes a composition predictor, trains an additive graph residual and separates intact from coordinate-reassigned representations. Controlled tasks support the training-schedule hypothesis, while WSI comparisons and perturbations connect predictive gains to neighborhood dependence. Coordinate-free controls retain appearance capacity as a contributing explanation. The results support explicit training interventions and behavioral spatial tests alongside architectural design.
Author Contribution Statement
Xiangyu Li: Conceptualization, Methodology, Software, Investigation, Formal analysis, Visualization, Writing - original draft. Jincheng Li: Conceptualization, Methodology, Supervision, Writing - review & editing. Xing Xie: Data curation, Software, Validation. Bin Guan: Software, Validation. Shaohua Kevin Zhou: Resources, Validation, Supervision. Rui Yan: Formal analysis, Validation, Methodology, Resources. Ran Su: Conceptualization, Project administration, Supervision.
Acknowledgments
This research is supported by Open Project Program of the State Key Laboratory of MedicalProteomics(SKLP-0202406), Emerging Frontiers CultivationProgram of Tianjin University Interdisciplinary Center,SeedFoundation of Tianjin University.
Declaration
During the preparation of this work, the authors used the Qwen model in order to refine the manuscript. After using this tool/service, the author reviewed and edited the content as needed and takes full responsibility for the content of the published article.
References
[1] T. G. Dietterich, R. H. Lathrop, T. Lozano-Pérez, Solving the multiple instance problem with axis-parallel rectangles, Artificial intelligence 89 (1-2) (1997) 31–71.
[2] O. Maron, T. Lozano-Pérez, A framework for multiple-instance learning, Advances in neural information processing systems 10 (1997).
[3] G. Campanella, M. G. Hanna, L. Geneslaw, A. Mirafal, V. Werneck Krausa Silva, K. J. Busam, E. Brogi, V. E. Reuter, D. S. Klimstra, T. J. Fuchs, Clinical-grade computational pathology using weakly supervised deep learning on whole slide images, Nature medicine 25 (8) (2019) 1301–1309.
[4] M. Y. Lu, D. F. Williamson, T. Y. Chen, R. J. Chen, M. Barbieri, F. Mahmood, Data-efficient and weakly supervised computational pathology on whole-slide images, Nature biomedical engineering 5 (6) (2021) 555–570.
[5] L. Pantanowitz, P. N. Valenstein, A. J. Evans, K. J. Kaplan, J. D. Pfeifer, D. C. Wilbur, L. C. Collins, T. J. Colgan, Review of the current state of whole slide imaging in pathology, Journal of pathology informatics 2 (1) (2011) 36.
[6] G. Verghese, J. K. Lennerz, D. Ruta, W. Ng, S. Thavaraj, K. P. Siziopikou, T. Naidoo, S. Rane, R. Salgado, S. E. Pinder, et al., Computational pathology in cancer diagnosis, prognosis, and prediction—present day and prospects, The Journal of pathology 260 (5) (2023) 551–563.
[7] A. H. Song, G. Jaume, D. F. Williamson, M. Y. Lu, A. Vaidya, T. R. Miller, F. Mahmood, Artificial intelligence for digital and computational pathology, Nature Reviews Bioengineering 1 (12) (2023) 930–949.
[8] D. F. Quail, J. A. Joyce, Microenvironmental regulation of tumor progression and metastasis, Nature medicine 19 (11) (2013) 1423–1437.
[9] J. Cheng, Y. Liu, W. Huang, W. Hong, L. Wang, X. Zhan, Z. Han, D. Ni, K. Huang, J. Zhang, Computational image analysis identifies histopathological image features associated with somatic mutations and patient survival in gastric adenocarcinoma, Frontiers in Oncology 11 (2021) 623382.
[10] X. Wang, Y. Chen, Y. Gao, H. Zhang, Z. Guan, Z. Dong, Y. Zheng, J. Jiang, H. Yang, L. Wang, et al., Predicting gastric cancer outcome from resected lymph node histopathology images using deep learning, Nature communications 12 (1) (2021) 1637.
[11] M. Ilse, J. Tomczak, M. Welling, Attention-based deep multiple instance learning, in: International conference on machine learning, PMLR, 2018, pp. 2127–2136.
[12] M. Zaheer, S. Kottur, S. Ravanbakhsh, B. Poczos, R. R. Salakhutdinov, A. J. Smola, Deep sets, Advances in neural information processing systems 30 (2017).
[13] X. Chen, P. Qiu, W. Zhu, H. Wang, H. Li, X. Dong, X. Sun, X. Yu, Y. Wang, A. Razi, A. Sotiras, Cracking instance jigsaw puzzles: An alternative to multiple instance learning for whole slide image analysis, in: Proceedings of the IEEE/CVF International Conference on Computer Vision, 2025, pp. 21353–21363.
[14] R. J. Chen, M. Y. Lu, M. Shaban, C. Chen, T. Y. Chen, D. F. Williamson, F. Mahmood, Whole slide images are 2d point clouds: Context-aware survival prediction using patch-based graph convolutional networks, in: International Conference on Medical Image Computing and Computer-Assisted Intervention, Springer, 2021, pp. 339–349.
[15] P. Pati, G. Jaume, A. Foncubierta-Rodriguez, F. Feroce, A. M. Anniello, G. Scognamiglio, N. Brancati, M. Fiche, E. Dubruc, D. Riccio, et al., Hierarchical graph representations in digital pathology, Medical image analysis 75 (2022) 102264.
[16] M. Adnan, S. Kalra, H. R. Tizhoosh, Representation learning of histopathology images using graph neural networks, in: Proceedings of the IEEE/CVF conference on computer vision and pattern recognition workshops, 2020, pp. 988–989.
[17] Z. Shao, H. Bian, Y. Chen, Y. Wang, J. Zhang, X. Ji, et al., Transmil: Transformer based correlated multiple instance learning for whole slide image classification, Advances in neural information processing systems 34 (2021) 2136–2147.
[18] R. J. Chen, C. Chen, Y. Li, T. Y. Chen, A. D. Trister, R. G. Krishnan, F. Mahmood, Scaling vision transformers to gigapixel images via hierarchical self-supervised learning, in: Proceedings of the IEEE/CVF conference on computer vision and pattern recognition, 2022, pp. 16144–16155.
[19] S. Yang, Y. Wang, H. Chen, Mambamil: Enhancing long sequence modeling with sequence reordering in computational pathology, in: International conference on medical image computing and computer-assisted intervention, Springer, 2024, pp. 296–306.
[20] J. Zhang, A. T. Nguyen, X. Han, V. Q.-H. Trinh, H. Qin, D. Samaras, M. S. Hosseini, 2dmamba: Efficient state space model for image representation with applications on giga-pixel whole slide image classification, in: Proceedings of the Computer Vision and Pattern Recognition Conference, 2025, pp. 3583–3592.
[21] H. Shah, K. Tamuly, A. Raghunathan, P. Jain, P. Netrapalli, The pitfalls of simplicity bias in neural networks, Advances in Neural Information Processing Systems 33 (2020) 9573–9585.
[22] R. Geirhos, P. Rubisch, C. Michaelis, M. Bethge, F. A. Wichmann, W. Brendel, Imagenet-trained cnns are biased towards texture; increasing shape bias improves accuracy and robustness, in: International conference on learning representations, 2018.
[23] M. Noroozi, P. Favaro, Unsupervised learning of visual representations by solving jigsaw puzzles, in: European conference on computer vision, Springer, 2016, pp. 69–84.
[24] M. Pezeshki, O. Kaba, Y. Bengio, A. C. Courville, D. Precup, G. Lajoie, Gradient starvation: A learning proclivity in neural networks, Advances in Neural Information Processing Systems 34 (2021) 1256–1272.
[25] Y. Xu, J.-Y. Zhu, I. Eric, C. Chang, M. Lai, Z. Tu, Weakly supervised histopathology cancer image segmentation and classification, Medical image analysis 18 (3) (2014) 591–604.
[26] O. Z. Kraus, J. L. Ba, B. J. Frey, Classifying and segmenting microscopy images with deep multiple instance learning, Bioinformatics 32 (12) (2016) i52–i59.
[27] K. Das, S. P. K. Karri, A. G. Roy, J. Chatterjee, D. Sheet, Classifying histopathology whole-slides using fusion of decisions from deep convolutional network on a collection of random multi-views at multi-magnification, in: 2017 IEEE 14th International Symposium on Biomedical Imaging (ISBI 2017), IEEE, 2017, pp. 1024–1027.
[28] K. Das, S. Conjeti, A. G. Roy, J. Chatterjee, D. Sheet, Multiple instance learning of deep convolutional neural networks for breast histopathology whole slide classification, in: 2018 IEEE 15th International Symposium on Biomedical Imaging (ISBI 2018), IEEE, 2018, pp. 578–581.
[29] X. Wang, H. Chen, C. Gan, H. Lin, Q. Dou, E. Tsougenis, Q. Huang, M. Cai, P.-A. Heng, Weakly supervised deep learning for whole slide lung cancer image analysis, IEEE transactions on cybernetics 50 (9) (2019) 3950–3962.
[30] C.-L. Chen, C.-C. Chen, W.-H. Yu, S.-H. Chen, Y.-C. Chang, T.-I. Hsu, M. Hsiao, C.-Y. Yeh, C.-Y. Chen, An annotation-free whole-slide training approach to pathological classification of lung cancer types using deep learning, Nature communications 12 (1) (2021) 1193.
[31] B. Li, Y. Li, K. W. Eliceiri, Dual-stream multiple instance learning network for whole slide image classification with self-supervised contrastive learning, in: Proceedings of the IEEE/CVF conference on computer vision and pattern recognition, 2021, pp. 14318–14328.
[32] H. Zhang, Y. Meng, Y. Zhao, Y. Qiao, X. Yang, S. E. Coupland, Y. Zheng, Dtfd-mil: Double-tier feature distillation multiple instance learning for histopathology whole slide image classification, in: Proceedings of the IEEE/CVF conference on computer vision and pattern recognition, 2022, pp. 18802–18812.
[33] W. Tang, S. Huang, X. Zhang, F. Zhou, Y. Zhang, B. Liu, Multiple instance learning framework with masked hard instance mining for whole slide image classification, in: Proceedings of the IEEE/CVF international conference on computer vision, 2023, pp. 4078–4087.
[34] T. Lin, Z. Yu, H. Hu, Y. Xu, C.-W. Chen, Interventional bag multi-instance learning on whole-slide pathological images, in: Proceedings of the IEEE/CVF conference on computer vision and pattern recognition, 2023, pp. 19830–19839.
[35] Y. Zhang, H. Li, Y. Sun, S. Zheng, C. Zhu, L. Yang, Attention-challenging multiple instance learning for whole slide image classification, in: European conference on computer vision, Springer, 2024, pp. 125–143.
[36] Y. Zhang, H. Li, Y. Sun, Z. Shui, J. Li, C. Zhu, L. Yang, Aem: attention entropy maximization for multiple instance learning based whole slide image classification, in: International Conference on Medical Image Computing and Computer-Assisted Intervention, Springer, 2025, pp. 45–55.
[37] L. Qu, Y. Ma, X. Luo, Q. Guo, M. Wang, Z. Song, Rethinking multiple instance learning for whole slide image classification: A good instance classifier is all you need, IEEE Transactions on Circuits and Systems for Video Technology 34 (10) (2024) 9732–9744.
[38] D. Shao, R. J. Chen, A. H. Song, J. Runevic, M. Y. Lu, T. Ding, F. Mahmood, Do multiple instance learning models transfer?, Proceedings of Machine Learning Research 267 (2025) 54219–54238.
[39] W. Zhu, P. Qiu, X. Chen, Z. Yang, A. Sotiras, A. Razi, Y. Wang, How effective can dropout be in multiple instance learning?, in: International Conference on Machine Learning, PMLR, 2025, pp. 80090–80106.
[40] W. Zhu, P. Qiu, X. Chen, O. M. Dumitrascu, Y. Wang, Pdl: Regularizing multiple instance learning with progressive dropout layers, arXiv preprint arXiv:2308.10112 (2023).
[41] R. J. Chen, T. Ding, M. Y. Lu, D. F. Williamson, G. Jaume, B. Chen, A. Zhang, D. Shao, A. H. Song, M. Shaban, et al., A general-purpose self-supervised model for computational pathology, arXiv preprint arXiv:2308.15474 (2023).
[42] M. Kang, H. Song, S. Park, D. Yoo, S. Pereira, Benchmarking self-supervised learning on diverse pathology datasets, in: Proceedings of the IEEE/CVF Conference on Computer Vision and Pattern Recognition, 2023, pp. 3344–3354.
[43] M. Oquab, T. Darcet, T. Moutakanni, H. Vo, M. Szafraniec, V. Khalidov, P. Fernandez, D. Haziza, F. Massa, A. El-Nouby, et al., Dinov2: Learning robust visual features without supervision, arXiv preprint arXiv:2304.07193 (2023).
[44] M. Caron, H. Touvron, I. Misra, H. Jégou, J. Mairal, P. Bojanowski, A. Joulin, Emerging properties in self-supervised vision transformers, in: Proceedings of the IEEE/CVF international conference on computer vision, 2021, pp. 9650–9660.
[45] M. Y. Lu, B. Chen, A. Zhang, D. F. Williamson, R. J. Chen, T. Ding, L. P. Le, Y.-S. Chuang, F. Mahmood, Visual language pretrained multiple instance zero-shot transfer for histopathology images, in: Proceedings of the IEEE/CVF conference on computer vision and pattern recognition, 2023, pp. 19764–19775.
[46] S. Kapse, P. Pati, S. Yellapragada, S. Das, R. R. Gupta, J. Saltz, D. Samaras, P. Prasanna, Gecko: Gigapixel vision-concept contrastive pretraining in histopathology, in: Proceedings of the IEEE/CVF International Conference on Computer Vision, 2025, pp. 20020–20030.
[47] J. Shi, C. Li, T. Gong, Y. Zheng, H. Fu, Vila-mil: Dual-scale vision-language multiple instance learning for whole slide image classification, in: Proceedings of the IEEE/CVF Conference on Computer Vision and Pattern Recognition, 2024, pp. 11248–11258.
[48] M. Han, L. Qu, D. Yang, X. Zhang, X. Wang, L. Zhang, Mscpt: Few-shot whole slide image classification with multi-scale and context-focused prompt tuning, IEEE Transactions on Medical Imaging (2025).
[49] B. Wong, J. Kim, H. Fu, M. Y. Yi, Few-shot learning from gigapixel images
via hierarchical vision-language alignment and modeling, in: The Thirti-ninth Annual Conference on Neural Information Processing Systems, 2025.
[50] D. Tomar, G. Vray, D. Mahapatra, S. Roy, J.-P. Thiran, B. Bozorgtabar, Slide-level prompt learning with vision language models for few-shot multiple instance learning in histopathology, in: 2025 IEEE 22nd International Symposium on Biomedical Imaging (ISBI), IEEE, 2025, pp. 1–5.
[51] J. Gou, L. Ji, P. Liu, M. Ye, Queryable prototype multiple instance learning with vision-language models for incremental whole slide image classification, in: Proceedings of the AAAI conference on artificial intelligence, Vol. 39, 2025, pp. 3158–3166.
[52] Z.-H. Zhou, Y.-Y. Sun, Y.-F. Li, Multi-instance learning by treating instances as non-iid samples, in: Proceedings of the 26th annual international conference on machine learning, 2009, pp. 1249–1256.
[53] D. Zhang, Y. Liu, L. Si, J. Zhang, R. Lawrence, Multiple instance learning on structured data, Advances in Neural Information Processing Systems 24 (2011).
[54] S. Pal, A. Valkanas, F. Regol, M. Coates, Bag graph: Multiple instance learning using bayesian graph neural networks, in: Proceedings of the AAAI conference on artificial intelligence, Vol. 36, 2022, pp. 7922–7930.
[55] A. Vaswani, N. Shazeer, N. Parmar, J. Uszkoreit, L. Jones, A. N. Gomez, E. Kaiser, I. Polosukhin, Attention is all you need, Advances in neural information processing systems 30 (2017).
[56] Y. Xiong, Z. Zeng, R. Chakraborty, M. Tan, G. Fung, Y. Li, V. Singh, Nystromformer: A nystrom-based algorithm for approximating self-attention, in: Proceedings of the AAAI conference on artificial intelligence, Vol. 35, 2021, pp. 14138–14148.
[57] J. Xiang, J. Zhang, Exploring low-rank property in multiple instance learning for whole slide image classification, in: The Eleventh International Conference on Learning Representations, 2023.
[58] J. Zhang, K. Ma, J. Van Arnam, R. Gupta, J. Saltz, M. Vakalopoulou, D. Samaras, A joint spatial and magnification based attention framework for large scale histopathology classification, in: Proceedings of the IEEE/CVF Conference on Computer Vision and Pattern Recognition, 2021, pp. 3776–3784.
[59] Z. Guo, W. Zhao, S. Wang, L. Yu, Higt: Hierarchical interaction graph-transformer for whole slide image analysis, in: International Conference on Medical Image Computing and Computer-Assisted Intervention, Springer, 2023, pp. 755–764.
[60] Z. Buzzard, K. Hemker, N. Simidjievski, M. Jamnik, Paths: A hierarchical transformer for efficient whole slide image analysis, arXiv preprint arXiv:2411.18225 (2024).
[61] M. Tran, S. Wagner, W. Weichert, C. Matek, M. Boxberg, T. Peng, Navigating through whole slide images with hierarchy, multi-object, and multi-scale data, IEEE transactions on medical imaging 44 (5) (2025) 2002–2015.
[62] O. Fourkioti, M. De Vries, C. Bakal, CAMIL: Context-aware multiple instance learning for cancer detection and subtyping in whole slide images, in: The Twelfth International Conference on Learning Representations, 2024. URL https://openreview.net/forum?id=rzBskAEmoc
[63] K. Chen, S. Sun, J. Zhao, Camil: Causal multiple instance learning for whole slide image classification, in: Proceedings of the AAAI Conference on Artificial Intelligence, Vol. 38, 2024, pp. 1120–1128.
[64] A. Gu, K. Goel, C. Re, Efficiently modeling long sequences with structured state spaces, in: International Conference on Learning Representations, 2021.
[65] Q. Sun, D. Jiang, J. Li, R. Yan, Y. He, T. Guan, Z. Cheng, NcEMIL: Rethinking decoupled multiple instance learning framework for histopathological slide classification, in: Proceedings of the International Conference on Medical Imaging with Deep Learning, Vol. 250 of Proceedings of Machine Learning Research, 2024, pp. 1166–1178.
[66] J. Peeples, W. Xu, A. Zare, Histogram layers for texture analysis, IEEE Transactions on Artificial Intelligence 3 (4) (2021) 541–552.
[67] A. H. Song, R. J. Chen, T. Ding, D. F. Williamson, G. Jaume, F. Mahmood, Morphological prototyping for unsupervised slide representation learning in computational pathology, in: Proceedings of the IEEE/CVF Conference on Computer Vision and Pattern Recognition, 2024, pp. 11566–11578.
[68] X.-S. Wei, J. Wu, Z.-H. Zhou, Scalable algorithms for multi-instance learning, IEEE transactions on neural networks and learning systems 28 (4) (2016) 975–987.
[69] C. E. Shannon, A mathematical theory of communication, The Bell system technical journal 27 (3) (1948) 379–423.
[70] T. M. Cover, Elements of information theory, John Wiley & Sons, 1999.
[71] N. Brancati, A. M. Anniciello, P. Pati, D. Riccio, G. Scognamiglio, G. Jaume, G. De Pietro, M. Di Bonito, A. Foncubierta, G. Botti, et al., Bracs: A dataset for breast carcinoma subtyping in h&e histology images, Database 2022 (2022) baac093.
[72] B. Ehteshami Bejnordi, M. Veta, P. Johannes van Diest, B. Van Ginneken, N. Karssemeijer, G. Litjens, J. A. Van Der Laak, C. consortium, M. Hermsen, Q. F. Manson, et al., Diagnostic assessment of deep learning algorithms for detection of lymph node metastases in women with breast cancer, Jama 318 (22) (2017) 2199–2210.