Model-based Cleaning of the QUILT-1M Pathology Dataset for Text-Conditional Image Synthesis

Marc Aubreville, Jonathan Ganz, Jonas Ammeling, Christopher C. Kaltenecker, Christof A. Bertram · DOI

Abstract

Large-scale scraped datasets like QUILT-1M are essential for training histopathology foundation models but suffer from significant "data noise"—including UI elements, narrators, and misaligned captions. This paper presents a two-stage cleaning pipeline using a ResNet-based impurity classifier and CONCH-based semantic filtering. We find that nearly 78% of QUILT-1M images contain non-medical artifacts. By filtering these impurities, we significantly improve the quality of text-conditional image synthesis, reducing the Fréchet Inception Distance (FID) from 247.24 to 147.36.

Introduction

Training foundation models for histopathology is challenging due to the massive size of whole-slide images and strict patient privacy regulations. To circumvent these issues, the community developed QUILT-1M, a dataset of 1 million image-caption pairs scraped from public educational sources like PubMed, YouTube, and Twitter. However, because these images are often screenshots from videos or papers, they are frequently "dirty," containing non-biological artifacts such as narrator faces, software UI elements, arrows, and multi-panel layouts. When generative models like Stable Diffusion are trained on this raw data, they learn to replicate these impurities rather than pure tissue morphology.

Methodology

The researchers developed a two-stage cleaning pipeline to refine the dataset:

  1. Impurity Classifier: A ResNet50-D multi-label classifier was trained on a manually annotated 1% sample (6,532 images) to detect eight specific types of impurities. To provide a baseline for "clean" data, the training set was supplemented with 2,072 guaranteed-clean images from the TCGA-BRCA cohort.
  2. Semantic Refinement: To ensure image-text alignment, the authors utilized CONCH, a vision-language model specialized for pathology. They calculated CLIP scores for every pair and discarded the bottom 50% of the dataset where the text least accurately described the image content.
  3. Generative Evaluation: A Stable Diffusion 2.1 model was fine-tuned on various iterations of the dataset (Original vs. Filtered) to evaluate the impact of data cleaning on generative fidelity.
Table 1: Prevalence of impurities in QUILT-1M and performance of the ResNet50-D classifier across different categories.

Key Insights

The study revealed a staggering prevalence of noise: 78.26% of the QUILT-1M dataset contains at least one form of impurity. As shown in Table 1, the most common artifacts are desktop/window decorations (35.96%) and additional buttons/control elements (31.89%). The ResNet50-D classifier proved highly effective at identifying these elements, achieving an overall accuracy of 92.71% and nearly perfect detection of narrators (0.9962 ROC AUC).

Results

The cleaning pipeline led to a dramatic improvement in both qualitative and quantitative metrics. Using the Fréchet Inception Distance (FID) to measure the similarity between generated and real pathology images, the researchers observed a steady decline in scores as filtering became more rigorous.

Figure 1: Comparison of image generations for "breast adenocarcinoma" across dataset variants. Filtering impurities and applying semantic scores significantly reduces FID and removes non-medical artifacts.

As illustrated in Figure 1, the original QUILT-1M model frequently generated images containing people or software windows. Filtering for visual impurities reduced the FID from 247.24 to 214.08. The most significant gain came from combining visual filtering with CONCH-based semantic refinement, which brought the FID down to 147.36 and resulted in generations that closely resemble actual tissue morphology.

Limitations and Future Work

A primary limitation is the reliance on the standard FID metric, which uses an Inception network trained on general objects (ImageNet). This may not be the optimal judge for specialized medical imagery. Future research should focus on developing pathology-specific evaluation metrics. Additionally, rather than discarding entire images containing small artifacts, future iterations could employ automated cropping to preserve the underlying medical data while removing the noise.

Summary updated

BibTeX
@inproceedings{aubreville2024model,
  author = {Marc Aubreville and Jonathan Ganz and Jonas Ammeling and Christopher C. Kaltenecker and Christof A. Bertram},
  title = {{Model-based Cleaning of the QUILT-1M Pathology Dataset for Text-Conditional Image Synthesis}},
  booktitle = {MIDL Short Papers},
  year = {2024},
  url = {https://openreview.net/forum?id=m7wYKrUjzV},
}
Figure