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.
翻译:机器学习的发展在很大程度上依赖于数据的急剧增长。然而,像LAION这类大规模网络数据集,除精确重复检测外基本未经处理,可能包含大量冗余。本文提出SemDeDup方法,利用预训练模型生成的嵌入向量来识别并移除语义重复数据——即语义相似但非完全一致的数据对。移除语义重复数据可在保持性能的同时加速学习过程。通过对LAION子集的分析,我们证明SemDeDup可在性能损失极小的情况下移除50%的数据,有效将训练时间减半。此外,模型在分布外数据上的表现有所提升。同时,在对基于部分清洗数据集C4训练的语言模型进行分析时,我们表明SemDeDup在提升效率的同时优于现有方案。SemDeDup展示了一种简单的思路:利用高质量嵌入向量,让模型以更少数据实现更快学习。