Unlocking the potential of digital pathology: Novel baselines for compression

Maximilian Fischer, Peter Neher, Peter J. Schüffler, Sebastian Ziegler, Shuhan Xiao, Robin Peretzke, David Clunie, Constantin Ulrich, Michael Baumgartner, Alexander Muckenhuber, Sílvia D. Almeida, Michael Götz, Jens Kleesiek, Marco Nolden, Rickmer Braren, Klaus Maier‐Hein

Introduction

Digital pathology is currently facing a data crisis. A single "Whole Slide Image" (WSI) can reach gigapixel dimensions, and storing these at 24 bits per pixel creates a significant financial and infrastructural burden for clinical laboratories. To manage this, laboratories often rely on lossy compression. However, the industry standard remains the 30-year-old JPEG format, which can introduce artifacts that degrade both human diagnostic accuracy and the performance of modern artificial intelligence models.

The challenge is twofold. First, pathologists require images to maintain high perceptual fidelity to ensure accurate diagnosis. Second, deep learning (DL) models used for tasks like tumor segmentation are highly sensitive to compression artifacts—even those invisible to the human eye—which can lead to catastrophic drops in accuracy. This paper provides a holistic, unbiased evaluation of modern compression schemes, moving beyond the common research bias of re-compressing already-compressed JPEG images.

Methodology

The researchers benchmarked three conventional codecs—JPEG (baseline), JPEG-XL, and WebP—against three neural (DL-based) codecs: CAI (general-purpose), SPL2 (perceptual fidelity), and SQLC (downstream task performance).

Overview of the proposed evaluation pipeline, including backbone models, compression codecs, and downstream tasks.

A primary innovation of this study is the introduction of a task-agnostic evaluation metric. Rather than training specific AI models for every clinical task, the authors utilized a ResNet18 foundation model pre-trained on pathology images to extract feature embeddings. By measuring the cosine similarity between the embeddings of original and compressed images, they developed a "Feature Similarity" metric that predicts how stable image features remain across different compression levels without requiring exhaustive downstream testing.

Experimental Setup and Datasets

To ensure broad coverage across different tissue types and initial states, the study utilized four distinct histopathological datasets:

  1. JPEG80: Breast and colon tissue images already compressed with JPEG (Quality 80), used to evaluate recompression.
  2. RMS (Rhabdomyosarcoma): A rare, initially uncompressed dataset serving as the gold standard for evaluating true compression impact.
  3. Camelyon16: A standard dataset for metastasis classification in lymph nodes.
  4. PanNuke: A large-scale dataset for nucleus segmentation across 19 tissue types.
Summary of the histopathological datasets used in the study, detailing tissue types, image counts, and tiling parameters.

Key Insights

  • The Generalization Gap: Neural codecs like SPL2 are highly specialized. While they achieve superior results on data similar to their training sets, they struggle to generalize to novel tissue types or different initial compression states.
  • The "Decoding Tax": Neural codecs face a significant computational bottleneck during decoding. For instance, decoding a slide using the SQLC model took approximately 100 seconds—orders of magnitude slower than conventional methods, making them difficult to deploy in high-throughput clinical settings.
  • WebP as a Practical Standard: WebP emerged as the most viable modern alternative to JPEG. It consistently outperformed JPEG in both image quality and file size reduction while maintaining comparable processing speeds.
  • Validation of Feature Similarity: The authors demonstrated that their task-agnostic cosine similarity metric aligns closely with actual downstream performance (e.g., Dice scores in segmentation), providing a faster way to evaluate new compression methods.

Results and Conclusion

In terms of perceptual quality, the SPL2 neural model led the field in metrics such as PSNR and MS-SSIM during re-compression. For AI-driven downstream tasks, the SQLC model maintained the highest accuracy even at high compression ratios. On uncompressed data (RMS), modern schemes like WebP and JPEG-XL achieved significantly higher quality than JPEG at identical bitrates.

Despite the quality advantages of neural models, their computational expense remains a barrier to clinical adoption. The authors suggest that future efforts should focus on standards like JPEG-AI and the use of large-scale foundation models to overcome dataset bias and generalization issues in digital pathology compression.

Summary updated

BibTeX
@misc{fischer2024unlocking,
  author = {Maximilian Fischer and Peter Neher and Peter J. Schüffler and Sebastian Ziegler and Shuhan Xiao and Robin Peretzke and David Clunie and Constantin Ulrich and Michael Baumgartner and Alexander Muckenhuber and Sílvia D. 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