Aggregation Schemes for Single-Vector WSI Representation Learning in Digital Pathology

Sobhan Hemati, Ghazal Alabtah, Saghir Alfasly, Hamid R. TizhoosharXiv 2025 · DOI

Introduction: The Gigapixel Problem

In digital pathology, a single Whole Slide Image (WSI) is a massive "gigapixel" file, often containing billions of pixels. Because these images are too large to fit into standard GPU memory, researchers typically decompose them into thousands of smaller "patches" or "tiles." Each patch is then processed through a neural network to create a feature vector, or embedding.

The core challenge lies in comparison and retrieval. Comparing thousands of patches from one slide to thousands in another is computationally prohibitive and storage-heavy. To build practical WSI search engines, we must "aggregate" these thousands of patch embeddings into a single, high-quality "fingerprint"—a single-vector representation—that preserves critical diagnostic information while enabling rapid search.

The Aggregation Pipeline

The goal of this research is to evaluate different methods for compressing a set of patch embeddings into a single vector that represents the entire slide. This process allows for efficient indexing and retrieval in large-scale pathology databases.

The general pipeline for aggregating thousands of patch embeddings into a single-vector WSI representation.

Benchmarking Aggregation Schemes

The authors benchmarked several aggregation schemes to determine which produces the most effective fingerprint for WSI retrieval:

  • Pooling Baselines: Simple Average and Max Pooling of patch features serve as the standard starting points.
  • Set-Based Learning: Advanced architectures like Deep Sets (designed to be permutation-invariant), Memory Networks, and Focal Attention (which learns to weigh diagnostically relevant patches more heavily) were evaluated.
  • Fisher Vectors (The Top Performers): This approach uses a generative model, such as a Gaussian Mixture Model or a Variational Autoencoder, to describe the underlying distribution of patches. Rather than just averaging features, Fisher Vectors analyze the gradients—measuring how a specific slide deviates from a global "average" model.
  • Deep Sparse & Binary Fisher Vectors: The study highlights variations that use regularization to produce sparse (mostly zeros) or binary (0s and 1s) vectors. Binary vectors are particularly efficient because they allow for Hamming distance comparisons, which are executed at the hardware level using XOR gates, resulting in lightning-fast search speeds.

Deep Fisher Vectors: Learning from Gradients

The superior performance of Fisher Vectors suggests that capturing how a slide differs from a general population model is more informative than simply averaging its features. The extraction process involves calculating a flattened gradient vector, $S_f$, which serves as the final WSI embedding.

Extraction of the WSI embedding using the gradient vector $S_f$ in the Fisher Vector framework.

Experimental Results

The study utilized four large-scale datasets from The Cancer Genome Atlas (TCGA), covering Bladder, Breast, Kidney, and Colon cancers. Patches were extracted using the Yottixel mosaic algorithm and embedded using a pre-trained DenseNet architecture.

Key Findings:

  • Accuracy Gains: In the Bladder dataset, the Deep Sparse Fisher Vector achieved an accuracy of 0.859, significantly outperforming Average Pooling (0.820) and the non-aggregating Yottixel baseline (0.796). In the Kidney dataset, the Deep Binary Fisher Vector reached 0.802 accuracy, while the baseline struggled at 0.472.
  • Efficiency and Speed: Binarizing data is often seen as a trade-off between accuracy and speed. However, this paper demonstrates that Deep Binary Fisher Vectors can match or exceed the accuracy of real-valued vectors. For the Colon dataset, searching with a 300-dimensional Binary Fisher Vector took only 475ms, compared to over 1,815ms for the sparse version.
  • Single-Vector Superiority: In almost every test, creating a single aggregated vector resulted in better retrieval performance than comparing raw patch sets (e.g., "Median of Minimums"), proving that intelligent summarization is superior to raw set comparisons.

Conclusion

This research demonstrates that Deep Fisher Vectors—particularly sparse and binary versions—offer a potent combination of high retrieval accuracy and hardware-accelerated search speeds. By effectively solving the "gigapixel problem" through intelligent aggregation, these methods pave the way for real-time clinical search engines in digital pathology. Future work may involve integrating these schemes with large-scale foundation models to further enhance diagnostic precision.

Summary updated

BibTeX
@misc{hemati2025aggregation,
  author = {Sobhan Hemati and Ghazal Alabtah and Saghir Alfasly and Hamid R. Tizhoosh},
  title = {{Aggregation Schemes for Single-Vector WSI Representation Learning in Digital Pathology}},
  year = {2025},
  eprint = {2501.17822},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2501.17822},
}
Figure