Transforming Dependency Structures to Logical Forms for Semantic Parsing

Transforming Dependency Structures to Logical Forms for Semantic Parsing

Transforming Dependency Structures to Logical Forms for Semantic Parsing a b Siva Reddy† Oscar Tackstr¨ om¨ ‡ Michael Collins‡ Tom Kwiatkowski‡ Dipanjan Das‡ Mark Steedman† Mirella Lapata† †ILCC, School of Informatics, University of Edinburgh ‡ Google, New York [email protected] oscart, mjcollins, tomkwiat, dipanjand @google.com { steedman, mlap @inf.ed.ac.uk} { } root Abstract nsubj dobj Disney acquired Pixar The strongly typed syntax of grammar for- nnp vbd nnp malisms such as CCG, TAG, LFG and HPSG offers a synchronous framework for deriving (a) The dependency tree for Disney acquired Pixar. syntactic structures and semantic logical forms. (nsubj (dobj acquired Pixar) Disney) In contrast—partly due to the lack of a strong type system—dependency structures are easy (b) The s-expression for the dependency tree. to annotate and have become a widely used λx. yz. acquired(xe) Disney(ya) Pixar(za) form of syntactic analysis for many languages. ∃ ∧ ∧ arg (x , y ) arg (x , z ) However, the lack of a type system makes a ∧ 1 e a ∧ 2 e a formal mechanism for deriving logical forms (c) The composed lambda-calculus expression. from dependency structures challenging. We address this by introducing a robust system Figure 1: The dependency tree is binarized into its based on the lambda calculus for deriving neo- s-expression, which is then composed into the lambda Davidsonian logical forms from dependency expression representing the sentence logical form. trees. These logical forms are then used for semantic parsing of natural language to Free- In recent years, there have been significant ad- base. Experiments on the Free917 and Web- vances in developing fast and accurate dependency Questions datasets show that our representation parsers for many languages (McDonald et al., 2005; is superior to the original dependency trees and that it outperforms a CCG-based representa- Nivre et al., 2007; Martins et al., 2013, inter alia). tion on this task. Compared to prior work, we Motivated by the desire to carry these advances over obtain the strongest result to date on Free917 to semantic parsing tasks, we present a robust method and competitive results on WebQuestions. for mapping dependency trees to logical forms that represent underlying predicate-argument structures.1 1 Introduction We empirically validate the utility of these logical Semantic parsers map sentences onto logical forms forms for question answering from databases. Since that can be used to query databases (Zettlemoyer and our approach uses dependency trees as input, we hy- Collins, 2005; Wong and Mooney, 2006), instruct pothesize that it will generalize better to domains that robots (Chen and Mooney, 2011), extract information are well covered by dependency parsers than methods (Krishnamurthy and Mitchell, 2012), or describe vi- that induce semantic grammars from scratch. sual scenes (Matuszek et al., 2012). Current systems The system that maps a dependency tree to its log- accomplish this by learning task-specific grammars ical form (henceforth DEPLAMBDA) is illustrated (Berant et al., 2013), by using strongly-typed CCG in Figure1. First, the dependency tree is binarized grammars (Reddy et al., 2014), or by eschewing the via an obliqueness hierarchy to give an s-expression use of a grammar entirely (Yih et al., 2015). that describes the application of functions to pairs aWork carried out during an internship at Google. 1By “robust”, we refer to the ability to gracefully handle b On leave from Columbia University. parse errors as well as the untyped nature of dependency syntax. 127 Transactions of the Association for Computational Linguistics, vol. 4, pp. 127–140, 2016. Action Editor: Christopher Potts. Submission batch: 12/2015; Published 4/2016. c 2016 Association for Computational Linguistics. Distributed under a CC-BY 4.0 license. of arguments. Each node in this s-expression is then stituents have a lambda-calculus expression of type substituted for a lambda-calculus expression and the Ind Event Bool. × → relabeled s-expression is beta-reduced to give the log- A “constituent” in this definition is either a sin- ical form in Figure 1(c). Since dependency syntax gle word, or an s-expression. S-expressions does not have an associated type theory, we introduce are defined formally in the next section; a type system that assigns a single type to all con- examples are (dobj acquired Pixar) and stituents, thus avoiding the need for type checking (nsubj (dobj acquired Pixar) Disney). Essen- (Section2). DEPLAMBDA uses this system to gener- tially, s-expressions are binarized dependency ate robust logical forms, even when the dependency trees, which include an ordering over the different structure does not mirror predicate-argument relation- dependencies to a head (in the above the dobj ships in constructions such as conjunctions, prepo- modifier is combined before the nsubj modifier). sitional phrases, relative clauses, and wh-questions Some examples of lambda-calculus expressions (Section3). for single words (lexical entries) are as follows: These ungrounded logical forms (Kwiatkowski acquired λx. acquired(x ) ⇒ e et al., 2013; Reddy et al., 2014; Krishnamurthy Disney λy. Disney(y ) ⇒ a and Mitchell, 2015) are used for question answer- Pixar λz. Pixar(z ) ⇒ a ing against Freebase, by passing them as input to An example for a full sentence is as follows: GRAPHPARSER (Reddy et al., 2014), a system that Disney acquired Pixar learns to map logical predicates to Freebase, result- ⇒ λx. yz. acquired(x ) Disney(y ) ing in grounded Freebase queries (Section4). We ∃ e ∧ a Pixar(z ) arg (x , y ) arg (x , z ) show that our approach achieves state-of-the-art per- ∧ a ∧ 1 e a ∧ 2 e a formance on the Free917 dataset and competitive This is a neo-Davidsonian style of analysis. Verbs performance on the WebQuestions dataset, whereas such as acquired make use of event variables such building the Freebase queries directly from depen- as xe, whereas nouns such as Disney make use of dency trees gives significantly lower performance. individual variables such as ya. Finally, we show that our approach outperforms a di- The restriction that all expressions are of type Ind Event Bool simplifies the type system rectly comparable method that generates ungrounded × → logical forms using CCG. Details of our experimen- considerably. While it leads to difficulty with some tal setup and results are presented in Section5 and linguistic constructions—see Section 3.3 for some Section6, respectively. examples—we believe the simplicity and robustness of the resulting system outweighs these concerns. It 2 Logical Forms also leads to some spurious variables that are bound We use a version of the lambda calculus with three by lambdas or existentials, but which do not appear as base types: individuals (Ind), events (Event), and arguments of any predicate: for example in the above truth values (Bool). Roughly speaking individuals analysis for Disney acquired Pixar, the variables xa, are introduced by nouns, events are introduced by ye and ze are unused. However these “spurious” vari- verbs, and whole sentences are functions onto truth ables are easily identified and discarded. values. For types A and B, we use A B to denote An important motivation for having variables of × the product type, while A B denotes the type type Ind Event is that a single lexical item some- → × of functions mapping elements of A to elements of times makes use of both types of variables. For exam- B. We will make extensive use of variables of type ple, the noun phrase president in 2009 has semantics Ind Event. For any variable x of type Ind λx. y. president(xa) president event(xe) × × ∃ ∧ ∧ Event, we use x = (x , x ) to denote the pair of arg1(xe, xa) 2009(ya) prep.in(xe, ya) a e ∧ ∧ variables xa (of type Ind) and xe (of type Event). In this example president introduces the predi- Here, the subscript denotes the projections a : Ind cates president, corresponding to an individual, and · × Event Ind and e : Ind Event Event. president event, corresponding to an event; essen- → · × → An important constraint on the lambda calculus tially a presidency event that may have various prop- system is as follows: All natural language con- erties. This follows the structure of Freebase closely: 128 Freebase contains an individual corresponding to Composition. Beta-reduction is used to compose Barack Obama, with a president property, as well the lambda-expression terms to compute the final as an event corresponding to the Obama presidency, semantics for the input sentence. In this step expres- with various properties such as a start and end date, a sions of the form (exp1 exp2 exp3) are interpreted location, and so on. The entry for president is then as function exp1 being applied to arguments exp2 and exp3. For example, (dobj acquired Pixar) re- λx. president(x ) president event(x ) arg (x , x ) a ∧ e ∧ 1 e a ceives the following expression after composition: Note that proper nouns do not introduce an event λz. x. acquired(ze) Pixar(xa) arg2(ze, xa) predicate, as can be seen from the entries for Disney ∃ ∧ ∧ and Pixar above. Obliqueness Hierarchy. The binarization stage re- quires a strict ordering on the different modifiers 3 Dependency Structures to Logical Forms to each head in a dependency parse. For example, in (nsubj (dobj acquired Pixar) Disney), the dobj We now describe the system used to map dependency is attached before the nsubj. The ordering is very structures to logical forms. We first give an overview similar to the obliqueness hierarchy in syntactic for- of the approach, then go into detail about various malisms such as HPSG (Pollard and Sag, 1994). linguistic constructions. Type for Dependency Labels. Recall from Sec- 3.1 An Overview of the Approach tion2 that every s-expression subtree receive a log- ical form of type η = Ind Event Bool.

View Full Text

Details

  • File Type
    pdf
  • Upload Time
    -
  • Content Languages
    English
  • Upload User
    Anonymous/Not logged-in
  • File Pages
    14 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