HistGen: Histopathology Report Generation via Local-Global Feature Encoding and Cross-Modal Context Interaction

Zhengrui Guo, Jiabo Ma, Yingxue Xu, Yihui Wang, Liansheng Wang, Hao Chen · DOI

Abstract

Automating the generation of diagnostic reports from gigapixel histopathology images represents a significant frontier in computational pathology. This paper introduces HistGen, a novel deep learning framework designed to bridge the gap between massive Whole Slide Images (WSIs) and structured clinical text. By utilizing a hierarchical visual encoder and a cross-modal context module, HistGen addresses the unique challenges of scale and information density inherent in histopathology. Our results demonstrate that HistGen not only achieves state-of-the-art performance in natural language generation but also learns robust visual representations that excel in downstream tasks such as cancer subtyping and survival analysis.

Introduction

In clinical oncology, pathologists must meticulously examine Whole Slide Images (WSIs)—digital scans of tissue samples that often exceed tens of thousands of pixels in width and height. The subsequent task of drafting diagnostic reports is both labor-intensive and prone to inter-observer variability. While automated image captioning has matured in the domain of natural images, WSIs present three distinct hurdles:

  1. Extreme Scale: A single WSI contains billions of pixels, far exceeding the capacity of standard neural networks.
  2. Information Density: Reports are concise summaries, whereas the visual data is vast, redundant, and requires multi-scale interpretation.
  3. Data Scarcity: The field has historically lacked standardized, large-scale benchmark datasets pairing WSIs with high-quality clinical reports.

HistGen addresses these challenges through a specialized architecture and a newly curated benchmark dataset, facilitating the transition from raw gigapixel data to actionable clinical insights.

Methodology

HistGen employs a Multiple Instance Learning (MIL) framework enhanced by three primary innovations:

1. Domain-Specific Massive Pre-training

To overcome the limitations of standard ImageNet-pretrained models, the authors pre-trained a Vision Transformer (ViT-L) using the DINOv2 self-supervised strategy. This pre-training utilized a massive dataset of 200 million patches extracted from over 55,000 WSIs. This foundational step ensures the model captures the intricate cellular and architectural nuances specific to histopathology.

2. Local-Global Hierarchical (LGH) Encoder

Pathologists typically diagnose by "zooming" between low-power overviews and high-power cellular details. The LGH encoder mimics this workflow by processing images in a region-to-slide manner. It first encodes local regions to capture cellular morphology and then utilizes a WSI-level encoder to model global interactions across the entire slide, ensuring that both focal lesions and overall tissue architecture are represented.

3. Cross-modal Context (CMC) Module

The CMC module serves as the interface between visual features and the text decoder. It employs "prototype learning" to distill the vast amount of visual data into the most representative patches. Furthermore, it maintains "context vectors" that store diagnostic patterns across different cases, allowing the model to leverage historical context when generating a new report.

Data and Evaluation

The researchers curated the WSI-Report Dataset, the first benchmark of its kind, consisting of 7,753 pairs of WSIs and diagnostic reports sourced from The Cancer Genome Atlas (TCGA). Raw clinical PDFs were processed and summarized using GPT-4 to ensure high-quality, structured ground-truth text.

For evaluation, the model's generalizability was tested on external datasets including UBC-OCEAN, Camelyon, and TUPAC16 for cancer subtyping, alongside six TCGA cohorts for survival analysis.

Key Results

Natural Language Generation (NLG)

HistGen significantly outperformed existing state-of-the-art (SOTA) models, such as R2GenCMN and Show&Tell. It achieved a BLEU-1 score of 0.413, marking a substantial improvement in the linguistic accuracy and clinical relevance of generated reports. Qualitative reviews confirmed that the generated text closely aligns with expert-level diagnoses regarding cancer types and grades.

Transfer Learning and Clinical Utility

A key finding of this research is that training a model to generate reports inherently improves its visual understanding. When the HistGen encoder was fine-tuned for cancer subtyping, it achieved an average accuracy of 82.7%, outperforming specialized MIL methods like TransMIL and DTFD-MIL. Additionally, the model demonstrated superior performance in predicting patient survival times (c-Index), suggesting that the report-generation task forces the model to learn features that are highly prognostic.

Discussion and Future Work

While HistGen represents a major step forward, the authors identify several areas for future development. Currently, the model is specialized for histopathology; expanding the framework to other modalities like radiology or ophthalmology is a logical next step. Furthermore, while the model is adept at identifying primary diagnoses, it occasionally omits specific "fine-print" details, such as precise tumor diameter measurements. Finally, while the 7,800-pair dataset is a landmark for the field, scaling to even larger datasets will likely be necessary to achieve the reliability required for clinical deployment.

Conclusion

HistGen demonstrates that a hierarchical, cross-modal approach can effectively bridge the gap between gigapixel visual data and clinical text. By providing both a novel architecture and a first-of-its-kind benchmark dataset, this work lays the foundation for AI-assisted diagnostic reporting in pathology.

Summary updated

BibTeX
@misc{guo2024histgen,
  author = {Zhengrui Guo and Jiabo Ma and Yingxue Xu and Yihui Wang and Liansheng Wang and Hao Chen},
  title = {{HistGen: Histopathology Report Generation via Local-Global Feature Encoding and Cross-Modal Context Interaction}},
  year = {2024},
  eprint = {2403.05396},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2403.05396},
}
Figure