1 / 38

Unsupervised Dependency Parsing

Unsupervised Dependency Parsing. David Mare ček Institute of Formal and Applied Linguistics Charles University in Prague Doctoral thesis defense September 26, 2012. Outline. Unsupervised dependency parsing What is it? What is it good for? My work Reducibility feature Dependency model

mmerrifield
Download Presentation

Unsupervised Dependency Parsing

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. UnsupervisedDependency Parsing David Mareček Institute of Formal and Applied Linguistics Charles University in Prague Doctoral thesis defense September 26, 2012

  2. Outline Unsupervised dependency parsing What is it? What is it good for? My work Reducibility feature Dependency model Gibbs sampling algorithm for dependency trees Results

  3. Supervised Parser is learned on a manually annotated treebank Unsupervised No treebanks, no language specific linguistic rules Only corpora without manual tree annotations Semi-supervised Something in the middle Dependency parsing PRP$ NN VBZ NN NNS . My grandmother plays computer games .

  4. Unsupervised dependency parsing Induction of linguistic structure directly from text corpus based on language independent linguistic assumptions about dependencies sometimes called “grammar induction” We can use it for any language and domain We do not need any new manually annotated treebanks Independent on linguistic theory We can tune it with respect to the final application E.g. in Machine translation: We do not know what stucture is the best for a particular language pair It can be different from the structures used in treebanks. It’s a challenge... Children do not use treebanks when learning their mother tongue. Could machines do it as well?

  5. REDUCIBILITY

  6. Reducibility Definition: A word (or a sequence of words) in a sentence is reducible if it can be removed from the sentence without violating its correctness. REDUCIBLE NOT REDUCIBLE Some conference participants missed the last bus yesterday. Some participants missed the last bus yesterday. Some conference participants the last bus yesterday.

  7. Hypothesis If a word (or sequence of words) is reducible in a particular sentence, it is a leaf (or a subtree) in its dependency structure. missed bus yesterday participants Some conference the last

  8. It mostly holds across languages Problems occur mainly with function words Hypothesis • If a word (or sequence of words) is reducible in a particular sentence, it is a leaf (or a subtree) in its dependency structure. PREPOSITIONAL PHRASES: They are at the conference. DETERMINERS: I am in the pub. AUXILIARY VERBS: I have been sitting there. • Let’s try to recognize reducible words automatically...

  9. Recognition of reducible words We remove the word from the sentence. But how can we automatically recognize whether the rest of the sentence is correct or not? Hardly... (we don’t have any grammar yet) If we have a large corpus, we can search for the needed sentence. it is in the corpus -> it is (possibly) grammatical it is not in the corpus -> we do not know We will find only a few words reducible... very low recall

  10. Other possibilities? Could we take a smaller context than the whole sentence? Does not work at all for free word-order languages. Why don’t use part-of-speech tags instead of words? DT NN VBS IN DT NN . DT NN VBS DT NN . ... but the preposition IN should not be reducible Solution: We use a very sparse reducible words in the corpus for estimating “reducibility scores” for PoS tags (or PoS tag sequence)

  11. Computing reducibility scores For each possible PoS unigram, bigram and trigram: Find all its occurrences in the corpus For each such occurence, remove the respective words and search for the rest of the sentence in the corpus. If it occurs at least once elsewhere in the corpus, the occurence is proclaimed as reducible. Reducibility of PoS n-gram = relative number of reducible occurences I saw her in the theater . PRP VBD PRP IN DT NN . 1 She was sitting on the balcony and wearing a blue dress . R’( “IN DT NN” ) = PRP VBD VBG IN DT NN CC VBG DT JJ NN . 2 I saw her . PRP VBD PRP .

  12. Computing reducibility scores • For each possible PoS unigram, bigram and trigram: • Find all its occurrences in the corpus • For each such occurence, remove the respective words and search for the rest of the sentence in the corpus. • If it occurs at least once elsewhere in the corpus, the occurence is proclaimed as reducible. • Reducibility of PoS n-gram = relative number of reducible occurences • r(g) ... number of reducible occurences • c(g) ... number of all the occurences

  13. Examples of reducibility scores Reducibility scores of the English PoS tags induced from the English Wikipedia corpus

  14. Examples of reducibility scores Reducibility scores of Czech PoS tags 1st and 2nd position of PDT tag

  15. DEPENDENCY TREE MODEL

  16. Dependency tree model Consists of four submodels edge model fertility model distance model reducibility model Simplification we use only PoS tags, we don’t use word forms (except for computing reducibility scores)

  17. Edge model P(dependent tag | edge direction, parent tag) “Rich get richer” principle on dependency edges

  18. Fertility model P(number left and right children | parent tag) “Rich get richer” principle

  19. Distance model Longer edges are less probable.

  20. Reducibility model Probability of a subtree is proportinal to its reducibility score.

  21. Probability of treebank The probability of the whole treebank, which we want to maximize Multiplication over all models and words in the corpus

  22. GIBBS SAMPLING OF DEPENDENCY TREES

  23. Gibbs sampling Initialization A random projective dependency tree is generated for each sentence Sampling A small changes in dependency structures are being done in many iterations across the treebank Small changes are chosen randomly with respect to the probability distribution of the resulting treebanks Decoding Final trees are built according to the last 100 samples

  24. Gibbs sampling – bracketing notation Each projective dependency tree can be expressed by a unique bracketing. Each bracket pair belongs to one node and delimits its descendants from the rest of the sentence. Each bracketed segment contains just one word that is not embedded deeper; this node is the head of the segment. root VB NN RB IN DT NN DT JJ (((DT) NN) VB (RB) (IN ((DT) (JJ) NN)))

  25. Gibbs sampling – small change Choose one non-root node and remove its bracket Add another bracket which does not violate the projectivity (VB) 0.0009 (VB (RB)) 0.0011 (((DT) NN) VB) 0.0016 (((DT) NN) VB (RB)) 0.0018 (IN) 0.0006 (IN ((DT) (JJ) NN)) 0.0023 ((RB) IN ((DT) (JJ) NN)) 0.0012 ((RB) IN) 0.0004 ( ((DT) NN) VB (RB) IN ((DT) (JJ) NN)) ( )

  26. Gibbs sampling- decoding After 200 iterations We run MST algorithm Edge weights = occurrences of individual edges in the treebank during the last 100 sampling iterations The output trees may be possibly non-projective

  27. EXPERIMENTS AND EVALUATION

  28. Data Inference and evaluation CoNLL 2006/2007 test data HamleDT treebanks (30 languages) Estimating reducibility scores Wikipedia corpus (W2C) 85 mil. tokens for English ... 3 mil. tokens for Japanese

  29. Experiments Different languages Different combinations and variants of models Supervised / unsupervised PoS tags POS, CPOS, number of classes Including / excluding punctuation from training / from evaluation Different decoding methods Different evaluation metrics DAS, UAS, NED

  30. Results Reducibility model is very useful • For some languages, I achieved better results when using unsupervised PoS tags instead of supervised ones • Many mistakes are in punctuation • ...

  31. Results

  32. Conclusions I have introduced reducibility feature, which is useful in unsupervised dependency parsing. Reducibility scores for individual PoS tag n-grams are computed on a large corpus, the inference itself is done on a smaller data. I have proposed an algorithm for sampling projective dependency trees. Better results for 15 out of 20 treebanks compared to the 2011 state-of-the-art Future work: Employ lexicalized models Improve reducibility – another dealing with function words Parallel unsupervised parsing for machine translation

  33. Thank you !

  34. ANSWERS

  35. Answers to A. Soegaard’s questions The aim of the parsing may be: To be able to parse any language using all the data resources available (McDonald, Petrov,...) To induce a grammar without using any manually annotated data (Spitkovsky, Blunsom,...) For a completely unsupervised solution I should use unsupervised PoS tagging as well I would not know what are verbs, what are nouns, ... Hyperparameter tuning and evaluation In a future work, it should be extrinsic (on a final application, e.g. MT) In my thesis, the only possibility was to evaluate against existed treebanks

  36. Answers to A. Soegaard’s questions [2] Decoding: I’ve chosen the maximum-spanning-tree decoding. The results using annealing were not very different Non-projective (Chu-Liu-Edmonds algorithm) I have not tested projective (Eisner’s) algorithm. Comparing results with other works Many papers report the results on sentences not longer than 10 words. Turkish 2006 data are missing I did not have this data available.

  37. Answers to F. Jurčíček’s questions (2) Chinese restaurant process Treebank generation ~ Chinese restaurant (4), (7) What is the history? When generating a treebank, a new dependency edge is generated based on previously generated edges When sampling a new treebank, a new edge(s) is sampled based on all other edges in the treebank (exchangeability) (5) Are the distance and reducibility models really unsupervised? unsupervised – we do not need any labeled data language independent – they works for all the languages Are the properties of distance and reducibility assumptions or we observed them form a data? The repeatability of edges could be observed from data as well.

  38. Answers to F. Jurčíček’s questions [2] (7) Probability of a dependency relation The proposed sampling algorithm can change more than one edge together (to preserve the treeness) Probability of the rest of the treebank is equal for all the candidates. (7) Dependencies in the same tree are not i.i.d. That’s true. I am aware of it. Independency is negligible on a very high number of sentences. (8) Small changes Described by removing a bracket and adding another bracket. This causes that more than one edge may be changed in one sample.

More Related