Inferensys

Glossary

Similarity Score

A similarity score is a numerical value that quantifies the degree of likeness between two data points, records, or entities, serving as the core metric for determining matches in entity resolution systems.
Data scientist building training data pipeline on laptop, data preprocessing visible, technical workspace.
ENTITY RESOLUTION

What is a Similarity Score?

A similarity score is a fundamental metric in entity resolution, quantifying the likeness between two data records to determine if they refer to the same real-world entity.

A similarity score is a numerical value, typically normalized between 0 and 1, that quantifies the degree of likeness between two records, strings, or data points for the purpose of entity resolution. It is the core output of fuzzy matching algorithms and probabilistic models, providing a deterministic measure to decide if records should be linked or merged. High scores indicate a strong match, while low scores suggest distinct entities.

These scores are calculated using specific distance metrics or similarity functions tailored to data type, such as Levenshtein distance for strings or cosine similarity for vector embeddings. In production systems, similarity scores are thresholded or combined via probabilistic matching frameworks like the Fellegi-Sunter model to make final linkage decisions, directly impacting the precision and recall of the resolution process.

ENTITY RESOLUTION

Core Characteristics of Similarity Scores

Similarity scores are the quantitative foundation of entity resolution, providing the numerical measure needed to automate decisions about record linkage and deduplication.

01

Definition and Purpose

A similarity score is a numerical value, typically normalized between 0 and 1, that quantifies the degree of likeness between two data records, strings, or vector representations. Its primary purpose in entity resolution is to provide an objective, automatable metric for determining whether two records refer to the same real-world entity. A score of 1 indicates perfect identity, while 0 indicates complete dissimilarity. These scores feed into downstream matching rules or machine learning models to make link/no-link decisions.

02

Normalization and Interpretability

Effective similarity scores are normalized to a consistent, interpretable range (e.g., 0 to 1). This standardization is critical for:

  • Combining scores from different attributes (e.g., name, address, date of birth) into a composite match score.
  • Setting universal thresholds for match classification across an entire pipeline.
  • Human interpretability, allowing data stewards to understand why a pair was linked or not. Without normalization, comparing a Jaccard similarity on tokens (range 0-1) with a Levenshtein distance on strings (range 0-N) would be meaningless.
03

Algorithmic Foundations

Scores are calculated using specific algorithms chosen based on data type and error patterns:

  • String-based: For textual attributes. Examples include Levenshtein Distance (edit distance), Jaccard Similarity (set overlap), and Cosine Similarity on character n-grams.
  • Phonetic: For matching names by sound, using algorithms like Soundex or Metaphone, which generate codes for approximate phonetic matching.
  • Vector-based: For comparing dense representations (embeddings) of text or entities, typically using Cosine Similarity or Euclidean Distance in a high-dimensional space.
  • Set-based: For comparing categorical or multi-valued fields, using Jaccard or Overlap Coefficient.
04

Role in Probabilistic Matching

In the Fellegi-Sunter model, the canonical probabilistic matching framework, similarity scores are transformed into agreement weights. The model calculates:

  • m-probability: The probability that an attribute agrees given the records are a match.
  • u-probability: The probability that an attribute agrees given the records are a non-match. The log-likelihood ratio of these probabilities generates a weight for each attribute. The sum of these weights across all compared attributes produces a composite match score, which is then compared to upper and lower thresholds to classify the pair as a match, non-match, or potential match requiring clerical review.
05

Thresholds and Decision Boundaries

A raw similarity score requires a decision threshold to trigger an action. Setting this threshold is a core engineering challenge balancing precision and recall.

  • High Threshold (e.g., >0.95): Yields high precision (few false matches) but lower recall (misses true matches with data errors).
  • Low Threshold (e.g., >0.7): Yields high recall (finds most true matches) but lower precision (includes many false matches). Sophisticated systems use dual thresholds, creating a clerical review zone for scores in a middle range. Thresholds are typically tuned via labeled data and evaluation of the confusion matrix.
06

Feature Engineering for ML Models

In machine learning-based entity resolution, similarity scores are not the final output but are used as engineered features for a classifier. A feature vector for a record pair might include:

  • Individual similarity scores for name, address, phone, date_of_birth.
  • Derived features like the minimum, maximum, or average score across attributes.
  • A flag indicating if a phonetic code matches. These features train a model (e.g., logistic regression, random forest, or a Siamese network) to predict a binary match label, often outperforming simple thresholding on a composite score.
CORE CONCEPT

How Similarity Scores Work in Entity Resolution

A similarity score is a numerical value, typically between 0 and 1, that quantifies the degree of likeness between two records or data points for the purpose of entity resolution.

In entity resolution, a similarity score is the fundamental metric that determines whether two records refer to the same real-world entity. It is calculated by comparing specific attributes—like names, addresses, or product codes—using algorithms such as Levenshtein distance for strings or cosine similarity for vector embeddings. This score is the primary input for probabilistic matching models, which weigh the evidence from multiple attributes to make a final linkage decision.

Effective entity resolution requires calibrating similarity thresholds to balance precision and recall. A high threshold yields fewer, more confident matches, while a lower threshold captures more potential matches at the risk of false positives. These scores are often aggregated across attributes using weighted models like the Fellegi-Sunter framework, and the resulting linkages are validated through transitive closure to ensure a consistent set of connected components representing each unique entity.

ENTITY RESOLUTION

Comparison of Common Similarity Metrics

A technical comparison of core algorithms used to calculate similarity scores for entity resolution, detailing their mathematical basis, typical use cases, and computational characteristics.

Metric / FeatureCosine SimilarityJaccard IndexLevenshtein DistanceDice Coefficient

Primary Domain

Text Embeddings & Vectors

Set-Based Data

String Edit Operations

Token-Based Text

Mathematical Definition

cos(θ) = (A·B) / (||A|| ||B||)

J(A,B) = |A∩B| / |A∪B|

Minimum single-character edits

D = 2|A∩B| / (|A| + |B|)

Output Range

-1 to 1 (typically 0 to 1)

0 to 1

0 to max(|A|,|B|) (normalized 0-1)

0 to 1

Vector-Space Required

Sensitive to Magnitude

Common Use Case

Document similarity, RAG

Deduplication, categorical data

Fuzzy string matching, typo tolerance

Biomedical text, NLP token overlap

Computational Complexity

O(n) for dense vectors

O(n) for set operations

O(m*n) via dynamic programming

O(n) for token counting

Handles Synonyms/Context

ENTITY RESOLUTION

Examples of Similarity Score Applications

Similarity scores are a foundational metric for quantifying likeness between data points. Here are key applications where they drive critical data engineering and AI tasks.

01

Customer Data Integration

Similarity scores are used to unify customer records from disparate systems (CRM, ERP, support tickets). Deterministic matching on exact fields like email is combined with probabilistic matching using scores on names, addresses, and phone numbers to create a golden record. This prevents duplicate marketing and ensures a single customer view.

  • Key Metrics: Scores often combine Jaccard similarity on tokenized names and Levenshtein distance on addresses.
  • Business Impact: Directly reduces operational costs from failed deliveries and redundant communications.
02

Product Catalog Deduplication

E-commerce and retail platforms use similarity scoring to identify duplicate or near-identical product listings from multiple vendors. This involves comparing high-dimensional feature vectors derived from product titles, descriptions, images, and specifications.

  • Technical Approach: Cosine similarity on text embeddings from a language model is standard. For blocking, Locality-Sensitive Hashing (LSH) groups candidate products for pairwise scoring.
  • Outcome: Creates a clean, canonical catalog, improving search relevance and price comparison accuracy.
03

Healthcare Patient Matching

A critical, high-stakes application where similarity scores link patient records across hospitals, labs, and clinics. Strict privacy regulations often preclude using national identifiers, making scoring on demographic data essential.

  • Attributes Scored: Name (with phonetic encoding like Metaphone for sound-alikes), date of birth, and medical record number fragments.
  • Challenge: Requires extremely high precision to avoid dangerous medical errors, often using supervised models with active learning for human-in-the-loop verification.
04

Academic Paper Disambiguation

Resolves author name ambiguity in bibliographic databases (e.g., Digital Bibliography & Library Project, Semantic Scholar). The same author name (e.g., "J. Smith") may refer to hundreds of individuals. Similarity scores compare contextual features.

  • Features Used: Co-author networks, institutional affiliations, research field keywords, and journal titles.
  • Method: A Siamese network can learn a similarity function between paper-author pairs, clustering publications into distinct author entities.
05

Financial Fraud Detection

Identifies synthetic identity fraud or organized fraud rings by scoring similarity between applicant profiles and known fraudulent entities. Instead of seeking exact matches, systems look for suspiciously high similarity in partial, manipulated attributes.

  • Application: New account applications are scored against a database of known fraud indicators (addresses, phone numbers, devices).
  • Technique: Anomaly detection models flag applications where aggregate similarity to bad actors exceeds a threshold, despite no single exact match.
06

Knowledge Graph Entity Linking

Core to building Enterprise Knowledge Graphs. Similarity scores align ambiguous textual mentions from documents ("Apple") to their correct referent (the company vs. the fruit) in a knowledge base. This is the entity linking task.

  • Scoring Method: Compares the context vector of the mention with the description vector of each candidate knowledge base entity using cosine similarity.
  • Integration: This resolved entity becomes a node in the graph, enabling Graph-Based RAG for factually grounded AI responses.
ENTITY RESOLUTION

Frequently Asked Questions

A similarity score is a numerical value, often between 0 and 1, that quantifies the degree of likeness between two records or data points for entity resolution. These questions address its core mechanics, applications, and best practices.

A similarity score is a numerical metric that quantifies the degree of likeness between two data points, such as text strings, vectors, or entire records, for the purpose of entity resolution. It works by applying a specific algorithm or function that compares the features of the inputs and outputs a value, typically normalized between 0 (completely dissimilar) and 1 (identical).

Common algorithms include:

  • Jaccard Similarity: Measures overlap between sets. Formula: |A ∩ B| / |A ∪ B|.
  • Cosine Similarity: Measures the cosine of the angle between two vectors, often used for text embeddings.
  • Levenshtein Distance (converted to a similarity score): Measures the minimum number of single-character edits (insertions, deletions, substitutions) required to change one string into another.

In an entity resolution pipeline, these scores are calculated for pairs of records across attributes (e.g., name, address, email). A decision rule—often a threshold like 0.85—is then applied to classify the pair as a match, non-match, or candidate for manual review.

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.