SlideShare a Scribd company logo
ACL2019

Intro. by Chen
Our Goals
• Understanding the task

• Semantic Parsing & Logical Forms

• Understanding their method

• Dual Learning

• How to fit semantic parsing into dual learning

• Understanding other methods
Semantic Parsing
• Semantic Parsing:

• Mapping a natural language query into a logical form;

• Logical form:

• One type of meaning representation understood by
computers, usually executable to obtain answers.

• Common treatment:

• End-to-end Seq2seq models (fully supervised)
Example
• Query: “show flight from ci0 to ci1”

• Lambda expression:

• Strictly structured & executable

• A flexible function instance expressed by strings

• Foundation of programming languages » check wiki

• Demand of semantic parsing:

• Valid and complete at surface and semantic levels.
( lambda $0 e
( and
( flight $0 )
( from $0 ci0 )
( to $0 ci1)
) )
Task Demand• Surface:

• A complete tree structure / logical form

• “()” matches

• Semantic:

• Predicate & its arguments (or even their types) match

• ( flight $0 ) (from $0 ci0) (to $0 ci1)

• i.e. semantic parsing is (NL-to-AMR/SQL)
• A bridge between human and machine languages

• Python is good interpreter | we are semantic parsers.
A semantic parser needs to …
• (below are in my words)

• Understand the natural language | its meaning.

• Able to infer its structure.

• Understand the function and its arguments.

• Able to translate / map.

• btw. MT symbols -> symbols ⼈人
👀
This work
• Dual learning into semantic parsing

• Query to logical form (Q2LF);

• Logical form to query (LF2Q);

• Benefit or trait:

• No supervision

• Reinforcement learning: a validity reward for

• Achievement:

• SOTA on ATIS | competitive SOTA on OVERNIGHT
↕ provide signals to each other
Surface

Semantic
(primary)
(dual)
Primary Task
• Attention-based Encoder-Decoder architecture

• (Luong et al., 2015) attention:

• Regular endec output:

• Copy mechanism

• Entity Mapping: Uniform Resource Identifier (URI, K&C, 2006)

• e.g. kobe bryant → en.player.kobe_bryant;

•
gt ⋅
(1 − gt) ⋅
+
Selection at t
Attentions at t
Dual Model
• Reverse Entity Mapping: 

• e.g. en.player.kobe_bryant → [the black mamba; …]
• Randomly select on from the list.
KB−1
(yt)
Dual learning
• Two agents & two loops:

• (Q2LF, LF2Q), (LF2Q, Q2LF)

• Reinforcement learning based on policy gradient (Sutton)

• Data:

• queries; logical forms; parallel

• Supervised initialization with ;

• Two unsupervised loops with 、
𝒬 ℒℱ 𝒯
𝒬 ∪ 𝒯
𝒬 ∪ 𝒯 ℒℱ ∪ 𝒯
Supervisor Guidance
• When is limited, the unsupervised models would rot.

• Initial training: maximum likelihood estimation (MLE)

• Train Q2LF and LF2Q on .

• Other preparation:

• Train on .

• Logical form checker: grammar_error_indicator(・)
𝒯
𝒯
LMq 𝒬 ∪ 𝒯
Loop starts from a query
1. Sample a query from ;

2. Q2LF generates k logical forms with beam search;

3. Calculate validity reward: 

4. Reconstruct with LF2Q

5. Calculate reconstruction reward 

6. Balance rewards: 

7. Update:
𝒬 ∪ 𝒯
y1, y2, ⋯yk
Rval
q (yi)
Rrec
q (x, yi)
rq
i
= αRval
q (yi) + (1 − α)Rrec
q (x, yi)
Loop starts from a logical form
1. Sample a query from ;

2. LF2Q generates k queries with beam search;

3. Calculate validity reward: 

4. Reconstruct with Q2LF

5. Calculate reconstruction reward 

6. Balance rewards: 

7. Update:
ℒℱ ∪ 𝒯
x1, x2, ⋯xk
Rval
lf (xi)
Rrec
lf (y, xi)
rlf
i
= βRval
lf (xi) + (1 − β)Rrec
lf (y, xi)
Reward design (1/2)
• grammar_error_indicator(・)
has been included in
OVERNIGHT dataset.

• Otherwise, construct a
grammar_error_indicator(・)
based on the ontology of
the corresponding dataset.

• 1 when correct, otherwise 0

• Rval
q (y) = grammar_error_indicator(y)
Reward design (2/2)
• The pre-trained language model for queries: 

• ;

• That’s it!

• Let’s see experiments.
LMq
Rval
lf =
log LMq(x)
Length(x)
Experiments
• Datasets (supervised)

• ATIS(1994):

Airline 

Travel

Information

System

• OVERNIGHT(2015):

• 8 domain: calenda/
restaurants/social
networks/
basketball/blocks/
publication/
recipes/housing
Parallel data (Two s)𝒯
Experiments
• Synthesis logical forms

( for ATIS )

• Modification based
on ontology:

• Replace entity or
predicate;

• Check validity;

• Check novelty;
Data augmentation (1/2)ℒℱ
Experiments
• Synthesis logical forms (for OVERNIGHT)

• Generation based on grammar:

• Reorder entity instances of one type.

• +500 for each domain.
Data augmentation (2/2)ℒℱ
Experiments
• Base model:

• and : 0.5

• Pre-trained word: Glove6B

• : 100-dim word emb

200-dim hidden

• Training and decoding:

• Beam size: {3, 5}

• Batch size: {10, 20}

• Adam lr: 0.001
α β
LMq
Model settings
• Pseudo baseline, 1/2 loss:

• Back-translation (Sennrich
et al., 2016)

• “Varied Queries” (Guo et
al., 2018)
ATIS
陳:Results on ATIS
are convincing.
Simple data
augmentation does
not help the model.
Back-trans fails to
treat SQL well.
DUAL dramatically
makes their model
so different.
Both Copy-mech &
Coarse2Fine
suggest the sparsity
of natural language.
OVERNIGHT
OVERNIGHT contains less distinct entities and training samples, 

that copy is not essential.
陳:I start to wonder, this is the maximum of the Seq2seq capacity.
Ablation (1/4)
• Cut into:

• 50% ; 50% ; 50%
𝒯
𝒯 𝒬 ℒℱ
is still essential;
↓
𝒯
Semi-supervised
prev. ATTPTR+DUAL+LF | 79.9 | 89.1
Ablation (2/4)
←
is still essential;
(On ATIS)

𝒯
Ratio of labeled data
Ablation (3/4)
(On ATIS)

• Cut into:

• 30% ;

• 70% ;

• 70% .
𝒯
𝒯
𝒬
ℒℱ
more unlabeled data
DUAL
MLE
Ablation (4/4)
Choice for validity reward
Soft
Hard
Soft
Hard
感想(⼀一⾔言)
Untrained model
Model trained without MLE
Rewards
Model trained with MLE
Loss
Model explored with RL

More Related Content

What's hot

8th TUC Meeting - Peter Boncz (CWI). Query Language Task Force status
8th TUC Meeting - Peter Boncz (CWI). Query Language Task Force status8th TUC Meeting - Peter Boncz (CWI). Query Language Task Force status
8th TUC Meeting - Peter Boncz (CWI). Query Language Task Force status
LDBC council
 
Advanced Functional Programming in Scala
Advanced Functional Programming in ScalaAdvanced Functional Programming in Scala
Advanced Functional Programming in Scala
Patrick Nicolas
 
Java Tutorial Lab 7
Java Tutorial Lab 7Java Tutorial Lab 7
Java Tutorial Lab 7
Berk Soysal
 
Jax retrospective
Jax retrospectiveJax retrospective
Jax retrospective
Chris Laffra
 
LR(0) PARSER
LR(0) PARSERLR(0) PARSER
Data structure
Data structureData structure
Data structure
swapnilnav99
 
R programming groundup-basic-section-i
R programming groundup-basic-section-iR programming groundup-basic-section-i
R programming groundup-basic-section-i
Dr. Awase Khirni Syed
 
1.3 introduction to R language, importing dataset in r, data exploration in r
1.3 introduction to R language, importing dataset in r, data exploration in r1.3 introduction to R language, importing dataset in r, data exploration in r
1.3 introduction to R language, importing dataset in r, data exploration in r
Simple Research
 
Live coding java 8 urs peter
Live coding java 8   urs peterLive coding java 8   urs peter
Live coding java 8 urs peterNLJUG
 
D404 ex-5-1-1
D404 ex-5-1-1D404 ex-5-1-1
D404 ex-5-1-1
Omkar Rane
 
Poio API: a CLARIN-D curation project for language documentation and language...
Poio API: a CLARIN-D curation project for language documentation and language...Poio API: a CLARIN-D curation project for language documentation and language...
Poio API: a CLARIN-D curation project for language documentation and language...
Peter Bouda
 
Spark Overview - Oleg Mürk
Spark Overview - Oleg MürkSpark Overview - Oleg Mürk
Spark Overview - Oleg Mürk
Planet OS
 
Java Tutorial Lab 3
Java Tutorial Lab 3Java Tutorial Lab 3
Java Tutorial Lab 3
Berk Soysal
 
Algebraic Property Graphs
Algebraic Property GraphsAlgebraic Property Graphs
Algebraic Property Graphs
Adrian Wilke
 
Workshop presentation hands on r programming
Workshop presentation hands on r programmingWorkshop presentation hands on r programming
Workshop presentation hands on r programming
Nimrita Koul
 
Extensible Operators and Literals for JavaScript
Extensible Operators and Literals for JavaScriptExtensible Operators and Literals for JavaScript
Extensible Operators and Literals for JavaScript
Brendan Eich
 
Relational Calculus
Relational CalculusRelational Calculus
Relational Calculus
Dr. C.V. Suresh Babu
 
Deadlock
DeadlockDeadlock
Deadlock
bhavanatmithun
 

What's hot (20)

8th TUC Meeting - Peter Boncz (CWI). Query Language Task Force status
8th TUC Meeting - Peter Boncz (CWI). Query Language Task Force status8th TUC Meeting - Peter Boncz (CWI). Query Language Task Force status
8th TUC Meeting - Peter Boncz (CWI). Query Language Task Force status
 
Advanced Functional Programming in Scala
Advanced Functional Programming in ScalaAdvanced Functional Programming in Scala
Advanced Functional Programming in Scala
 
Java Tutorial Lab 7
Java Tutorial Lab 7Java Tutorial Lab 7
Java Tutorial Lab 7
 
Jax retrospective
Jax retrospectiveJax retrospective
Jax retrospective
 
LR(0) PARSER
LR(0) PARSERLR(0) PARSER
LR(0) PARSER
 
Data structure
Data structureData structure
Data structure
 
R programming groundup-basic-section-i
R programming groundup-basic-section-iR programming groundup-basic-section-i
R programming groundup-basic-section-i
 
1.3 introduction to R language, importing dataset in r, data exploration in r
1.3 introduction to R language, importing dataset in r, data exploration in r1.3 introduction to R language, importing dataset in r, data exploration in r
1.3 introduction to R language, importing dataset in r, data exploration in r
 
Live coding java 8 urs peter
Live coding java 8   urs peterLive coding java 8   urs peter
Live coding java 8 urs peter
 
Data structure
Data structureData structure
Data structure
 
Presentation1
Presentation1Presentation1
Presentation1
 
D404 ex-5-1-1
D404 ex-5-1-1D404 ex-5-1-1
D404 ex-5-1-1
 
Poio API: a CLARIN-D curation project for language documentation and language...
Poio API: a CLARIN-D curation project for language documentation and language...Poio API: a CLARIN-D curation project for language documentation and language...
Poio API: a CLARIN-D curation project for language documentation and language...
 
Spark Overview - Oleg Mürk
Spark Overview - Oleg MürkSpark Overview - Oleg Mürk
Spark Overview - Oleg Mürk
 
Java Tutorial Lab 3
Java Tutorial Lab 3Java Tutorial Lab 3
Java Tutorial Lab 3
 
Algebraic Property Graphs
Algebraic Property GraphsAlgebraic Property Graphs
Algebraic Property Graphs
 
Workshop presentation hands on r programming
Workshop presentation hands on r programmingWorkshop presentation hands on r programming
Workshop presentation hands on r programming
 
Extensible Operators and Literals for JavaScript
Extensible Operators and Literals for JavaScriptExtensible Operators and Literals for JavaScript
Extensible Operators and Literals for JavaScript
 
Relational Calculus
Relational CalculusRelational Calculus
Relational Calculus
 
Deadlock
DeadlockDeadlock
Deadlock
 

Similar to I20191007

Processing Large Graphs
Processing Large GraphsProcessing Large Graphs
Processing Large Graphs
Nishant Gandhi
 
A full Machine learning pipeline in Scikit-learn vs in scala-Spark: pros and ...
A full Machine learning pipeline in Scikit-learn vs in scala-Spark: pros and ...A full Machine learning pipeline in Scikit-learn vs in scala-Spark: pros and ...
A full Machine learning pipeline in Scikit-learn vs in scala-Spark: pros and ...
Jose Quesada (hiring)
 
An early look at the LDBC Social Network Benchmark's Business Intelligence wo...
An early look at the LDBC Social Network Benchmark's Business Intelligence wo...An early look at the LDBC Social Network Benchmark's Business Intelligence wo...
An early look at the LDBC Social Network Benchmark's Business Intelligence wo...
Gábor Szárnyas
 
Provenance for Data Munging Environments
Provenance for Data Munging EnvironmentsProvenance for Data Munging Environments
Provenance for Data Munging Environments
Paul Groth
 
Learning to Rank Presentation (v2) at LexisNexis Search Guild
Learning to Rank Presentation (v2) at LexisNexis Search GuildLearning to Rank Presentation (v2) at LexisNexis Search Guild
Learning to Rank Presentation (v2) at LexisNexis Search Guild
Sujit Pal
 
System analyst and design
System analyst and designSystem analyst and design
System analyst and design
Chakrit Kulkaisri
 
Implementing a JavaScript Engine
Implementing a JavaScript EngineImplementing a JavaScript Engine
Implementing a JavaScript Engine
Kris Mok
 
The openCypher Project - An Open Graph Query Language
The openCypher Project - An Open Graph Query LanguageThe openCypher Project - An Open Graph Query Language
The openCypher Project - An Open Graph Query Language
Neo4j
 
Clojure - An Introduction for Lisp Programmers
Clojure - An Introduction for Lisp ProgrammersClojure - An Introduction for Lisp Programmers
Clojure - An Introduction for Lisp Programmerselliando dias
 
N20190530
N20190530N20190530
N20190530
TMU, Japan
 
A Production Quality Sketching Library for the Analysis of Big Data
A Production Quality Sketching Library for the Analysis of Big DataA Production Quality Sketching Library for the Analysis of Big Data
A Production Quality Sketching Library for the Analysis of Big Data
Databricks
 
A Workshop on R
A Workshop on RA Workshop on R
A Workshop on R
Ajay Ohri
 
Apache Calcite: A Foundational Framework for Optimized Query Processing Over ...
Apache Calcite: A Foundational Framework for Optimized Query Processing Over ...Apache Calcite: A Foundational Framework for Optimized Query Processing Over ...
Apache Calcite: A Foundational Framework for Optimized Query Processing Over ...
Julian Hyde
 
The Evolution of Streaming Expressions - Joel Bernstein, Alfresco & Dennis Go...
The Evolution of Streaming Expressions - Joel Bernstein, Alfresco & Dennis Go...The Evolution of Streaming Expressions - Joel Bernstein, Alfresco & Dennis Go...
The Evolution of Streaming Expressions - Joel Bernstein, Alfresco & Dennis Go...
Lucidworks
 
FP Days: Down the Clojure Rabbit Hole
FP Days: Down the Clojure Rabbit HoleFP Days: Down the Clojure Rabbit Hole
FP Days: Down the Clojure Rabbit HoleChristophe Grand
 
Fabian Hueske - Taking a look under the hood of Apache Flink’s relational APIs
Fabian Hueske - Taking a look under the hood of Apache Flink’s relational APIsFabian Hueske - Taking a look under the hood of Apache Flink’s relational APIs
Fabian Hueske - Taking a look under the hood of Apache Flink’s relational APIs
Flink Forward
 
Taking a look under the hood of Apache Flink's relational APIs.
Taking a look under the hood of Apache Flink's relational APIs.Taking a look under the hood of Apache Flink's relational APIs.
Taking a look under the hood of Apache Flink's relational APIs.
Fabian Hueske
 
C LANGUAGE - BESTECH SOLUTIONS
C LANGUAGE - BESTECH SOLUTIONSC LANGUAGE - BESTECH SOLUTIONS
C LANGUAGE - BESTECH SOLUTIONS
BESTECH SOLUTIONS
 
Database part2-
Database part2-Database part2-
Database part2-
Taymoor Nazmy
 
Large-Scale Machine Learning with Apache Spark
Large-Scale Machine Learning with Apache SparkLarge-Scale Machine Learning with Apache Spark
Large-Scale Machine Learning with Apache Spark
DB Tsai
 

Similar to I20191007 (20)

Processing Large Graphs
Processing Large GraphsProcessing Large Graphs
Processing Large Graphs
 
A full Machine learning pipeline in Scikit-learn vs in scala-Spark: pros and ...
A full Machine learning pipeline in Scikit-learn vs in scala-Spark: pros and ...A full Machine learning pipeline in Scikit-learn vs in scala-Spark: pros and ...
A full Machine learning pipeline in Scikit-learn vs in scala-Spark: pros and ...
 
An early look at the LDBC Social Network Benchmark's Business Intelligence wo...
An early look at the LDBC Social Network Benchmark's Business Intelligence wo...An early look at the LDBC Social Network Benchmark's Business Intelligence wo...
An early look at the LDBC Social Network Benchmark's Business Intelligence wo...
 
Provenance for Data Munging Environments
Provenance for Data Munging EnvironmentsProvenance for Data Munging Environments
Provenance for Data Munging Environments
 
Learning to Rank Presentation (v2) at LexisNexis Search Guild
Learning to Rank Presentation (v2) at LexisNexis Search GuildLearning to Rank Presentation (v2) at LexisNexis Search Guild
Learning to Rank Presentation (v2) at LexisNexis Search Guild
 
System analyst and design
System analyst and designSystem analyst and design
System analyst and design
 
Implementing a JavaScript Engine
Implementing a JavaScript EngineImplementing a JavaScript Engine
Implementing a JavaScript Engine
 
The openCypher Project - An Open Graph Query Language
The openCypher Project - An Open Graph Query LanguageThe openCypher Project - An Open Graph Query Language
The openCypher Project - An Open Graph Query Language
 
Clojure - An Introduction for Lisp Programmers
Clojure - An Introduction for Lisp ProgrammersClojure - An Introduction for Lisp Programmers
Clojure - An Introduction for Lisp Programmers
 
N20190530
N20190530N20190530
N20190530
 
A Production Quality Sketching Library for the Analysis of Big Data
A Production Quality Sketching Library for the Analysis of Big DataA Production Quality Sketching Library for the Analysis of Big Data
A Production Quality Sketching Library for the Analysis of Big Data
 
A Workshop on R
A Workshop on RA Workshop on R
A Workshop on R
 
Apache Calcite: A Foundational Framework for Optimized Query Processing Over ...
Apache Calcite: A Foundational Framework for Optimized Query Processing Over ...Apache Calcite: A Foundational Framework for Optimized Query Processing Over ...
Apache Calcite: A Foundational Framework for Optimized Query Processing Over ...
 
The Evolution of Streaming Expressions - Joel Bernstein, Alfresco & Dennis Go...
The Evolution of Streaming Expressions - Joel Bernstein, Alfresco & Dennis Go...The Evolution of Streaming Expressions - Joel Bernstein, Alfresco & Dennis Go...
The Evolution of Streaming Expressions - Joel Bernstein, Alfresco & Dennis Go...
 
FP Days: Down the Clojure Rabbit Hole
FP Days: Down the Clojure Rabbit HoleFP Days: Down the Clojure Rabbit Hole
FP Days: Down the Clojure Rabbit Hole
 
Fabian Hueske - Taking a look under the hood of Apache Flink’s relational APIs
Fabian Hueske - Taking a look under the hood of Apache Flink’s relational APIsFabian Hueske - Taking a look under the hood of Apache Flink’s relational APIs
Fabian Hueske - Taking a look under the hood of Apache Flink’s relational APIs
 
Taking a look under the hood of Apache Flink's relational APIs.
Taking a look under the hood of Apache Flink's relational APIs.Taking a look under the hood of Apache Flink's relational APIs.
Taking a look under the hood of Apache Flink's relational APIs.
 
C LANGUAGE - BESTECH SOLUTIONS
C LANGUAGE - BESTECH SOLUTIONSC LANGUAGE - BESTECH SOLUTIONS
C LANGUAGE - BESTECH SOLUTIONS
 
Database part2-
Database part2-Database part2-
Database part2-
 
Large-Scale Machine Learning with Apache Spark
Large-Scale Machine Learning with Apache SparkLarge-Scale Machine Learning with Apache Spark
Large-Scale Machine Learning with Apache Spark
 

Recently uploaded

Globus Compute Introduction - GlobusWorld 2024
Globus Compute Introduction - GlobusWorld 2024Globus Compute Introduction - GlobusWorld 2024
Globus Compute Introduction - GlobusWorld 2024
Globus
 
Beyond Event Sourcing - Embracing CRUD for Wix Platform - Java.IL
Beyond Event Sourcing - Embracing CRUD for Wix Platform - Java.ILBeyond Event Sourcing - Embracing CRUD for Wix Platform - Java.IL
Beyond Event Sourcing - Embracing CRUD for Wix Platform - Java.IL
Natan Silnitsky
 
Globus Compute wth IRI Workflows - GlobusWorld 2024
Globus Compute wth IRI Workflows - GlobusWorld 2024Globus Compute wth IRI Workflows - GlobusWorld 2024
Globus Compute wth IRI Workflows - GlobusWorld 2024
Globus
 
Into the Box 2024 - Keynote Day 2 Slides.pdf
Into the Box 2024 - Keynote Day 2 Slides.pdfInto the Box 2024 - Keynote Day 2 Slides.pdf
Into the Box 2024 - Keynote Day 2 Slides.pdf
Ortus Solutions, Corp
 
Providing Globus Services to Users of JASMIN for Environmental Data Analysis
Providing Globus Services to Users of JASMIN for Environmental Data AnalysisProviding Globus Services to Users of JASMIN for Environmental Data Analysis
Providing Globus Services to Users of JASMIN for Environmental Data Analysis
Globus
 
Accelerate Enterprise Software Engineering with Platformless
Accelerate Enterprise Software Engineering with PlatformlessAccelerate Enterprise Software Engineering with Platformless
Accelerate Enterprise Software Engineering with Platformless
WSO2
 
Innovating Inference - Remote Triggering of Large Language Models on HPC Clus...
Innovating Inference - Remote Triggering of Large Language Models on HPC Clus...Innovating Inference - Remote Triggering of Large Language Models on HPC Clus...
Innovating Inference - Remote Triggering of Large Language Models on HPC Clus...
Globus
 
Gamify Your Mind; The Secret Sauce to Delivering Success, Continuously Improv...
Gamify Your Mind; The Secret Sauce to Delivering Success, Continuously Improv...Gamify Your Mind; The Secret Sauce to Delivering Success, Continuously Improv...
Gamify Your Mind; The Secret Sauce to Delivering Success, Continuously Improv...
Shahin Sheidaei
 
How to Position Your Globus Data Portal for Success Ten Good Practices
How to Position Your Globus Data Portal for Success Ten Good PracticesHow to Position Your Globus Data Portal for Success Ten Good Practices
How to Position Your Globus Data Portal for Success Ten Good Practices
Globus
 
A Comprehensive Look at Generative AI in Retail App Testing.pdf
A Comprehensive Look at Generative AI in Retail App Testing.pdfA Comprehensive Look at Generative AI in Retail App Testing.pdf
A Comprehensive Look at Generative AI in Retail App Testing.pdf
kalichargn70th171
 
How Recreation Management Software Can Streamline Your Operations.pptx
How Recreation Management Software Can Streamline Your Operations.pptxHow Recreation Management Software Can Streamline Your Operations.pptx
How Recreation Management Software Can Streamline Your Operations.pptx
wottaspaceseo
 
Strategies for Successful Data Migration Tools.pptx
Strategies for Successful Data Migration Tools.pptxStrategies for Successful Data Migration Tools.pptx
Strategies for Successful Data Migration Tools.pptx
varshanayak241
 
In 2015, I used to write extensions for Joomla, WordPress, phpBB3, etc and I ...
In 2015, I used to write extensions for Joomla, WordPress, phpBB3, etc and I ...In 2015, I used to write extensions for Joomla, WordPress, phpBB3, etc and I ...
In 2015, I used to write extensions for Joomla, WordPress, phpBB3, etc and I ...
Juraj Vysvader
 
Prosigns: Transforming Business with Tailored Technology Solutions
Prosigns: Transforming Business with Tailored Technology SolutionsProsigns: Transforming Business with Tailored Technology Solutions
Prosigns: Transforming Business with Tailored Technology Solutions
Prosigns
 
TROUBLESHOOTING 9 TYPES OF OUTOFMEMORYERROR
TROUBLESHOOTING 9 TYPES OF OUTOFMEMORYERRORTROUBLESHOOTING 9 TYPES OF OUTOFMEMORYERROR
TROUBLESHOOTING 9 TYPES OF OUTOFMEMORYERROR
Tier1 app
 
Understanding Globus Data Transfers with NetSage
Understanding Globus Data Transfers with NetSageUnderstanding Globus Data Transfers with NetSage
Understanding Globus Data Transfers with NetSage
Globus
 
Enhancing Research Orchestration Capabilities at ORNL.pdf
Enhancing Research Orchestration Capabilities at ORNL.pdfEnhancing Research Orchestration Capabilities at ORNL.pdf
Enhancing Research Orchestration Capabilities at ORNL.pdf
Globus
 
Corporate Management | Session 3 of 3 | Tendenci AMS
Corporate Management | Session 3 of 3 | Tendenci AMSCorporate Management | Session 3 of 3 | Tendenci AMS
Corporate Management | Session 3 of 3 | Tendenci AMS
Tendenci - The Open Source AMS (Association Management Software)
 
Large Language Models and the End of Programming
Large Language Models and the End of ProgrammingLarge Language Models and the End of Programming
Large Language Models and the End of Programming
Matt Welsh
 
De mooiste recreatieve routes ontdekken met RouteYou en FME
De mooiste recreatieve routes ontdekken met RouteYou en FMEDe mooiste recreatieve routes ontdekken met RouteYou en FME
De mooiste recreatieve routes ontdekken met RouteYou en FME
Jelle | Nordend
 

Recently uploaded (20)

Globus Compute Introduction - GlobusWorld 2024
Globus Compute Introduction - GlobusWorld 2024Globus Compute Introduction - GlobusWorld 2024
Globus Compute Introduction - GlobusWorld 2024
 
Beyond Event Sourcing - Embracing CRUD for Wix Platform - Java.IL
Beyond Event Sourcing - Embracing CRUD for Wix Platform - Java.ILBeyond Event Sourcing - Embracing CRUD for Wix Platform - Java.IL
Beyond Event Sourcing - Embracing CRUD for Wix Platform - Java.IL
 
Globus Compute wth IRI Workflows - GlobusWorld 2024
Globus Compute wth IRI Workflows - GlobusWorld 2024Globus Compute wth IRI Workflows - GlobusWorld 2024
Globus Compute wth IRI Workflows - GlobusWorld 2024
 
Into the Box 2024 - Keynote Day 2 Slides.pdf
Into the Box 2024 - Keynote Day 2 Slides.pdfInto the Box 2024 - Keynote Day 2 Slides.pdf
Into the Box 2024 - Keynote Day 2 Slides.pdf
 
Providing Globus Services to Users of JASMIN for Environmental Data Analysis
Providing Globus Services to Users of JASMIN for Environmental Data AnalysisProviding Globus Services to Users of JASMIN for Environmental Data Analysis
Providing Globus Services to Users of JASMIN for Environmental Data Analysis
 
Accelerate Enterprise Software Engineering with Platformless
Accelerate Enterprise Software Engineering with PlatformlessAccelerate Enterprise Software Engineering with Platformless
Accelerate Enterprise Software Engineering with Platformless
 
Innovating Inference - Remote Triggering of Large Language Models on HPC Clus...
Innovating Inference - Remote Triggering of Large Language Models on HPC Clus...Innovating Inference - Remote Triggering of Large Language Models on HPC Clus...
Innovating Inference - Remote Triggering of Large Language Models on HPC Clus...
 
Gamify Your Mind; The Secret Sauce to Delivering Success, Continuously Improv...
Gamify Your Mind; The Secret Sauce to Delivering Success, Continuously Improv...Gamify Your Mind; The Secret Sauce to Delivering Success, Continuously Improv...
Gamify Your Mind; The Secret Sauce to Delivering Success, Continuously Improv...
 
How to Position Your Globus Data Portal for Success Ten Good Practices
How to Position Your Globus Data Portal for Success Ten Good PracticesHow to Position Your Globus Data Portal for Success Ten Good Practices
How to Position Your Globus Data Portal for Success Ten Good Practices
 
A Comprehensive Look at Generative AI in Retail App Testing.pdf
A Comprehensive Look at Generative AI in Retail App Testing.pdfA Comprehensive Look at Generative AI in Retail App Testing.pdf
A Comprehensive Look at Generative AI in Retail App Testing.pdf
 
How Recreation Management Software Can Streamline Your Operations.pptx
How Recreation Management Software Can Streamline Your Operations.pptxHow Recreation Management Software Can Streamline Your Operations.pptx
How Recreation Management Software Can Streamline Your Operations.pptx
 
Strategies for Successful Data Migration Tools.pptx
Strategies for Successful Data Migration Tools.pptxStrategies for Successful Data Migration Tools.pptx
Strategies for Successful Data Migration Tools.pptx
 
In 2015, I used to write extensions for Joomla, WordPress, phpBB3, etc and I ...
In 2015, I used to write extensions for Joomla, WordPress, phpBB3, etc and I ...In 2015, I used to write extensions for Joomla, WordPress, phpBB3, etc and I ...
In 2015, I used to write extensions for Joomla, WordPress, phpBB3, etc and I ...
 
Prosigns: Transforming Business with Tailored Technology Solutions
Prosigns: Transforming Business with Tailored Technology SolutionsProsigns: Transforming Business with Tailored Technology Solutions
Prosigns: Transforming Business with Tailored Technology Solutions
 
TROUBLESHOOTING 9 TYPES OF OUTOFMEMORYERROR
TROUBLESHOOTING 9 TYPES OF OUTOFMEMORYERRORTROUBLESHOOTING 9 TYPES OF OUTOFMEMORYERROR
TROUBLESHOOTING 9 TYPES OF OUTOFMEMORYERROR
 
Understanding Globus Data Transfers with NetSage
Understanding Globus Data Transfers with NetSageUnderstanding Globus Data Transfers with NetSage
Understanding Globus Data Transfers with NetSage
 
Enhancing Research Orchestration Capabilities at ORNL.pdf
Enhancing Research Orchestration Capabilities at ORNL.pdfEnhancing Research Orchestration Capabilities at ORNL.pdf
Enhancing Research Orchestration Capabilities at ORNL.pdf
 
Corporate Management | Session 3 of 3 | Tendenci AMS
Corporate Management | Session 3 of 3 | Tendenci AMSCorporate Management | Session 3 of 3 | Tendenci AMS
Corporate Management | Session 3 of 3 | Tendenci AMS
 
Large Language Models and the End of Programming
Large Language Models and the End of ProgrammingLarge Language Models and the End of Programming
Large Language Models and the End of Programming
 
De mooiste recreatieve routes ontdekken met RouteYou en FME
De mooiste recreatieve routes ontdekken met RouteYou en FMEDe mooiste recreatieve routes ontdekken met RouteYou en FME
De mooiste recreatieve routes ontdekken met RouteYou en FME
 

I20191007

  • 2. Our Goals • Understanding the task • Semantic Parsing & Logical Forms • Understanding their method • Dual Learning • How to fit semantic parsing into dual learning • Understanding other methods
  • 3. Semantic Parsing • Semantic Parsing: • Mapping a natural language query into a logical form; • Logical form: • One type of meaning representation understood by computers, usually executable to obtain answers. • Common treatment: • End-to-end Seq2seq models (fully supervised)
  • 4. Example • Query: “show flight from ci0 to ci1” • Lambda expression: • Strictly structured & executable • A flexible function instance expressed by strings • Foundation of programming languages » check wiki • Demand of semantic parsing: • Valid and complete at surface and semantic levels. ( lambda $0 e ( and ( flight $0 ) ( from $0 ci0 ) ( to $0 ci1) ) )
  • 5. Task Demand• Surface: • A complete tree structure / logical form • “()” matches • Semantic: • Predicate & its arguments (or even their types) match • ( flight $0 ) (from $0 ci0) (to $0 ci1) • i.e. semantic parsing is (NL-to-AMR/SQL) • A bridge between human and machine languages • Python is good interpreter | we are semantic parsers.
  • 6. A semantic parser needs to … • (below are in my words) • Understand the natural language | its meaning. • Able to infer its structure. • Understand the function and its arguments. • Able to translate / map. • btw. MT symbols -> symbols ⼈人 👀
  • 7. This work • Dual learning into semantic parsing • Query to logical form (Q2LF); • Logical form to query (LF2Q); • Benefit or trait: • No supervision • Reinforcement learning: a validity reward for • Achievement: • SOTA on ATIS | competitive SOTA on OVERNIGHT ↕ provide signals to each other Surface Semantic (primary) (dual)
  • 8. Primary Task • Attention-based Encoder-Decoder architecture • (Luong et al., 2015) attention: • Regular endec output: • Copy mechanism
 • Entity Mapping: Uniform Resource Identifier (URI, K&C, 2006) • e.g. kobe bryant → en.player.kobe_bryant; • gt ⋅ (1 − gt) ⋅ + Selection at t Attentions at t
  • 9. Dual Model • Reverse Entity Mapping: • e.g. en.player.kobe_bryant → [the black mamba; …] • Randomly select on from the list. KB−1 (yt)
  • 10. Dual learning • Two agents & two loops: • (Q2LF, LF2Q), (LF2Q, Q2LF) • Reinforcement learning based on policy gradient (Sutton) • Data: • queries; logical forms; parallel • Supervised initialization with ; • Two unsupervised loops with 、 𝒬 ℒℱ 𝒯 𝒬 ∪ 𝒯 𝒬 ∪ 𝒯 ℒℱ ∪ 𝒯
  • 11. Supervisor Guidance • When is limited, the unsupervised models would rot. • Initial training: maximum likelihood estimation (MLE) • Train Q2LF and LF2Q on . • Other preparation: • Train on . • Logical form checker: grammar_error_indicator(・) 𝒯 𝒯 LMq 𝒬 ∪ 𝒯
  • 12. Loop starts from a query 1. Sample a query from ; 2. Q2LF generates k logical forms with beam search; 3. Calculate validity reward: 4. Reconstruct with LF2Q 5. Calculate reconstruction reward 6. Balance rewards: 7. Update: 𝒬 ∪ 𝒯 y1, y2, ⋯yk Rval q (yi) Rrec q (x, yi) rq i = αRval q (yi) + (1 − α)Rrec q (x, yi)
  • 13. Loop starts from a logical form 1. Sample a query from ; 2. LF2Q generates k queries with beam search; 3. Calculate validity reward: 4. Reconstruct with Q2LF 5. Calculate reconstruction reward 6. Balance rewards: 7. Update: ℒℱ ∪ 𝒯 x1, x2, ⋯xk Rval lf (xi) Rrec lf (y, xi) rlf i = βRval lf (xi) + (1 − β)Rrec lf (y, xi)
  • 14. Reward design (1/2) • grammar_error_indicator(・) has been included in OVERNIGHT dataset. • Otherwise, construct a grammar_error_indicator(・) based on the ontology of the corresponding dataset. • 1 when correct, otherwise 0 • Rval q (y) = grammar_error_indicator(y)
  • 15. Reward design (2/2) • The pre-trained language model for queries: • ; • That’s it! • Let’s see experiments. LMq Rval lf = log LMq(x) Length(x)
  • 16. Experiments • Datasets (supervised) • ATIS(1994):
 Airline 
 Travel
 Information
 System • OVERNIGHT(2015): • 8 domain: calenda/ restaurants/social networks/ basketball/blocks/ publication/ recipes/housing Parallel data (Two s)𝒯
  • 17. Experiments • Synthesis logical forms
 ( for ATIS ) • Modification based on ontology: • Replace entity or predicate; • Check validity; • Check novelty; Data augmentation (1/2)ℒℱ
  • 18. Experiments • Synthesis logical forms (for OVERNIGHT) • Generation based on grammar: • Reorder entity instances of one type. • +500 for each domain. Data augmentation (2/2)ℒℱ
  • 19. Experiments • Base model: • and : 0.5 • Pre-trained word: Glove6B • : 100-dim word emb
 200-dim hidden • Training and decoding: • Beam size: {3, 5} • Batch size: {10, 20} • Adam lr: 0.001 α β LMq Model settings • Pseudo baseline, 1/2 loss: • Back-translation (Sennrich et al., 2016) • “Varied Queries” (Guo et al., 2018)
  • 20. ATIS 陳:Results on ATIS are convincing. Simple data augmentation does not help the model. Back-trans fails to treat SQL well. DUAL dramatically makes their model so different. Both Copy-mech & Coarse2Fine suggest the sparsity of natural language.
  • 21. OVERNIGHT OVERNIGHT contains less distinct entities and training samples, 
 that copy is not essential. 陳:I start to wonder, this is the maximum of the Seq2seq capacity.
  • 22. Ablation (1/4) • Cut into: • 50% ; 50% ; 50% 𝒯 𝒯 𝒬 ℒℱ is still essential; ↓ 𝒯 Semi-supervised prev. ATTPTR+DUAL+LF | 79.9 | 89.1
  • 23. Ablation (2/4) ← is still essential; (On ATIS) 𝒯 Ratio of labeled data
  • 24. Ablation (3/4) (On ATIS) • Cut into: • 30% ; • 70% ; • 70% . 𝒯 𝒯 𝒬 ℒℱ more unlabeled data DUAL MLE
  • 25. Ablation (4/4) Choice for validity reward Soft Hard Soft Hard
  • 26. 感想(⼀一⾔言) Untrained model Model trained without MLE Rewards Model trained with MLE Loss Model explored with RL