Inferensys

Glossary

Blocking

A computational efficiency technique in record linkage that partitions datasets into mutually exclusive blocks using a cheap heuristic, drastically reducing the number of required pairwise comparisons.
Data scientist building training data pipeline on laptop, data preprocessing visible, technical workspace.
COMPUTATIONAL EFFICIENCY

What is Blocking?

Blocking is a foundational efficiency technique in record linkage that partitions datasets into mutually exclusive blocks using a cheap heuristic, drastically reducing the number of required pairwise comparisons from a quadratic to a near-linear complexity.

Blocking is a computational efficiency technique in record linkage that partitions datasets into mutually exclusive blocks using a cheap heuristic, such as phonetic encoding or exact matching on a single attribute. By only comparing records within the same block, it reduces the naive O(n²) pairwise comparison space to a near-linear O(n) complexity, making large-scale entity resolution computationally tractable.

The effectiveness of blocking depends on the selection of a blocking key—a deterministic function that groups likely matches without generating false negatives. Common keys include Soundex codes for names or geographic prefixes. To mitigate the risk of missing true matches due to data quality issues, modern systems often employ iterative blocking or sorted neighborhood methods that slide a window over sorted data, ensuring recall without sacrificing the performance gains of the initial partition.

COMPUTATIONAL EFFICIENCY

Key Characteristics of Blocking

Blocking is a foundational efficiency technique in record linkage that partitions datasets into mutually exclusive groups using a cheap heuristic, drastically reducing the number of required pairwise comparisons from quadratic to near-linear complexity.

01

Blocking Key Functions

A blocking key is a deterministic function that maps a record to a string value, grouping records that share the same key into a block. Common functions include:

  • Phonetic encoding: Soundex or Double Metaphone on surnames to group similar-sounding names
  • Sorted neighborhood: Sorting records by a key and sliding a fixed-size window over the sorted list
  • Token-based: Extracting the first 3 characters of a last name and zip code prefix
  • N-gram indexing: Using character n-grams to create overlapping blocks for fuzzy matching

The key must balance recall (not missing true matches) against reduction ratio (eliminating unnecessary comparisons).

02

Reduction Ratio

The reduction ratio quantifies how effectively a blocking strategy prunes the comparison space. It is calculated as:

RR = 1 - (s_M / s_N)

Where s_M is the number of candidate pairs generated and s_N is the total possible pairs n(n-1)/2.

  • A reduction ratio of 0.99 means only 1% of all possible pairs are compared
  • Higher ratios reduce compute cost but risk false negatives if true matches fall into different blocks
  • Typical production systems target a reduction ratio between 0.95 and 0.99 while maintaining recall above 0.95
03

Transitive Closure

After blocking and pairwise comparison, transitive closure resolves indirect matches into connected components. If record A matches B, and B matches C, then A, B, and C form a single entity cluster.

  • Connected components algorithm: Builds clusters by traversing all match edges in the graph
  • Merge propagation: Ensures all records in a cluster share the same canonical identifier
  • Cluster deduplication: Post-processing step that merges overlapping clusters from different blocking passes

Transitive closure is essential because blocking strategies often produce overlapping blocks where the same entity appears in multiple partitions.

04

Multi-Pass Blocking

Multi-pass blocking runs multiple independent blocking strategies and unions the candidate pairs to improve recall. No single blocking key captures all true matches, so combining approaches compensates for individual weaknesses.

  • Disjoint blocking: Each pass uses a different key (e.g., zip code, then Soundex last name, then date of birth)
  • Union of candidates: All pairs from all passes are pooled before deduplication and comparison
  • Cost tradeoff: Each additional pass increases the number of comparisons, reducing the overall reduction ratio

Production pipelines typically use 3-5 blocking passes with orthogonal keys to achieve high recall without excessive compute.

05

Sorted Neighborhood Method

The Sorted Neighborhood Method (SNM) sorts records by a blocking key and slides a fixed-size window over the sorted list, comparing only records within the same window.

  • Window size (w): Typically 10-50 records; larger windows increase recall but add comparisons
  • Multi-pass SNM: Running SNM multiple times with different sort keys to capture matches missed in a single pass
  • Key selection: Sort keys should cluster similar records together; concatenating multiple fields (e.g., city + first initial) improves clustering

SNM is particularly effective when the blocking key has graded similarity rather than exact equality, as nearby records in the sorted order are likely to be true matches.

06

Canopy Clustering

Canopy clustering is a cheap, approximate clustering technique used as a pre-blocking step. It creates overlapping "canopies" using a loose similarity metric, then performs expensive comparisons only within each canopy.

  • T1 threshold: A loose threshold that determines canopy membership; records within T1 distance of a canopy center are included
  • T2 threshold: A tight threshold; records within T2 distance become new canopy centers
  • Overlapping canopies: Records can belong to multiple canopies, improving recall at the cost of some duplicate comparisons

Canopy clustering is commonly paired with TF-IDF or Jaccard similarity on tokenized text fields as the cheap distance metric.

BLOCKING IN RECORD LINKAGE

Frequently Asked Questions

Explore the fundamental mechanics of blocking, the essential computational efficiency technique that makes large-scale entity resolution feasible by intelligently partitioning datasets before pairwise comparison.

Blocking is a computational efficiency technique in record linkage that partitions datasets into mutually exclusive blocks using a cheap heuristic, drastically reducing the number of required pairwise comparisons from a quadratic O(n²) complexity to a manageable subset. Instead of comparing every record in dataset A with every record in dataset B, blocking applies a blocking key—a deterministic function derived from one or more attributes—to group records that share the same key value. Only records within the same block are compared, operating on the principle that true matches will share some identifying characteristic. For example, a blocking key might be the first three characters of a surname combined with a Soundex-encoded postal code, ensuring that 'Smith, 90210' and 'Smyth, 90210' land in the same block while excluding millions of irrelevant comparisons. The technique is foundational to identity resolution, deduplication, and knowledge base population at scale.

Prasad Kumkar

About the author

Prasad Kumkar

CEO & MD, Inference Systems

Prasad Kumkar is the CEO & MD of Inference Systems and writes about AI systems architecture, LLM infrastructure, model serving, evaluation, and production deployment. Over 5+ years, he has worked across computer vision models, L5 autonomous vehicle systems, and LLM research, with a focus on taking complex AI ideas into real-world engineering systems.

His work and writing cover AI systems, large language models, AI agents, multimodal systems, autonomous systems, inference optimization, RAG, evaluation, and production AI engineering.