Semantic similarity is a computational measure that quantifies the degree of closeness in meaning between two concepts, typically calculated by analyzing their distance, shared properties, and informational content within an ontological graph. Unlike simple lexical matching, which compares surface-level strings, semantic similarity leverages the formal structure of ontologies like SNOMED CT or the UMLS to determine how conceptually related two terms are, even when they share no common words.
Glossary
Semantic Similarity

What is Semantic Similarity?
Semantic similarity is a computational measure that quantifies the degree of closeness in meaning between two concepts, typically calculated by analyzing their distance, shared properties, and informational content within an ontological graph.
In clinical informatics, this metric is foundational for tasks such as ontology mapping, concept normalization, and clinical entity linking. Algorithms compute similarity using path-length measures between nodes, the depth of their lowest common ancestor, or corpus-based information content. High similarity scores enable systems to automatically align disparate terminologies like ICD-10-CM and RxNorm, powering robust semantic interoperability and accurate clinical decision support.
Key Characteristics of Semantic Similarity Measures
Semantic similarity quantifies the closeness of meaning between two concepts within a structured knowledge graph. Unlike simple string matching, these measures exploit the hierarchical, relational, and logical axioms of an ontology to compute a context-aware score.
Path-Based Measures
Calculate similarity by analyzing the shortest path or distance between two concept nodes in the ontological graph. The fundamental assumption is that concepts closer in the hierarchy are more semantically related.
- Shortest Path Length: A simple edge count between two nodes.
- Wu & Palmer: Scales the depth of the Least Common Subsumer (LCS) by the sum of depths of the two concepts.
- Leacock & Chodorow: Normalizes the shortest path length by the maximum depth of the taxonomy.
Example: In SNOMED CT, the path between Pneumonia and Lung Cancer is shorter (both are lung disorders) than the path between Pneumonia and Femur Fracture.
Information Content (IC) Measures
Weight concepts based on their specificity or rarity within a corpus. A rare, deeply nested concept carries more information than a common, shallow one. Similarity is a function of the shared information between two concepts.
- Resnik: Similarity equals the IC of the Least Common Subsumer (LCS).
- Lin: Normalizes the shared IC by the sum of the individual ICs of the two concepts.
- Jiang & Conrath: Uses the difference between the sum of individual ICs and twice the shared IC to compute a distance.
Corpus Dependency: IC values can be derived intrinsically from the ontology structure or extrinsically from term frequency in a clinical text corpus.
Feature-Based Measures
Represent concepts as sets of defining characteristics or logical properties rather than just nodes in a graph. Similarity is computed using set theory operations on these feature sets.
- Tversky Index: An asymmetric model where the weight of common and distinctive features can be tuned, reflecting human similarity judgments.
- Common Features: The intersection of properties shared by two concepts.
- Distinctive Features: Properties unique to one concept but not the other.
Application: Highly effective in Description Logic-based ontologies like OWL, where concepts have rich axiomatic definitions beyond simple hierarchical placement.
Hybrid & Embedding-Based Measures
Combine structural ontology knowledge with distributional semantics from neural language models to overcome the limitations of purely graph-based or purely text-based approaches.
- Ontology-Aware Embeddings: Graph neural networks encode the hierarchical structure and relational edges of an ontology into dense vector representations.
- BERT-based Alignment: Contextual embeddings from transformer models capture nuanced synonymy and paraphrasing that rigid ontology structures might miss.
- Cross-Lingual Mapping: Embedding spaces allow similarity computation between concepts from ontologies in different natural languages.
Advantage: Mitigates the lexical gap where semantically identical concepts have completely different surface forms or labels.
Subsumption & Logical Similarity
Leverages formal Description Logic reasoning to determine semantic relationships beyond simple distance. A reasoner infers implicit subsumption relationships based on the logical axioms of the ontology.
- Equivalence: The reasoner determines if two concepts are logically identical based on their necessary and sufficient conditions.
- Subsumption Testing: Checks if one concept is a strict subclass of another, implying a directed similarity relationship.
- Satisfiability: Ensures a concept definition is logically consistent before computing similarity.
Clinical Relevance: Critical for ensuring that a mapped concept in ICD-10-CM is a valid, more granular subtype of a broader SNOMED CT concept, preventing semantic drift in data aggregation.
Contextual & Pragmatic Similarity
Adjusts similarity scores based on the specific task, user intent, or clinical context rather than relying solely on universal ontological distance. A measure of fitness-for-purpose.
- Task-Specific Weighting: A path-based measure might be weighted differently for billing code selection vs. clinical research cohort identification.
- Temporal Context: The similarity of two diagnoses might increase if they occur within the same patient encounter.
- Value Set Binding: Similarity is constrained by whether a candidate concept is a member of a specific, authorized value set for a given data element.
Example: Diabetes Mellitus and Hyperglycemia are highly similar in a lab result context but less similar in a primary diagnosis context where specificity is required.
Frequently Asked Questions
Explore the computational foundations of measuring meaning within medical ontologies. These answers clarify how graph-based distance, information content, and deep learning embeddings are used to quantify the closeness of clinical concepts for data harmonization and decision support.
Semantic similarity is a computational measure that quantifies the degree of relatedness or likeness in meaning between two clinical concepts based on their properties and positions within an ontological graph. Unlike simple lexical matching, which compares surface-level strings, semantic similarity leverages the formal hierarchical structure and logical axioms of terminologies like SNOMED CT or the Unified Medical Language System (UMLS). The core mechanism involves calculating the distance between two concept nodes, typically by measuring the shortest path length or the depth of their lowest common ancestor (LCA). More advanced methods incorporate information content (IC) , which weights concepts by their specificity—rare, deeply nested concepts carry higher information value than general ones. This technique is foundational for concept normalization, where disparate textual mentions like 'heart attack' and 'myocardial infarction' must be mapped to the same unique identifier, and for ontology mapping, where equivalent concepts across different code systems like ICD-10-CM and SNOMED CT must be aligned to enable semantic interoperability.
Semantic Similarity vs. Lexical Matching vs. Semantic Matching
A comparison of three distinct computational approaches for identifying correspondences between concepts in different medical ontologies, ranging from surface-level string analysis to deep logical inference.
| Feature | Semantic Similarity | Lexical Matching | Semantic Matching |
|---|---|---|---|
Core Mechanism | Quantifies conceptual closeness using graph distance and properties within a single ontology | Compares string similarity of labels, synonyms, and terms across ontologies | Uses formal axioms, hierarchical context, and logical constraints to determine equivalence |
Primary Input | Concept embeddings or graph path lengths | Character n-grams, edit distance, token sequences | Description logic axioms, OWL constructs, subsumption hierarchies |
Handles Synonyms | |||
Handles Homonyms | |||
Requires Label Overlap | |||
Uses Ontology Structure | |||
Logical Consistency Checking | |||
Typical Accuracy | 85-92% | 60-80% | 95-99% |
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
Explore the core concepts that underpin semantic similarity measurement within medical ontologies, from the formal logic of knowledge representation to the practical techniques for mapping and harmonizing clinical terminologies.
Description Logic
A family of formal knowledge representation languages that define the axioms and logical structure of ontologies. Description logic enables automated reasoning and consistency checking, providing the formal semantics that allow a reasoner to infer hierarchical relationships and compute the subsumption of one concept by another.
Semantic Matching
An ontology alignment technique that uses the formal semantics, hierarchical context, and logical axioms of concepts to determine their degree of similarity. Unlike lexical matching, which compares string labels, semantic matching analyzes the defined properties and restrictions of a concept to find non-obvious but logically sound alignments.
Concept Normalization
The task of linking disparate textual mentions of a clinical entity to a single, unique concept identifier in a standard terminology like SNOMED CT or RxNorm. This process relies on semantic similarity to resolve ambiguous terms, ensuring that 'heart attack' and 'myocardial infarction' are mapped to the same concept ID.
Equivalence Mapping
A type of ontology alignment that asserts a relationship of logical equality or interchangeability between a concept in a source code system and a concept in a target code system. A ConceptMap resource in FHIR uses equivalence mappings to define precise translation rules, often validated by a confidence score.
Subsumption
The hierarchical relationship where one concept is more general than another, such that the broader concept fully encompasses the meaning of the narrower one. For example, 'Disorder of cardiovascular system' subsumes 'Hypertensive disorder'. Semantic similarity calculations often leverage the path distance defined by these subsumption hierarchies within an ontology graph.
UMLS
The Unified Medical Language System is a large biomedical vocabulary compendium that maps concepts across over 200 source vocabularies, including SNOMED CT, ICD-10-CM, and LOINC. It provides a common semantic network and a Concept Unique Identifier (CUI) that serves as the foundational backbone for computing semantic similarity across disparate coding systems.

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