Hospitals as Natural Experiments for Deciding Which Slide Tiles to Read

A whole-slide pathology image is a scan of a tissue biopsy at microscope resolution. It is often 100,000 pixels on a side, far too large for a neural network to read at once. Practical systems therefore send a cheap "scout" over a low-resolution version of the slide, choose a small fraction of tiles, and read only those at full resolution. Current scouts choose tiles by association: they keep whatever kind of tissue co-occurs with the diagnosis in the training data. When the training slides come from several hospitals, that co-occurrence partly reflects which hospital a slide came from. Prevalence, staining, scanners and slide-handling artifacts all differ by site. A scout trained this way can learn to keep ink marks or stain borders and discard real diagnostic tissue, and nothing in its training signal tells these two apart.

We propose to choose tiles with a small causal graph instead. The graph is learned over a few dozen slide-level variables: how much of each low-resolution tissue type a slide contains, the diagnosis, and the hospital. Causal discovery from observational data normally leaves many arrows undirected, because many graphs explain the same statistics equally well. Treating the hospital as an outside cause that shifts the data supplies the asymmetry needed to direct many of those arrows. The result is a rule for which tissue types the full-resolution model should read, and that rule is designed to keep holding when the model is deployed at a hospital it has never seen.

Core Claim

A slide-level causal graph over thumbnail tissue types, learned across hospitals, gives a cheaper and more transferable tile-selection rule than an associative scout. The rule keeps tissue types whose link to the diagnosis survives once the hospital is accounted for, and drops tissue types that depend on the diagnosis only through the hospital. On a held-out hospital, this rule should match the accuracy of full-bag reading while processing a small fraction of tiles. It should also avoid the failure in which normal slides are reduced to their artifacts.

Some vocabulary first. A Markov equivalence class is the set of causal graphs that imply exactly the same pattern of statistical independences. Observational data alone cannot choose among them. With a hospital variable that is known to be a cause and never an effect, some of these ambiguities resolve. Suppose a tissue type depends on both diagnosis and hospital, but diagnosis and hospital are not directly linked. That pattern is a "collider": the tissue type is a common effect of both, so both arrows point into it. Causal discovery from observational and interventional data across multiple environments introduces S-FCI, which formalizes this argument. It shows that data from several heterogeneous environments behaves like interventional data with unknown targets, even when hidden common causes are present. We use that result as our method. Hospitals play the role of environments, and the variables are tissue-composition summaries rather than tabular measurements.

The causal contribution has to earn its place against a much simpler rule. That rule drops any tissue type that is independent of the diagnosis once you condition on hospital. Our claim is that full graph discovery adds value over this per-tissue test in two cases. The first is when tissue types depend on each other: a hospital-driven artifact can look diagnostic through its correlation with real tumor tissue. The second is when orientations are needed to separate tissue that mediates hospital effects from tissue that the diagnosis drives. If the experiments show the per-tissue test is just as good, we will report that the simpler rule suffices.

Research Program

Slide-level variables. Each tile of each slide is encoded at low magnification (1.25x) by a lightweight encoder. Resolution-Based Distillation for Efficient Histology Image Classification distills a 10x teacher into low-resolution students, and its 1.25x lung adenocarcinoma student came within 3% of the teacher. That result motivates the expectation that low-magnification tiles still separate tissue types. We use the same distillation recipe for the encoder.

Tissue types. The low-resolution tile embeddings are clustered into $K$ tissue types, with $K$ between 30 and 60. Each slide becomes a vector $c \in \mathbb{R}^K$ of tissue-type proportions, plus its diagnosis $Y$ and hospital index $S$. Clustering tiles into prototypes is not new. CaMIL does it to make front-door adjustment tractable. The difference is that CaMIL uses the clusters as compressed inputs inside a fixed three-node causal graph, whereas we use them as the variables over which the graph is discovered.

Graph discovery. We run S-FCI over $(c_1,\dots,c_K, Y, S)$ using the Causal-learn library. Tiered background knowledge constrains the search. Hospital is placed first, so it has no incoming edges. Diagnosis comes before tissue composition, because a diagnosis of tumor changes what the tissue looks like. Post-diagnostic artifact clusters, such as pen ink identified from thumbnails, form an optional final tier. Query-Specific Causal Graph Pruning Under Tiered Knowledge shows that for a single target query, discovery can be confined to the components between the relevant tiers. That paper was tested only on synthetic tabular tiers, and we borrow its restriction both to keep the search small and to test whether tiers transfer to image-derived variables. Few hundred slides is a small sample for conditional-independence testing over about 60 variables, so we also run an amortized discoverer. CausalTab maps a dataset to a directed graph in under a second for up to 300 variables, and we compare its output against S-FCI's as a check on how stable the discovered graph is.

Selection rule. Writing $\mathcal{G}$ for the learned graph, the set of retained tissue types is

$$R = \{k : c_k \text{ is adjacent to } Y \text{ in } \mathcal{G} \text{ and } c_k \not\perp Y \mid S, c_{\mathrm{pa}(k)\setminus Y}\}.$$

Here $\mathrm{pa}(k)$ is the set of variables with arrows into $c_k$. In words, a tissue type is kept if it stays linked to the diagnosis after conditioning on the hospital and on its own other direct causes.

At test time, the pipeline runs as follows. The scout assigns each low-resolution tile to a cluster. Only tiles in the retained set $R$ are read at full resolution, up to a fixed tile budget. A standard attention-based multiple-instance model then reads those tiles; such models treat the slide as a bag of tiles that carries a single label. Because $R$ is defined over tissue types and does not depend on how unusual a slide looks, a completely normal slide still sends its lymphoid tissue to the reader rather than only its dust and ink.

Robustness. Cheap image statistics such as stain intensity, background fraction and blur proxies are added as observed variables. Some hospital effects then appear explicitly in the graph instead of hiding as latent causes. S-FCI's handling of hidden common causes covers the rest, for example tissue-fixation differences that leave no trace in these statistics.

Baselines

Full-bag reader (accuracy reference). The naive reference processes every tissue tile at full resolution with the same attention-based reader. It defines the accuracy ceiling and the compute cost we are trying to cut. It is run on identical splits, with the same encoder and the same hyperparameter search.

Random sparse sampling. This is the eWSI recipe from Domain Adaptation Without the Compute Burden for Efficient Whole Slide Image Analysis: 512 uniformly sampled tiles with low-rank adapter fine-tuning. It reports 98.5% AUC on Camelyon16 with an in-domain self-supervised encoder. That number is the strongest reported accuracy in the file, but it comes from an in-distribution split and not a held-out hospital. We run eWSI at the same tile budget our rule ends up using, with the same encoder. Beating it means higher held-out-hospital AUC at an equal budget, or equal AUC at a lower false-positive rate. The second matters because the eWSI authors themselves report inflated false positives from sparse sampling.

HDMIL scout. The strongest direct competitor is the learned associative scout of HDMIL. It distills a high-resolution attention teacher into a thumbnail pre-screener and reports 90.88% AUC with a 28.6% inference-time reduction on Camelyon16. We retrain it on the same training hospitals and match the fraction of tiles it keeps to ours. Beating it means better AUC on a held-out hospital at equal tile count, plus fewer artifact tiles retained on normal slides.

Normal-tissue atlas pruning. The pruning method of Creating an atlas of normal tissue for pruning WSI patching through anomaly detection fits a one-class model on healthy tissue and discards normal-looking tiles. It reports 30–50% fewer tiles and 69% faster breast-tissue search. It is the baseline for the normal-slide failure, and we fit its one-class model on the training hospitals' normal slides.

Front-door causal readers. We pair CaMIL, which reports more than 5% gains in AUC and F1 on Camelyon16 with a DTFD reader, and CATT-MIL, which reports a 2.99% average AUC gain, with full bags. They represent the alternative of deconfounding inside the reader rather than at the selection step.

Ablations. Two ablations isolate the key ingredient. The first runs PC discovery without the hospital node and keeps the whole undirected neighborhood of $Y$; this is what an unresolved equivalence class gives you. The second applies the per-tissue stratified test $c_k \perp Y \mid S$ with no graph at all.

Why not just…?

Why not just stain-normalize and keep the HDMIL scout? Stain normalization removes color shifts. It does not remove hospital-specific prevalence or artifacts such as ink, folds and scanner borders, which correlate with the diagnosis for non-color reasons. Both CaMIL and CATT-MIL attribute their gains to confounding that goes beyond color. This is still a real competitor, so we include "stain-normalized HDMIL" as a baseline. If it matches us on held-out hospitals, the causal selection step is not needed.

Why not just test each tissue type against the diagnosis given the hospital, with no graph? This is the most serious threat, and it is the second ablation above. Our only reason to expect the graph to help is the case where tissue types depend on one another, so that an artifact type looks diagnostic through its correlation with real tumor tissue. A per-tissue test cannot separate those two; conditioning on the tumor tissue type inside the graph can. The decisive comparison is held-out-hospital AUC and artifact retention for the two rules. If they are indistinguishable, we will report that one round of stratified tests is all the causal machinery this problem needs.

Why not just train the scout with an invariance penalty across hospitals? Invariant-risk training of the scout is a reasonable alternative, and we will run it at an equal budget. With a handful of hospitals and per-tile decisions, though, the scout gets a weak and noisy signal about what is invariant. Our rule makes its decision at the level of tissue types, and every decision can be inspected: a pathologist can check whether the dropped clusters really are artifacts. The comparison on held-out hospitals settles which works better.

Proposed Experiments

The main protocol is leave-one-hospital-out evaluation on Camelyon17, which spans five centers, with Camelyon16 for slide classification. TCGA-NSCLC is a secondary test where tumor is spatially large and selection should matter less.

Every method is scored on three axes. Accuracy is AUC on held-out hospitals. Compute is measured as full-resolution tiles read per slide and as wall-clock time on one GPU. The third axis is the fraction of retained tiles on normal slides that fall into artifact clusters, verified by a pathologist on a random sample.

No reported held-out-hospital results were found on Lacuna for any of these baselines. The in-distribution reference points are HDMIL's 90.88% AUC and eWSI's 98.5% AUC on Camelyon16, and PFA-ScanNet's kappa of 0.905 on Camelyon17 (PFA-ScanNet). We will reproduce all baselines on our own splits rather than compare against these numbers.

Three outcomes would decide the proposal. The causal rule should beat HDMIL on held-out-hospital AUC at an equal tile count. It should cut artifact retention on normal slides relative to atlas pruning. And the full graph should beat the per-tissue stratified test. The third is the test of whether resolving the equivalence class matters at all.

We will also check that the discovered graph is stable. Specifically, the retained set $R$ should agree between S-FCI and CausalTab, and across bootstrap resamples of the slides. If $R$ changes substantially from one resample to the next, the small number of slides is the limiting factor, and we will say so.