learning context dependent mappings from sentences to
play

Learning Context-dependent Mappings from Sentences to Logical Form - PowerPoint PPT Presentation

Learning Context-dependent Mappings from Sentences to Logical Form Luke Zettlemoyer and Michael Collins MIT Computer Science and Artificial Intelligence Lab Context-dependent Analysis Show me flights from New York to Singapore. Which of those


  1. Learning Context-dependent Mappings from Sentences to Logical Form Luke Zettlemoyer and Michael Collins MIT Computer Science and Artificial Intelligence Lab

  2. Context-dependent Analysis Show me flights from New York to Singapore. Which of those are nonstop? Show me the cheapest one. What about connecting?

  3. Context-dependent Analysis Show me flights from New York to Singapore. λ x.flight ( x ) ∧ from ( x,NYC) ∧ to ( x,SIN ) Which of those are nonstop? Show me the cheapest one. What about connecting?

  4. Context-dependent Analysis Show me flights from New York to Singapore. λ x.flight ( x ) ∧ from ( x,NYC) ∧ to ( x,SIN ) Which of those are nonstop? λ x.flight ( x ) ∧ from ( x,NYC) ∧ to ( x,SIN ) ∧ nonstop ( x ) Show me the cheapest one. What about connecting?

  5. Context-dependent Analysis Show me flights from New York to Singapore. λ x.flight ( x ) ∧ from ( x,NYC) ∧ to ( x,SIN ) Which of those are nonstop? λ x.flight ( x ) ∧ from ( x,NYC) ∧ to ( x,SIN ) ∧ nonstop ( x ) Show me the cheapest one. argmax ( λ x.flight ( x ) ∧ from ( x,NYC) ∧ to ( x,SIN ) ∧ nonstop ( x ), λ y.cost ( y )) What about connecting?

  6. Context-dependent Analysis Show me flights from New York to Singapore. λ x.flight ( x ) ∧ from ( x,NYC) ∧ to ( x,SIN ) Which of those are nonstop? λ x.flight ( x ) ∧ from ( x,NYC) ∧ to ( x,SIN ) ∧ nonstop ( x ) Show me the cheapest one. argmax ( λ x.flight ( x ) ∧ from ( x,NYC) ∧ to ( x,SIN ) ∧ nonstop ( x ), λ y.cost ( y )) What about connecting? argmax ( λ x.flight ( x ) ∧ from ( x,NYC) ∧ to ( x,SIN ) ∧ connect ( x ), λ y.cost ( y ))

  7. A Supervised Learning Problem Training Examples: sequences of sentences and logical forms Show me flights from New York to Seattle. λ x.flight ( x ) ∧ from ( x,NYC) ∧ to ( x,SEA ) List ones from Newark on Friday. λ x.flight ( x ) ∧ from ( x,NEW) ∧ to ( x,SEA ) ∧ day ( x,FRI ) Show me the cheapest. argmax ( λ x.flight ( x ) ∧ from ( x,NEW) ∧ to ( x,SEA ) ∧ day ( x,FRI ), λ y.cost ( y ))

  8. A Supervised Learning Problem Goal: Find a function f λ x.flight ( x ) ∧ from ( x,NYC ) ∧ to ( x,SEA ) Show me the cheapest? λ x.flight ( x ) ∧ to ( x,SEA ) ∧ from ( x,NEW ) ∧ day ( x,FRI ) f argmax ( λ x.flight ( x ) ∧ from ( x,NEW) ∧ to ( x,SEA ) ∧ day ( x,FRI ), λ y.cost ( y ))

  9. A Supervised Learning Problem Goal: Find a function f λ x.flight ( x ) ∧ from ( x,NYC ) ∧ to ( x,SEA ) Show me the cheapest? λ x.flight ( x ) ∧ to ( x,SEA ) ∧ from ( x,NEW ) ∧ day ( x,FRI ) f argmax ( λ x.flight ( x ) ∧ from ( x,NEW) ∧ to ( x,SEA ) ∧ day ( x,FRI ), λ y.cost ( y )) Key Challenges: • Structured input and output (lambda calculus) • Hidden variables (only annotate final logical forms)

  10. Talk Outline • Sketch of the Approach • Context-sensitive Derivations • A Learning Algorithm • Evaluation

  11. An Example Analysis Show me flights from New York to Seattle. λ x.flight ( x ) ∧ from ( x,NYC) ∧ to ( x,SEA ) List ones from Newark on Friday.

  12. An Example Analysis Context: Current sentence: λ x.flight ( x ) ∧ from ( x,NYC ) List ones from Newark on Friday. ∧ to ( x,SEA )

  13. An Example Analysis Context: Current sentence: λ x.flight ( x ) ∧ from ( x,NYC ) List ones from Newark on Friday. ∧ to ( x,SEA ) Step 1: Context-independent parse

  14. An Example Analysis Context: Current sentence: λ x.flight ( x ) ∧ from ( x,NYC ) List ones from Newark on Friday. ∧ to ( x,SEA ) λ x. ! f ( x ) ∧ from ( x,NEW ) ∧ day ( x,FRI ) Step 1: Context-independent parse

  15. An Example Analysis Context: Current sentence: λ x.flight ( x ) ∧ from ( x,NYC ) List ones from Newark on Friday. ∧ to ( x,SEA ) λ x. ! f ( x ) ∧ from ( x,NEW ) ∧ day ( x,FRI ) Step 1: Context-independent parse

  16. An Example Analysis Context: Current sentence: λ x.flight ( x ) ∧ from ( x,NYC ) List ones from Newark on Friday. ∧ to ( x,SEA ) λ x. ! f ( x ) ∧ from ( x,NEW ) ∧ day ( x,FRI ) Step 1: Context-independent parse

  17. An Example Analysis Context: Current sentence: λ x.flight ( x ) ∧ from ( x,NYC ) List ones from Newark on Friday. ∧ to ( x,SEA ) λ x. ! f ( x ) ∧ from ( x,NEW ) ∧ day ( x,FRI ) Step 1: Context-independent parse Step 2: Resolve reference

  18. An Example Analysis Context: Current sentence: λ x.flight ( x ) ∧ from ( x,NYC ) List ones from Newark on Friday. ∧ to ( x,SEA ) λ x. ! f ( x ) ∧ from ( x,NEW ) ∧ day ( x,FRI ) λ x.flight ( x ) ∧ to ( x,SEA ) Step 1: Context-independent parse Step 2: Resolve reference

  19. An Example Analysis Context: Current sentence: λ x.flight ( x ) ∧ from ( x,NYC ) List ones from Newark on Friday. ∧ to ( x,SEA ) λ x. ! f ( x ) ∧ from ( x,NEW ) ∧ day ( x,FRI ) λ x.flight ( x ) ∧ to ( x,SEA ) λ x.flight ( x ) ∧ to ( x,SEA ) ∧ from ( x,NEW ) ∧ day ( x,FRI ) Step 1: Context-independent parse Step 2: Resolve reference

  20. Talk Outline • Sketch of Approach • Context-sensitive Derivations • A Learning Algorithm • Evaluation

  21. Derivations List ones from Newark on Friday. λ x.flight ( x ) ∧ from ( x,NYC ) ∧ to ( x,SEA ) λ x. ! f ( x ) ∧ from ( x,NEW ) ∧ day ( x,FRI ) λ x.flight ( x ) ∧ to ( x,SEA ) λ x.flight ( x ) ∧ to ( x,SEA ) ∧ from ( x,NEW ) ∧ day ( x,FRI ) Three step process: • Step 1: Context-independent parsing • Step 2: Resolve all references • Step 3: Optionally, perform an elaboration

  22. Derivations List ones from Newark on Friday. λ x.flight ( x ) ∧ from ( x,NYC ) ∧ to ( x,SEA ) λ x. ! f ( x ) ∧ from ( x,NEW ) ∧ day ( x,FRI ) λ x.flight ( x ) ∧ to ( x,SEA ) λ x.flight ( x ) ∧ to ( x,SEA ) ∧ from ( x,NEW ) ∧ day ( x,FRI ) Three step process: • Step 1: Context-independent parsing • Step 2: Resolve all references • Step 3: Optionally, perform an elaboration

  23. Step 1: CCG Parsing List Singapore flights to NP S/N N (N\N)/NP λ f.f ( x ) λ x.flight ( x ) λ y. λ f. λ x.f ( x ) ∧ to ( x,y ) sin N\N λ f. λ x.f ( x ) ∧ to ( x,sin ) N λ x.flight ( x ) ∧ to ( x,sin ) S λ x.flight ( x ) ∧ to ( x,sin )

  24. Step 1: CCG Parsing List Singapore flights to NP S/N N (N\N)/NP λ f.f ( x ) λ x.flight ( x ) λ y. λ f. λ x.f ( x ) ∧ to ( x,y ) sin N\N λ f. λ x.f ( x ) ∧ to ( x,sin ) N λ x.flight ( x ) ∧ to ( x,sin ) S λ x.flight ( x ) ∧ to ( x,sin )

  25. Step 1: CCG Parsing List Singapore flights to NP S/N N (N\N)/NP λ f.f ( x ) λ x.flight ( x ) λ y. λ f. λ x.f ( x ) ∧ to ( x,y ) sin N\N λ f. λ x.f ( x ) ∧ to ( x,sin ) N λ x.flight ( x ) ∧ to ( x,sin ) S λ x.flight ( x ) ∧ to ( x,sin )

  26. Step 1: CCG Parsing List Singapore flights to NP S/N N (N\N)/NP λ f.f ( x ) λ x.flight ( x ) λ y. λ f. λ x.f ( x ) ∧ to ( x,y ) sin N\N λ f. λ x.f ( x ) ∧ to ( x,sin ) N λ x.flight ( x ) ∧ to ( x,sin ) S λ x.flight ( x ) ∧ to ( x,sin )

  27. Step 1: CCG Parsing List Singapore flights to NP S/N N (N\N)/NP λ f.f ( x ) λ x.flight ( x ) λ y. λ f. λ x.f ( x ) ∧ to ( x,y ) sin N\N λ f. λ x.f ( x ) ∧ to ( x,sin ) N λ x.flight ( x ) ∧ to ( x,sin ) S λ x.flight ( x ) ∧ to ( x,sin )

  28. Step 1: Referential lexical items List ones from Newark on Friday. λ x. ! f ( x ) ∧ from ( x,NEW ) ∧ day ( x,FRI )

  29. Step 1: Referential lexical items List ones from Newark on Friday. λ x. ! f ( x ) ∧ from ( x,NEW ) ∧ day ( x,FRI ) First extension: • Add referential lexical items N λ x. ! f ( x) ones NP ! e it ...

  30. Step 1: Type-shifting operations Second extension: • Add type-shifting operators for elliptical expressions the cheapest

  31. Step 1: Type-shifting operations Second extension: • Add type-shifting operators for elliptical expressions the cheapest NP/N λ g.argmin ( g , λ y.cost ( y ))

  32. Step 1: Type-shifting operations Second extension: • Add type-shifting operators for elliptical expressions the cheapest NP/N λ g.argmin ( g , λ y.cost ( y )) NP argmin ( λ x. ! f ( x ), λ y.cost ( y ))

  33. Step 1: Type-shifting operations Second extension: • Add type-shifting operators for elliptical expressions the cheapest NP/N λ g.argmin ( g , λ y.cost ( y )) NP argmin ( λ x. ! f ( x ), λ y.cost ( y )) A/B : g => A : g( λ x. ! f ( x ) ) where g is a function with input type <e,t>

  34. Derivations List ones from Newark on Friday. λ x.flight ( x ) ∧ from ( x,NYC ) ∧ to ( x,SEA ) λ x. ! f ( x ) ∧ from ( x,NEW ) ∧ day ( x,FRI ) λ x.flight ( x ) ∧ to ( x,SEA ) λ x.flight ( x ) ∧ to ( x,SEA ) ∧ from ( x,NEW ) ∧ day ( x,FRI ) Three step process: • Step 1: Context-independent parsing • Step 2: Resolve all references • Step 3: Optionally, perform an elaboration

  35. Derivations List ones from Newark on Friday. λ x.flight ( x ) ∧ from ( x,NYC ) ∧ to ( x,SEA ) λ x. ! f ( x ) ∧ from ( x,NEW ) ∧ day ( x,FRI ) λ x.flight ( x ) ∧ to ( x,SEA ) λ x.flight ( x ) ∧ to ( x,SEA ) ∧ from ( x,NEW ) ∧ day ( x,FRI ) Three step process: • Step 1: Context-independent parsing • Step 2: Resolve all references • Step 3: Optionally, perform an elaboration

Recommend


More recommend