CRF Autoencoder for Unsupervised Dependency Parsing∗

CRF Autoencoder for Unsupervised Dependency Parsing∗

CRF Autoencoder for Unsupervised Dependency Parsing∗ Jiong Cai, Yong Jiang and Kewei Tu caijiong,jiangyong, tukw @shanghaitech.edu.cn { School of Information Science} and Technology ShanghaiTech University, Shanghai, China Abstract inative parser. They designed a convex quadratic objective function under the discriminative clus- Unsupervised dependency parsing, which tering framework. By utilizing global features tries to discover linguistic dependency and linguistic priors, their approach achieves state- structures from unannotated data, is a very of-the-art performance. However, their approach challenging task. Almost all previous uses an approximate parsing algorithm, which has work on this task focuses on learning gen- no theoretical guarantee. In addition, the perfor- erative models. In this paper, we de- mance of the approach depends on a set of manu- velop an unsupervised dependency pars- ally specified linguistic priors. ing model based on the CRF autoencoder. The encoder part of our model is discrim- inative and globally normalized which al- lows us to use rich features as well as uni- Conditional random field autoencoder (Ammar versal linguistic priors. We propose an et al., 2014) is a new framework for unsupervised exact algorithm for parsing as well as a structured prediction. There are two components tractable learning algorithm. We evaluated of this model: an encoder and a decoder. The en- the performance of our model on eight coder is a globally normalized feature-rich CRF multilingual treebanks and found that our model predicting the conditional distribution of model achieved comparable performance the latent structure given the observed structured with state-of-the-art approaches. input. The decoder of the model is a generative model generating a transformation of the struc- 1 Introduction tured input from the latent structure. Ammar et al. (2014) applied the model to two sequential Unsupervised dependency parsing, which aims to structured prediction tasks, part-of-speech induc- discover syntactic structures in sentences from un- tion and word alignment and showed that by uti- labeled data, is a very challenging task in natural lizing context information the model can achieve language processing. Most of the previous work better performance than previous generative mod- on unsupervised dependency parsing is based on els and locally normalized models. However, to generative models such as the dependency model the best of our knowledge, there is no previous with valence (DMV) introduced by Klein and work applying the CRF autoencoder to tasks with Manning (2004). Many approaches have been more complicated outputs such as tree structures. proposed to enhance these generative models, for example, by designing advanced Bayesian priors (Cohen et al., 2008), representing dependencies with features (Berg-Kirkpatrick et al., 2010), and In this paper, we propose an unsupervised dis- representing discrete tokens with continuous vec- criminative dependency parser based on the CRF tors (Jiang et al., 2016). autoencoder framework and provide tractable al- Besides generative approaches, Grave and El- gorithms for learning and parsing. We performed hadad (2015) proposed an unsupervised discrim- experiments in eight languages and show that our ∗This work was supported by the National Natural Sci- approach achieves comparable results with previ- ence Foundation of China (61503248). ous state-of-the-art models. 1638 Proceedings of the 2017 Conference on Empirical Methods in Natural Language Processing, pages 1638–1643 Copenhagen, Denmark, September 7–11, 2017. c 2017 Association for Computational Linguistics The score of a dependency tree y of sentence x is n ROOT These stocks eventually reopened φ(x, y) = φ(x, hi, i) y 1 xˆ1 These Xi=1 We define the probability of parse tree y given sen- y2 xˆ2 stocks x tence x as y3 xˆ3 eventually exp(φ(x, y)) P (y x) = | Z(x) y4 xˆ4 reopened Z(x) is the partition function, Encoder Decoder Figure 1: The CRF Autoencoder for the input sen- Z(x) = exp(φ(x, y0)) tence “These stocks eventually reopened” and its y0 (x) X∈Y corresponding parse tree (shown at the top). x where (x) is the set of all valid parse trees of x. and xˆ are the original and reconstructed sentence. Y y is the dependency parse tree represented by a The partition function can be efficiently computed in O(n3) time using a variant of the inside-outside sequence where yi contains the token and index algorithm (Paskin, 2001) for projective tree struc- of the parent of token xi in the parse tree, e.g., y = stocks, 2 and y = reopened, 4 . The tures, or using the Matrix-Tree Theorem for non- 1 h i 2 h i encoder is represented by a factor graph (with a projective tree structures (Koo et al., 2007). global factor specifying valid parse trees) and the The decoder of our model consists of a set of decoder is represented by a Bayesian net. categorical conditional distributions θx t, which represents the probability of generating| token x conditioned on token t. So the probability of the xˆ y 2 Method reconstruction output given the parse tree is n 2.1 Model P (xˆ y) = θxˆi ti | | Yi=1 Figure1 shows our model with an example in- The conditional distribution of xˆ, y given x is put sentence. Given an input sentence x = (x1, x2, . , xn), we regard its parse tree as the P (y, xˆ x) = P (y x)P (xˆ y) latent structure represented by a sequence y = | | | (y , y , . , y ) where y is a pair t , h , t is the 1 2 n i h i ii i 2.1.1 Features head token of the dependency connecting to token Following McDonald et al. (2005) and Grave et x h i in the parse tree, and i is the index of this head al. (2015), we define the feature vector of a de- token in the sentence. The model also contains a pendency based on the part-of-speech tags (POS) reconstruction output, which is a token sequence of the head, child and context words, the direc- xˆ = (ˆx , xˆ ,..., xˆ ) 1 2 n . Throughout this paper, we tion, and the distance between the head and child xˆ = x set . of the dependency. The feature template used in The encoder in our model is a log-linear model our parser is shown in Table1. represented by a first-order dependency parser. The score of a dependency tree can be factorized 2.1.2 Parsing as the sum of scores of its dependencies. For each Given parameters w and θ, we can parse a sen- dependency arc (x, i, j), where i and j are the in- tence x by searching for a dependency tree y dices of the head and child of the dependency, a which has the highest probability P (xˆ, y x). | feature vector f(x, i, j) is specified. The score of a dependency is defined as the inner product of the y∗ = arg max log P (xˆ, y x) feature vector and a weight vector w, y (x) | ∈Y n = arg max φ(x, hi, i) + log θxˆ t T y (x) i| i φ(x, i, j) = w f(x, i, j) ∈Y i=1 X 1639 POS dis dir VERB VERB NOUN NOUN i × × → → POSj dis dir VERB NOUN NOUN ADJ × × → → POSi POSj dis dir VERB PRON NOUN DET × × × → → POSi POSi 1 POSj dis dir VERB ADV NOUN NUM × − × × × → → POSi POSi+1 POSj dis dir VERB ADP NOUN CONJ × × × × → → POSi POSj POSj 1 dis dir ADJ ADV ADP NOUN × × − × × → → POSi POSj POSj+1 dis dir × × × × Table 2: Universal linguistic rules Table 1: Feature template of a dependency, where i is the index of the head, j is the index of the child, dis = i j , and dir is the direction of the taken into account. | − | dependency. Q(x, y) = exp 1[(t x ) ] i → i ∈ R i ! For projective dependency parsing, we can use X Eisners algorithm (1996) to find the best parse where 1[(ti xi) ] is an indicator function 3 → ∈ R in O(n ) time. For non-projective dependency of whether dependency ti xi satisfies one of → parsing, we can use the Chu-Liu/Edmond algo- the universal linguistic rules in . The universal R rithm (Chu and Liu, 1965; Edmonds, 1967; Tarjan, linguistic rules that we use are shown in Table2 1977) to find the best parse in O(n2) time. (Naseem et al., 2010). 2.2 Parameter Learning 2.2.2 Algorithm 2.2.1 Objective Function We apply coordinate descent to minimize the ob- jective function, which alternately updates w and Spitkovsky et al. (2010) shows that Viterbi EM θ. In each optimization step of w, we run two can improve the performance of unsupervised de- epochs of stochastic gradient descent, and in each pendency parsing in comparison with EM. There- optimization step of θ, we run two iterations of the fore, instead of using negative conditional log like- Viterbi EM algorithm. lihood as our objective function, we choose to use To update w using stochastic gradient de- negative conditional Viterbi log likelihood, scent, for each sentence x, we first run the pars- N ing algorithm to find the best parse tree y∗ = α log max P (xˆi, y xi) + λΩ(w) (1) arg maxy (x)(P (xˆ, y x)Q (x, y)); then we can ∈Y | − y (xi) | calculate the gradient of the objective function Xi=1 ∈Y based on the following derivation, where Ω(w) is a L1 regularization term of the encoder parameter w and λ is a hyper-parameter ∂log P (xˆ, y∗ x) | controlling the strength of regularization. ∂w To encourage learning of dependency relations ∂log P (y∗ x) ∂log P (xˆ y∗) = | + | that satisfy universal linguistic knowledge, we add ∂w ∂w a soft constraint on the parse tree based on the ∂log P (y∗ x) = | universal syntactic rules following Naseem et al.

View Full Text

Details

  • File Type
    pdf
  • Upload Time
    -
  • Content Languages
    English
  • Upload User
    Anonymous/Not logged-in
  • File Pages
    6 Page
  • File Size
    -

Download

Channel Download Status
Express Download Enable

Copyright

We respect the copyrights and intellectual property rights of all users. All uploaded documents are either original works of the uploader or authorized works of the rightful owners.

  • Not to be reproduced or distributed without explicit permission.
  • Not used for commercial purposes outside of approved use cases.
  • Not used to infringe on the rights of the original creators.
  • If you believe any content infringes your copyright, please contact us immediately.

Support

For help with questions, suggestions, or problems, please contact us