Revisiting Automatic Data Curation for Vision Foundation Models in Digital Pathology

Boqi Chen, Cédric Vincent-Cuaz, Lydia A. Schoenpflug, Manuel Madeira, Lisa Fournier, Vaishnavi Subramanian, Sonali Andani, Samuel Ruiperez-Campillo, Julia E. Vogt, Raphaëlle Luisier, Dorina Thanou, Viktor H. Koelzer, Pascal Frossard, Gabriele Campanella, Gunnar RätscharXiv 2025

TL;DR

This paper introduces the first fully automated, unsupervised tile-level data curation pipeline for training digital pathology vision foundation models on a massive scale of 350 million tiles. By combining hierarchical clustering with a novel batch stratification strategy, the authors mitigate data imbalance and significantly outperform both uncurated baselines and expert-guided supervised curation across diverse clinical downstream tasks.

What Problem Does This Paper Address?

Vision Foundation Models (FMs) are revolutionizing digital pathology (DP) by learning powerful, task-agnostic representations from Whole-Slide Images (WSIs). However, training these models requires hundreds of millions of small image patches ("tiles").

Currently, selecting which tiles to train on relies heavily on high-level, expert-curated WSI metadata (like primary cancer diagnosis or organ origin). This top-down approach completely ignores granular, tile-level variations—such as the mix of healthy tissue, necrosis, and tumor cells within a single slide—leading to highly imbalanced, heavy-tailed data distributions. Because manual tile-level annotation is entirely unscalable at this magnitude, the authors investigate whether unsupervised machine learning can automatically curate data at the tile level to train better, more balanced pathology foundation models.

Methods

The authors propose a two-stage pipeline: Hierarchical Clustering Curation and Stratified Batch Sampling.

  1. Hierarchical Clustering: First, they use an existing pathology foundation model (UNI) to extract embeddings for all 350 million tiles. They then build a bottom-up hierarchical clustering tree using K-means. This structured representation compresses dense, over-represented regions and highlights rare patterns. A top-down sampling strategy is then applied to extract a diverse 10% subset.
  2. Batch Stratification: Crucially, the authors discovered that simply curating the dataset isn't enough if standard random batch sampling is used during self-supervised learning (SSL via DINOv2). Random batches still get dominated by common features. To fix this, they introduce batch stratification: every training batch is forced to contain an equal number of tiles from each top-level cluster. Furthermore, they track sample frequencies to prioritize less-frequently seen tiles within each cluster, maximizing intra-cluster diversity.
Fig. 1. Overview of our pipeline for automatic data curation and SSL training in DP.

Datasets

  • Pre-training Dataset: A massive collection of ~350 million non-overlapping $224 \times 224$ pixel tiles extracted from 11,666 WSIs in The Cancer Genome Atlas (TCGA, covering 32 cancer types) and 25,430 WSIs from the Genotype-Tissue Expression dataset (GTEx, covering 40 healthy tissue sites).
  • Downstream Evaluation:
  • Region of Interest (RoI) level: 8 independent datasets including LUAD (lung), BRACS, BreakHis, BACH (breast), PCAM (lymph node), CRC, UniToPatho, and Chaoyang (colon).
  • Whole-Slide Image (WSI) level: 9 clinical tasks from MSHS and MSKCC clinical centers, spanning biomarker prediction (ER, HER2, PR, HRD, EGFR) and cancer/disease detection (BCa, IBD).

Key Insights and Ideas

  • The Curation-Sampling Paradox: Merely filtering a dataset down to a diverse subset doesn't guarantee better self-supervised learning. If training batches are sampled randomly, the model's gradient updates are still overwhelmed by dominant data modalities. Batch stratification is the essential catalyst that unlocks the power of curated data.
  • Unsupervised Biological Interpretability: Even though the hierarchical clustering tree is built completely unsupervised on raw embeddings, quantitative analysis reveals it captures meaningful biology. For instance, ~50% of the highest-level clusters naturally grouped healthy tissues from GTEx, while others cleanly separated cancerous tiles with high neoplastic or inflammatory cell densities.
  • Size vs. Balance Trade-off: As you sample larger percentages of the dataset, the total variation distance from a perfectly uniform distribution increases because smaller, rarer clusters quickly run out of tiles (depletion).
Fig. 2. (a, b) UMAP embeddings of T1 centroids at level 4. Colors represent cluster sizes (logarithmic scale) for the full and the 10% curated dataset, respectively. (c, d) Visualization of hierarchical sampling dynamics for T1 and T2. Solid lines denote the sampling level and dashed lines are the corresponding dynamics at the alternative level.

Key Results

The proposed method, T1-BS (Tree 1 with Batch Stratification), consistently outperformed the baselines across both evaluation levels:

  • RoI-Level Evaluation: Achieved an overall average balanced accuracy (bACC) of 82.0%, outperforming the full uncurated dataset baseline (79.9%) and a supervised curation baseline (80.8%). It showed massive gains on the highly challenging BRACS dataset (69.3% vs 66.1% baseline).
Table 1. RoI-level evaluation. Best results are in bold and second best are underlined.
  • WSI-Level Evaluation: Reached an overall average AUC of 83.3%, beating the full dataset baseline (82.6%) and supervised curation (82.8%). It achieved notable improvements in difficult tasks like Homologous Repair Deficiency (HRD) prediction (79.1% AUC vs 74.4% baseline) and Immunotherapy (IO) response prediction (59.0% AUC vs 57.3% baseline).
Table 2. WSI-level evaluation. Best results are in bold and second best are underlined.

Limitations and Future Work

  • Bootstrap Dependency: The pipeline relies on pre-extracted embeddings from an existing foundation model (UNI). If the initial model has blind spots, the clustering tree will inherit them.
  • Granular Sampling: Currently, sampling within the bottom-level clusters is entirely random, and batch stratification only looks at top-level clusters rather than the full tree hierarchy.
  • Future Directions: The authors plan to explore more informative sampling strategies within the hierarchy, test different pre-trained FMs, and investigate how this approach alters embedding spaces during continual self-supervised learning.

Summary updated

BibTeX
@misc{chen2025revisiting,
  author = {Boqi Chen and Cédric Vincent-Cuaz and Lydia A. Schoenpflug and Manuel Madeira and Lisa Fournier and Vaishnavi Subramanian and Sonali Andani and Samuel Ruiperez-Campillo and Julia E. Vogt and Raphaëlle Luisier and Dorina Thanou and Viktor H. Koelzer and Pascal Frossard and Gabriele Campanella and Gunnar Rätsch},
  title = {{Revisiting Automatic Data Curation for Vision Foundation Models in Digital Pathology}},
  year = {2025},
  eprint = {2503.18709},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2503.18709},
}
Figure