Source-linked AI summary
Cross-Modal Contrastive Learning for the Retrieval of Immunotherapy-Associated Molecular Signatures from Histopathology
Sigrid Vila-Bagaria, Mar Teixidó, Miquel Piñol, Felip Vilardell, Robert Montal, Veronica Vilaplana
TL;DR
Identifying immunotherapy-associated gastric cancer subtypes relies on a costly 10-gene RNA signature, while paired histology-genomic data are scarce and binary labels can lose information about continuous expression. CCMIL aligns H&E and RNA representations for retrieval and signature imputation, with reported retrieval and downstream classification outcomes. Its evaluation remains limited to a retrospective TCGA cohort.
Problem
The “Inflamed/Non-Inflamed” gastric adenocarcinoma phenotype predicts ICI response, but identifying it requires a costly 10-gene RNA signature, and paired histology-genomic data are scarce.
Source: §1 · pp. 1–2Method
CCMIL uses a supervised contrastive objective to align H&E and RNA representations, then retrieves RNA embeddings for an H&E query to impute a continuous molecular signature.
Source: §1 · p. 2, §3.2 · p. 4, §3.3 · p. 5Results
CCMIL provides transcriptomically coherent retrieval and continuous inflammatory-phenotype imputation, while its learned representation also supports downstream classification.
Source: §6 · p. 9Takeaways & Limitations
The retrieval-oriented framework offers a histology-based route to molecular pre-screening without genomic sequencing at inference.
Source: §1 · p. 2, §6 · p. 9Evaluation was limited to a retrospective TCGA cohort; independent external-cohort validation is needed to assess generalizability.
Source: §6 · p. 9
Abstract
from arXiv · showhide
Gastric Adenocarcinoma is a leading cause of cancer mortality. Although "Inflamed/Non-Inflamed" subtypes have been proposed to predict immunotherapy response, their identification relies on a costly 10-gene RNA signature. We propose a Cross-modal Contrastive Multiple Instance Learning (CCMIL) framework for cross-modal retrieval, imputing these molecular signatures directly from standard Hematoxylin & Eosin (H&E) slides. By leveraging a supervised contrastive objective, CCMIL aligns visual morphological patterns with molecular phenotypes into a shared latent space. This establishes an interpretable search-by-case retrieval engine, enabling pathologists to query a whole slide image to surface transcriptomically coherent neighbors and approximate RNA signatures without genomic sequencing at inference. Our results demonstrate that this retrieval-first approach captures the continuous phenotypic spectrum of tumor inflammation and yields clinically interpretable attention heatmaps. Furthermore, the learned representation also supports competitive downstream classification, providing a practical molecular pre-screening strategy.
1 Introduction
The costly 10-gene RNA signature used to identify immunotherapy-associated “Inflamed/Non-Inflamed” gastric adenocarcinoma subtypes limits routine use. CCMIL addresses this by learning to impute the signature from standard H&E slides, while targeting challenges from scarce paired data and the loss of biological nuance in binary labels.
- The “Inflamed/Non-Inflamed” phenotype predicts ICI response, but identifying it requires a costly 10-gene RNA signature that limits routine clinical use.Source: §1 · p. 1
- Paired histology-genomic data are scarce, and converting continuous gene expression into binary labels can discard patients’ positions on the biological spectrum.Source: §1 · p. 2
- CCMIL learns a shared histology-transcriptomics embedding for cross-modal retrieval.Source: §1 · p. 2
- The learned representation captures biologically coherent patient relationships, supporting RNA signature imputation and downstream classification from H&E alone.Source: §1 · p. 2
2 Related Work
Related work establishes contrastive learning as a way to align modalities for retrieval, while identifying a practical gap: multimodal models may still require genomic data at inference. This work builds on aligned multimodal representations to retrieve molecular signatures from histology alone.
- Contrastive learning pulls positive pairs together and pushes negative pairs apart; ConVIRT and CLIP applied it to vision-language retrieval, with medical adaptations including MedCLIP.Source: §2 · p. 2
- Unimodal MIL models such as ABMIL, CLAM, and TransMIL may not capture the full transcriptomic complexity of heterogeneous tumors.Source: §2 · p. 2
- Although multimodal methods such as MCAT fuse histology and genomics, they require both modalities at inference; CCMIL instead uses an aligned manifold to retrieve molecular signatures from histology alone.Source: §2 · p. 2
3 Method
CCMIL maps histological and genomic features into a shared embedding space, training the representations with contrastive and classification objectives. At inference, H&E embeddings support direct classification or retrieval of RNA profiles.
3.1 Cross-modal contrastive architecture
- Parallel histological and genomic encoders map both modalities into a shared joint embedding space.Source: §3.1 · p. 2, Figure 1 · p. 3
- The histology stream uses CONCH features, spatial encodings, and THCA attention conditioned on learned histology-type embeddings to form slide-level representations.Source: §3.1 · p. 3
- The genomic stream encodes the 10-gene signature by combining gene-specific identity vectors with expression-weighted aggregation, then refines the result with an SNN.Source: §3.1 · p. 3
- Table 1 compares framework and baseline performance using mean ± standard deviation across 5-fold cross-validation.Source: Table 1 · p. 4
3.2 Losses
- The supervised contrastive loss groups same-label WSI and RNA embeddings, including both same-patient cross-modal pairs and other embeddings sharing the phenotype label.Source: §3.2 · p. 4
- An unweighted average of BCE losses from the WSI and genomic probes encourages both modalities to retain diagnostic utility and follow the task decision boundary.Source: §3.2 · p. 5
3.3 Inference strategy
- At inference, the genomic stream is detached; H&E embeddings can feed a classification probe or retrieve RNA embeddings for signature imputation.Source: §3.3 · p. 5
4 Experimental setup
The experiments use a curated TCGA gastric adenocarcinoma cohort, five-fold cross-validation, and matched H&E and multimodal baselines. Figures 2 and 3 describe the retrieval evaluation and qualitative visualizations.
4.1 Dataset and preprocessing
- The curated TCGA cohort contains 265 diagnostic slides, with inflammation labels from a 10-gene RNA signature and histology subtypes assigned by expert pathologists.Slides were segmented and patched at 40×, then embedded using CONCH.Source: §4.1 · pp. 5–6
- Figure 2 presents a UMAP of the joint representation and RNA cosine similarity across retrieval ranks, with CSLS + Reciprocal closest to the RNA-space Oracle.The caption identifies retrieval rank k as the horizontal comparison dimension for mean RNA cosine similarity.Source: Figure 2 · p. 6
4.2 Training setup
- Training used five-fold cross-validation with early stopping, Adam, and a fixed learning rate of 5×10−5.Each fold used train, validation, and test splits of 80%, 10%, and 10%.Source: §4.2 · p. 6
- Figure 3 contrasts attention maps with baselines and depicts transcriptomically coherent neighbors along a continuous inflammatory gradient.The caption describes CCMIL attention hotspots as dense and highly localized.Source: Figure 3 · p. 7
- Baselines included three H&E-only MIL models, multimodal MCAT, and a spatially matched retrieval baseline using instance-level CLIP alignment.All models used identical CONCH embeddings and the same five-fold splits.Source: §4.2 · p. 7
5 Results
CCMIL retrieves transcriptomically similar cases and supports downstream classification, while qualitative analyses show localized attention and a continuous inflammatory gradient. CSLS + Reciprocal reranking is the selected retrieval strategy.
5.1 Quantitative Evaluation
- Test →Test retrieval achieved R@5 of 0.92 and MRR of 0.80, while Test →Train weighted k-NN voting yielded Accuracy of 0.72 and F1-score of 0.76.The Test →Test measures are reported relative to the CLIP baseline comparison; Test →Train mimics querying new slides against training cases.Source: §5.1 · p. 8
- CSLS + Reciprocal reranking mitigated high-dimensional hubness and maintained the highest RNA cosine similarity to the RNA-space Oracle upper bound.The strategy was selected using validation-set evaluation of multiple retrieval metrics.Source: §5.1 · pp. 7–8
- CCMIL achieved the highest F1-score (0.76) and Recall (0.92), while ablations showed poorer Accuracy without representation choices and lower retrieval scores without contrastive learning or THCA.Representation learning alone yielded Accuracy 0.54; omitting contrastive learning yielded R@1 0.63; replacing THCA with standard attention yielded R@1 0.60 and F1-score 0.74.Source: §5.1 · p. 8
5.2 Qualitative Evaluation
- CCMIL attention produced dense, localized hotspots aligned with tumor segmentations, unlike baseline maps described as under-activated, saturated, or diffuse.The authors interpret biologically coherent activations as capturing subtle patterns associated with an Inflamed signature that is visually indistinguishable to pathologists.Source: §5.2 · p. 8
- Slides projected along an inflammation axis formed a continuous phenotype gradient, with transcriptomically coherent neighbors retrieved through rank 10.The qualitative analysis selected seven evenly spaced query slides and displayed their retrieved RNA profiles at ranks 1, 2, 3, and 10.Source: §5.2 · p. 8
6 Discussion and Conclusions
CCMIL learns a shared histology-transcriptomics space for retrieval and molecular-signature imputation from H&E slides. The proof of concept was evaluated retrospectively within the TCGA cohort, with external validation left for future work.
6. Discussion and Conclusions
- CCMIL integrates a composite loss and THCA module to learn a shared histology-transcriptomics latent space, improving cross-modal alignment relative to evaluated baselines.The framework is presented as an interpretable retrieval method for molecular signatures from standard H&E slides.Source: §6 · pp. 8–9
- The search-by-case engine retrieves transcriptomically coherent neighbors to impute a patient's continuous inflammatory phenotype beyond binary classification.The conclusion frames the representation as supporting downstream classification and immunotherapy pre-screening.Source: §6 · p. 9
- Evaluation was limited to a retrospective TCGA cohort; independent external-cohort validation is future work for assessing generalizability.The conclusion describes the study as a proof of concept.Source: §6 · p. 9