PolyPath: Adapting a Large Multimodal Model for Multi-slide Pathology Report Generation

Faruk Ahmed, Lin Yang, Tiam Jaroensri, Andrew Sellergren, Yossi Matias, Avinatan Hassidim, Gregory S. Corrado, Dale R. Webster, Shravya Shetty, Shruthi Prabhakara, Yun Liu, Daniel Golden, Ellery Wulczyn, David F. SteinerarXiv 2025 · DOI

Abstract

PolyPath leverages the massive 1-million-token context window of Gemini 1.5 Flash to generate clinical pathology reports from multiple whole-slide images (WSIs) simultaneously. By processing up to 40,000 image patches per case, the model achieves clinical accuracy comparable to human-written reports for cases with up to five slides, marking a significant step toward "generalist" diagnostic AI in pathology.

Introduction

In clinical pathology, a single diagnosis often requires a pathologist to synthesize information across multiple glass slides, known as "parts." While AI has made significant strides in analyzing individual "Regions of Interest" (ROIs) or single Whole Slide Images, most models struggle with the "many-to-one" challenge: integrating findings from several gigapixel-scale images into one cohesive report.

Existing approaches often bypass this complexity by having a human select the "most representative" slide or by using low-magnification views that miss crucial cellular details. PolyPath addresses this by attempting to ingest the entire multi-slide context at a diagnostically relevant magnification (10X), mimicking the actual workflow of a human pathologist.

Methods

The researchers developed PolyPath by fine-tuning Gemini 1.5 Flash. The core innovation lies in how the model handles the sheer volume of data required for multi-slide analysis.

PolyPath workflow for generating pathology findings from multiple whole-slide images.
  1. Input Representation: Each slide is broken into 768 × 768 pixel patches. The model can ingest up to 50 slides per part, totaling up to 40,000 patches—the data equivalent of watching 11 hours of video.
  2. Specialized Encoding: A frozen, medical-specific image encoder converts patches into tokens.
  3. Aggressive Pooling: To fit within the context window, a mean-pooling strategy averages 256 tokens per patch into a single descriptor. While this loses some fine-grained spatial detail, it allows the model to "see" the entire case.
  4. Fine-Tuning: Low-Rank Adaptation (LoRA) was applied to the language model, allowing it to learn the specific structure and vocabulary of pathology reports without retraining the entire network.

Datasets

The study utilized a massive retrospective dataset of approximately 350,000 WSIs with associated pathology reports from a tertiary teaching hospital. The data was categorized by the number of slides per part:

  • P1: Single slide (used as a baseline).
  • P2-5, P6-9, P10+: Multi-slide categories.

The training set included over 93,000 parts, spanning a wide variety of tissue types (colorectal, skin, lung, etc.) and procedures (biopsies, resections).

Key Results and Insights

PolyPath demonstrated that context is critical for diagnostic accuracy. The jump from single-slide to multi-slide modeling led to consistent improvements in report quality, as single-slide baselines often missed the "bottom-line" diagnosis when evidence was located on a different slide.

Pathologist evaluation results showing average scores and preference proportions for PolyPath vs. original reports.
  • Pathologist Preference: In a blinded evaluation by board-certified pathologists, PolyPath’s generated text was considered clinically accurate and equivalent to (or preferred over) the original human report 68% of the time for cases with up to 5 slides.
  • Clinical Accuracy: For "Normal" findings, the model was at least as good as the original report 80% of the time. For "Significant" findings (such as carcinomas), it reached 75%.
  • Quantitative Edge: PolyPath outperformed single-slide baselines across all categories (P1 through P10+) in both ROUGE-L and METEOR scores. However, the authors noted that these standard Natural Language Generation (NLG) metrics are poor substitutes for expert judgment, as a report can have a high ROUGE score but contain a dangerous "clinically significant" error.

Limitations and Future Work

Despite the promising results, several hurdles remain. Performance noticeably dipped for cases with 6 or more slides (the "P10+" challenge), likely due to the relative scarcity of such complex cases in the training data. Additionally, the model was trained on data from a single hospital system; its ability to generalize to different labs with different staining techniques or scanners remains unproven.

Currently, the model generates reports at the "part" level. Real-world pathology often requires integrating multiple parts (e.g., a primary tumor and a lymph node) to determine cancer staging. Moving to "case-level" generation and exploring more sophisticated ways to represent spatial relationships between patches are the next logical steps for this research.

Summary updated

BibTeX
@misc{ahmed2025polypath,
  author = {Faruk Ahmed and Lin Yang and Tiam Jaroensri and Andrew Sellergren and Yossi Matias and Avinatan Hassidim and Gregory S. Corrado and Dale R. Webster and Shravya Shetty and Shruthi Prabhakara and Yun Liu and Daniel Golden and Ellery Wulczyn and David F. Steiner},
  title = {{PolyPath: Adapting a Large Multimodal Model for Multi-slide Pathology Report Generation}},
  year = {2025},
  eprint = {2502.10536},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2502.10536},
}
Figure