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 GB for 8B pages), versus 24 bytes for Broder’s six-Rabin-fingerprint shingles.
  • Accuracy sweet spot: Manually judging sampled pairs across 8B pages showed k = 3 differing 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.
Multi-table space vs. probe-scan tradeoff for 8B 64-bit fingerprints (k = 3)
Each table T_i permutes p_i bits to the leading positions so an exact prefix probe catches every match with at most 3 differing bits
20 tables (6 blocks of 11/10 bits, choose 3; p_i = 31 to 33)<= 8 candidates / probe
16 tables (4 x 16 choose 1 + 4 x 12 choose 1; p_i = 28)64 candidates / probe
10 tables (5 blocks of 13/12 bits, choose 2; p_i = 25 to 26)<= 512 candidates / probe
4 tables (4 blocks of 16 bits, choose 1; p_i = 16)<= 256K candidates / probe

Source: Manku, Jain, and Das Sarma (2007), Section 3.1.1 (Example 3.1).

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 t sorted, compressed tables T_1..T_t. Each table applies a bit permutation pi_i that moves a chosen subset of p_i prefix bits to the front. If two fingerprints differ in at most 3 bits, at least one block combination must match exactly in its leading p_i bits. 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 t huge repository tables in RAM, keep the 32 GB compressed repository F in GFS 64 MB chunks, replicate the 8 MB batch of 1M query fingerprints Q into 10 uncompressed tables inside every mapper’s RAM, and stream F sequentially past 200 co-located mappers.
Online lookup vs. batch MapReduce deduplication
Online single-page mode

Shards t compressed tables across RAM (10 to 20 tables) for millisecond lookup per crawled URL.

Batch MapReduce mode

Builds 10 uncompressed 8 MB tables for 1M queries; 200 mappers scan 32 GB of GFS chunks at >1 GB/s.

Source: Manku, Jain, and Das Sarma (2007), Sections 3.1 to 3.3 and 4.3.

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.75 at k = 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.