Revisiting Automatic Data Curation for Vision Foundation Models in Digital Pathology

Cédric Vincent-Cuaz, Boqi Chen, Lydia A. Schoenpflug, Manuel Madeira, Lisa Fournier, Vaishnavi Subramanian, Sonali Andani, Julia E Vogt, Raphaëlle Luisier, Dorina Thanou, Pascal Frossard, Gabriele Campanella, Gunnar RatschMICCAI 2025 · DOI

TL;DR

This paper tackles the challenge of effectively curating massive datasets for training vision foundation models (FMs) in digital pathology. They introduce an unsupervised, tile-level data curation method using hierarchical clustering and a novel stratified batch sampling strategy, significantly improving FM performance on downstream tasks.

What Problem Does This Paper Address?

Digital pathology (DP) involves analyzing high-resolution whole-slide images (WSIs) for tasks like cancer typing and survival prediction. Vision foundation models (FMs) have shown great promise in this domain due to their ability to learn transferable representations from large, unlabeled datasets. However, the performance of these FMs is heavily dependent on the quality and characteristics of the pre-training data. Current data curation methods in DP often rely on expert knowledge at the WSI level (e.g., disease classification), overlooking the granular information available at the tile level. This can lead to biased datasets that don't fully capture the heterogeneity of real-world pathology images, potentially limiting the FM's discriminative power. The paper aims to address this by developing an automated, tile-level data curation framework that ensures a more balanced and diverse representation of pathological features.

Methods

The core of the paper's contribution lies in two main components:

  • Unsupervised Hierarchical Clustering for Data Curation:
    • They leverage pre-trained FMs (specifically, UNI [6]) to extract embeddings from approximately 350 million non-overlapping 224x224 pixel tiles from a large dataset of WSIs (TCGA and GTEx).
  • These tile embeddings are then used to construct a hierarchical clustering tree. This is achieved by recursively applying K-means clustering, starting from a large number of bottom-level clusters and progressively merging them into fewer, larger clusters at higher levels. This process aims to create clusters that are more uniformly distributed across the embedding space.
  • A top-down sampling strategy is then employed to select curated subsets of a desired size (N) from this hierarchical tree. This allows for control over the balance and size of the curated dataset, mitigating biases from over- or under-represented patterns.
  • Stratified Batch Sampling for FM Training:
    • Recognizing that simply curating the data might not be enough, the authors propose a novel batch stratification strategy during the self-supervised learning (SSL) phase.
  • Instead of random batch sampling, they structure each batch to contain an equal number of tiles from each top-level cluster identified by the hierarchical curation.
  • This ensures that the FM is continuously exposed to diverse samples from all parts of the data distribution, even if some clusters are inherently smaller or less frequent. They further enhance this by prioritizing tiles that have been less frequently sampled within a batch and cluster, promoting intra-cluster diversity.

Datasets

  • Pre-training Dataset:
    • 11,666 WSIs from The Cancer Genome Atlas (TCGA) cohort (spanning 32 cancer types).
  • 25,430 WSIs from the Genotype-Tissue Expression (GTEx, v7) dataset (across 40 healthy tissue sites).
  • This resulted in approximately 350 million 224x224 pixel tiles.
  • Downstream Evaluation Tasks:
    • RoI-level tasks: 8 tasks from independent cohorts, including lung adenocarcinoma classification (LUAD), colorectal tissue and polyp classification (CRC), breast cancer subtyping (BRACS), and lymph node metastasis classification (PCAM).
  • WSI-level tasks: 9 clinically relevant tasks from two centers (MSHS and MSKCC), including breast cancer detection (BCa), biomarker prediction (ER, HER2, PR, HRD), and lung cancer tasks (EGFR mutation status, IO response).

Key Insights and Ideas

  • Tile-level curation is crucial: Expert knowledge at the WSI level is insufficient; granular tile-level analysis is necessary for effective data curation in digital pathology.
  • Hierarchical clustering provides a structured data landscape: The hierarchical clustering approach effectively organizes the vast embedding space, allowing for systematic sampling of diverse data points.
  • Balance and size are in tension: There's an inherent trade-off between dataset balance and size. Simply aiming for a balanced dataset might lead to a smaller, less informative subset, while a larger dataset might reintroduce biases.
  • Stratified batch sampling is key for learning: Even with curated data, the way data is fed to the model during training (batch sampling) significantly impacts performance. Stratified sampling ensures continuous exposure to diverse data, mitigating biases.
  • Generalist FMs benefit from diverse data: The proposed method shows promise in training more generalist FMs that perform well across a wider range of tasks and tissue types, rather than specializing in specific biases present in the data.

Key Results

  • The proposed method (T1-BS, referring to a specific hierarchical tree configuration and stratified batch sampling) achieved the highest average performance across both RoI-level and WSI-level benchmarks.
  • T1-BS outperformed other methods, including a baseline with full data and random sampling (F-BR), supervised curation (S-BS), and other automatic curation strategies.
  • Specifically, T1-BS achieved an average balanced accuracy of 87.2% on RoI-level breast tissue tasks, outperforming S-BS (84.7%).
  • For WSI-level tasks, T1-BS showed improvements in average AUC for breast and lung-related benchmarks, notably in challenging tasks like HRD and IO prediction.
  • The study demonstrated that stratified batch sampling consistently outperforms random sampling when using curated subsets.

Limitations and Future Work

  • Confidence in embedding positions: The authors acknowledge that the confidence attributed to the relative positions of embeddings is low, which might affect the effectiveness of sampling within bottom-level clusters.
  • Random sampling within bottom-level clusters: The current method uses random sampling within the smallest clusters, which could be improved.
  • Batch stratification limited to top-level: Batch stratification currently only considers top-level clusters, not the full tree hierarchy.
  • Future Directions:
    • Investigate the impact of different pre-trained FMs on the curation process.
  • Explore additional tree configurations and more informative sampling strategies for both curation and learning.
  • Study the transformations implied by their approach in the embedding space.
  • Apply the method to continual self-supervised learning.
  • Develop more informative bottom-level cluster sampling and batch construction beyond top-level stratification.

Summary updated

BibTeX
@inproceedings{vincentcuaz2025revisiting,
  author = {Cédric Vincent-Cuaz and Boqi Chen and Lydia A. Schoenpflug and Manuel Madeira and Lisa Fournier and Vaishnavi Subramanian and Sonali Andani and Julia E Vogt and Raphaëlle Luisier and Dorina Thanou and Pascal Frossard and Gabriele Campanella and Gunnar Ratsch},
  title = {{Revisiting Automatic Data Curation for Vision Foundation Models in Digital Pathology}},
  booktitle = {International Conference on Medical Image Computing and Computer-Assisted Intervention},
  year = {2025},
  doi = {10.1007/978-3-032-04978-0\_53},
}
Figure