Unlocking the Potential of Digital Pathology: Novel Baselines for Compression

Maximilian Fischer, Peter Neher, Peter Schüffler, Sebastian Ziegler, Shuhan Xiao, Robin Peretzke, David Clunie, Constantin Ulrich, Michael Baumgartner, Alexander Muckenhuber, Silvia Dias Almeida, Michael Götz, Jens Kleesiek, Marco Nolden, Rickmer Braren, Klaus Maier-Hein · DOI

TL;DR

Whole Slide Images (WSIs) in digital pathology are massive, and while lossy compression is necessary for storage, it can degrade both human diagnosis and AI performance. This paper benchmarks modern conventional and deep-learning codecs, introducing a novel "task-agnostic" metric that uses feature similarity to predict how compression will impact downstream AI tasks without needing to train specific models for every test.

What Problem Does This Paper Address?

Digital pathology is currently bottlenecked by data volume. A single Whole Slide Image (WSI) can be several gigabytes, leading to astronomical storage costs. To manage this, labs rely on lossy compression—primarily JPEG, a standard from 1994 designed for natural scenes, not medical tissue.

The core challenge is that lossy compression permanently alters image data. While an image might "look fine" to a human (perceptual quality), the subtle changes in texture and color can cause deep learning models to fail (downstream performance). Most existing research evaluates these two aspects in isolation and often uses datasets that were already compressed, which biases the results. The authors aim to provide a unified, unbiased framework for evaluating how compression affects both humans and machines.

Methods

The authors conducted a head-to-head comparison between three conventional codecs and three deep-learning (DL) based approaches:

  • Conventional: JPEG (the baseline), JPEG-XL, and WebP.
  • Deep Learning: CAI (general purpose), SPL2 (fine-tuned for perceptual quality), and SQLC (fine-tuned for downstream tasks).

The study's most significant methodological contribution is a task-agnostic downstream metric. Instead of running a full segmentation or classification pipeline for every compression level, they extract features from a pathology foundation model (ResNet18) and measure the cosine similarity between the original and compressed image embeddings.

Fig. 1: Overview of our approach. We provide a full overview of the performanceof linear compression schemes as well as for more recent dl-based schemes on human perception, as well as for dl-based downstream tasks.

Datasets

The study utilizes four distinct histopathological datasets to ensure broad evaluation:

  • JPEG80 Dataset: A collection of breast and colon tissue samples already compressed with JPEG (Quality=80), used to test "recompression" performance.
  • RMS (Rhabdomyosarcoma) Data: A newly introduced, initially uncompressed dataset. This is crucial for an unbiased evaluation of how initial compression affects data.
  • Camelyon16: A standard benchmark for lymph node metastasis detection.
  • PanNuke: A large-scale dataset used for nuclei instance segmentation.
The RMS dataset provides a rare look at initially uncompressed pathology data.

Key Insights and Ideas

  • The Generalization Trap: DL-based codecs are highly effective but brittle. A model fine-tuned on JPEG-compressed data performs excellently on that specific data but struggles to generalize to uncompressed or differently compressed images. They essentially "learn" the artifacts of the training set.
  • WebP is a Strong Contender: While DL models often win on pure metrics, WebP emerged as a highly practical "middle ground." It offers significantly better compression than JPEG with much faster processing times than DL methods.
  • Feature Similarity as a Proxy: The authors proved that cosine similarity in the latent space of a foundation model correlates very well with actual task performance (like Dice scores in segmentation). This allows researchers to evaluate new compression schemes much faster.
  • The Cost of Compression in Training: The appendix reveals a critical "aha moment": models pre-trained on uncompressed data significantly outperform those trained on the industry-standard JPEG80 data. We may be leaving significant AI performance on the table by not prioritizing uncompressed data for foundation model training.

Key Results

  • Perceptual Quality: The SPL2 (DL) model outperformed all other schemes in metrics like MS-SSIM and LPIPS, especially for recompressing existing JPEG data.
  • Downstream Accuracy: The SQLC model maintained the highest segmentation accuracy at high compression ratios. However, the proposed feature similarity metric successfully predicted these drops in performance across all models.
  • Computational Overhead: DL-based codecs are currently too slow for many clinical workflows. For example, decoding a slide with the SQLC model took roughly 100 seconds, whereas conventional methods are nearly instantaneous.
  • Initial Compression Matters: Applying JPEG80 at the start of a pipeline (as is common practice) permanently destroys information that modern DL codecs could have preserved better if they were used as the primary compression method.

Limitations and Future Work

The primary limitation of neural (DL) compression is computational speed and dataset bias. The long encoding/decoding times make them difficult to integrate into current high-throughput scanners.

Future work suggested by the authors includes:

  • Evaluating the newly established JPEG-AI standard once reference implementations are available.
  • Optimizing scanner hardware to natively support neural image compression, similar to how they currently support JPEG.
  • Developing models that don't require time-consuming fine-tuning on specific datasets, potentially by leveraging even larger-scale foundation models.

Summary updated

BibTeX
@misc{fischer2024unlocking,
  author = {Maximilian Fischer and Peter Neher and Peter Schüffler and Sebastian Ziegler and Shuhan Xiao and Robin Peretzke and David Clunie and Constantin Ulrich and Michael Baumgartner and Alexander Muckenhuber and Silvia Dias Almeida and Michael Götz and Jens Kleesiek and Marco Nolden and Rickmer Braren and Klaus Maier-Hein},
  title = {{Unlocking the Potential of Digital Pathology: Novel Baselines for Compression}},
  year = {2024},
  eprint = {2412.13137},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2412.13137},
}
Figure