Algorithm Search⌘K

Problemcore

Entity resolution

Also called record linkage, duplicate record detection, merge-purge problem.

Find the records in one or more data sets that refer to the same real-world entity, and link or merge them. Exact methods compare all pairs; blocking and windows make it fast.

Time
O(n^2) worst
Where
n = the number of records

Entity resolution (ER) is the problem of finding which records refer to the same real-world entity, such as one person, one company or one product, when the records have no shared identifier and their values differ by typos, abbreviations and missing fields. The output is a partition of the records into clusters, one for each entity, or a set of links between two files. This page states the problem and its parts. The pages for the methods each solve one part: blocking and the sorted neighborhood method choose which pairs to compare, the Fellegi-Sunter model decides each pair from field agreements, R-Swoosh merges records with black-box rules, and collective entity resolution uses the links between records. ER decides which records describe one entity. Truth discovery comes after it and decides which of their conflicting values is true.

In plain words

You have two customer lists, or one list with many copies of the same people. Nobody wrote down a customer number, and the same person appears as "Jon Smith, 12 Main St" and "John Smith, 12 Main Street". You want to know which rows are the same person. You can compare two rows and say "probably the same" or "probably not", but comparing every row with every other row takes too long when there are millions. So the work has steps: pick the pairs worth comparing, compare them, decide, and then group the rows so that the groups make sense together.

Definition

Input. A set DD of nn records, or two sets AA and BB. Each record has attribute values, and there is a hidden map ee from records to entities.

Output. A partition of DD into clusters, with the aim that two records are in one cluster if and only if ee maps them to the same entity. For two files the output is a set of pairs in A×BA \times B (the links).

What a method has. No method sees ee. It has a pairwise rule, given or learned: a function match(r,s)\mathit{match}(r, s) that returns yes or no, or a score sim(r,s)\mathit{sim}(r, s). Under the pairwise reading, the output is the connected components of the graph of matching pairs, that is, the transitive closure of the rule. Under the merge reading of Benjelloun et al., matching records are merged and the merged records are compared again.

Quality. With labels for a sample, pairwise precision is the fraction of the pairs in found clusters that are true pairs, and pairwise recall is the fraction of true pairs that are in found clusters. Their harmonic mean is the F1 score. Cluster-level measures also exist. All of these are measurements on a given data set.

Variants

  • Deduplication. One file, find the clusters (the merge/purge problem).
  • Record linkage. Two files, each with at most one record for each entity, so the links are a one-to-one matching.
  • Reference disambiguation. Many short references, such as author names in a bibliography, that must be mapped to entities through their context.
  • Online or incremental ER. New records arrive and must be added to the clusters without starting again.
  • Schema heterogeneity. The sources have different schemas, so schema matching must come first.

Examples

Five records (name, city, birth year):

record name city year
r1 Jon Smith Boston 1970
r2 John Smith Boston 1970
r3 J. Smith Boston
r4 John Smith Denver 1985
r5 Ann Lee Boston 1970

The true clusters are {r1, r2, r3}, {r4} and {r5}. A rule "same city and name edit distance at most 1" matches only r1 and r2. A rule "same city and same last name" also brings r3, the right cluster. A rule "same name" puts r2 and r4 together, a false match. Each rule is a heuristic, and the choice of the rule decides the result more than the algorithm does.

Known algorithms

AlgorithmTimeSpacePropertiesCode
R-SwooshO(n^2) worst · averageO(n) extradeterministicexactnot externalnot in placeofflineiterative1 language
Sorted neighborhood methodO(p (n log n + w n)) worst · average · bestO(n + p w n) extradeterministicnot exactnot externalnot in placeofflineiterative1 language

Bounds

Black-box rules need all pairs. Theorem. Any deterministic method that returns the components of the match graph exactly, and that only calls a black-box match\mathit{match}, makes n(n−1)/2n(n-1)/2 calls in the worst case. Proof. Answer "no" to every call. If some pair {a,b}\{a, b\} is never asked, the answers are the same for the rule that matches no pair and the rule that matches only aa and bb, but the correct outputs differ. So every pair must be asked. This is why every fast method uses something about the records, such as keys or similarity, and why its recall is a measurement, not a guarantee.

Output size. The output is one of the set partitions of nn records, whose number grows faster than any exponential cnc^n. The problem is to find the right one, not to list them.

Clustering with inconsistent scores. Finding the partition that disagrees with the fewest pairwise decisions is the correlation clustering problem, which is NP-hard.

Reductions

  • To connected components. With a yes-or-no rule that is taken as transitive, ER is the components of the graph of matching pairs.
  • To matching. For two files with one record for each entity on each side, the links with the largest total score form a maximum weight matching, an instance of the assignment problem.
  • To correlation clustering. With scores that are positive for "same" and negative for "different", the best partition is a correlation clustering of the complete signed graph.
  • To classification. The pair decision alone is a binary classification of pairs, with the classes very unbalanced: most pairs are not matches.

Applications

  • Census and health data. Linking birth, death and hospital records for statistics, where the record linkage methods began.
  • Customer data. Joining customer lists after a merger, and cleaning mailing lists.
  • Bibliographies and knowledge bases. Finding which author names and which citations are the same.
  • Product catalogues. Joining offers for the same product from many shops, as the input to truth discovery on their values.

References

  1. Ivan P. Fellegi and Alan B. Sunter, A theory for record linkage, Journal of the American Statistical Association 64(328), 1969, pages 1183 to 1210, the statement of record linkage between two files as a decision on each pair of records (link, possible link or non-link), and the optimal rule
  2. Howard B. Newcombe, James M. Kennedy, S. J. Axford and A. P. James, Automatic linkage of vital records, Science 130(3381), 1959, pages 954 to 959, the early computer linkage of birth and marriage records with weights from the frequencies of agreement
  3. Omar Benjelloun, Hector Garcia-Molina, David Menestrina, Qi Su, Steven Euijong Whang and Jennifer Widom, Swoosh: a generic approach to entity resolution, The VLDB Journal 18(1), 2009, pages 255 to 276, the generic model with black-box match and merge functions and the definition of the result ER(I)
  4. Ahmed K. Elmagarmid, Panagiotis G. Ipeirotis and Vassilios S. Verykios, Duplicate record detection: a survey, IEEE Transactions on Knowledge and Data Engineering 19(1), 2007, pages 1 to 16, the survey of field comparison measures, probabilistic and rule-based matching, and methods to cut the number of comparisons
  5. Peter Christen, Data Matching: Concepts and Techniques for Record Linkage, Entity Resolution, and Duplicate Detection, Springer, 2012, the process of data matching (cleaning, indexing, comparison, classification, evaluation) and the measures of quality

Where this leads

About this page

The build computes these levels from the evidence in the repository. Each row says what the next level needs. Read what the levels mean.

LadderLevelWhat the next level needs
Human proofH0 no proof
  • add a proof in proofs/ (06.5)
LeanL0 no Lean part
  • name a Lean module in the lean field (07)
VisualV0 none
  • add viz/scene.ts or a figure (10)
WritingW2 basic
  • a contract.yaml