Pathology Image Restoration via Mixture of Prompts

Jiangdong Cai, Yan Chen, Zhenrong Shen, Haotian Jiang, Honglin Xiong, Kai Xuan, Lichi Zhang, Qian WangarXiv 2025 · DOI

Introduction

In the field of digital pathology, the acquisition of "all-in-focus" whole-slide images (WSI) is a critical yet challenging task. Due to the inherent unevenness of biological tissue samples, different regions of a slide often fall out of the focal plane during a single scan. Traditional solutions involve Multi-Focus Image Fusion (MFIF), which requires scanning multiple focal planes and merging them—a process that is both time-consuming and computationally intensive. This paper introduces a novel two-stage framework designed to restore high-quality, sharp images from a single out-of-focus scan by leveraging a "Mixture of Prompts" (MoP).

Methodology

The proposed framework addresses the limitations of standard image restoration models, which often struggle with the intricate morphological complexity of pathology slides or produce artifacts that compromise diagnostic integrity.

Mixture of Prompts (MoP)

The system extracts three specialized priors to guide the restoration process:

  1. Defocus Prompt ($P_D$): Utilizing a pre-trained encoder, the model estimates local blur levels and focal distances, providing a map of degradation severity.
  2. Pathology Prompt ($P_P$): High-level semantic features are derived from pathology foundation models such as Prov-GigaPath or UNI. These features provide essential domain knowledge, helping the network understand the expected biological structures.
  3. Edge Prompt ($P_E$): Fine-grained structural information is captured via edge detection. Crucially, these edges are weighted by the defocus prompt, allowing the model to distinguish between reliable structural markers and unreliable, heavily blurred edges.
The proposed architecture featuring the Mixture of Prompts (MoP) module, the P-former for coarse restoration, and the P-diffusion for fine detail refinement.

Two-Stage Restoration Architecture

The restoration pipeline is divided into two distinct stages to balance fidelity and perceptual quality:

  • Stage 1: P-former (Coarse Restoration): This stage employs a Transformer-based model utilizing a Mixture of Experts (MoE) approach. Guided by the pathology prompt, the P-former restores the general structure and handles diverse tissue types, providing a stable, high-fidelity baseline.
  • Stage 2: P-diffusion (Fine Detail Refinement): A diffusion-based model refines the coarse output. By integrating edge and pathology prompts, it injects realistic high-frequency details, such as nuclear membranes and extracellular matrix textures, without introducing the "hallucinations" common in unguided generative models.

Experimental Evaluation

The framework was rigorously tested on both in-house histology datasets (13,000 image pairs) and the public 3DHistech cervical cytopathology dataset.

Quantitative and Qualitative Results

The combined P-former + P-diffusion approach achieved state-of-the-art performance, reaching a PSNR of 28.91 and an LPIPS score of 0.0735. These metrics indicate a superior balance between pixel-level accuracy and perceptual realism compared to standalone models like Restormer or ResShift.

Qualitative comparison of the proposed method against baseline restoration models, highlighting superior detail preservation in cell nuclei.

Qualitatively, the method excels at restoring distinct boundaries for cell nuclei and fine textures where other methods often produce over-smoothed or "plastic-looking" results.

Impact on Downstream Tasks

To validate clinical utility, the authors evaluated the model's impact on a downstream cancer-cell classifier. Restoration using the MoP framework improved classification accuracy from 82.82% (on blurry images) to 91.91%, significantly closing the gap with the ground truth accuracy of 95.15%.

Conclusion

The "Mixture of Prompts" framework represents a significant advancement in pathology image restoration. By combining the structural reliability of Transformers with the generative power of Diffusion models—all anchored by domain-specific biological and optical priors—the method enables high-quality imaging from single scans. Future work will focus on optimizing inference speeds to facilitate direct integration into digital scanning hardware.

Summary updated

BibTeX
@misc{cai2025pathology,
  author = {Jiangdong Cai and Yan Chen and Zhenrong Shen and Haotian Jiang and Honglin Xiong and Kai Xuan and Lichi Zhang and Qian Wang},
  title = {{Pathology Image Restoration via Mixture of Prompts}},
  year = {2025},
  eprint = {2503.12399},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2503.12399},
}
Figure