HoloHisto: End-to-end Gigapixel WSI Segmentation with 4K Resolution Sequential Tokenization

Yucheng Tang, Yufan He, Holger R. Roth, Pengfeig Guo, Ruining Deng, Tianyuan Yao, Quan Liu, Can Cui, Yuechen Yang, Mengmeng Yin, Ziyue Xu, Daguang Xu, Haichun Yang, Yuankai Z Huo

Introduction

Digital pathology relies on Whole Slide Images (WSIs) that are exceptionally large, often exceeding 50,000 pixels in a single dimension. Traditional deep learning models cannot process these images in their entirety due to memory constraints. Consequently, the industry standard has been a "patch-and-stitch" workflow: dividing the image into small tiles (e.g., 256x256), segmenting them individually, and reassembling the results.

This conventional approach suffers from two major drawbacks. First, it results in a significant loss of context, as small patches fail to capture large-scale tissue structures and long-range spatial relationships. Second, the pipeline creates efficiency bottlenecks, making it computationally expensive and difficult to optimize end-to-end.

Comparison of standard patch sizes vs. the 4K resolution patches used in HoloHisto.

HoloHisto addresses these challenges by moving away from the patch-and-stitch paradigm. It introduces an end-to-end framework capable of processing 4K-resolution base patches, which provide 31 times more pixels than standard 512x512 patches, thereby preserving vital global context.

Methodology

The HoloHisto framework integrates three core technical innovations to enable efficient, high-resolution segmentation:

  1. Sequential Tokenization (VQGAN): To manage 4K inputs without prohibitive computational costs, the model employs a pre-trained Vector Quantized Generative Adversarial Network (VQGAN) encoder. This component compresses high-resolution image regions into a grid of discrete "visual tokens," reducing the sequence length for the transformer while maintaining perceptual detail.
  2. Linear Multi-Scale Attention: Standard Transformer attention scales quadratically with resolution. HoloHisto utilizes ReLU linear attention, which offers linear complexity. This allows the model to scale efficiently to ultra-high-definition (UHD) token sequences.
  3. End-to-End WSI Pipeline: Using the cuCIM library, the authors developed a dataloader for real-time reading and random 4K sampling directly from gigapixel files. This removes the need for offline pre-tiling and provides a virtually unlimited variety of training patches.
The HoloHisto architecture, featuring sequential tokenization and multi-scale ViT blocks.

Datasets and Evaluation

The performance of HoloHisto was validated on two primary benchmarks:

  • Kidney Pathology Image Segmentation (KPIS): A new dataset of 60 high-resolution mouse kidney WSIs with manual annotations for glomeruli.
  • NEPTUNE: A public dataset of 1,751 Regions of Interest (ROIs) from 459 human kidney pathology WSIs.

Key Results and Insights

HoloHisto-4K demonstrates superior performance compared to established baselines, including U-Net, SwinUNETR, and Segment Anything Model (SAM) variants.

  • WSI-level Accuracy: On the KPIS dataset, HoloHisto achieved a Dice score of 84.54% for full WSI segmentation, significantly outperforming SAM-ViT-H (77.24%) and standard U-Nets (62.19%).
  • Patch-wise Performance: At the individual 4K patch level, the model reached a 93.79% Dice score.
  • Generalization: On the NEPTUNE dataset, HoloHisto achieved an average Dice score of 88.85%, surpassing other architectures across six pathological features.

The research highlights that resolution is critical for context; the transition to 4K patches allows the model to identify complex tissue interrelations invisible at smaller scales. Furthermore, random sampling proved more effective than fixed tiling, likely due to its role as a form of data augmentation.

Conclusion and Future Directions

While HoloHisto sets a new state-of-the-art, it currently relies on a VQGAN tokenizer pre-trained on natural images (ImageNet). Future work aims to develop domain-specific tokenizers trained on large-scale pathology data to better capture the unique textures of histopathology. Additionally, the team plans to extend the framework toward generalist models capable of handling diverse pathology vision tasks beyond segmentation.

Summary updated

BibTeX
@misc{tang2024holohisto,
  author = {Yucheng Tang and Yufan He and Holger R. Roth and Pengfeig Guo and Ruining Deng and Tianyuan Yao and Quan Liu and Can Cui and Yuechen Yang and Mengmeng Yin and Ziyue Xu and Holger Roth and Daguang Xu and Haichun Yang and Yuankai Z Huo},
  title = {{HoloHisto: End-to-end Gigapixel WSI Segmentation with 4K Resolution Sequential Tokenization}},
  year = {2024},
  eprint = {2407.03307},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2407.03307},
}
Figure