You Might Like

Semantic similarity is a metric defined over a set of documents or terms, where the idea of distance between them is based on the likeness of their meaning or semantic content as opposed to similarity which can be estimated regarding their syntactical representation (e.g. their string format). These are mathematical tools used to estimate the strength of the semantic relationship between units of language, concepts or instances, through a numerical description obtained according to the comparison of information supporting their meaning or describing their nature.[1][2] The term semantic similarity is often confused with semantic relatedness. Semantic relatedness includes any relation between two terms, while semantic similarity only includes "is a" relations.[3] For example, "car" is similar to "bus", but is also related to "road" and "driving".

Computationally, semantic similarity can be estimated by defining a topological similarity, by using ontologies to define the distance between terms/concepts. For example, a naive metric for the comparison of concepts ordered in a partially ordered set and represented as nodes of a directed acyclic graph (e.g., a taxonomy), would be the shortest-path linking the two concept nodes. Based on text analyses, semantic relatedness between units of language (e.g., words, sentences) can also be estimated using statistical means such as a vector space model to correlate words and textual contexts from a suitable text corpus.


The concept of semantic similarity is more specific than semantic relatedness, as the latter includes concepts as antonymy and meronymy, while similarity does not.[4] However, much of the literature uses these terms interchangeably, along with terms like semantic distance. In essence, semantic similarity, semantic distance, and semantic relatedness all mean, "How much does term A have to do with term B?" The answer to this question is usually a number between -1 and 1, or between 0 and 1, where 1 signifies extremely high similarity.


An intuitive way of visualizing the semantic similarity of terms is by grouping together terms which are closely related and spacing wider apart the ones which are distantly related. This is also common in practice for mind maps and concept maps and is sometimes subconscious.

A more direct way of visualizing the semantic similarity of two linguistic items can be seen with the Semantic Folding approach. In this approach a linguistic item such as a term or a text can be represented by generating a pixel for each of its active semantic features in e.g. a 128 x 128 grid. This allows for a direct visual comparison of the semantics of two items by comparing image representations of their respective feature sets.


Semantic similarity measures have been applied and developed in biomedical ontologies.[5][6] They are mainly used to compare genes and proteins based on the similarity of their functions rather than on their sequence similarity, but they are also being extended to other bioentities, such as diseases.[7]

These comparisons can be done using tools freely available on the web:

  • ProteInOn can be used to find interacting proteins, find assigned GO terms and calculate the functional semantic similarity of UniProt proteins and to get the information content and calculate the functional semantic similarity of GO terms.[8]
  • CMPSim provides a functional similarity measure between chemical compounds and metabolic pathways using ChEBI based semantic similarity measures.[9]
  • CESSM provides a tool for the automated evaluation of GO-based semantic similarity measures.[10]

Similarity is also applied to find similar geographic features or feature types:[11]

  • SIM-DL similarity server[12] can be used to compute similarities between concepts stored in geographic feature type ontologies.
  • Similarity Calculator can be used to compute how well related two geographic concepts are in the Geo-Net-PT ontology.[13][14]
  • The OSM [69] semantic network can be used to compute the semantic similarity of tags in OpenStreetMap.[15]

Several metrics use WordNet, a manually constructed lexical database of English words. Despite the advantages of having human supervision in constructing the database, since the words are not automatically learned the database cannot measure relatedness between multi-word term, non-incremental vocabulary.[4][16]

Natural language processing (NLP) is a field of computer science and linguistics. Sentiment analysis, Natural language understanding and Machine translation (Automatically translate text from one human language to another) are a few of the major areas where it is being used. For example, knowing one information resource in the internet, it is often of immediate interest to find similar resources. The Semantic Web provides semantic extensions to find similar data by content and not just by arbitrary descriptors.[17][18][19][20][21][22][23][24][25]


There are essentially two types of approaches that calculate topological similarity between ontological concepts:

  • Edge-based: which use the edges and their types as the data source;
  • Node-based: in which the main data sources are the nodes and their properties.

Other measures calculate the similarity between ontological instances:

  • Pairwise: measure functional similarity between two instances by combining the semantic similarities of the concepts they represent
  • Groupwise: calculate the similarity directly not combining the semantic similarities of the concepts they represent

Some examples:

  • Pekar et al.[26]
  • Cheng and Cline[27]
  • Wu et al.[28]
  • Del Pozo et al.[29]
  • IntelliGO: Benabderrahmane et al.[6]
  • Resnik[30] based on the notion of information content. The information content of a concept (term or word) is the logarithm of the probability of finding the concept in a given corpus. only considers the information content of lowest common subsumer (lcs). A lowest common subsumer is a concept in a lexical taxonomy ( e.g. WordNet), which has the shortest distance from the two concepts compared. For example, animal and mammal both are the subsumers of cat and dog, but mammal is lower subsumer than animal for them.
  • Lin[31] based on Resnik's similarity. considers the information content of lowest common subsumer (lcs) and the two compared concepts.
  • Maguitman, Menczer, Roinestad and Vespignani[32] Generalizes Lin's similarity to arbitrary ontologies (graphs).
  • Jiang and Conrath[33] based on Resnik's similarity. considers the information content of lowest common subsumer (lcs) and the two compared concepts to calculate the distance between the two concepts. The distance is later used in computing the similarity measure.
  • Align, Disambiguate, and Walk [70] : Random walks on Semantic Networks[34]
  • applicable to ontology
  • consider properties (content) of nodes
  • consider types (content) of relations
  • based on eTVSM[35]
  • based on Resnik's similarity[36]
  • maximum of the pairwise similarities
  • composite average in which only the best-matching pairs are considered (best-match average)

Statistical similarity approaches can be learned from data, or predefined. Similarity learning can often outperform predefined similarity measures. Broadly speaking, these approaches build a statistical model of documents, and use it to estimate similarity.

  • LSA (Latent semantic analysis)[37][38](+) vector-based, adds vectors to measure multi-word terms; (−) non-incremental vocabulary, long pre-processing times
  • PMI (Pointwise mutual information) (+) large vocab, because it uses any search engine (like Google); (−) cannot measure relatedness between whole sentences or documents
  • SOC-PMI (Second-order co-occurrence pointwise mutual information) (+) sort lists of important neighbor words from a large corpus; (−) cannot measure relatedness between whole sentences or documents
  • GLSA (Generalized Latent Semantic Analysis) (+) vector-based, adds vectors to measure multi-word terms; (−) non-incremental vocabulary, long pre-processing times
  • ICAN (Incremental Construction of an Associative Network) (+) incremental, network-based measure, good for spreading activation, accounts for second-order relatedness; (−) cannot measure relatedness between multi-word terms, long pre-processing times
  • NGD (Normalized Google distance) (+) large vocab, because it uses any search engine (like Google); (−) can measure relatedness between whole sentences or documents but the larger the sentence or document the more ingenuity is required, Cilibrasi & Vitanyi (2007), reference below.[39]
  • TSS - Twitter Semantic Similarity [71] -pdf [72] large vocab, because it use online tweets from Twitter to compute the similarity. It has high temporary resolution that allows to capture high frequency events. Open Source
  • NCD (Normalized Compression Distance)
  • ESA (Explicit Semantic Analysis) [73] based on Wikipedia and the ODP
  • SSA (Salient Semantic Analysis) [74] which indexes terms using salient concepts found in their immediate context.
  • n° of Wikipedia (noW) [75] , inspired by the game Six Degrees of Wikipedia [76] , is a distance metric based on the hierarchical structure of Wikipedia. A directed-acyclic graph is first constructed and later, Dijkstra's shortest path algorithm is employed to determine the noW value between two terms as the geodesic distance between the corresponding topics (i.e. nodes) in the graph.
  • VGEM [77] (Vector Generation of an Explicitly-defined Multidimensional Semantic Space) (+) incremental vocab, can compare multi-word terms (−) performance depends on choosing specific dimensions
  • SimRank
  • NASARI [78] :[40] Sparse vector representations constructed by applying the hypergeometric distribution over the Wikipedia corpus in combination with BabelNet [79] taxonomy. Cross-lingual similarity is currently also possible thanks to the multilingual and unified extension.[41]
  • Marker Passing: Combining Lexical Decomposition for automated Ontology Creation and Marker Passing the approach of Fähndrich et al. introduces a new type of semantic similarity measure.[42] Here markers are passed from the two target concepts carrying an amount of activation. This activation might increase or decrease depending on the relations weight with which the concepts are connected. This combines edge and node based approaches and includes connectionist reasoning with symbolic information.
  • Good Common Subsumer-(GCS)-based Semantic Similarity Measure[43]

Researchers have collected datasets with similarity judgements on pairs of words, which are used to evaluate the cognitive plausibility of computational measures. The golden standard up to today is an old 65 word list where humans have judged the word similarity.[44] For a list of datasets, and an overview of the state of the art see [80] .

See also

You Might Like