Inferensys

Glossary

Semantic Similarity

A computational measure of the closeness of meaning between two concepts, often calculated based on their distance and properties within an ontological graph.
Stylish WeWork-like workspace with hot desks and document wall, professional searching through enterprise knowledge base on a mounted ultrawide display, warm industrial pendants overhead.
MEDICAL ONTOLOGY ALIGNMENT

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.

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.

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.

ONTOLOGICAL COMPUTATION

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.

01

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.

02

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.

03

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.

04

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.

05

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.

06

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.

SEMANTIC SIMILARITY

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.

ONTOLOGY ALIGNMENT TECHNIQUE COMPARISON

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.

FeatureSemantic SimilarityLexical MatchingSemantic 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%

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.