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.
Glossary
Blocking

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.
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.
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.
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).
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
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.
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.
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.
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.
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.
Enabling Efficiency, Speed & Accuracy
Intelligent Analysis, Decision & Execution
We build AI systems for teams that need search across company data, workflow automation across tools, or AI features inside products and internal software.
Talk to Us
Search across company data
Give teams answers from docs, tickets, runbooks, and product data with sources and permissions.
Useful when people spend too long searching or get different answers from different systems.

Automate internal workflows
Use AI to route work, draft outputs, trigger actions, and keep approvals and logs in place.
Useful when repetitive work moves across multiple tools and teams.

Add AI to products and internal tools
Build assistants, guided actions, or decision support into the software your team or customers already use.
Useful when AI needs to be part of the product, not a separate tool.
Related Terms
Master the core concepts that surround blocking in the entity resolution pipeline. Each technique addresses a specific challenge in scaling identity matching to enterprise datasets.
Record Linkage
The foundational statistical process of identifying records across different datasets that refer to the same real-world entity when a reliable unique identifier is absent. Blocking serves as the computational efficiency backbone of record linkage, preventing the quadratic explosion of O(n²) pairwise comparisons.
- Deterministic linkage: Exact matching on a shared key (e.g., Social Security Number)
- Probabilistic linkage: Uses the Fellegi-Sunter model to calculate match weights based on attribute agreement patterns
- Without blocking, linking two datasets of 1 million records each would require 1 trillion comparisons
Candidate Generation
The initial retrieval phase in entity linking that produces a shortlist of possible knowledge base entries for a given textual mention. Blocking is the database-centric analogue of candidate generation in NLP pipelines.
- Uses surface form dictionaries to map mention strings to candidate entity IDs
- Employs approximate nearest neighbor (ANN) search over dense entity embeddings for fuzzy retrieval
- A poorly tuned candidate generation step that misses the true entity creates an irrecoverable error downstream
Fuzzy Matching
A string comparison technique that calculates similarity between two text strings to identify non-exact duplicates. Often used as the similarity function within a blocking key to handle dirty real-world data.
- Levenshtein distance: Minimum edit operations to transform one string into another
- Jaro-Winkler: Optimized for short strings like personal names, weighting prefix matches
- Phonetic algorithms (Soundex, Metaphone): Index by pronunciation to block names with spelling variations
Probabilistic Record Linkage
A rigorous statistical framework formalized by Fellegi and Sunter that calculates match weights for record pairs based on agreement and disagreement patterns across multiple attributes. Blocking defines the initial search space over which these probabilistic models operate.
- M-probability: The likelihood that a matching attribute agrees for a true match
- U-probability: The likelihood of random agreement for a non-match
- The match weight is the log-likelihood ratio: log₂(m/u), summing across all fields
Deduplication
The specific application of record linkage techniques to find and merge duplicate records representing the same entity within a single dataset. Blocking is equally critical here to avoid comparing every record against every other record.
- Sorted neighborhood method: Sort records by a blocking key, then slide a fixed-size window to only compare nearby records
- Transitive closure: If A matches B and B matches C, then A, B, and C form a connected cluster
- Produces a golden record that consolidates the best attribute values from all duplicates
Privacy-Preserving Record Linkage (PPRL)
A set of cryptographic and encoding techniques that allow linkage of records across databases without revealing plaintext personally identifiable information (PII) to any party. Blocking must be adapted to operate on encoded data.
- Bloom filter encoding: Represents attribute values as bit vectors, allowing similarity computation via set-based metrics like Dice coefficient
- Phonetic blocking on encoded fields enables efficient comparison without decryption
- Critical for inter-hospital patient matching and cross-agency fraud detection under GDPR and HIPAA

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.
Partnered with leading AI, data, and software stack.
How We Work
Custom AI workflows for your Business
One-fit-all AI don't work for modern businesses. At Inferensys, we aim to understand your business & custom requirements; which we use to define most efficient agentic workflows, the data, and the tools for your business.
01
Review the use case
We understand the task, the users, and where AI can actually help.
Read more02
Pick the right approach
We define what needs search, automation, or product integration.
Read more03
Build the first useful version
We implement the part that proves the value first.
Read more04
Improve from there
We add the checks and visibility needed to keep it useful.
Read moreThe first call is a practical review of your use case and the right next step.
Talk to Us