Noise-Robust De-Duplication at Scale

Emily Silcock, Luca D'Amico-Wong, Jinglin Yang, Melissa DellICLR 2023

Introduction

De-duplication is a "silent" pillar of modern Natural Language Processing (NLP). If training data is saturated with duplicates, models tend to memorize rather than generalize. Worse, if test set data leaks into the training set, evaluation metrics become unreliable.

Researchers have developed a new neural-based approach to text de-duplication that significantly outperforms traditional N-gram methods, especially in "noisy" datasets containing OCR errors or minor edits. Alongside this method, they released NEWS-COPY, a massive human-labeled benchmark, demonstrating that contrastively trained bi-encoders can identify duplicates that hashing misses while scaling efficiently to millions of documents.

The Problem with Traditional Methods

Historically, the industry has relied on N-gram methods (like MinHash or Locality-Sensitive Hashing, LSH) because they are incredibly fast. However, these methods are brittle. If a text has slight OCR errors, minor abridgments, or was translated by a machine, the N-gram overlap drops sharply, causing the duplicate to be missed. In fact, the researchers found that 19% of true duplicates in their dataset had zero 10-grams in common. Relying solely on 10-gram hashing for LLM training data likely means missing a fifth of all duplicates.

Furthermore, evaluating de-duplication is notoriously difficult. It is nearly impossible to find all duplicates in a massive corpus to create a "ground truth" benchmark without an astronomical amount of human labor.

A Neural Approach to De-Duplication

To move beyond simple string matching, the authors propose a robust Neural De-Duplication pipeline:

  1. Bi-Encoder Model: They utilize a symmetric bi-encoder (based on S-BERT MPNet) contrastively trained to map near-duplicate articles to similar vector spaces. This enables "fuzzy" matching based on semantic content rather than exact character sequences.
  2. Re-Ranking Approach: For higher precision, a "re-ranker" uses the bi-encoder to find top candidates, which are then passed to a more computationally expensive cross-encoder to make the final determination.
  3. Scaling with FAISS: To operate at scale, the pipeline leverages the FAISS library for efficient similarity search. This allows the processing of millions of documents without the $O(N^2)$ complexity of comparing every single pair.
  4. Clustering: Once similarities are computed, community detection (Louvain) is used to group articles into definitive duplicate clusters.

Datasets and the "Time-Window" Hack

The paper introduces NEWS-COPY, a primary contribution containing 27,210 articles and 122,876 positive duplicate pairs. To build this without comparing every article in history, the authors exploited the "timeliness" of historical news wires. Because duplicate news stories typically only appear within a narrow time window (a few days), human annotators could exhaustively label the corpus within those windows, solving the unbiased evaluation problem.

Other datasets evaluated include subsets of the C4 (Colossal Clean Crawled Corpus) (RealNews and Patents) for off-the-shelf performance, and SuperGlue (specifically ReCoRD) to evaluate test-set leakage.

Key Results

The neural models demonstrated a massive leap in accuracy over traditional methods. On the NEWS-COPY test set, the neural Re-ranking model achieved an Adjusted Rand Index (ARI) of 93.7, while the more scalable Bi-encoder achieved 91.5. Traditional LSH and N-gram overlap lagged significantly behind at 73.7 and 75.0, respectively.

Comparison of Neural and Non-Neural de-duplication performance.

Noise Robustness: The neural models were far superior at identifying duplicates in the 1930s portion of the dataset, which suffered from much "noisier" OCR than the 1970s portion.

Real-World Impact (Leakage): When applying their model to the ReCoRD benchmark, the authors found significant leakage from the training set. GPT-3’s performance on leaked examples was 84%, compared to only 70% on non-leaked examples, strongly suggesting that standard benchmark scores are artificially inflated by duplication.

Scalability and Limitations

A common myth is that neural methods are too slow for large-scale de-duplication. The authors proved otherwise, showing that a single NVIDIA A6000 GPU can de-duplicate 10 million articles (19GB of text) in under 12 hours.

Time breakdown for processing 10 million articles using Bi-Encoder vs Hashing.

Despite this success, there are limitations to consider:

  • The Embedding Bottleneck: As shown in the time breakdown, the vast majority of the processing time (over 8.5 hours out of the ~11.75 total) is spent simply generating embeddings for the articles. Using "lighter" models like DistilBERT could drastically reduce this bottleneck with minimal accuracy loss.
  • Semantic vs. Exact Duplicates: The neural model sometimes flags "false positives" that are semantically identical but technically different (e.g., two different journalists writing about the exact same event using similar wire-service facts). Whether these should be removed depends on the specific downstream use case.
  • Template Sensitivity: In datasets like C4, the model occasionally struggled with "templates" (e.g., medical report forms or patent boilerplate) that appear thousands of times, requiring manual thresholds to ignore massive, unhelpful clusters.

Summary updated

BibTeX
@inproceedings{silcock2023noise,
  author = {Emily Silcock and Luca D'Amico-Wong and Jinglin Yang and Melissa Dell},
  title = {{Noise-Robust De-Duplication at Scale}},
  booktitle = {International Conference on Learning Representations},
  year = {2023},
}
Figure