Near-duplicate Detection
Also known as: deduplication, shingling, MinHash, SimHash, 近重复检测.
Finding documents that are almost, but not exactly, the same, such as a news story republished with a new headline, by comparing fingerprints of their word sequences.
Synthetic dataExamples on this page use synthetic data created for illustration.
Definition
Near-duplicate detection finds documents that are almost, but not exactly, the same, such as a news story republished with a new headline. Methods turn each text into a compact fingerprint of its word sequences and call two documents near-duplicates when their fingerprints overlap enough.
In plain terms
An exact hash fails the moment one word differs. The standard approach cuts each text into overlapping runs of words called shingles, then measures how much two sets of shingles overlap (the Jaccard similarity: shared shingles divided by all distinct shingles). Techniques such as MinHash and SimHash compress those sets so that millions of documents can be compared quickly.
The aim is to count stories, not copies. Two independent reports of the same event are not duplicates: they share facts but not wording. Keep the original documents and record which cluster each belongs to.
Example
Word 3-shingles (every run of three consecutive words):
| Text | Shingles | Shared with A | Jaccard similarity to A |
|---|---|---|---|
| A: “the central bank raised rates on tuesday” | 5 | — | — |
| B: “the central bank raised rates on tuesday morning” | 6 | 5 | 5 / 6 = 0.83 |
| C: “policymakers lifted the benchmark rate on tuesday” | 5 | 0 | 0 / 10 = 0 |
B is a near-duplicate of A (one added word); C reports the same event in different words and is correctly kept as a separate story.
Common misunderstandings
- “Two stories about the same event are duplicates.” Duplicates share wording; independent reports share facts.
- “An exact checksum is enough.” One changed word or a new headline defeats it.
- “One similarity threshold suits all text.” Short items and boilerplate-heavy pages need different settings; check examples.
References
- Andrei Z. Broder. On the Resemblance and Containment of Documents . Proceedings of Compression and Complexity of SEQUENCES 1997, 1997. DOI: 10.1109/SEQUEN.1997.666900
- Gurmeet Singh Manku, Arvind Jain, Anish Das Sarma. Detecting Near-duplicates for Web Crawling . Proceedings of the 16th International Conference on World Wide Web, 2007. DOI: 10.1145/1242572.1242592
- Christopher D. Manning, Prabhakar Raghavan, Hinrich Schütze. Near-duplicates and shingling, in Introduction to Information Retrieval . Cambridge University Press, 2008.