Slide 1

Slide 1 text

Learning Dependency-Based Compositional Semantics [Liang+ 2012] 村⼭友理

Slide 2

Slide 2 text

• データベースを使った質問応答 • 質問⽂の意味を正確に捉えるには何らかの論理形式に変換する必要がある • しかし、アノテーションはコストが⾼すぎる… Motivation 1

Slide 3

Slide 3 text

• 論理形式を隠れ変数として扱い、(x, y)からパーザーを学習 Idea 2

Slide 4

Slide 4 text

• 論理形式zにはどんな形式⾔語を⽤いるのが良いか︖ • SQL (Giordani and Moschitti 2009) • Prolog (Zelle and Mooney 1996; Tang and Mooney 2001) • FunQL (Kate, Wong, and Mooney 2005) • Lambda calculus (Zettlemoyer and Collins 2005) • 論理形式の構成にはどんな⽣成規則を⽤いるのが良いか︖ • Synchronous grammars (Wong and Mooney 2007) • Hybrid trees (Lu et al. 2008) • Combinatory Categorial Grammars (CCG) (Zettlemoyer and Collins 2005) • Shift-reduce derivations (Zelle and Mooney 1996) • これらとは異なる形式⾔語と⽣成規則を持つDependency-based compositional semantics (DCS) を考案 Semantic representation 3 DCS tree

Slide 5

Slide 5 text

DCS のsyntaxは predicate と relation から構成︓ predicate • a special null predicate ø • domain-independent predicates (e.g., count, <, >, and =) • domain-specific predicates (e.g., state, river, border, etc.) relation • Table 1 を参照 Syntax 4

Slide 6

Slide 6 text

• DCSにおける論理形式を DCS treeという • DCS tree は directed rooted tree • ノードには predicate、エッジにはrelationをラベル付け • 各ノードは⼦に対して順序を保つ Syntax 5 Definition 1 (DCS trees)

Slide 7

Slide 7 text

• データベースのことを worldと呼ぶ • まず、valueの集合 Vを作成 • number (e.g., 3 ∈ V) • string (e.g., Washington ∈ V) • tuple (e.g., (3, Washington) ∈ V) • set (e.g., {3, Washington} ∈ V) • other higher-order entities • world は各predicate をそのsemantics, つまり組の集合に写像 • 𝑉{TUPLE}はすべての組の集合を表す︓ World 6 Definition 2 (World)

Slide 8

Slide 8 text

Examples 7

Slide 9

Slide 9 text

• world wに対するDCS tree z のsemantics または denotation を 𝑧 ! と表す • syntaxとsemanticsのスコープの違い (e.g., generalized quantification, superlative constructions) を統⼀的に扱うために mark-executeを導⼊ Semantics 8

Slide 10

Slide 10 text

Quantifier scope ambiguity 9 e.g., Some river traverses every city. The two meanings are: (i) There is a river x such that x traverses every city. (ii) For every city x, some river traverses x.

Slide 11

Slide 11 text

Superlative scope ambiguity 10 e.g., state bordering the largest state The two meanings are: (i) a state that borders Alaska (which is the largest state) (ii) a state with the highest score, where the score of a state x is the maximum size of any state that x borders (Alaska is irrelevant here because no states border it)

Slide 12

Slide 12 text

• denotation d にはn個の columnが含まれる • column 1は常にroot nodeに対応 • 残りのcolumnはnon-root marked nodeに対応 • non-marked nodeについては量化するので対応するcolumnはない • denotation d は配列の集合 d.Aと、marked nodeごとにそれが実⾏される ときに引き出される情報を格納した store σを持つ Denotation 11 • mark relation σ.r (C) • base denotation σ.b, which essentially corresponds to denotation of the subtree rooted at the marked node excluding the mark relation and its subtree ( 𝑠𝑖𝑧𝑒 ! ) • mark relationの⼦のdenotation ( 𝑎𝑟𝑔𝑚𝑎𝑥 ! ) • markされていない nodeのstoreは常に 空 (σ=ø)

Slide 13

Slide 13 text

Denotation 12 Definition 3 (Denotations)

Slide 14

Slide 14 text

• predicateがpのノードが⼀つあるDCS tree z のdenotationを定義 • zのdenotationは column を1つ持ち、配列は組 w(p)に対応し、storeは空 Base Case 13

Slide 15

Slide 15 text

先にproject operationを定義︓ øをnon-initial columns with empty stores (i>1 such that 𝑑. 𝜎! = 𝜙)のindexを表すのにも使⽤ join-project-inactive operation は2つのdenotationの配列を結合し、non-initial empty columnを消去 • join はcolumn 1に作⽤ • ∗ はすべての要素を表す、つまり ⋈∗,∗ $% は組全体が⼀致しなければならないという結合条 件を⽰す (𝑎& = 𝑎& ' ) Join 14

Slide 16

Slide 16 text

𝑎! , … , 𝑎" に対応する値がcolumn 1になかった場合 Aggregate 15 𝑎! , … , 𝑎" に対応するcolumn 1の組の集合

Slide 17

Slide 17 text

𝑏" は現在のdenotation dに置き換えられる Mark 16

Slide 18

Slide 18 text

Execute 17

Slide 19

Slide 19 text

Extraction 18

Slide 20

Slide 20 text

Generalized Quantification 19

Slide 21

Slide 21 text

Comparatives and Superlatives 20

Slide 22

Slide 22 text

Construction Mechanism 21

Slide 23

Slide 23 text

Lexical Trigger 22

Slide 24

Slide 24 text

Recursive Construction of DCS Trees 23

Slide 25

Slide 25 text

• Dependency-based compositional semantics (DCS) を提案 • question-answer ペアからsemantic parserを学習し、中間の論理形式 (DCS tree) は教師なし⼿法により導かれる まとめ 24

Slide 26

Slide 26 text

25