Automatic Data Curation for Self-Supervised Learning: A Clustering-Based Approach
Huy V. Vo, Vasil Khalidov, Timothée Darcet, Théo Moutakanni, Nikita Smetanin, Marc Szafraniec, Hugo Touvron, Camille Couprie, Maxime Oquab, Armand Joulin, Hervé Jégou, Patrick Labatut, Piotr Bojanowski
TL;DR
This work tackles SSL data quality by introducing a principled automatic data curation pipeline based on hierarchical $k$-means with resampling, aimed at producing large, diverse, and balanced datasets. The method promotes sampling from an embedding-space support to approximate a uniform distribution over data concepts, addressing long-tail biases that hinder SSL. Across web images, text, and satellite imagery, SSL features trained on curated data outperform those trained on raw data and, in many cases, rival manually curated datasets, with pronounced gains on robustness, out-of-distribution, and long-tailed benchmarks. The approach is scalable, domain-agnostic, and applicable beyond SSL, offering practical benefits for large-scale data-driven learning while highlighting areas for further scaling and fairness considerations.
Abstract
Self-supervised features are the cornerstone of modern machine learning systems. They are typically pre-trained on data collections whose construction and curation typically require extensive human effort. This manual process has some limitations similar to those encountered in supervised learning, e.g., the crowd-sourced selection of data is costly and time-consuming, preventing scaling the dataset size. In this work, we consider the problem of automatic curation of high-quality datasets for self-supervised pre-training. We posit that such datasets should be large, diverse and balanced, and propose a clustering-based approach for building ones satisfying all these criteria. Our method involves successive and hierarchical applications of $k$-means on a large and diverse data repository to obtain clusters that distribute uniformly among data concepts, followed by a hierarchical, balanced sampling step from these clusters. Extensive experiments on three different data domains including web-based images, satellite images and text show that features trained on our automatically curated datasets outperform those trained on uncurated data while being on par or better than ones trained on manually curated data. Code is available at https://github.com/facebookresearch/ssl-data-curation.
