Algorithm Search⌘K

Definitioncore

Resnik similarity

Also called information content similarity.

The similarity of two concepts in a taxonomy as the information content -log P(c) of their most informative common subsumer.

Resnik similarity measures how similar two concepts of a taxonomy are by the information content of the most specific concept that subsumes both. A taxonomy such as the noun hierarchy of WordNet puts "cat" and "dog" under "mammal", and "cat" and "car" only under the root, "entity". Resnik 1995 gives each concept a probability from corpus counts and scores a pair by the self-information −log⁡P(c)-\log P(c) of their common subsumer with the largest value. A rare, specific subsumer such as "bird" means a high similarity, and the root, with probability 1, means similarity 0. Unlike counting the edges of the path between two concepts, the measure does not assume that all links of the taxonomy have the same length. That it agrees with human ratings better than edge counting is a measurement.

Definition

Let a taxonomy be a directed acyclic graph of concepts with one root, in which an edge from cc to c′c' says that cc is a kind of c′c'. Concept c′c' subsumes cc if c′=cc' = c or c′c' is an ancestor of cc. Each word nn is attached to the concepts that are its senses, and words⁡(c)\operatorname{words}(c) is the set of words attached to cc or to a concept that cc subsumes. From a corpus with the count count⁡(n)\operatorname{count}(n) of each word,

freq⁡(c)=∑n∈words⁡(c)count⁡(n),P(c)=freq⁡(c)N,IC⁡(c)=−log⁡P(c),\operatorname{freq}(c) = \sum_{n \in \operatorname{words}(c)} \operatorname{count}(n), \qquad P(c) = \frac{\operatorname{freq}(c)}{N}, \qquad \operatorname{IC}(c) = -\log P(c),

where NN is the frequency of the root. The Resnik similarity of two concepts is

sim⁡(c1,c2)=max⁡c∈S(c1,c2)IC⁡(c),\operatorname{sim}(c_1, c_2) = \max_{c \in S(c_1, c_2)} \operatorname{IC}(c),

where S(c1,c2)S(c_1, c_2) is the set of concepts that subsume both. For two words, Resnik takes the largest similarity over their senses: wsim⁡(w1,w2)=max⁡sim⁡(c1,c2)\operatorname{wsim}(w_1, w_2) = \max \operatorname{sim}(c_1, c_2) over the senses c1c_1 of w1w_1 and c2c_2 of w2w_2. The base of the logarithm sets the unit; the examples below use base 2, so the values are in bits.

These facts follow from the definition.

  • Monotone. If c′c' subsumes cc, then words⁡(c)⊆words⁡(c′)\operatorname{words}(c) \subseteq \operatorname{words}(c'), so P(c)≤P(c′)P(c) \le P(c') and IC⁡(c)≥IC⁡(c′)\operatorname{IC}(c) \ge \operatorname{IC}(c'). The information content does not grow toward the root, and the root has IC⁡=0\operatorname{IC} = 0.
  • Trees. In a tree, S(c1,c2)S(c_1, c_2) is the path from the lowest common ancestor to the root, so by monotonicity the most informative common subsumer is the lowest common ancestor. In a DAG there can be several lowest common subsumers, and the maximum chooses among them.
  • Range. 0≤sim⁡(c1,c2)≤min⁡(IC⁡(c1),IC⁡(c2))0 \le \operatorname{sim}(c_1, c_2) \le \min(\operatorname{IC}(c_1), \operatorname{IC}(c_2)). The root is a common subsumer, which gives the lower bound, and every common subsumer subsumes c1c_1 and c2c_2, so by monotonicity its information content is at most theirs. sim⁡\operatorname{sim} is symmetric.
  • Not a normalized score. sim⁡(c,c)=IC⁡(c)\operatorname{sim}(c, c) = \operatorname{IC}(c), which differs from concept to concept, so the similarity of a concept with itself is not a constant.
  • Ambiguous words. Resnik 1995 adds the count of an ambiguous word to every concept of each of its senses. A common variant divides the count among the senses.

Examples and non-examples

A small taxonomy. The tree and the counts below are written for this page, with N=100N = 100 noun tokens.

concept parent freq P IC (bits)
entity (root) 100 1 0
animal entity 58 0.58 0.7859
mammal animal 50 0.50 1.0000
cat mammal 20 0.20 2.3219
dog mammal 30 0.30 1.7370
bird animal 8 0.08 3.6439
sparrow bird 5 0.05 4.3219
eagle bird 3 0.03 5.0589
artifact entity 42 0.42 1.2515
vehicle artifact 35 0.35 1.5146
car vehicle 25 0.25 2.0000
bicycle vehicle 10 0.10 3.3219
tool artifact 7 0.07 3.8365
hammer tool 7 0.07 3.8365

Only the leaves have counts. The frequency of an inner concept is the sum over the leaves below it.

pair most informative subsumer sim (bits)
sparrow, eagle bird 3.6439
car, bicycle vehicle 1.5146
car, hammer artifact 1.2515
cat, dog mammal 1.0000
cat, sparrow animal 0.7859
cat, car entity 0

Sparrow and eagle come out more similar than cat and dog, because "bird" is rarer in this corpus than "mammal". The measure rewards a specific common class, and here specific means rare. Car and hammer, whose common class is "artifact", also come out more similar than cat and dog, although their path in the tree has 4 edges and the path from cat to dog has 2. The counts decide, not the shape of the tree.

Self-similarity. sim⁡(cat,cat)=2.3219\operatorname{sim}(\text{cat}, \text{cat}) = 2.3219 and sim⁡(dog,dog)=1.7370\operatorname{sim}(\text{dog}, \text{dog}) = 1.7370, which is less than sim⁡(sparrow,eagle)\operatorname{sim}(\text{sparrow}, \text{eagle}). So a dog is less similar to itself than a sparrow is to an eagle. This is a known weakness that the normalized measures below fix.

The measurement. Resnik 1995 took the frequencies from the nouns of the Brown corpus over WordNet and compared the measure with the human ratings of 30 noun pairs from Miller and Charles. The correlation was r=0.7911r = 0.7911 for information content, against 0.66450.6645 for edge counting and 0.66710.6671 for the probability of the subsumer alone. A replication of the ratings with new subjects gave correlations near 0.9 with the original ratings (Resnik reports 0.9015, and 0.8848 as the average per subject), which serves as an upper bound.

Not: a distance. The value grows with similarity and has no fixed maximum, and sim⁡(c,c)\operatorname{sim}(c, c) is not a constant, so it cannot be turned into a distance that is 0 exactly for equal concepts by subtracting it from a constant.

Not: distributional similarity. The counts only give the weights of the concepts. Whether two concepts share a subsumer comes from the hand-built taxonomy, not from the contexts of the words as in the distributional hypothesis. Two words that never occur near each other can be very similar.

  • Self-information. IC⁡(c)\operatorname{IC}(c) is the self-information of the event that a random noun token falls under cc.
  • Lin similarity. 2IC⁡(lcs⁡)IC⁡(c1)+IC⁡(c2)\frac{2 \operatorname{IC}(\operatorname{lcs})}{\operatorname{IC}(c_1) + \operatorname{IC}(c_2)}, with lcs the most informative common subsumer, is in [0,1][0, 1] and gives 1 for a concept with itself. In the table, cat and dog get 2/(2.3219+1.7370)=0.49272 / (2.3219 + 1.7370) = 0.4927, and sparrow and eagle 0.77690.7769.
  • Jiang and Conrath distance. IC⁡(c1)+IC⁡(c2)−2IC⁡(lcs⁡)\operatorname{IC}(c_1) + \operatorname{IC}(c_2) - 2 \operatorname{IC}(\operatorname{lcs}) is 0 for a concept with itself. In the table, cat and dog get 2.05892.0589 and cat and car 4.32194.3219.
  • Path length. The number of edges between the two concepts, through the lowest common subsumer. Resnik's argument against it is that the links of a taxonomy do not all stand for the same distance in meaning.
  • Uses. The similarity of the senses of nearby words is a knowledge source for word sense disambiguation, and taxonomies can be extended with pairs from Hearst patterns. Rank correlation, such as Spearman's, is the usual way to compare a measure with human ratings.

References

  1. Resnik 1995, the definition of similarity as the information content of the most informative common subsumer, the class frequencies from noun counts in the Brown corpus over WordNet, the maximum over senses for words, and the correlations with human ratings
  2. Daniel Jurafsky and James H. Martin, Speech and Language Processing, third edition draft, Appendix Word Senses and WordNet, the section on word similarity in a thesaurus

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)
WritingW4 complete
  • a review of the text: no review record reviews/QP71HQ/text.yaml