[Paper Review] SemDeDup: Data-efficient learning at web-scale through semantic deduplication
SemDeDup uses embeddings from pre-trained models to identify and remove semantic duplicates in web-scale data, reducing data by up to 50% with little to no performance loss and faster training across vision-language and language modeling tasks.
Progress in machine learning has been driven in large part by massive increases in data. However, large web-scale datasets such as LAION are largely uncurated beyond searches for exact duplicates, potentially leaving much redundancy. Here, we introduce SemDeDup, a method which leverages embeddings from pre-trained models to identify and remove semantic duplicates: data pairs which are semantically similar, but not exactly identical. Removing semantic duplicates preserves performance and speeds up learning. Analyzing a subset of LAION, we show that SemDeDup can remove 50% of the data with minimal performance loss, effectively halving training time. Moreover, performance increases out of distribution. Also, analyzing language models trained on C4, a partially curated dataset, we show that SemDeDup improves over prior approaches while providing efficiency gains. SemDeDup provides an example of how simple ways of leveraging quality embeddings can be used to make models learn faster with less data.
Motivation & Objective
- Motivate data efficiency in large-scale self-supervised learning by addressing semantic redundancy beyond exact duplicates.
- Quantify the prevalence of semantic duplicates in web-scale datasets like LAION.
- Demonstrate that removing semantic duplicates preserves or improves performance while reducing training time.
- Extend semantic deduplication to large text corpora like C4 and assess efficiency gains in language modeling.
Proposed method
- Embed data points with pre-trained foundation models (CLIP for images, OPT for language).
- Cluster embeddings into k clusters (e.g., k=50,000 for CLIP, k=11,000 for OPT).
- Within each cluster, compute pairwise cosine similarities and mark semantic duplicates based on a threshold 1-ε.
- From each duplicate group, keep the example with the lowest cosine similarity to the cluster centroid and remove the rest.
- Tune ε to control the retained data fraction and analyze robustness to the choice of k and embedding model.
Experimental results
Research questions
- RQ1How prevalent are semantic duplicates in web-scale datasets like LAION when measured in embedding space?
- RQ2Can removing semantic duplicates preserve model performance while reducing data size and training time in CLIP and language models?
- RQ3How does SemDeDup perform with different clustering granularities and embedding models, and on out-of-distribution tasks?
- RQ4Does applying SemDeDup to text corpora (C4) yield efficiency gains without sacrificing perplexity or validation performance?
Key findings
- LAION-440M contains substantial semantic redundancy; 30% have a semantic duplicate at ε=0.00095 and 50% at ε=0.03.
- Removing semantic duplicates up to 50% of LAION-440M yields almost the same performance and doubles training speed.
- Across 24 tasks, average zero-shot performance improves when removing semantic duplicates, with minimal losses at larger pruned fractions.
- For out-of-distribution tasks (6 datasets), SemDeDup with 37% data removal outperforms the baseline and with 50% removal matches baseline on average.
- On language modeling with C4, SemDeDup outperforms NearDup baselines and enables meaningful compute savings by training on smaller deduplicated datasets.
- Training on deduplicated data can achieve baseline perplexity with 10–15% less compute when continuing training for more epochs on pruned data.
Read this paper
Open the full text in the Nubint reader and ask about any passage as you read.
Read this paper on NubintThis review was generated by AI from the original paper. Please check the paper before citing it.