arXiv is now an independent nonprofit! Learn more
License: arXiv.org perpetual non-exclusive license
arXiv:1809.00414v1 [cs.IR] 03 Sep 2018

Hypernyms Through Intra-Article Organization in Wikipedia

Disha Shrivastava Thanks: * Work done as part of IBM Research, Bangalore Affiliation: MILA, Université de Montréal Affiliation: Montreal, Canada Email: dishu.905@gmail.com    Sreyash Kenkre Affiliation: IBM Research Affiliation: Bangalore, India Email: srekenkr@in.ibm.com    Santosh Penubothula Affiliation: IBM Research Affiliation: Bangalore, India Email: sapenubo@in.ibm.com
Abstract

We introduce a new measure for unsupervised hypernym detection and directionality. The motivation is to keep the measure computationally light and portatable across languages. We show that the relative physical location of words in explanatory articles captures the directionality property. Further, the phrases in section titles of articles about the word, capture the semantic similarity needed for hypernym detection task. We experimentally show that the combination of features coming from these two simple measures suffices to produce results comparable with the best unsupervised measures in terms of the average precision.

1 Introduction

Given two words w1w_{1} and w2w_{2}, the hypernym detection task is to determine if there is a hypernym relation between the two words. If a hypernym is known to exist, the directionality task is to determine if w1w_{1} is a hypernym or hyponym of w2w_{2}. More precisely, due to polysemy, the detection task asks if, there is some meaning of w1w_{1}, in which it is a hypernym or hyponym of some meaning of w2w_{2}.

The first approaches were pattern based Hearst 1992; Snow et al. 2004. However, these suffered from poor recall. This led to the development of methods based on the distributional hypothesis Harris 1954 or the Distributional Inclusion Hypotheses Geffet and Dagan 2005. The method used in these techniques was to take a very large corpus, and using either window based, or dependency path based approaches, along with measures like frequency, PPMI Church and Hanks 1990, LPMI Evert 2005, to find vectors to represent the words. In supervised settings, the vectors for two words are combined suitably and a classifier is trained Baroni et al. 2012; Roller et al. 2014; Weeds et al. 2014; Shwartz et al. 2016 to predict the existence of a hypernym relation and later directionality. However, recently there has been deeper research on what exactly is learned by these techniques Levy et al. 2015. In the unsupervised setting a suitable measure, motivated by either the distributional inclusion hypothesis or the distributional informativeness hypothesis is used for hypernyms Santus et al. 2016; Weeds et al. 2004; Santus et al. 2014; Geffet and Dagan 2005.

In this paper we present a simple and computationally light unsupervised technique for hypernym detection and directionality which is a combination of two measures, called as depth measure and heading measure. We start off with a large corpus, but instead of finding window or dependency path based contexts, which are very expensive to compute; we argue that the internal organization of descriptive and explanatory documents naturally leads to strong signals that are indicative of hypernyms. By exploratory documents, we mean documents that have been produced with the express purpose of making the reader understand the concepts that the document is describing; text books, research papers and Wikipedia articles are prime examples of this. We verify this intuition empirically, wherein we achieve results comparable and in some cases better than prior techniques in both the tasks of hypernym detection and directionality. One salient feature of our measures is that they exploit how humans organize information in explanatory documents making them portable across all languages. This offers us an advantage over prior techniques which depend on the intricacies of syntax and semantics of the language of the documents.

2 Methodology

We will be using Wikipedia as the source of descriptive and explanatory documents in this paper. For ease of exposition, we define the concept of units. Given an article from Wikipedia, each page title, section title, sub-section title etc., irrespective of the depth of section, will be referred to as a heading. Each heading on the article usually consists of a title that describes what the text following the heading is about. Following the heading, are usually a few paragraphs that describe in more detail the heading. This may be followed by another heading, and this pattern repeats. We refer to each heading and the text following it, till (but not including) the next heading, as a unit. Thus the article is physically organized as a sequence of disjoint units. We represent a unit uu as a pair (h,S)(h,S), where hh is the heading, and SS is the sequence of sentences in the unit.

2.1 Depth Measure

Given a hypernym-hyponym pair, (w1,w2)(w_{1},w_{2}), consider the organization of a Wikipedia article containing both of them. The very first unit at the top of the page is usually a broader introduction of the main topic of the article. It will use words that are more popular. However, from the next unit onward, the articles tend to be more specialized with higher detail in content. Thus the linguistic contexts used in the units occurring lower in the article tend to be more detail oriented than those occurring earlier (except for the first introductory unit). Since more detailed context are indicative of a hyponym, they tend to occur later in the article than the hypernyms. This same reasoning applies within a unit. In this case the hypernym will tend to occur in earlier sentences in the unit than the hyponym. We generalize this to the case in which w1w_{1} and w2w_{2} do not co-occur in the same article, as follows. We take a large corpus of articles (e.g. all articles in Wikipedia), and check the depth at which w1w_{1} and w2w_{2} tend to occur (individually). If w2w_{2} tends to occur at larger depth than w1w_{1}, we conclude that w2w_{2} is a hyponym of w1w_{1}.

Let 𝒫\mathcal{P} be the set of articles. Let a𝒫a\in\mathcal{P} be an article, and let ww be a given word or phrase. To formally define depth, we will assume that the article has a fixed rooted tree like topology with the units of aa as its vertices, denoted by G(a)G(a). The root will be the first unit of the article, and the depth will be the distance from the root. We experiment when G(a)G(a) is a Star-like tree topology, as indicated by the depths of its sections and sub-sections, or a Linear-like topology with a unit being a parent of the immediate next unit in the physical layout of the article. We define a function λ(a,w)\lambda(a,w) that captures the depth of each occurrence of ww in aa. Let (a,w)\mathcal{I}(a,w) denote the set of occurrences of ww in aa. Each occurrence consists of a pair (ui,sj)(u_{i},s_{j}), where uiu_{i} denotes a unit, and sjs_{j} is the sentence in which it occurs. Multiple instances of ww in the same sentence is treated as one instance. Let d(G(a))d(G(a)) denote the total depth of G(a)G(a). If d(ui)d(u_{i}) is the depth of unit uiu_{i} in G(a)G(a), and |ui||u_{i}| is the number of sentences in it, then we define the

λ(a,w)=(ui,sj)(a,w)(1d(ui)d(G(a)CLOSE)(1j|ui|)\displaystyle\lambda(a,w)=\sum\limits_{(u_{i},s_{j})\in\mathcal{I}(a,w)}\left(1-\frac{d(u_{i})}{d(G(a)}\right)\left(1-\frac{j}{|u_{i}|}\right)

The first factor gives a normalized measure (to ensure same scale across all articles, of different sizes) of the depth of each occurrence of ww in aa. Similarly, the second factor gives a normalized depth of the instance within a unit. Larger the λ(a,w)\lambda(a,w), more likely is it to be a hypernym. To aggregate this measure across all articles:

λ(w)=mediana𝒫 λ(a,w)\lambda(w)=\underset{a\in\mathcal{P}}{\mathrm{median}}\hbox{~}\lambda(a,w) (1)

2.2 Heading Measure

For testing relatedness between words, we define the heading measure, inspired by  Do and Roth 2012. We search in Wikipedia for the article on the given phrase ww (e.g., if ww is the word jumping, then we get the article https://en.wikipedia.org/wiki/Jumping). Since the page is about ww, it is organized into sections that explain every property of ww. We can thus represent ww simply by the collection of headings (titles, sub-titles at every possible level).

If the page on ww turns out to be a disambiguation page, then the page lists different possible meanings of ww, along with the corresponding links. We follow each of the links to get possible articles on different meanings of ww. In case any of the pages is again a disambiguation page, we iterate further. For each of the pages that are articles, we form a set of headings. Each set corresponds to a different meaning of ww. We let SwS_{w} denote the collection of the headings for different meanings of ww (See Algorithm 1). Note here, that SwS_{w} is a set of sets. One advantage of this method is that we get the different meanings of the words up front, whereas, in context feature based approaches, there can be a mixing of the different contexts for polysemous words.

input : Word or phrase ww
output : SwS_{w}, a collection of headings of pages on ww
Function ExtractHeadings(w)
𝒫={P1,,Pk}\mathcal{P}=\{P_{1},\ldots,P_{k}\} be the set of articles on ww, SwϕS_{w}\leftarrow\phi
 while 𝒫ϕ\mathcal{P}\not=\phi do
   Select any P𝒫P\in\mathcal{P}
    𝒫𝒫P\mathcal{P}\leftarrow\mathcal{P}\setminus P
    if PP is not a disambiguation page then
      Let CC be the collection of headings on page PP
       SwSw{C}S_{w}\leftarrow S_{w}\cup\{C\}
       else
      Let 𝒟\mathcal{D} be the collection of articles that PP points to as possible meanings of ww
       𝒫𝒫𝒟\mathcal{P}\leftarrow\mathcal{P}\cup\mathcal{D} end if
      end while
 return SwS_{w}
 
Algorithm 1 Extract Heading Sets

After computing Sw1S_{w_{1}} and Sw2S_{w_{2}} as shown in Algorithm (1), we compute the SimScore(w1,w2)SimScore(w_{1},w_{2}) as the maximum similarity between an element of Sw1S_{w_{1}} and Sw2S_{w_{2}}. For the similarity, we experimented with two measures, the Jaccard Similarity, and the cosine of the corresponding word2vec Mikolov et al. 2013 vectors. For using word2vec, for each heading set CC, we take the mean of the vectors for each heading. Since word2vec uses the context of words, this combines our features with the contextual features. The final measure we use for the pair of words is:

(1+λ(w1)λ(w2)2)(SimScore(w1,w2))\displaystyle\left(\frac{1+\lambda(w_{1})-\lambda(w_{2})}{2}\right)\left(SimScore(w_{1},w_{2})\right) (2)

3 Experiments and Results

3.1 Datasets and Corpus

We experimented with four datasets widely used in literature: BLESS Baroni and Lenci 2011, EVALution Santus et al. 2015, Lenci/Benotto Benotto 2015, and Weeds Weeds et al. 2014 taken from the repository provided by Shwartz et al. 2017. The corpus of articles we use is a complete xml dump of the English Wikipedia dated 3 Nov 2017.

3.2 Testing Directionality

We extracted out the pairs marked hypernyms from each of the four data sets and computed the depth measure for each word in the pair. If the difference λ(w1)\lambda(w_{1}) - λ(w2)\lambda(w_{2}) is less than zero, we mark these pairs as False and compute precision. To identify the articles containing ww, we indexed the corpus of Wikipedia using Elasticsearch Gormley and Tong 2015 and used the top thousand articles returned as the set for computing λ(w)\lambda(w). We experimented with the Star and Linear topologies.

Dataset Star Topology Linear Topology
Total Precision Precision
BLESS 1198 0.918 0.536
Weeds 1321 0.974 0.429
Evalution 3303 0.980 0.566
LenciBenotto 1728 0.974 0.439
Table 1: Testing directionality. Total= total number of pairs present in the test set.

It is seen that with Star topology our precision in very high on each of the datasets. The worst performance is on BLESS. However, here too, it is 91.8%91.8\%. For BLESS, as seen in  Santus et al. 2014, the performance of SLQS is 87%87\%. Similar to SLQS, our depth measure is motivated by distributional informativeness hypothesis Shwartz et al. 2017. However, without using the extensive computation of context vectors and entropy, we are able to demonstrate good performance. As can be seen by physically examining Wikipedia articles, many of them tend to have a Star topology. This is also indicative that the topology used plays a major role in this feature. More sophisticated techniques will be needed to identify the topology of individual articles.

3.3 Testing Detection

For this experiment, we aim to discriminate pairs of words connected by the hypernym relation, from words connected by other relations (meronym, coord, attribute, event, antonym, synonym). For each pair, we evaluate our scoring function given in expression (2). We compared our numbers with those given in  Shwartz et al. 2017. In that paper, multiple measures are used, and the best performing measure for every row of the table is presented. We conducted the experiments for both, Star as well as the Linear topology. However, the results for Star topology were slightly better, hence we present these in Table (2).

Dataset Hyper vs Rel AP word2vec AP Jaccard Best AP Best Measure
BLESS all other relations 0.084 0.065 0.051 invCLinvCL
meronym 0.446 0.355 0.760 SLQSsubSLQS_{sub}
coord 0.203 0.235 0.537 SLQSsubSLQS_{sub}
attribute 0.581 0.509 0.740 SLQSsubSLQS_{sub}
event 0.453 0.315 0.779 APSynAPSyn
Weeds all other relations 0.514 0.506 0.441 clarkeDEclarkeDE
coord 0.514 0.506 0.441 clarkeDEclarkeDE
EVALution all other relations 0.273 0.290 0.353 invCLinvCL
meronym 0.629 0.678 0.675 APSynAPSyn
attribute 0.556 0.614 0.651 APSynAPSyn
antonym 0.520 0.526 0.550 SLQSrowSLQS-row
synonym 0.606 0.593 0.657 SLQSrowSLQS-row
Lenci/Benotto all other relations 0.401 0.389 0.382 APSynAPSyn
antonym 0.548 0.530 0.624 APSynAPSyn
synonym 0.599 0.593 0.725 SLQSrowsubSLQS-row_{sub}
Table 2: AP=AP= average precision. The Best AP and Best Measure is taken from  Shwartz et al. 2017.

For the case of hypernym vs all other relations, except for EVALution, in all other data sets, our average precision (APAP) using both Jaccard and word2vec (Shwartz et al. 2017 call this as APAP@all) is better than the best unsupervised measure as reported in Shwartz et al. 2017. For comparing hypernyms against individual relations, we find that with Jaccard similarity, it performs better than the best measures on meronyms in EVALution, and coordinates in Weeds. However, it performs worse for both the relations in BLESS. Our systems performs worse than the best measure whenever an Informativeness Measure  Shwartz et al. 2017, like SLQSSLQS and its variants perform well. It performs better, or at least competitive, when the best performing measure is an Inclusion Measure or Similarity Measure (except for hypernym-vs-event in BLESS). A possible explanation of this is that the heading features that we use do not capture how informative a phrase is. However, having common headings is an indication of shared features, implying similarity, which is also indicated by inclusion measures. However, it should be noted, that we are comparing our single system against the best performing one in each case. For finding the best measure, Shwartz et al. 2017 finds the best by varying the measures as well as the features, whereas we have a fixed system. Our system took a day to set up (including coding effort), and a few mins to run. This is in contrast to methods mentioned above that rely on the computation of context vectors; calculation of dependency parse tree based features alone, from ukWack and Wackypedia corpus, took several days on the same machine.

3.4 Error Analysis

One of the sources of error in our technique is a semantic drift due to disambiguation pages. For example, for the pair (alligator,wild)(alligator,wild), which is marked as attribute in BLESS, our system follows disambiguation links to wildlife, and then marks it as a hypernym. We find this pattern repeatedly. e.g. (scale,lizard)(scale,lizard) is a meronym in BLESS, but is classified as hypernym in the hypernym vs. meronym experiments. While (scale,snake)(scale,snake) is a meronym in BLESS, and is marked correctly as not a hypernym. One reason for this is that among the disambiguation pages, a word is often generalized to related terms. For the hypernym v/s all experiment, the proportion of false positives when at least one word needed a disambiguation page was 37%37\% for BLESS, 29%29\% for Weeds, and about 31%31\% for EVALution and Lenci/Benotto. Selective link following during the disambiguation step can potentially solve this problem.

4 Conclusion

We showed that the organization of articles is an important feature for the task of both hypernym detection and directionality. Using just this simple and computationally cheap measure suffices to give performance that is comparable to the state of art unsupervised measures in these tasks. The proposed measure can also be trivially extended to any languages with a Wikipedia. We believe future work in this area will benefit by using this feature in complex systems that can improve performance.

References

  • Baroni et al. (2012) Marco Baroni, Raffaella Bernardi, Ngoc-Quynh Do, and Chung-chieh Shan. 2012. Entailment above the word level in distributional semantics. In EACL 2012, 13th Conference of the European Chapter of the Association for Computational Linguistics, Avignon, France, April 23-27, 2012, pages 23–32.
  • Baroni and Lenci (2011) Marco Baroni and Alessandro Lenci. 2011. How we blessed distributional semantic evaluation. In Proceedings of the GEMS 2011 Workshop on GEometrical Models of Natural Language Semantics, GEMS 2011, Edinburgh, Scotland, July 31, 2011, pages 1–10.
  • Benotto (2015) Giulia Benotto. 2015. Distributional Models for Semantic Relations: A Sudy on Hyponymy and Antonymy. University of Pisa.
  • Church and Hanks (1990) Kenneth Ward Church and Patrick Hanks. 1990. Word association norms, mutual information, and lexicography. Computational Linguistics, 16(1):22–29.
  • Do and Roth (2012) Quang Xuan Do and Dan Roth. 2012. Exploiting the wikipedia structure in local and global classification of taxonomic relations. Natural Language Engineering, 18(2):235–262.
  • Evert (2005) Stefan Evert. 2005. The Statistics of Word cooccurrences: word pairs and collocations.
  • Geffet and Dagan (2005) Maayan Geffet and Ido Dagan. 2005. The distributional inclusion hypotheses and lexical entailment. In ACL 2005, 43rd Annual Meeting of the Association for Computational Linguistics, Proceedings of the Conference, 25-30 June 2005, University of Michigan, USA, pages 107–114.
  • Gormley and Tong (2015) Clinton Gormley and Zachary Tong. 2015. Elasticsearch: The Definitive Guide, 1st edition. O’Reilly Media, Inc.
  • Harris (1954) Zellig S. Harris. 1954. Distributional structure. In Word, 10(2-3), pages 146–162.
  • Hearst (1992) Marti A. Hearst. 1992. Automatic acquisition of hyponyms from large text corpora. In 14th International Conference on Computational Linguistics, COLING 1992, Nantes, France, August 23-28, 1992, pages 539–545.
  • Levy et al. (2015) Omer Levy, Steffen Remus, Chris Biemann, and Ido Dagan. 2015. Do supervised distributional methods really learn lexical inference relations? In NAACL HLT 2015, The 2015 Conference of the North American Chapter of the Association for Computational Linguistics: Human Language Technologies, Denver, Colorado, USA, May 31 - June 5, 2015, pages 970–976.
  • Mikolov et al. (2013) Tomas Mikolov, Kai Chen, Greg Corrado, and Jeffrey Dean. 2013. Efficient estimation of word representations in vector space. CoRR, abs/1301.3781.
  • Roller et al. (2014) Stephen Roller, Katrin Erk, and Gemma Boleda. 2014. Inclusive yet selective: Supervised distributional hypernymy detection. In COLING 2014, 25th International Conference on Computational Linguistics, Proceedings of the Conference: Technical Papers, August 23-29, 2014, Dublin, Ireland, pages 1025–1036.
  • Santus et al. (2016) Enrico Santus, Alessandro Lenci, Tin-Shing Chiu, Qin Lu, and Chu-Ren Huang. 2016. Nine features in a random forest to learn taxonomical semantic relations. In Proceedings of the Tenth International Conference on Language Resources and Evaluation LREC 2016, Portorož, Slovenia, May 23-28, 2016.
  • Santus et al. (2014) Enrico Santus, Alessandro Lenci, Qin Lu, and Sabine Schulte im Walde. 2014. Chasing hypernyms in vector spaces with entropy. In Proceedings of the 14th Conference of the European Chapter of the Association for Computational Linguistics, EACL 2014, April 26-30, 2014, Gothenburg, Sweden, pages 38–42.
  • Santus et al. (2015) Enrico Santus, Frances Yung, Alessandro Lenci, and Chu-Ren Huang. 2015. Evalution 1.0: an evolving semantic dataset for training and evaluation of distributional semantic models.
  • Shwartz et al. (2016) Vered Shwartz, Yoav Goldberg, and Ido Dagan. 2016. Improving hypernymy detection with an integrated path-based and distributional method. In Proceedings of the 54th Annual Meeting of the Association for Computational Linguistics, ACL 2016, August 7-12, 2016, Berlin, Germany, Volume 1: Long Papers.
  • Shwartz et al. (2017) Vered Shwartz, Enrico Santus, and Dominik Schlechtweg. 2017. Hypernyms under siege: Linguistically-motivated artillery for hypernymy detection. In Proceedings of the 15th Conference of the European Chapter of the Association for Computational Linguistics, EACL 2017, Valencia, Spain, April 3-7, 2017, Volume 1: Long Papers, pages 65–75.
  • Snow et al. (2004) Rion Snow, Daniel Jurafsky, and Andrew Y. Ng. 2004. Learning syntactic patterns for automatic hypernym discovery. In Advances in Neural Information Processing Systems 17 [Neural Information Processing Systems, NIPS 2004, December 13-18, 2004, Vancouver, British Columbia, Canada], pages 1297–1304.
  • Weeds et al. (2014) Julie Weeds, Daoud Clarke, Jeremy Reffin, David J. Weir, and Bill Keller. 2014. Learning to distinguish hypernyms and co-hyponyms. In COLING 2014, 25th International Conference on Computational Linguistics, Proceedings of the Conference: Technical Papers, August 23-29, 2014, Dublin, Ireland, pages 2249–2259.
  • Weeds et al. (2004) Julie Weeds, David J. Weir, and Diana McCarthy. 2004. Characterising measures of lexical distributional similarity. In COLING 2004, 20th International Conference on Computational Linguistics, Proceedings of the Conference, 23-27 August 2004, Geneva, Switzerland.