Pathology foundation models integrated with multiple instance learning achieve competitive accuracy within single-cancer cohorts, yet cross-cancer generalization remains unresolved due to organ-specific histological and architectural differences. In this paper, we propose Conserved Immune Topology (CIT), a lightweight spatial representation for cross-cancer MSI-H prediction that augments foundation-model embeddings with biologically motivated immune descriptors. CIT uses unsupervised clustering to identify immune-associated tiles, then encodes tertiary lymphoid structures, peritumoral immune reactions, multi-scale tumor-infiltrating lymphocyte density, and immune-tumor mixing from frozen foundation-model embeddings and tile coordinates without requiring annotations or target-domain data. The proposed method was evaluated under cross-site and cross-cancer settings using CPTAC-COAD and TCGA-STAD cohorts, which introduce scanner variability, distribution shifts, and organ-specific architectural variations. Zero-shot cross-cancer transfer with CIT increased TransMIL AUC from 0.6627 to 0.7161, an absolute gain of 0.0534 (p=0.003), with consistent improvements across all three MIL aggregators. These results suggest that spatial immune topology provides potentially an organ-invariant representation for MSI-H prediction, supporting cross-cancer generalization of pathology foundation models.
Figures & tables
Figure 1: Overview of the proposed framework. WSI patches are encoded via UNI2-h and concatenated with a CIT descriptor.
Dataset
Patients
MSI-H
MSS
MSI-H (%)
TCGA-COAD
301
54
247
17.9
TCGA-STAD
308
54
254
17.5
CPTAC-COAD
105
24
81
22.9
Table 1: Patient counts and MSI-H/MSS class distribution for study cohorts.
Model
MSI-H AUC
CONCH + ABMIL
0.9145±0.0499
CONCH + CLAM-SB
0.9181±0.0563
CONCH + TransMIL
0.9198±0.0615
UNI2-h + ABMIL
0.9337±0.0166
UNI2-h + ABMIL + CIT
0.9348±0.0197
UNI2-h + CLAM-SB
0.9469±0.0233
Table 2: Internal TCGA-COAD performance ( 301 patients, 54 MSI-H / 247 MSS; MSI-H AUC, mean ± SD over five folds).
Model
Baseline
CIT
ABMIL
0.8089
0.8086
CLAM-SB
0.7989
0.8344
TransMIL
0.7870
0.8277
Table 3: Cross-site generalization on the independent CPTAC-COAD cohort. CIT improves CLAM-SB and TransMIL despite institution and scanner shift, while ABMIL is unchanged.
Model
Baseline
CIT
Δ AUC (98.33% CI)
DeLong p
ABMIL
0.5681
0.6313
+0.0632 ( +0.0280 to +0.0984 )
<0.001
CLAM-SB
0.6242
0.6414
+0.0172 ( −0.0025 to +0.0369 )
0.037
TransMIL
0.6627
0.7161
+0.0534 ( +0.0111 to +0.0957 )
0.003
Table 4: Zero-shot cross-cancer evaluation on TCGA-STAD ( 308 patients; 54 MSI-H / 254 MSS), models trained on TCGA-COAD. Δ AUC with 98.33% DeLong CIs (Bonferroni-adjusted, α=0.0167 ).
Figure 2: ROC curves for TransMIL with and without CIT on TCGA-STAD. CIT improves the true positive rate across most operating points.
Model
Baseline
CIT
Δ
ABMIL
0.7066
0.7228
+0.016
CLAM-SB
0.7490
0.7547
+0.006
TransMIL
0.7470
0.7878
+0.041
Table 5: Reverse-direction zero-shot transfer, models trained on TCGA-STAD and tested on TCGA-COAD ( 301 patients; 54 MSI-H / 247 MSS). CIT improves MSI-H AUC across all aggregators, with the largest gain for TransMIL ( +0.041 ).
Configuration
COAD AUC
STAD AUC
Δ STAD
Baseline (no CIT)
0.9398±0.0274
0.6627
—
− G1 (TLS)
0.9559±0.0115
0.7115
−0.0046
− G2 (margin)
0.9554±0.0117
0.7085
−0.0076
− G3 (TIL density)
0.9562±0.0114
0.7134
−0.0027
− G4 (mixing)
0.9547±0.0119
0.7050
−0.0111
Full CIT (all 4 groups)
0.9567±0.0112
0.7161
—
Table 6: Leave-one-group-out ablation (UNI2-h + TransMIL). Internal TCGA-COAD AUC (mean ± SD) and zero-shot TCGA-STAD AUC with Δ STAD relative to full CIT.
Microsatellite instability-high (MSI-H) and high tumor mutational burden (TMB-H) are clinically relevant biomarkers, yet their histopathological prediction remains challenging when models are transferred across morphologically distinct cancer types. Immune-associated spatial patterns can persist across cancers despite these morphological differences, but foundation-model-based predictors trained on a single cancer do not explicitly use this information, limiting cross-cancer generalization. To address this limitation, we propose TIRA (Tumor Immune Representation Adaptation), a target-free framework that refines frozen foundation-model representations using spatial immune topology, without requiring target-domain data during model development or test-time adaptation. TIRA uses a topology-supervised biology representation to condition tile-level attention while pooling only morphological features for joint MSI and TMB prediction. We train TIRA on TCGA-COAD+READ and evaluate it zero-shot on CPTAC-COAD, TCGA-STAD, TCGA-UCEC, and CPTAC-UCEC, covering cross-site, cross-cancer, and combined cross-cancer-site distribution shifts under UNI2, CONCH, and Virchow2. With UNI2, TIRA improved zero-shot AUROC on TCGA-STAD from 0.633 to 0.766 for MSI and from 0.651 to 0.772 for TMB. Source-derived spatial immune topology improved the cross-cancer robustness of frozen pathology foundation-model representations.
Predicting microsatellite instability (MSI) status from routine hematoxylin and eosin (H&E) whole slide images (WSIs) offers a practical alternative to molecular testing, but models trained at one institution tend to generalize poorly to slides acquired at a different site. Foundation model representations, despite their generality, still encode site-specific texture alongside the conserved biological morphology underlying MSI. We investigate whether tile-level spatial priors derived from known MSI histology can guide these representations toward more site-invariant features. We introduce a biologically motivated spatial prior based on peripheral distance encoding, reflecting the Crohn's-like peripheral lymphocytic reaction at the tumor invasive margin, and evaluate a secondary local immune neighborhood encoding reflecting the lymphocyte-to-tumor ratio in each tile's immediate spatial neighborhood. Both priors are injected into a TransMIL aggregator before self-attention, allowing the transformer to integrate spatial biological context with UNI2-h or Virchow2 features across all attention layers. We evaluate six foundation model and MIL aggregator combinations as a reference, then assess the effect of each spatial prior. Training on TCGA-COAD (137 slides) and evaluating externally on TCGA-READ (50 slides) without retraining, peripheral distance encoding achieves MSI AUC 0.959 +/- 0.012 on COAD and MSS specificity 1.000 on READ, compared to 0.957 and 0.939 for the strongest reference configuration. Local immune neighborhood encoding achieves comparable internal AUC but lower cross-site specificity, suggesting margin proximity encodes a more site-invariant biological signal than local immune density. Results suggest biologically grounded spatial priors act as regularizers that reduce reliance on site-specific imaging patterns.
Predicting immune biomarkers associated with the tumor immune microenvironment (TIME) is critical for advancing precision oncology, yet existing approaches are largely limited to single image modalities and suffer from insufficient resolution and incomplete utilization of complementary clinical and biological information. Here we introduce MixTIME, a multimodal foundation model that leverages a mixture-of-experts (MoE) architecture to integrate pathology foundation models trained across distinct modalities: image only (UNIv2), image text (CONCHv1.5), and image transcriptomic (STPath) representations for pixel-level and slide-level prediction of multiplex immunofluorescence (mIF) protein expression from hematoxylin and eosin (HE) whole-slide images. MixTIME employs a learnable router to dynamically weight expert contributions and is trained with a distribution- and tendency-aware loss function. Benchmarked on two datasets of different scales, MixTIME achieves state-of-the-art performance across 17 protein markers as measured by correlation metrics. The predicted mIF profiles substantially enhance downstream tasks, including spatial domain identification, survival prediction, and AI-assisted pathology report generation validated by expert pathologists from multiple institutes across the world. Furthermore, MixTIME enables longitudinal tracking of protein expression dynamics across clinical time points and reveals protein gene interaction patterns linked to drug resistance and immune suppression in tumor microenvironments. Collectively, MixTIME provides a scalable framework for multimodal biomarker discovery and clinical translation in computational pathology.
Tianyu Liu, Ziqing Wang, Zhaokang Liang +12
Program of Computational Biology and Bioinforamtics, Yale University, USA · Broad Institute of MIT and Harvard, USA · These authors contributed equally to this work. +12