Google engineers Gurmeet Singh Manku, Arvind Jain, and Anish Das Sarma showed in 2007 that 64-bit SimHash fingerprints at Hamming distance k = 3 achieve roughly 0.75 precision and 0.75 recall for near-duplicate detection across 8 billion web pages, fitting the entire uncompressed fingerprint index into 64 GB (and under 32 GB compressed). By permuting bit-blocks to the front of sorted tables, their system finds all matching fingerprints within 3 bit-flips in milliseconds online or scans 1 million batch queries in under 100 seconds across 200 MapReduce mappers.
Exact cryptographic hashes like MD5 and SHA-1 miss near-duplicates differing only in ads, hit counters, or timestamps, while Broder’s shingle signatures require 24 bytes per page (3x larger). Manku, Jain, and Das Sarma turned Charikar’s random-hyperplane SimHash into a production crawler filter able to drop near-duplicate pages and avoid following their outgoing links.
- 3x smaller fingerprints: 64-bit SimHash uses 8 bytes per page (
64 GBfor 8B pages), versus 24 bytes for Broder’s six-Rabin-fingerprint shingles. - Accuracy sweet spot: Manually judging sampled pairs across 8B pages showed
k = 3differing bits balances precision and recall both near 0.75. - 50% index compression: Encoding XOR deltas between consecutive sorted fingerprints with Huffman-coded leading-1 bit positions shrunk the 64 GB table to under 32 GB.
- 1B batch queries/day pace: Streaming 64 MB GFS chunks across 200 mappers exceeded 1 GB/sec combined throughput, resolving 1M query fingerprints in under 100 seconds.
How It Works
To build a 64-bit SimHash for a page, the crawler extracts weighted IR features (tokens, case folding, stop-word removal, stemming, phrases), hashes each feature into 64 bits, adds or subtracts its weight across a 64-element float vector based on each bit’s sign, and takes the final sign bits.
Finding all stored fingerprints within Hamming distance k = 3 of a query F is harder: probing every <= 3-bit mutation in one sorted table takes C(64, 3) = 41,664 lookups, while precomputing all <= 3-bit neighbors inflates index size up to 41,664x. The authors resolve this with a pigeonhole multi-table layout:
- Online query tables: Split the 64 bits into blocks and build
tsorted, compressed tablesT_1..T_t. Each table applies a bit permutationpi_ithat moves a chosen subset ofp_iprefix bits to the front. If two fingerprints differ in at most 3 bits, at least one block combination must match exactly in its leadingp_ibits. Probing the tables in parallel (via interpolation search on 1,024-byte XOR-Huffman blocks) narrows 8B candidates down to 8 to 512 records to popcount-check. - Batch MapReduce mode: Instead of building
thuge repository tables in RAM, keep the32 GBcompressed repositoryFin GFS 64 MB chunks, replicate the8 MBbatch of1Mquery fingerprintsQinto 10 uncompressed tables inside every mapper’s RAM, and streamFsequentially past 200 co-located mappers.
Key Findings
Evaluating the uniform-bit assumption on real web data revealed two systematic deviations in the 8B-page fingerprint distribution. First, XORs between consecutive sorted fingerprints show heavy density on small leading-1 bit positions because similar pages genuinely cluster together, violating the exponential decay expected from purely random hashes. Second, 128-bucket histograms show sharp spikes caused by empty pages (simhash = 0), widespread "File not Found" responses, and identical bulletin-board login templates.
Despite those clusters, XOR-Huffman compression still halved storage from 64 GB to under 32 GB, and batch processing finished 1M queries in under 100 seconds.
Caveats and Builder Takeaway
- Soft signal over hard deletion: With both precision and recall near
0.75atk = 3, roughly one in four flagged pairs is a false match or missed duplicate. The authors explicitly footnote that production crawlers should use near-duplicate detection to adjust URL crawl priority rather than blindly dropping pages. - Hotspot decompression overhead: Clustering around boilerplate templates and empty pages forces interpolation search to decompress multiple 1,024-byte blocks on popular buckets.
- IDF drift and document length: Because feature vectors rely on global IDF weights that evolve as the corpus grows, and because tiny pages behave differently from long ones, modern pipelines (including LLM training-data deduplication) pair SimHash or MinHash with length filtering and template stripping, building on earlier crawlers like Mercator and early Google search.
If you need web-scale near-duplicate lookup in bounded RAM, permuting bit blocks across a handful of sorted tables remains one of the simplest ways to turn O(N) Hamming scans into sub-millisecond prefix probes.


