liveBook · Manning

Duplicate detection

As explained in Grokking AI Algorithms, Second Edition

Near-duplicate removal is the detection and removal of repeated or substantially similar content from a dataset.

Duplicate detection finds and removes repeated or substantially similar content from a dataset. In language-model training, the same quote may appear hundreds of times across forums and blogs, causing memorization instead of meaningful generalization. section 11.7

Removing duplicates helps to:

  • Prevent the model from assigning excessive probability to repeated phrases. section 11.7
  • Encourage learning general meaning rather than reproducing memorized text verbatim. section 11.7

A repeated quote

Imagine one quotation copied into hundreds of forum posts and blogs. Without duplicate removal, that repetition makes the quote seem unusually important; the model may reproduce it even when it is an incorrect response. section 11.7

How Grokking AI Algorithms, Second Edition covers it

How deep it goes
Explains the memorization problem and practical rationale but does not detail detection algorithms or implementation steps.
Examples
Uses a quotation mirrored across hundreds of forums and blogs as its central example.
How it connects
Connects duplicate detection with data preprocessing, memorization, generalization, and dataset quality.

Related concepts

This explainer was generated by Manning's knowledge graph from the text of Grokking AI Algorithms, Second Edition. The section links point to the parts of the book it draws on.