Unsupervised Semantic Parsing

Similar documents
Unsupervised Semantic Parsing

Learning Compositional Semantics for Open Domain Semantic Parsing

A Joint Model of Language and Perception for Grounded Attribute Learning

Large-Scale Syntactic Processing: Parsing the Web. JHU 2009 Summer Research Workshop

Syntax-semantics interface and the non-trivial computation of meaning

COMS 4771 Clustering. Nakul Verma

Semantics as a Foreign Language. Gabriel Stanovsky and Ido Dagan EMNLP 2018

Logic Programming: from NLP to NLU?

Semi-Supervised Abstraction-Augmented String Kernel for bio-relationship Extraction

Sum-Product Networks. STAT946 Deep Learning Guest Lecture by Pascal Poupart University of Waterloo October 15, 2015

Online Graph Planarisation for Synchronous Parsing of Semantic and Syntactic Dependencies

Learning the Structure of Sum-Product Networks. Robert Gens Pedro Domingos

Using Distributed NLP to Bootstrap Semantic Representations from Web Resources

Probabilistic Dialogue Models with Prior Domain Knowledge

Grounded Compositional Semantics for Finding and Describing Images with Sentences

Bringing Textual Descriptions to Life: Semantic Parsing of Requirements Documents into Executable Scenarios

VS 3 : SMT Solvers for Program Verification

Chapter 3: Describing Syntax and Semantics. Introduction Formal methods of describing syntax (BNF)

An Efficient Implementation of PATR for Categorial Unification Grammar

SEMINAR: RECENT ADVANCES IN PARSING TECHNOLOGY. Parser Evaluation Approaches

Computationally Efficient M-Estimation of Log-Linear Structure Models

Static Semantics. Winter /3/ Hal Perkins & UW CSE I-1

Semantic Analysis. Outline. The role of semantic analysis in a compiler. Scope. Types. Where we are. The Compiler so far

structure of the presentation Frame Semantics knowledge-representation in larger-scale structures the concept of frame

Unsupervised: no target value to predict

Knowledge Representation

An UIMA based Tool Suite for Semantic Text Processing

Functional Programming. Pure Functional Languages

Transition-Based Dependency Parsing with Stack Long Short-Term Memory

An Empirical Evaluation of Deep Architectures on Problems with Many Factors of Variation

Conversational Knowledge Graphs. Larry Heck Microsoft Research

Learning Tractable Probabilistic Models Pedro Domingos

Learning Directed Probabilistic Logical Models using Ordering-search

A Deep Relevance Matching Model for Ad-hoc Retrieval

SEMANTIC ANALYSIS TYPES AND DECLARATIONS

The role of semantic analysis in a compiler

Sardar Vallabhbhai Patel Institute of Technology (SVIT), Vasad M.C.A. Department COSMOS LECTURE SERIES ( ) (ODD) Code Optimization

COMPUTATIONAL SEMANTICS WITH FUNCTIONAL PROGRAMMING JAN VAN EIJCK AND CHRISTINA UNGER. lg Cambridge UNIVERSITY PRESS

Inferring Protocol State Machine from Network Traces: A Probabilistic Approach

Foundations of AI. 9. Predicate Logic. Syntax and Semantics, Normal Forms, Herbrand Expansion, Resolution

Syntax and Grammars 1 / 21

Semantics Isn t Easy Thoughts on the Way Forward

Semantic Analysis. Outline. The role of semantic analysis in a compiler. Scope. Types. Where we are. The Compiler Front-End

Functional Programming. Pure Functional Languages

A Simple Syntax-Directed Translator

Contents. Chapter 1 SPECIFYING SYNTAX 1

Scene Grammars, Factor Graphs, and Belief Propagation

Text mining tools for semantically enriching the scientific literature

Motivation: Shortcomings of Hidden Markov Model. Ko, Youngjoong. Solution: Maximum Entropy Markov Model (MEMM)

Stack- propaga+on: Improved Representa+on Learning for Syntax

Learning to Match. Jun Xu, Zhengdong Lu, Tianqi Chen, Hang Li

Scene Grammars, Factor Graphs, and Belief Propagation

Recursive Deep Models for Semantic Compositionality Over a Sentiment Treebank text

Feature LDA: a Supervised Topic Model for Automatic Detection of Web API Documentations from the Web

Compiler Code Generation COMP360

Introduction to Lexical Analysis

Random projection for non-gaussian mixture models

It s time for a semantic engine!

Lightly Supervised Learning of Procedural Dialog Systems

1. true / false By a compiler we mean a program that translates to code that will run natively on some machine.

6.184 Lecture 4. Interpretation. Tweaked by Ben Vandiver Compiled by Mike Phillips Original material by Eric Grimson

S-MART: Novel Tree-based Structured Learning Algorithms Applied to Tweet Entity Linking

Constraint Propagation for Efficient Inference in Markov Logic

ECE521 Lecture 18 Graphical Models Hidden Markov Models

By Robin Dhamankar, Yoonkyong Lee, AnHai Doan, Alon Halevy and Pedro Domingos. Presented by Yael Kazaz

Markov Logic: Representation

Learning Latent Linguistic Structure to Optimize End Tasks. David A. Smith with Jason Naradowsky and Xiaoye Tiger Wu

K-Means Clustering 3/3/17

8. Relational Calculus (Part II)

MIA - Master on Artificial Intelligence

Why do we need an interpreter? SICP Interpretation part 1. Role of each part of the interpreter. 1. Arithmetic calculator.

CS224n: Natural Language Processing with Deep Learning 1 Lecture Notes: Part IV Dependency Parsing 2 Winter 2019

Exam Marco Kuhlmann. This exam consists of three parts:

Summary: Semantic Analysis

Leveraging Knowledge Graphs for Web-Scale Unsupervised Semantic Parsing. Interspeech 2013

Text Mining for Software Engineering

Introduction to Lexical Analysis

Shallow Parsing Swapnil Chaudhari 11305R011 Ankur Aher Raj Dabre 11305R001

Dependency grammar and dependency parsing

Chapter 2 & 3: Representations & Reasoning Systems (2.2)

MIDTERM EXAM (Solutions)

Machine Learning. Unsupervised Learning. Manfred Huber

Functional Programming. Pure Functional Programming

Type Checking. Outline. General properties of type systems. Types in programming languages. Notation for type rules.

Building Classifiers using Bayesian Networks

Dependency grammar and dependency parsing

Lambda Calculus. Type Systems, Lectures 3. Jevgeni Kabanov Tartu,

Syntactic N-grams as Machine Learning. Features for Natural Language Processing. Marvin Gülzow. Basics. Approach. Results.

Dependency grammar and dependency parsing

Automatic Linguistic Indexing of Pictures by a Statistical Modeling Approach

Outline. General properties of type systems. Types in programming languages. Notation for type rules. Common type rules. Logical rules of inference

A SYNTAX FOR IMAGE UNDERSTANDING

Unsupervised Learning. Clustering and the EM Algorithm. Unsupervised Learning is Model Learning

Latent Relation Representations for Universal Schemas

Final Project Discussion. Adam Meyers Montclair State University

Pouya Kousha Fall 2018 CSE 5194 Prof. DK Panda

Parsing. Zhenjiang Hu. May 31, June 7, June 14, All Right Reserved. National Institute of Informatics

OPEN INFORMATION EXTRACTION FROM THE WEB. Michele Banko, Michael J Cafarella, Stephen Soderland, Matt Broadhead and Oren Etzioni

Undergraduate Compilers in a Day

CS490W. Text Clustering. Luo Si. Department of Computer Science Purdue University

Transcription:

Unsupervised Semantic Parsing Hoifung Poon Dept. Computer Science & Eng. University of Washington (Joint work with Pedro Domingos) 1

Outline Motivation Unsupervised semantic parsing Learning and inference Experimental results Conclusion 2

Semantic Parsing Natural language text Formal and detailed meaning representation (MR) Also called logical form Standard MR language: First-order logic E.g., Microsoft buys Powerset. 3

Semantic Parsing Natural language text Formal and detailed meaning representation (MR) Also called logical form Standard MR language: First-order logic E.g., Microsoft buys Powerset. BUYS(MICROSOFT,POWERSET) 4

Shallow Semantic Processing Semantic role labeling Given a relation, identify arguments E.g., agent, theme, instrument Information extraction Identify fillers for a fixed relational template E.g., seminar (speaker, location, time) In contrast, semantic parsing is Formal: Supports reasoning and decision making Detailed: Obtains far more information 5

Applications Natural language interfaces Knowledge extraction from Wikipedia: 2 million articles PubMed: 18 million biomedical abstracts Web: Unlimited amount of information Machine reading: Learning by reading Question answering Help solve AI 6

Traditional Approaches Manually construct a grammar Challenge: Same meaning can be expressed in many different ways Microsoft buys Powerset Microsoft acquires semantic search engine Powerset Powerset is acquired by Microsoft Corporation The Redmond software giant buys Powerset Microsoft s purchase of Powerset, Manual encoding of variations? 7

Supervised Learning User provides: Target predicates and objects Example sentences with meaning annotation System learns grammar and produces parser Examples: Zelle & Mooney [1993] Zettlemoyer & Collins [2005, 2007, 2009] Wong & Mooney [2007] Lu et al. [2008] Ge & Mooney [2009] 8

Limitations of Supervised Approaches Applicable to restricted domains only For general text Not clear what predicates and objects to use Hard to produce consistent meaning annotation Crucial to develop unsupervised methods Also, often learn both syntax and semantics Fail to leverage advanced syntactic parsers Make semantic parsing harder 9

Unsupervised Approaches For shallow semantic tasks, e.g.: Open IE: TextRunner [Banko et al. 2007] Paraphrases: DIRT [Lin & Pantel 2001] Semantic networks: SNE [Kok & Domingos 2008] Show promise of unsupervised methods But none for semantic parsing 10

This Talk: USP First unsupervised approach for semantic parsing Based on Markov Logic [Richardson & Domingos, 2006] Three times as many Sole input is dependency trees correct answers as second best Can be used in general domains Applied it to extract knowledge from biomedical abstracts and answer questions Substantially outperforms TextRunner, DIRT 11

Outline Motivation Unsupervised semantic parsing Learning and inference Experimental results Conclusion 12

USP: Key Idea # 1 Target predicates and objects can be learned Viewed as clusters of syntactic or lexical variations of the same meaning BUYS(-,-) buys, acquires, s purchase of, Cluster of various expressions for acquisition MICROSOFT Microsoft, the Redmond software giant, Cluster of various mentions of Microsoft 13

USP: Key Idea # 2 Relational clustering Cluster relations with same objects USP Recursively cluster arbitrary expressions with similar subexpressions Microsoft buys Powerset Microsoft acquires semantic search engine Powerset Powerset is acquired by Microsoft Corporation The Redmond software giant buys Powerset Microsoft s purchase of Powerset, 14

USP: Key Idea # 2 Relational clustering Cluster relations with same objects USP Recursively cluster expressions with similar subexpressions Microsoft buys Powerset Microsoft acquires semantic search engine Powerset Powerset is acquired by Microsoft Corporation The Redmond software giant buys Powerset Microsoft s purchase of Powerset, Cluster same forms at the atom level 15

USP: Key Idea # 2 Relational clustering Cluster relations with same objects USP Recursively cluster expressions with similar subexpressions Microsoft buys Powerset Microsoft acquires semantic search engine Powerset Powerset is acquired by Microsoft Corporation The Redmond software giant buys Powerset Microsoft s purchase of Powerset, Cluster forms in composition with same forms 16

USP: Key Idea # 2 Relational clustering Cluster relations with same objects USP Recursively cluster expressions with similar subexpressions Microsoft buys Powerset Microsoft acquires semantic search engine Powerset Powerset is acquired by Microsoft Corporation The Redmond software giant buys Powerset Microsoft s purchase of Powerset, Cluster forms in composition with same forms 17

USP: Key Idea # 2 Relational clustering Cluster relations with same objects USP Recursively cluster expressions with similar subexpressions Microsoft buys Powerset Microsoft acquires semantic search engine Powerset Powerset is acquired by Microsoft Corporation The Redmond software giant buys Powerset Microsoft s purchase of Powerset, Cluster forms in composition with same forms 18

USP: Key Idea # 3 Start directly from syntactic analyses Focus on translating them to semantics Leverage rapid progress in syntactic parsing Much easier than learning both 19

USP: System Overview Input: Dependency trees for sentences Converts dependency trees into quasi-logical forms (QLFs) QLF subformulas have natural lambda forms Starts with lambda-form clusters at atom level Recursively builds up clusters of larger forms Output: Probability distribution over lambda-form clusters and their composition MAP semantic parses of sentences 20

Probabilistic Model for USP Joint probability distribution over a set of QLFs and their semantic parses Use Markov logic A Markov Logic Network (MLN) is a set of pairs (F i, w i ) where F i is a formula in first-order logic w i is a real number 1 P ( x ) e x p w N ( x ) i i Z i Number of true groundings of F i 21

Generating Quasi-Logical Forms buys nsubj dobj Microsoft Powerset Convert each node into an unary atom 22

Generating Quasi-Logical Forms buys(n 1 ) nsubj dobj Microsoft(n 2 ) Powerset(n 3 ) n 1, n 2, n 3 are Skolem constants 23

Generating Quasi-Logical Forms buys(n 1 ) nsubj dobj Microsoft(n 2 ) Powerset(n 3 ) Convert each edge into a binary atom 24

Generating Quasi-Logical Forms buys(n 1 ) nsubj(n 1,n 2 ) dobj(n 1,n 3 ) Microsoft(n 2 ) Powerset(n 3 ) Convert each edge into a binary atom 25

A Semantic Parse buys(n 1 ) nsubj(n 1,n 2 ) dobj(n 1,n 3 ) Microsoft(n 2 ) Powerset(n 3 ) Partition QLF into subformulas 26

A Semantic Parse buys(n 1 ) nsubj(n 1,n 2 ) dobj(n 1,n 3 ) Microsoft(n 2 ) Powerset(n 3 ) Subformula Lambda form: Replace Skolem constant not in unary atom with a unique lambda variable 27

A Semantic Parse buys(n 1 ) λx 2.nsubj(n 1,x 2 ) λx 3.dobj(n 1,x 3 ) Microsoft(n 2 ) Powerset(n 3 ) Subformula Lambda form: Replace Skolem constant not in unary atom with a unique lambda variable 28

A Semantic Parse Core form buys(n 1 ) Argument form Argument form λx 2.nsubj(n 1,x 2 ) λx 3.dobj(n 1,x 3 ) Microsoft(n 2 ) Powerset(n 3 ) Follow Davidsonian Semantics Core form: No lambda variable Argument form: One lambda variable 29

A Semantic Parse buys(n 1 ) λx 2.nsubj(n 1,x 2 ) λx 3.dobj(n 1,x 3 ) C BUYS Microsoft(n 2 ) C MICROSOFT Powerset(n 3 ) C POWERSET Assign subformula to lambda-form cluster 30

Lambda-Form Cluster C BUYS buys(n 1 ) 0.1 One formula in MLN acquires(n 1 ) 0.2 Learn weights for each pair of cluster and core form Distribution over core forms 31

Lambda-Form Cluster buys(n 1 ) 0.1 A BUYER C BUYS acquires(n 1 ) 0.2 A BOUGHT A PRICE May contain variable number of argument types 32

Argument Type: A BUYER λx 2.nsubj(n 1,x 2 ) 0.5 C MICROSOFT 0.2 None 0.1 λx 2.agent(n 1,x 2 ) 0.4 C GOOGLE 0.1 Three MLN formulas One 0.8 Distributions over argument forms, clusters, and number 33

USP MLN Four simple formulas Exponential prior on number of parameters 34

Abstract Lambda Form buys(n 1 ) λx 2.nsubj(n 1,x 2 ) Final logical λx 3.dobj(n form is 1,x obtained 3 ) via lambda reduction C BUYS (n 1 ) λx 2.A BUYER (n 1,x 2 ) λx 3.A BOUGHT (n 1,x 3 ) 35

Outline Motivation Unsupervised semantic parsing Learning and inference Experimental results Conclusion 36

Learning Observed: Q (QLFs) Hidden: S (semantic parses) Maximizes log-likelihood of observing the QLFs L ( Q ) lo g P ( Q, S ) S 37

Use Greedy Search Search for Θ, S to maximize P Θ (Q, S) Same objective as hard EM Directly optimize it rather than lower bound For fixed S, derive optimal Θ in closed form Guaranteed to find a local optimum 38

Search Operators MERGE(C 1, C 2 ): Merge clusters C 1, C 2 E.g.: buys, acquires buys, acquires COMPOSE(C 1, C 2 ): Create a new cluster resulting from composing lambda forms in C 1, C 2 E.g.: Microsoft, Corporation Microsoft Corporation 39

USP-Learn Initialization: Partition Atoms Greedy step: Evaluate search operations and execute the one with highest gain in log-likelihood Efficient implementation: Inverted index, etc. 40

MAP Semantic Parse Goal: Given QLF Q and learned Θ, find semantic parse S to maximize P Θ (Q, S) Again, use greedy search 41

Outline Motivation Unsupervised semantic parsing Learning and inference Experimental results Conclusion 42

Task No predefined gold logical forms Evaluate on an end task: Question answering Applied USP to extract knowledge from text and answer questions Evaluation: Number of answers and accuracy 43

Dataset GENIA dataset: 1999 Pubmed abstracts Questions Use simple questions in this paper, e.g.: What does anti-stat1 inhibit? What regulates MIP-1 alpha? Sample 2000 questions according to frequency 44

Systems Closest match in aim and capability: TextRunner [Banko et al. 2007] Also compared with: Baseline by keyword matching and syntax RESOLVER [Yates and Etzioni 2009] DIRT [Lin and Pantel 2001] 45

Total Number of Answers 300 200 100 0 KW-SYN TextRunner RESOLVER DIRT USP 46

Number of Correct Answers 300 200 100 0 KW-SYN TextRunner RESOLVER DIRT USP 47

Three times as many correct answers as second best Number of Correct Answers 300 200 100 0 KW-SYN TextRunner RESOLVER DIRT USP 48

Highest accuracy: 88% Number of Correct Answers 300 200 100 0 KW-SYN TextRunner RESOLVER DIRT USP 49

Qualitative Analysis USP resolves many nontrivial variations Argument forms that mean the same, e.g., expression of X X expression X stimulates Y Y is stimulated with X Active vs. passive voices Synonymous expressions Etc. 50

Clusters And Compositions Clusters in core forms investigate, examine, evaluate, analyze, study, assay diminish, reduce, decrease, attenuate synthesis, production, secretion, release dramatically, substantially, significantly Compositions amino acid, t cell, immune response, transcription factor, initiation site, binding site 51

Question-Answer: Example Q: What does IL-13 enhance? A: The 12-lipoxygenase activity of murine macrophages Sentence: The data presented here indicate that (1) the 12-lipoxygenase activity of murine macrophages is upregulated in vitro and in vivo by IL-4 and/or IL-13, (2) this upregulation requires expression of the transcription factor STAT6, and (3) the constitutive expression of the enzyme appears to be STAT6 independent. 52

Future Work Learn subsumption hierarchy over meanings Incorporate more NLP into USP Scale up learning and inference Apply to larger corpora (e.g., entire PubMed) 53

Conclusion USP: The first approach for unsupervised semantic parsing Based on Markov Logic Learn target logical forms by recursively clustering variations of same meaning Novel form of relational clustering Applicable to general domains Substantially outperforms shallow methods 54