CleanPatrick: A Benchmark for Image Data Cleaning

Fabian Gröger, Simone Lionetti, Philippe Gottfrois, Alvaro Gonzalez-Jimenez, Ludovic Amruthalingam, Elisabeth Victoria Goessinger, Hanna Lindemann, Marie Bargiela, Marie Hofbauer, Omar Badri, Philipp Tschandl, Arash Koochek, Matthew Groh, Alexander A. Navarini, Marc Pouly

TL;DR

CleanPatrick is the first large-scale benchmark for image data cleaning based on real-world data corruption rather than synthetic noise. Leveraging nearly 500,000 annotations on a dermatology dataset, it provides a rigorous framework to evaluate how well algorithms detect off-topic images, near-duplicates, and label errors.

What Problem Does This Paper Address?

"Garbage in, garbage out" remains a fundamental truth in machine learning. While the community heavily emphasizes data quality, existing image data cleaning benchmarks rely almost entirely on synthetic noise—such as artificially flipping 10% of the labels in a clean dataset.

This approach fails to capture the messy reality of practical data collection, which includes structural issues like near-duplicates (e.g., the same subject from slightly different angles) and off-topic samples (e.g., web-scraped text slides or equipment photos). Without a realistic, non-synthetic benchmark, it is nearly impossible to objectively evaluate and compare data curation strategies.

Methods

The authors built CleanPatrick using a multi-stage curation pipeline to establish a high-quality ground truth from noisy real-world data:

Figure 1: Process of acquiring and curating the CleanPatrick benchmark. We began by collecting annotations from medical crowd workers for three types of data-quality issues. This was followed by a probabilistic estimation of sample quality and annotator expertise, used to aggregate the collected annotations. Finally, a group of medical domain experts judged the quality of a subsample of the dataset.
  1. Crowdsourced Annotation: They collected 496,377 binary annotations from 933 medical crowd workers across three distinct issue types: off-topic samples, near-duplicates, and label errors.
  2. Fast-Duplicates Procedure: To avoid the prohibitive $O(N^2)$ bottleneck of comparing every single image pair, they introduced an iterative nearest-neighbor search using self-supervised DINO embeddings, reducing the required pairwise comparisons to at most $2N$.
  3. Probabilistic Label Aggregation: Instead of relying on simple majority voting, they adapted the GLAD (Generative Model of Labels, Abilities, and Difficulties) framework from Item Response Theory (IRT). This model probabilistically estimates both the difficulty of each sample and the expertise of each annotator.
  4. Expert Calibration: A panel of three board-certified dermatologists reviewed a stratified sample to set optimal binarization thresholds for the final dataset labels.

Crucially, CleanPatrick formalizes data cleaning as a ranking task rather than a binary classification problem. Algorithms must output a continuous anomaly score, allowing them to be evaluated using standard ranking metrics (AUROC, Average Precision, and Precision@k) that mirror real-world human-in-the-loop audit workflows.

Datasets

  • Fitzpatrick17k: The underlying dataset used to build the benchmark, consisting of 16,577 clinical dermatology images across 114 fine-grained skin disease classes.
  • CleanPatrick: The newly introduced benchmark. Curation revealed that the original Fitzpatrick17k dataset contains 4% off-topic samples, 21% near-duplicates, and 32% label errors.
  • CIFAR-10N: Used as a secondary baseline to cross-verify the generalizability and relative ranking of label-error detection methods.

Key Insights and Ideas

  • Data Contamination is Multi-Faceted: Data cleaning is often conflated solely with fixing bad labels. CleanPatrick proves that structural noise (near-duplicates) and contextual noise (off-topic images) represent a massive portion of real-world dataset contamination.
  • Self-Supervision Crushes Structural Noise: Self-supervised representations are exceptionally powerful at identifying near-duplicates. Traditional pixel-level methods (like hashing) completely fail when duplicates differ slightly in resolution, lighting, or cropping.
  • Context-Blind Algorithms Struggle with Fine-Grained Errors: Detecting label errors in specialized domains remains an open, massive challenge. When errors require deep domain expertise to spot, current algorithmic approaches frequently perform near or below chance.

Key Results

  • Near-Duplicate Detection: SelfClean (a self-supervised representation method) dominated this task, achieving an outstanding AUROC of 0.92 and an Average Precision (AP) of 0.88, maintaining a perfect 1.00 Precision@100 and Precision@1000. Pixel-based methods like perceptual hashing (pHash) and SSIM performed near chance (~0.50 AUROC).
  • Off-Topic Detection: Classical anomaly detectors like Isolation Forest (IForest), HBOS, and ECOD performed competitively, achieving AUROCs around 0.76–0.77. While SelfClean had a lower overall AUROC (0.67), it achieved a much higher Precision@100 (0.52), making it highly effective for tight human review budgets.
  • Label-Error Detection: This proved to be the hardest task. Most established methods (FINE, NoiseRank, Confident Learning) performed below or near the random baseline (AUROC $\le$ 0.48). SelfClean performed the best but still achieved a modest AUROC of 0.58 and AP of 0.39.

Limitations and Future Work

  • Retrieval Bias: The fast-duplicates approach relies on DINO embeddings for candidate retrieval, which could theoretically bias the benchmark against non-embedding methods (though the authors' audit suggests this bias is minimal).
  • Expert Panel Size: Ground-truth thresholds were calibrated using a small panel of three dermatologists, which may not fully capture the broader spectrum of clinical disagreement.
  • Domain Specificity: The medical domain's long-tailed distributions and fine-grained classes present a steep challenge. The authors suggest that future work should explore hybrid pipelines combining classical anomaly detection with self-supervised models and human-in-the-loop feedback.

Summary updated

BibTeX
@misc{groger2025cleanpatrick,
  author = {Fabian Gröger and Simone Lionetti and Philippe Gottfrois and Alvaro Gonzalez-Jimenez and Ludovic Amruthalingam and Elisabeth Victoria Goessinger and Hanna Lindemann and Marie Bargiela and Marie Hofbauer and Omar Badri and Philipp Tschandl and Arash Koochek and Matthew Groh and Alexander A. Navarini and Marc Pouly},
  title = {{CleanPatrick: A Benchmark for Image Data Cleaning}},
  year = {2025},
  eprint = {2505.11034},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2505.11034},
}
Figure