type constraints neural semantic parsing withlexicalized grammars for semantic parsing 3...

49
Neural Semantic Parsing with Type Constraints Jayant Krishnamurthy, Pradeep Dasigi, Matt Gardner 1

Upload: others

Post on 11-Oct-2020

19 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: Type Constraints Neural Semantic Parsing withLexicalized Grammars for Semantic Parsing 3 [Zettlemoyer and Collins 2005] [Liang et al., 2011] [Krishnamurthy and Mitchell, 2012] [Kwiatkowski

Neural Semantic Parsing with Type Constraints

Jayant Krishnamurthy, Pradeep Dasigi, Matt Gardner

1

Page 2: Type Constraints Neural Semantic Parsing withLexicalized Grammars for Semantic Parsing 3 [Zettlemoyer and Collins 2005] [Liang et al., 2011] [Krishnamurthy and Mitchell, 2012] [Kwiatkowski

Semantic Parsing: Language ➝ Programs

2

Which player was from South Korea?

Question

((row2cell athlete)(cell2row south_korea))

Logical Form

Semantic Parsing

Execution

KnowledgeSource

Kim Yu-Na

Athlete Nation

Sonja Henie Norway

Kim Yu-Na South Korea

Answer

[Zelle and Mooney, 1996]

Page 3: Type Constraints Neural Semantic Parsing withLexicalized Grammars for Semantic Parsing 3 [Zettlemoyer and Collins 2005] [Liang et al., 2011] [Krishnamurthy and Mitchell, 2012] [Kwiatkowski

Lexicalized Grammars for Semantic Parsing

3

[Zettlemoyer and Collins 2005][Liang et al., 2011] [Krishnamurthy and Mitchell, 2012] [Kwiatkowski et al., 2013] [Artzi et al., 2013], ...

If all the frogs died the population of raccoon would _ ?NP : S\NP : NP : (S\S)\NP :frog λx.decrease(x) raccoon λx.λe.λf.cause(e, f(x))

S : decrease(frog) (S\S) : λe.λf.cause(e, f(raccoon))

S : λf.cause(decrease(frog), f(raccoon))

Page 4: Type Constraints Neural Semantic Parsing withLexicalized Grammars for Semantic Parsing 3 [Zettlemoyer and Collins 2005] [Liang et al., 2011] [Krishnamurthy and Mitchell, 2012] [Kwiatkowski

Semantic Parsing via Machine Translation

LSTM LSTM LSTM LSTM LSTM LSTM... ...

which athlete ?

(

LSTM

( reverse )

4

[Andreas et al., 2013][Jia and Liang, 2016] [Dong and Lapata, 2016][Locascio et al., 2016] [Ling et al., 2016][Yin and Neubig, 2017] [Rabinovich et al., 2017]

Page 5: Type Constraints Neural Semantic Parsing withLexicalized Grammars for Semantic Parsing 3 [Zettlemoyer and Collins 2005] [Liang et al., 2011] [Krishnamurthy and Mitchell, 2012] [Kwiatkowski

Traditional vs Neural Semantic Parsing

Guaranteed to produce

valid logical form

No grammar induction

Train on Question/

AnswerPairs

Joint Entity Linking

Traditional Semantic Parsing

Neural Semantic Parsing

This Work

5

Page 6: Type Constraints Neural Semantic Parsing withLexicalized Grammars for Semantic Parsing 3 [Zettlemoyer and Collins 2005] [Liang et al., 2011] [Krishnamurthy and Mitchell, 2012] [Kwiatkowski

Outline

● WikiTableQuestions

● Neural Semantic Parser

○ Type Constraints

○ Joint Entity Linking

○ QA Supervision

● Experimental Results

6

Page 7: Type Constraints Neural Semantic Parsing withLexicalized Grammars for Semantic Parsing 3 [Zettlemoyer and Collins 2005] [Liang et al., 2011] [Krishnamurthy and Mitchell, 2012] [Kwiatkowski

Dataset: WikiTableQuestions

Q: Which athlete was from South Korea after the year 2010?A: Kim Yu-Na

Q: How many more silver medals did Gillis Grafström have than Sonja Henie?A: 1

7

Athlete Nation Olympics Gold Silver Bronze

Gillis Grafström

Sweden 1932 3 1 0

Evgeni Plushenko

Russia 2014 2 2 0

Sonja Henie Norway 1936 3 0 0

Kim Yu-na S Korea 2014 1 1 0

[Pasupat and Liang, 2015]

Page 8: Type Constraints Neural Semantic Parsing withLexicalized Grammars for Semantic Parsing 3 [Zettlemoyer and Collins 2005] [Liang et al., 2011] [Krishnamurthy and Mitchell, 2012] [Kwiatkowski

Table Knowledge Graphs

8

gillis.. sweden 1932 3

athlete nation olympics gold

1

ind

evgeni.. russia 2014 2

athlete nation olympics gold

2

ind

next ...

...... num

2014 2014-MM-DD

date

2

num

next

Athlete Nation Olympics Gold Silver Bronze

Gillis Grafström

Sweden 1932 3 1 0

Evgeni Plushenko

Russia 2014 2 2 0

Sonja Henie

Norway 1936 3 0 0

Kim Yu-na S Korea 2014 1 1 0

[Pasupat and Liang, 2015]

Page 9: Type Constraints Neural Semantic Parsing withLexicalized Grammars for Semantic Parsing 3 [Zettlemoyer and Collins 2005] [Liang et al., 2011] [Krishnamurthy and Mitchell, 2012] [Kwiatkowski

Logical Forms

9

gillis.. sweden 1932 3

athlete nation olympics gold

1

ind

evgeni.. russia 2014 2

athlete nation olympics gold

2

ind

next ...

...... num

2014 2014-MM-DD

date

2

num

next

[Pasupat and Liang, 2015]

Q: Which athlete was from South Korea after the year 2010?((reverse athlete) (and (nation south_korea)

(year ((reverse date) (>= 2010-mm-dd)))))

Q: How many more silver medals did Gillis Grafström have than Sonja Henie?(- (num (silver (athlete gillis_grafstorm)))

(num (silver (athlete sonja_henie))))

Page 10: Type Constraints Neural Semantic Parsing withLexicalized Grammars for Semantic Parsing 3 [Zettlemoyer and Collins 2005] [Liang et al., 2011] [Krishnamurthy and Mitchell, 2012] [Kwiatkowski

Outline

● WikiTableQuestions

● Neural Semantic Parser

○ Type Constraints

○ Joint Entity Linking

○ QA Supervision

● Experimental Results

10

Page 11: Type Constraints Neural Semantic Parsing withLexicalized Grammars for Semantic Parsing 3 [Zettlemoyer and Collins 2005] [Liang et al., 2011] [Krishnamurthy and Mitchell, 2012] [Kwiatkowski

Seq2seq Semantic Parser

LSTM LSTM LSTM LSTM LSTM LSTM... ...

which athlete ?

(

LSTM

ATT ATT ATT ATTo1 o2 o11

( reverse )

11

Page 12: Type Constraints Neural Semantic Parsing withLexicalized Grammars for Semantic Parsing 3 [Zettlemoyer and Collins 2005] [Liang et al., 2011] [Krishnamurthy and Mitchell, 2012] [Kwiatkowski

Our Model

LSTM LSTM LSTM LSTM LSTM LSTM... ...

which athlete ?

LSTM

ATT ATT ATT ATTo1 o2 o11

Contribution 1: Generate actions from a typed grammar instead of tokens from the logical form.

cc →

(<r,c> r)<r,c> →

<<c,r>,<r,c>>d → 2010

12

Page 13: Type Constraints Neural Semantic Parsing withLexicalized Grammars for Semantic Parsing 3 [Zettlemoyer and Collins 2005] [Liang et al., 2011] [Krishnamurthy and Mitchell, 2012] [Kwiatkowski

Type-constrained Decoding

13

Which athlete was from South Korea after the year 2010?

Generated Actionsc

Logical Formc

Page 14: Type Constraints Neural Semantic Parsing withLexicalized Grammars for Semantic Parsing 3 [Zettlemoyer and Collins 2005] [Liang et al., 2011] [Krishnamurthy and Mitchell, 2012] [Kwiatkowski

Type-constrained Decoding

14

Which athlete was from South Korea after the year 2010?

Generated Actionsc

Logical Formc

Page 15: Type Constraints Neural Semantic Parsing withLexicalized Grammars for Semantic Parsing 3 [Zettlemoyer and Collins 2005] [Liang et al., 2011] [Krishnamurthy and Mitchell, 2012] [Kwiatkowski

Type-constrained Decoding

15

Which athlete was from South Korea after the year 2010?

Generated Actionscc→(<r,c> r)

Logical Form(<r,c> r)

Page 16: Type Constraints Neural Semantic Parsing withLexicalized Grammars for Semantic Parsing 3 [Zettlemoyer and Collins 2005] [Liang et al., 2011] [Krishnamurthy and Mitchell, 2012] [Kwiatkowski

Type-constrained Decoding

16

Which athlete was from South Korea after the year 2010?

Generated Actionscc→(<r,c> r)

Logical Form(<r,c> r)

Page 17: Type Constraints Neural Semantic Parsing withLexicalized Grammars for Semantic Parsing 3 [Zettlemoyer and Collins 2005] [Liang et al., 2011] [Krishnamurthy and Mitchell, 2012] [Kwiatkowski

Type-constrained Decoding

17

Which athlete was from South Korea after the year 2010?

Generated Actionscc→(<r,c> r)<r,c>→(<<c,r>,<r,c>> <c,r>)

Logical Form((<<c,r>,<r,c>> <c,r>) r)

Page 18: Type Constraints Neural Semantic Parsing withLexicalized Grammars for Semantic Parsing 3 [Zettlemoyer and Collins 2005] [Liang et al., 2011] [Krishnamurthy and Mitchell, 2012] [Kwiatkowski

Type-constrained Decoding

18

Which athlete was from South Korea after the year 2010?

Generated Actionscc→(<r,c> r)<r,c>→(<<c,r>,<r,c>> <c,r>)

Logical Form((<<c,r>,<r,c>> <c,r>) r)

Page 19: Type Constraints Neural Semantic Parsing withLexicalized Grammars for Semantic Parsing 3 [Zettlemoyer and Collins 2005] [Liang et al., 2011] [Krishnamurthy and Mitchell, 2012] [Kwiatkowski

Type-constrained Decoding

19

Which athlete was from South Korea after the year 2010?

Generated Actionscc→(<r,c> r)<r,c>→(<<c,r>,<r,c>> <c,r>)<<c,r>,<r,c>>→reverse

Logical Form((reverse <c,r>) r)

Page 20: Type Constraints Neural Semantic Parsing withLexicalized Grammars for Semantic Parsing 3 [Zettlemoyer and Collins 2005] [Liang et al., 2011] [Krishnamurthy and Mitchell, 2012] [Kwiatkowski

Type-constrained Decoding

20

Which athlete was from South Korea after the year 2010?

Generated Actionscc→(<r,c> r)<r,c>→(<<c,r>,<r,c>> <c,r>)<<c,r>,<r,c>>→reverse

Logical Form((reverse <c,r>) r)

Page 21: Type Constraints Neural Semantic Parsing withLexicalized Grammars for Semantic Parsing 3 [Zettlemoyer and Collins 2005] [Liang et al., 2011] [Krishnamurthy and Mitchell, 2012] [Kwiatkowski

Type-constrained Decoding

21

Which athlete was from South Korea after the year 2010?

Generated Actionscc→(<r,c> r)<r,c>→(<<c,r>,<r,c>> <c,r>)<<c,r>,<r,c>>→reverse<c,r>→athlete

Logical Form((reverse athlete) r)

Page 22: Type Constraints Neural Semantic Parsing withLexicalized Grammars for Semantic Parsing 3 [Zettlemoyer and Collins 2005] [Liang et al., 2011] [Krishnamurthy and Mitchell, 2012] [Kwiatkowski

Type-constrained Decoding

22

Which athlete was from South Korea after the year 2010?

Generated Actionscc→(<r,c> r)<r,c>→(<<c,r>,<r,c>> <c,r>)<<c,r>,<r,c>>→reverse<c,r>→athleter→(<r,<r,r>> r r)<r,<r,r>>→andr→(<c,r> c)<c,r>→nationc→south_korear→(<c,r> c)<c,r>→yearc→(<r,c> r)<r,c>→(<<c,r>,<r,c>> <c,r>)

Logical Form((reverse athlete) (and (nation south_korea) (year ((<<c,r>,<r,c>> <c,r>) r))))

Page 23: Type Constraints Neural Semantic Parsing withLexicalized Grammars for Semantic Parsing 3 [Zettlemoyer and Collins 2005] [Liang et al., 2011] [Krishnamurthy and Mitchell, 2012] [Kwiatkowski

Type-constrained Decoding

23

Which athlete was from South Korea after the year 2010?

Generated Actionscc→(<r,c> r)<r,c>→(<<c,r>,<r,c>> <c,r>)<<c,r>,<r,c>>→reverse<c,r>→athleter→(<r,<r,r>> r r)<r,<r,r>>→andr→(<c,r> c)<c,r>→nationc→south_korear→(<c,r> c)<c,r>→yearc→(<r,c> r)<r,c>→(<<c,r>,<r,c>> <c,r>)<<c,r>,<r,c>>→reverse

Logical Form((reverse athlete) (and (nation south_korea) (year ((reverse date) (>= 2010-mm-dd)))

<c,r>→dater→(>= d)d→2010.mm.dd

Page 24: Type Constraints Neural Semantic Parsing withLexicalized Grammars for Semantic Parsing 3 [Zettlemoyer and Collins 2005] [Liang et al., 2011] [Krishnamurthy and Mitchell, 2012] [Kwiatkowski

Type-constrained Decoding

24

Which athlete was from South Korea after the year 2010?

Generated Actionscc→(<r,c> r)<r,c>→(<<c,r>,<r,c>> <c,r>)<<c,r>,<r,c>>→reverse<c,r>→athleter→(<r,<r,r>> r r)<r,<r,r>>→andr→(<c,r> c)<c,r>→nationc→south_korear→(<c,r> c)<c,r>→yearc→(<r,c> r)<r,c>→(<<c,r>,<r,c>> <c,r>)<<c,r>,<r,c>>→reverse

Logical Form((reverse athlete) (and (nation south_korea) (year ((reverse date) (>= 2010-mm-dd)))

<c,r>→dater→(>= d)d→2010.mm.dd

Four transformation rules:● Constant● Application● Lambda● Variable

Instantiations with concrete types automatically induced from corpus

Page 25: Type Constraints Neural Semantic Parsing withLexicalized Grammars for Semantic Parsing 3 [Zettlemoyer and Collins 2005] [Liang et al., 2011] [Krishnamurthy and Mitchell, 2012] [Kwiatkowski

Our Model

LSTM LSTM LSTM LSTM LSTM LSTM... ...

which athlete ?

LSTM

ATT ATT ATT ATTo1 o2 o11

Contribution 1: Generate actions from a typed grammar instead of tokens from the logical form.

c c →(<r, c>,r)<r,c>→<<c,r>,

<r,c>> d→2010

25

Page 26: Type Constraints Neural Semantic Parsing withLexicalized Grammars for Semantic Parsing 3 [Zettlemoyer and Collins 2005] [Liang et al., 2011] [Krishnamurthy and Mitchell, 2012] [Kwiatkowski

Our Model

LSTM LSTM LSTM LSTM LSTM LSTM... ...LSTM

ATT ATT ATT ATTo1 o2 o11

gillis.. sweden 1932

athlete nation olympics

evgeni.. russia 2014

athlete nation olympics

next

next

c c →(<r, c>,r)<r,c>→<<c,r>,

<r,c>> d→2010

which athlete

Entity Embedding

Contribution 2: Joint entity linking with entity embeddings

?

26

Page 27: Type Constraints Neural Semantic Parsing withLexicalized Grammars for Semantic Parsing 3 [Zettlemoyer and Collins 2005] [Liang et al., 2011] [Krishnamurthy and Mitchell, 2012] [Kwiatkowski

Entity Embedding and Linking

27

LSTM LSTM LSTM...

which athlete ?Word Embeddings

Page 28: Type Constraints Neural Semantic Parsing withLexicalized Grammars for Semantic Parsing 3 [Zettlemoyer and Collins 2005] [Liang et al., 2011] [Krishnamurthy and Mitchell, 2012] [Kwiatkowski

Entity Embedding and Linking

28

LSTM LSTM LSTM...

which athlete ?Word Embeddings

Link Embeddings

l(which) l(athlete) l(?)

Page 29: Type Constraints Neural Semantic Parsing withLexicalized Grammars for Semantic Parsing 3 [Zettlemoyer and Collins 2005] [Liang et al., 2011] [Krishnamurthy and Mitchell, 2012] [Kwiatkowski

Entity Embedding and Linking

athletenationgillis2014

Link Embedding

Sathlete

S2014

Sgillis

Snation

l(was)

Page 30: Type Constraints Neural Semantic Parsing withLexicalized Grammars for Semantic Parsing 3 [Zettlemoyer and Collins 2005] [Liang et al., 2011] [Krishnamurthy and Mitchell, 2012] [Kwiatkowski

Entity Embedding and Linking

30

Soft Entity Linking

Which athlete was from South Korea?

athlete

E F+Embedding Similarity

Featurized Similarity

= Sathlete

athletenationgillis2014

Link Embedding

Sathlete

S2014

Sgillis

Snation

l(was)

Page 31: Type Constraints Neural Semantic Parsing withLexicalized Grammars for Semantic Parsing 3 [Zettlemoyer and Collins 2005] [Liang et al., 2011] [Krishnamurthy and Mitchell, 2012] [Kwiatkowski

Entity Embedding and Linking

Knowledge Graph Embedding

31

gillis. sweden 1932

athlete nation olympics

evgeni. russia 2014

athlete nation olympics

next

next athl

ete

τ(athlete)N(athlete)

r(athlete)

tanh

Soft Entity Linking

Which athlete was from South Korea?

athlete

E F+Embedding Similarity

Featurized Similarity

= Sathlete

athletenationgillis2014

Link Embedding

Sathlete

S2014

Sgillis

Snation

l(was)

Page 32: Type Constraints Neural Semantic Parsing withLexicalized Grammars for Semantic Parsing 3 [Zettlemoyer and Collins 2005] [Liang et al., 2011] [Krishnamurthy and Mitchell, 2012] [Kwiatkowski

Moving towards our model

LSTM LSTM LSTM LSTM LSTM LSTM... ...LSTM

ATT ATT ATT ATTo1 o2 o11

gillis.. sweden 1932

athlete nation olympics

evgeni.. russia 2014

athlete nation olympics

next

next

Contribution 1: Generate actions from a typed grammar instead of tokens from the logical form.

c c →(<r, c>,r)<r,c>→<<c,r>,

<r,c>> d→2010

which athlete

Entity Embedding Contribution 2: Embed KG and

define a soft entity linking

?

32

Page 33: Type Constraints Neural Semantic Parsing withLexicalized Grammars for Semantic Parsing 3 [Zettlemoyer and Collins 2005] [Liang et al., 2011] [Krishnamurthy and Mitchell, 2012] [Kwiatkowski

Our model

LSTM LSTM LSTM LSTM LSTM LSTM... ...LSTM

ATT ATT ATT ATTo1 o2 o11

gillis.. sweden 1932

athlete nation olympics

evgeni.. russia 2014

athlete nation olympics

next

next

Contribution 1: Generate actions from a typed grammar instead of tokens from the logical form.

c c →(<r, c>,r)<r,c>→<<c,r>,

<r,c>> d→2010

which athlete

Entity Embedding Contribution 2: Embed KG and

define a soft entity linking

?

Contribution 3: Train on QA pairs, using logical forms from dynamic programming on denotations33

Training Data:Q: Which athlete was from South Korea after the year 2010?A: Kim yu-na

Page 34: Type Constraints Neural Semantic Parsing withLexicalized Grammars for Semantic Parsing 3 [Zettlemoyer and Collins 2005] [Liang et al., 2011] [Krishnamurthy and Mitchell, 2012] [Kwiatkowski

Training with DPD

Q: Which athlete was from South Korea after the year 2010?A: Kim yu-na

gillis.. sweden 1932

athlete nation olympics

evgeni.. russia 2014

athlete nation olympics

next

next

Page 35: Type Constraints Neural Semantic Parsing withLexicalized Grammars for Semantic Parsing 3 [Zettlemoyer and Collins 2005] [Liang et al., 2011] [Krishnamurthy and Mitchell, 2012] [Kwiatkowski

Training with DPD

35

Q: Which athlete was from South Korea after the year 2010?A: Kim yu-na

((reverse athlete) (and (nation south_korea) (year ((reverse date) (>= 2010-mm-dd)))))((reverse athlete) (and (nation south_korea))((reverse athlete) (argmax ind))...

gillis.. sweden 1932

athlete nation olympics

evgeni.. russia 2014

athlete nation olympics

next

next

Page 36: Type Constraints Neural Semantic Parsing withLexicalized Grammars for Semantic Parsing 3 [Zettlemoyer and Collins 2005] [Liang et al., 2011] [Krishnamurthy and Mitchell, 2012] [Kwiatkowski

Training with DPD

36

Q: Which athlete was from South Korea after the year 2010?A: Kim yu-na

((reverse athlete) (and (nation south_korea) (year ((reverse date) (>= 2010-mm-dd)))))((reverse athlete) (and (nation south_korea))((reverse athlete) (argmax ind))...

gillis.. sweden 1932

athlete nation olympics

evgeni.. russia 2014

athlete nation olympics

next

next

Page 37: Type Constraints Neural Semantic Parsing withLexicalized Grammars for Semantic Parsing 3 [Zettlemoyer and Collins 2005] [Liang et al., 2011] [Krishnamurthy and Mitchell, 2012] [Kwiatkowski

Outline

● WikiTableQuestions

● Neural Semantic Parser

○ Type Constraints

○ Joint Entity Linking

○ QA Supervision

● Experimental Results

37

Page 38: Type Constraints Neural Semantic Parsing withLexicalized Grammars for Semantic Parsing 3 [Zettlemoyer and Collins 2005] [Liang et al., 2011] [Krishnamurthy and Mitchell, 2012] [Kwiatkowski

Comparison with Prior Work

38

Page 39: Type Constraints Neural Semantic Parsing withLexicalized Grammars for Semantic Parsing 3 [Zettlemoyer and Collins 2005] [Liang et al., 2011] [Krishnamurthy and Mitchell, 2012] [Kwiatkowski

Comparison with Prior Work

39

Page 40: Type Constraints Neural Semantic Parsing withLexicalized Grammars for Semantic Parsing 3 [Zettlemoyer and Collins 2005] [Liang et al., 2011] [Krishnamurthy and Mitchell, 2012] [Kwiatkowski

Comparison with Prior Work

40

Page 41: Type Constraints Neural Semantic Parsing withLexicalized Grammars for Semantic Parsing 3 [Zettlemoyer and Collins 2005] [Liang et al., 2011] [Krishnamurthy and Mitchell, 2012] [Kwiatkowski

Do Type Constraints Help?

41

Page 42: Type Constraints Neural Semantic Parsing withLexicalized Grammars for Semantic Parsing 3 [Zettlemoyer and Collins 2005] [Liang et al., 2011] [Krishnamurthy and Mitchell, 2012] [Kwiatkowski

Entity Linking Ablations

42

Page 43: Type Constraints Neural Semantic Parsing withLexicalized Grammars for Semantic Parsing 3 [Zettlemoyer and Collins 2005] [Liang et al., 2011] [Krishnamurthy and Mitchell, 2012] [Kwiatkowski

Error Analysis

43

Precision Errors (41%)

● Select an answer from a given list of options (15%)

Q: Which David D'or album was the bigger seller - Changing Heights or In The Soul?

● Complex background knowledge (13%)

Q: Which train ran for the longest time?(time = Year Discontinued - Year Began )

Page 44: Type Constraints Neural Semantic Parsing withLexicalized Grammars for Semantic Parsing 3 [Zettlemoyer and Collins 2005] [Liang et al., 2011] [Krishnamurthy and Mitchell, 2012] [Kwiatkowski

Error Analysis

44

● Complex cell values (15%)

● Unusual table structures (10%)

Tables with a total row

● Unsupported Operations (11%)

(Average, Percents, String operations)

Name Fate

Jervis Sold for scrap

Janus Torpedoed and sunk off Anzio

Q: How many of these ships were sunk?

Recall Errors (36%)

Page 45: Type Constraints Neural Semantic Parsing withLexicalized Grammars for Semantic Parsing 3 [Zettlemoyer and Collins 2005] [Liang et al., 2011] [Krishnamurthy and Mitchell, 2012] [Kwiatkowski

Neural Semantic Parsing with Type Constraints

LSTM LSTM LSTM LSTM LSTM LSTM... ...LSTM

ATT ATT ATT ATTo1 o2 o11

gillis.. sweden 1932

athlete nation olympics

evgeni.. russia 2014

athlete nation olympics

next

next

Contribution 1: Generate actions from a typed grammar instead of tokens from the logical form.

c c →(<r, c>,r)<r,c>→<<c,r>,

<r,c>> d→2010

which athlete

Entity Embedding Contribution 2: Embed KG and

define a soft entity linking

?

Contribution 3: Train on QA pairs, using logical forms from dynamic programming on denotations45

Training Data:Q: Which athlete was from South Korea after the year 2010?A: Kim yu-na

State-of-the-art onWikiTableQuestions

Page 46: Type Constraints Neural Semantic Parsing withLexicalized Grammars for Semantic Parsing 3 [Zettlemoyer and Collins 2005] [Liang et al., 2011] [Krishnamurthy and Mitchell, 2012] [Kwiatkowski

46

Page 47: Type Constraints Neural Semantic Parsing withLexicalized Grammars for Semantic Parsing 3 [Zettlemoyer and Collins 2005] [Liang et al., 2011] [Krishnamurthy and Mitchell, 2012] [Kwiatkowski

Summary

Contributions

1. Neural semantic parsing with type-constrained decoding to generate valid logical forms

2. Novel soft entity linking trained jointly with semantic parser

3. Training with QA supervision using dynamic programming on denotations

State of the art on WikitableQuestions dataset

47

Page 48: Type Constraints Neural Semantic Parsing withLexicalized Grammars for Semantic Parsing 3 [Zettlemoyer and Collins 2005] [Liang et al., 2011] [Krishnamurthy and Mitchell, 2012] [Kwiatkowski

Error Analysis

Precision Errors (41%)

● Selecting an answer from a given list of options (15%)

Which David D'or album was the bigger seller - Changing Heights or In The Soul?

● Requiring background knowledge (13%)

Which train ran for the longest time? (time = Year Discontinued - Year Began)

48

Table representation failures (25%)

● Complex cell values (15%)

● Unusual table structures (10%)

Tables with a total row

Name Fate

Jervis Sold for scrap

Janus Torpedoed and sunk off Anzio

Q: How many of these ships were sunk?

Unsupported operations (11%)

● Average● Percentages● String operations

Recall Errors (36%)

Page 49: Type Constraints Neural Semantic Parsing withLexicalized Grammars for Semantic Parsing 3 [Zettlemoyer and Collins 2005] [Liang et al., 2011] [Krishnamurthy and Mitchell, 2012] [Kwiatkowski

Training using DPD

● Dynamic Programming on Denotations (Pasupat and Liang, 2016)● Generate consistent logical forms given denotation● Maximize marginal likelihood of all consistent logical forms, using SGD

49