Record Linkage, Similarity & Data Fusion
Once schemas are reconciled, the same real-world entity still appears under different strings in different sources. This chapter covers how to measure string similarity (edit distance, Jaccard, Soundex), how to decide that two records match (rule-based, learned, probabilistic — with blocking for scale), and how to fuse conflicting values afterwards.
01 · Problem
Record linkage & entity resolution
Schema reconciliation lined up the structures. But the same real-world object — a person, a product — is still recorded with different values in different sources. Finding those matches is record linkage (a.k.a. entity resolution); reconciling what they disagree on is data fusion.
Whatever the data model, we must recognise when two records hold the same information — and, crucially,
we can do this field by field rather than on the whole tuple as one blob. Compare
Tanca | Letizia | DEIS | Lonardo with Tanca | Letizia | DEIB | Leonardo: split into fields, we can
use the knowledge that Leonardo is a Politecnico campus to see that Lonardo is a typo of it and
DEIS a typo of DEIB. Glue the tuple into one string and that structured knowledge is lost.
The mismatches record linkage must survive are everyday ones: typing errors (Givanni vs Giovanni),
different conventions (Sept 20th vs 20/9), nicknames (Giuseppe vs Beppe), inversions
(Giovanni Rossi vs Rossi, Giovanni), and abbreviations (Politecnico di Milano vs PoliMI).
02 · Method
String similarity measures
Given two sets of strings, find all pairs that refer to the same entity — each such pair is a match. The tool is a similarity measure with ; the closer to 0, the less similar. We declare a match when
(Using a distance instead changes nothing: lower similarity means higher distance.) The measures come in families — sequence-based (edit distance, Needleman-Wunsch, affine gap, Smith-Waterman, Jaro, Jaro-Winkler), set-based (overlap, Jaccard, TF/IDF), hybrid (generalized Jaccard, soft TF/IDF, Monge-Elkan), and phonetic (Soundex). Three matter most here.
Edit (Levenshtein) distance
The minimal number of single-character insertions, deletions and replacements that turn string into . Turned into a similarity by normalising against the longer string.
Jaccard (set-based)
View each string as a multiset of tokens (e.g. bigrams) and compare the token sets — robust to word order and small edits.
Soundex (phonetic)
A four-character code from a word’s pronunciation; two words match if their codes are equal.
Worked examples The two measures worked out
Edit similarity. For strings and ,
For “Politecnico di Milano” and “Politecnico Milano”, we delete the d and the i, so
and (with the slide’s lengths and )
Jaccard. Tokenise into padded bigrams. For pino → and pin → ,
The dynamic-programming table behind is worth seeing once. It is seeded with a near-duplicate name of exactly the kind linkage has to score — one substitution and one insertion, so — and the highlighted path is the alignment that achieves it. Divide by the longer length to get the similarity above, then compare against your threshold:
Levenshtein edit-distance matrix
Type two strings. Each cell is the minimum of delete (↑+1), insert (←+1), and substitute (↖+0/+1). The highlighted path is one optimal alignment; the corner is the edit distance.
| ε | C | a | t | h | y | R | o | b | b | e | r | t | ||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| ε | 0 | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 |
| K | 1 | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 |
| a | 2 | 2 | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 |
| t | 3 | 3 | 2 | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 |
| h | 4 | 4 | 3 | 2 | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 |
| y | 5 | 5 | 4 | 3 | 2 | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 |
| 6 | 6 | 5 | 4 | 3 | 2 | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | |
| R | 7 | 7 | 6 | 5 | 4 | 3 | 2 | 1 | 2 | 3 | 4 | 5 | 6 | 7 |
| o | 8 | 8 | 7 | 6 | 5 | 4 | 3 | 2 | 1 | 2 | 3 | 4 | 5 | 6 |
| b | 9 | 9 | 8 | 7 | 6 | 5 | 4 | 3 | 2 | 1 | 2 | 3 | 4 | 5 |
| e | 10 | 10 | 9 | 8 | 7 | 6 | 5 | 4 | 3 | 2 | 2 | 2 | 3 | 4 |
| r | 11 | 11 | 10 | 9 | 8 | 7 | 6 | 5 | 4 | 3 | 3 | 3 | 2 | 3 |
| t | 12 | 12 | 11 | 10 | 9 | 8 | 7 | 6 | 5 | 4 | 4 | 4 | 3 | 2 |
Soundex is a double-edged tool
Matching by sound is great for names that evolved phonetically (Legoff / Legough) but wrong for
ordinary words that merely sound alike (coughing / coffin). It is also strongly
language-dependent — gn is pronounced differently in English and Italian — so it is a specialist
tool, not a default.
03 · Method
Record matching & data fusion
A string measure compares fields; record matching decides whether two whole tuples are the same entity. Three approaches, plus one indispensable optimisation:
Rule-based
Hand-written rules — “same SSN ⇒ same person”, or a weighted blend with the best similarity measure chosen per attribute. Accurate but labour-intensive.
Learned
Learn the matching from data — supervised (labelled matching / non-matching pairs, needs lots of training data) or unsupervised (cluster similar values).
Probabilistic
Model the matching domain with a probability distribution and reason over it (the classic Fellegi-Sunter-style approach): principled and knowledge-friendly, but computationally expensive and hard to debug.
All three still end at the same place: a score, and a decision about where to cut it. That decision is harder than makes it look — set the cut anywhere and some of these pairs come out wrong:
Matching by threshold — and why one cut is not enough
Seven pairs, scored with the chapter's normalised edit similarity. Set the two cuts: above the upper one is a match, below the lower one a non-match, and between them a possible match that a human reviews. The tick marks show which pairs are really the same entity.
| Pair | s(a,b) | truth | decision |
|---|---|---|---|
| Maria Rossi vs Mario Rossi | 0.91 | different | match ✕ |
| Givanni vs Giovanni | 0.88 | same | match |
| Kathy Robert vs Cathy Robbert | 0.85 | same | match |
| Legoff vs Legough | 0.57 | same | possible — review |
| coughing vs coffin | 0.50 | different | non-match |
| Politecnico di Milano vs PoliMI | 0.24 | same | non-match ✕ |
| Giovanni Rossi vs Rossi, Giovanni | 0.13 | same | non-match ✕ |
Misclassified · One character apart and NOT the same person. No string measure can tell — only another field can.
Blocking — beating the quadratic wall
Comparing every pair is — hopeless at scale. Blocking first partitions records into small blocks of plausibly-similar records (by some cheap metric) and compares only within corresponding blocks, dropping the cost to the sum of the squares of the block sizes. It is applied before the real matching rules.
Data fusion
Once two records are known to be the same entity, their fields may still disagree — which salary is right? Inconsistency can arise because a source is simply wrong, or because each source holds a correct but partial view (two workplaces, where the true salary is the sum; an author list that is incomplete; a middle name given only as an initial). A resolution function produces the reconciled value — often a function of the originals such as or .
Fusion as an aggregated outer-join
The lecture’s fusion example is compact: match two employee tables, then compute
R = MAX_AGE, SUM_SALARY(R1 OuterJoin R2) — outer-join keeps everyone, and the per-attribute
resolution functions (MAX on age, SUM on the partial salaries) settle each conflict.
Bridge to different data models
Everything so far assumed a single (relational) data model. Real integration also spans different models — relational, XML, JSON, the open Web. That needs a new element, the wrapper (a translator that exposes a non-relational source as if it were relational), which opens the next chapter on semistructured integration.
Load-bearing ideas
- Record linkage finds records for the same entity across sources; data fusion reconciles the values they disagree on. Compare field by field, not tuple-as-string.
- Similarity + threshold: , match iff . Know edit similarity (), Jaccard on token sets, and Soundex (phonetic, language-dependent).
- Matching: rule-based (weighted per-attribute), learned (supervised/unsupervised), probabilistic; blocking cuts the cost.
- Fusion: a resolution function (SUM, MAX, average…) per conflicting attribute, typically over an outer-join.