Upgrade to Pro — share decks privately, control downloads, hide ads and more …

Introduction to semantic parsing

bigsea
March 24, 2017

Introduction to semantic parsing

bigsea

March 24, 2017
Tweet

More Decks by bigsea

Other Decks in Research

Transcript

  1. What’s semantic parsing? Semantic parsing is… mapping utterance to executable

    logical form given context. --- To be able to query a database in natural language. Example Utterance: What was your last exercise? Logical form: R(Name).argmax(Type.Exercise, Time) Database: w1 name: running type: exercise time: 3/21/2017 10:00 w2 name: swimming type: exercise time: 3/15/2017 14:00 w3 name: push-up type: exercise time: 3/21/2017 20:00 This logical form is called Lambda DCS. cf. [Liang 2013]
  2. So how do we convert utterance to logical form? Statistical

    semantic parsing Statistically learn how to map utterance to logical form Supervision by grand truth logical form Training data: set of utterance/logical form pairs {(x_i, z_i)} [Wong+2007] --- logical form annotation is usually expensive! BTW, neural semantic parsing uses this type of supervision. [Jia+2015,Kocisky+2016,Herzig+2017] Supervision by answer (week supervision) Training data: set of utterance-answer pairs {(x_i, y_i)} [Liang+2010 ]
  3. Training semantic parser with weak supervision Image from [Liang 2016]

    1. Generate all possible logical forms from utterance 2. Extract features from each utterance/logical form pairs and learn which are the correct logical forms.
  4. Features for correct logical form prediction Using some features, we

    want to assess “closeness” of utterance and logical form. But how can we compare logical form and utterance?
  5. Semantic parsing via paraphrasing [Berant+2014] Instead of comparing natural utterance

    with logical form directly, they compare it with canonical utterance generated from logical form.
  6. Building a semantic parser overnight [Wang+2015] Setting We want to

    build semantic parser in new domain -> utterance/answer pairs {x_i, y_i} doesn’t exist So, how can we scale dataset collection? Proposed method utterance/answer pairs are expensive to collect (understand question, look up database, etc.) Collect data by paraphrasing canonical utterance to natural utterance (using cloud sourcing).
  7. Comparison of “Paraphrasing” and “Overnight” Similarity Both use similarity measure

    of canonical utterance and natural utterance as features. Difference Paraphrasing [Berant+2014] associate “right” canonical utterance and natural utterance by seeing executed answer y is correct or not. Overnight [Wang+2015] did that by converting “right” canonical utterance to natural utterance.
  8. Database What do we need to do manually? Seed Lexicon

    have to be manually defined for each task and Database is assumed to be pre-defined. For example, for exercise ontology, w1 name: running type: exercise time: 3/21/2017 10:00 w2 name: swimming type: exercise time: 3/15/2017 14:00 w3 name: push-up type: exercise time: 3/21/2017 20:00 Seed lexicon exercise->TypeNP[exercise] at->RelNP[at] go->VP[go] running->NP[running] swimming->NP[swimming] exercise->NP[exercise]
  9. Summary What can we do with semantic parsing? Querying a

    database using natural language in understandable manner. What cannot we do with semantic parsing? e.g. filling ontology, creating ontology,
  10. References Berant, J., & Liang, P. (2014). Semantic Parsing via

    Paraphrasing. ACL, 1415–1425. Herzig, J., Berant, J., & Aviv-yafo, T. (2017). Neural Semantic Parsing over Multiple Knowledge-bases. arXiv Preprint. Jia, R., & Liang, P. (2016). Data Recombination for Neural Semantic Parsing. ACL, 12–22. Kocisky, T., Melis, G., Grefenstette, E., Dyer, C., Ling, W., Blunsom, P., & Hermann, K. M. (2016). Semantic Parsing with Semi-Supervised Sequential Autoencoders. arXiv Preprint, 1–10. Liang, P., Jordan, M. I., & Klein, D. (2010). Learning Dependency-Based Compositional Semantics. ACL. Liang, P. (2013). Lambda Dependency-Based Compositional Semantics. arXiv Preprint, (1998), 1–7. Liang, P. (2016). Learning executable semantic parsers for natural language understanding. Communications of the ACM, 59(9), 68–76. Wang, Y., Berant, J., & Liang, P. (2015). Building a Semantic Parser Overnight. ACL, 1332–1342. Wong, Y. W., & Mooney, R. J. (2007). Learning Synchronous Grammars for Semantic Parsing with Lambda Calculus. ACL, 960–967.