Cross-Modal Prototype Allocation: Unsupervised Slide Representation Learning via Patch-Text Contrast in Computational Pathology

Yuxuan Chen, Jiawen Li, Jiali Hu, Xitong Ling, Tian Guan, Anjia Han, Yonghong HearXiv 2025 · OpenReview

Abstract

With the rapid advancement of pathology foundation models (FMs), the representation learning of whole slide images (WSIs) attracts increasing attention. Existing studies develop high-quality patch feature extractors and employ carefully designed aggregation schemes to derive slide-level representations. However, mainstream weakly supervised slide representation learning methods, primarily based on multiple instance learning (MIL), are tailored to specific downstream tasks, which limits their generalizability. To address this issue, some studies explore unsupervised slide representation learning. However, these approaches focus solely on the visual modality of patches, neglecting the rich semantic information embedded in textual data. In this work, we propose ProAlign, a cross-modal unsupervised slide representation learning framework. Specifically, we leverage a large language model (LLM) to generate descriptive text for the prototype types present in a WSI, introducing patch-text contrast to construct initial prototype embeddings. Furthermore, we propose a parameter-free attention aggregation strategy that utilizes the similarity between patches and these prototypes to form unsupervised slide embeddings applicable to a wide range of downstream tasks. Extensive experiments on four public datasets show that ProAlign outperforms existing unsupervised frameworks and achieves performance comparable to some weakly supervised models.

Introduction

The analysis of Whole Slide Images (WSIs) is a cornerstone of modern computational pathology. Due to the gigapixel scale of these images, standard deep learning approaches are often replaced by Multiple Instance Learning (MIL), where a slide is treated as a "bag" of patches. While effective, MIL-based weakly supervised methods suffer from significant drawbacks: they require large amounts of annotated data, are susceptible to label noise from inter-observer variability, and often produce task-specific representations that do not generalize well to new clinical questions.

Unsupervised representation learning offers a promising alternative by learning features without explicit slide-level labels. However, traditional unsupervised methods typically rely on visual clustering (e.g., k-means), which ignores the vast medical knowledge encoded in natural language. This "semantic blindness" limits the clinical interpretability and robustness of the learned features.

The ProAlign Framework

ProAlign addresses these limitations by introducing a cross-modal alignment strategy that "anchors" visual patch features to semantically meaningful medical concepts. The framework operates in three distinct stages:

  1. LLM-Guided Prototype Definition: Instead of arbitrary clustering, ProAlign uses a Large Language Model (LLM) to generate detailed textual descriptions for a set of tissue "prototypes" (e.g., "Invasive Carcinoma", "Necrotic Tissue"). This ensures that the learned representation space is grounded in established pathological categories.
  2. Patch-Text Contrast: Leveraging Vision-Language (V-L) foundation models like CONCH or PLIP, the framework extracts embeddings for both image patches and the LLM-generated text. By calculating the similarity between these modalities, patches are mapped to their most relevant textual prototypes, creating a semantically informed initial embedding space.
  3. Parameter-Free Attention Aggregation (PFAM): To derive a slide-specific representation, ProAlign employs a parameter-free attention mechanism. It aggregates patch features based on their similarity to the global prototypes, resulting in refined prototype embeddings that are concatenated to form the final slide embedding.
The ProAlign framework overview, illustrating the three-stage process: LLM-guided prototype definition, patch-text contrast, and PFAM-based aggregation.

Experimental Results

The authors evaluated ProAlign across four diverse datasets: CAMELYON+ (breast cancer metastasis), TCGA-NSCLC (lung cancer subtyping), PANDA (prostate cancer grading), and CPTAC (pan-cancer analysis).

As shown in the performance comparison (Figure 4), ProAlign significantly outperforms existing unsupervised methods. On the CAMELYON+ dataset, ProAlign achieved a balanced accuracy of 56.31%, a substantial improvement over the previous state-of-the-art unsupervised model, Panther (50.86%). Remarkably, in tasks like lung cancer subtyping (TCGA-NSCLC), ProAlign's performance was competitive with, and in some cases exceeded, several established weakly supervised MIL models.

Performance comparison of ProAlign against supervised and unsupervised methods across four benchmark datasets using the CONCH foundation model.

The choice of the underlying Vision-Language foundation model proved critical. Experiments indicated that using CONCH, a model specifically pre-trained on pathology data, yielded superior results compared to the more general-purpose PLIP model.

Discussion and Conclusion

A key strength of ProAlign is its "biological rationality." Visualization of prototype allocation maps reveals that the model correctly identifies and quantifies tissue types relevant to specific diagnoses. For instance, it accurately identifies higher proportions of fibrosis in Lung Adenocarcinoma (LUAD) slides, matching clinical expectations.

However, the framework's performance is sensitive to the number of prototypes selected. In simpler biopsy datasets like PANDA, increasing the number of prototypes beyond a certain point can lead to performance degradation, suggesting that the prototype set should be tailored to the complexity of the specific pathology task.

In conclusion, ProAlign demonstrates that integrating textual medical knowledge into unsupervised learning significantly enhances the quality and interpretability of slide representations. By bridging the gap between visual features and semantic concepts, ProAlign paves the way for more generalizable and clinically relevant AI tools in computational pathology.

Summary updated

BibTeX
@misc{chen2025cross,
  author = {Yuxuan Chen and Jiawen Li and Jiali Hu and Xitong Ling and Tian Guan and Anjia Han and Yonghong He},
  title = {{Cross-Modal Prototype Allocation: Unsupervised Slide Representation Learning via Patch-Text Contrast in Computational Pathology}},
  year = {2025},
  eprint = {2503.20190},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2503.20190},
}
Figure