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

Yucheng Tang, Yufan He, Vishwesh Nath, Pengfei Guo, Ruining Deng, Tianyuan Yao, Quan Liu, Can Cui, Mengmeng Yin, Ziyue Xu, Holger Roth, Daguang Xu, Haichun Yang, Yuankai Huo

TL;DR

HoloHisto is a novel end-to-end framework that enables high-fidelity segmentation of gigapixel whole slide images (WSIs) by processing massive 4K resolution patches. By combining sequential tokenization with efficient linear multi-scale attention, it captures vast contextual relationships that traditional "patch-and-stitch" methods miss, setting new state-of-the-art benchmarks in renal pathology.

What Problem Does This Paper Address?

In digital pathology, Whole Slide Images (WSIs) are gargantuan, often exceeding 80,000 $\times$ 70,000 pixels. Because these images are too large for standard GPU memory, the industry standard has been a two-stage "patch-and-stitch" process: chop the image into tiny tiles (e.g., 256x256 or 512x512), segment them individually, and glue the results back together.

This approach has a major flaw: it loses the "big picture." Small patches lack the spatial context needed to identify large-scale tissue structures or subtle interrelations between distant regions. However, simply increasing patch size to 4K resolution creates a computational nightmare; standard Transformer models use Softmax attention, which has a quadratic complexity ($O(N^2)$) relative to the number of pixels. A 4K patch has 16 times more pixels than a 1K patch, making standard attention prohibitively expensive.

![Fig.

  1. Comparison of field of view across different resolutions. 4K provides significantly more context than traditional small patches.](/figures/art_166df729913c452c83fb81a349347f98)

Methods

The authors introduce HoloHisto, a framework designed to handle ultra-high-definition (UHD) inputs efficiently through three main innovations:

  1. Random 4K Sampler: Utilizing the cuCIM library, the framework performs real-time, asynchronous reading of WSIs. This allows the model to sample "virtually unlimited" 4K patches during training without the need for slow, offline pre-tiling.
  2. Sequential Tokenization: To compress the massive 4K input, HoloHisto uses a pre-trained Vector Quantized Generative Adversarial Network (VQGAN) encoder. This maps image regions into a discrete "codebook" of visual tokens. This reduces the sequence length while retaining high-quality perceptual details, effectively turning the image into a grid of semantic "visual words."
  3. Linear Multi-Scale Attention: Instead of the standard Softmax attention, the backbone uses ReLU linear attention (inspired by EfficientViT). This shifts the computational complexity from quadratic to linear, making it feasible to process the long sequences generated by 4K patches.

![Fig.

  1. The HoloHisto-4K backbone architecture, featuring VQGAN tokenization and multi-scale ViT blocks.](/figures/art_d842a6f51dd94b3198fe83ab2220a151)

Datasets

The researchers evaluated HoloHisto on two primary datasets:

  • KPIs (Kidney Pathology Image Segmentation): A new, expert-annotated dataset introduced in this paper. It contains 60 high-resolution WSIs of whole mouse kidneys (including chronic kidney disease models) with WSI-level glomeruli segmentation.
  • NEPTUNE: A public dataset consisting of 1,751 ROI images (3000 $\times$ 3000 resolution) from 125 patients, used to validate the model's performance on human tissue features.

Key Insights and Ideas

  • Context is King: The jump from 1024x1024 to 4K resolution isn't just a marginal gain; it provides 31 times more pixels than standard 2D patches. This allows the model to "see" entire anatomical structures that were previously fragmented.
  • Discrete Representation as Compression: By using a VQGAN codebook, the model treats image segmentation more like a sequence modeling task (similar to how LLMs treat text). This abstraction is key to handling the information density of gigapixel images.
  • End-to-End WSI I/O: HoloHisto is the first approach to support direct input/output of complete WSIs and their corresponding gigapixel masks, moving away from the fragmented workflows of the past.

![Fig.

  1. The holistic end-to-end workflow for training and inference on gigapixel images.](/figures/art_12c0129b716e43ec865f2bf366bd9e6f)

Key Results

HoloHisto-4K significantly outperformed existing state-of-the-art (SOTA) models, including U-Net, SwinUNETR, and Segment Anything Model (SAM) variants.

  • WSI-Level Performance: On the KPIs dataset, HoloHisto achieved a Dice score of 84.54% for WSI-level segmentation. For comparison, the best-performing baseline (SAM-ViT-H) only reached 77.24%, while standard U-Nets struggled at 62.19%.
  • Consistency: The model showed remarkable stability across different kidney disease models (Normal, DN, NEP25), consistently maintaining higher Dice scores than tile-based methods.
  • Qualitative Superiority: Visual results show that HoloHisto produces much cleaner, more continuous masks for large structures compared to the fragmented outputs of patch-based models.

Limitations and Future Work

The primary limitation noted by the authors is the use of a natural image pre-trained tokenizer. The VQGAN codebook was learned from general images (like those in ImageNet), not specific histopathology features. The authors suggest that training a domain-specific tokenizer for pathology could further unlock performance.

Additionally, while HoloHisto handles 4K patches, the ultimate goal is a "Whole-Slide-Level" foundation model that can process an entire gigapixel image in a single forward pass without any tiling at all—a frontier the team intends to explore next.

Summary updated

BibTeX
@misc{tang2024holohisto,
  author = {Yucheng Tang and Yufan He and Vishwesh Nath and Pengfei Guo and Ruining Deng and Tianyuan Yao and Quan Liu and Can Cui and Mengmeng Yin and Ziyue Xu and Holger Roth and Daguang Xu and Haichun Yang and Yuankai 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