Storytelling from Structured Data and Knowledge Graphs
ANIRBAN LAHA
PARAG JAIN
ABHIJIT MISHRA
KARTHIK SANKARANARAYANAN
SARAVANAN KRISHNAN
How is the weather this weekend in Atlanta?
Weather Ontology
Database (Relational DB) for Weather
Natural Language Query in Weather Domain
Slight chance of showers on Saturday morning with a high of 31 degrees. Sunny day and clear skies all day Sunday.
…
....
Language Generation
NLG
Query Parser
Tabular
results
SQL
The Nikon D5300 DSLR Camera, which comes in black color features 24.2 megapixels and 3X optical zoom. It also has image stabilization and self-timer capabilities. The package includes lens and Lithium cell batteries.
Product Information
Product Description
Matthew Paige Damon who was born in October 8, 1970 is an American actor, film producer, and screenwriter.
Born Matthew Paige Damon October 8, 1970 Residence U.S. Occupation Actor filmmaker screenwriter
Input
Output
Knowledge Graph summarization
General graph summary:
Hugo Weaving acted in movie Cloud Atlas(as Bill Smoke) along with Tom Hanks(as Zachry) and in movie The Matrix(as Agent Smith). Both the movies were directed by Lana Wachowski.
Query: Show me movies directed by Lana and their lead actors.
Focus Lana
Entity focused summary(Focus Lana):
Lana Wachowski born in 1965 is the director of movies Cloud Atlas(released in 2012) and The Matrix(released in 1999)
Summarization
Headline Generation
Image Captioning
Attorney from Alton files a lawsuit
against himself by mistake
Paraphrasing
L'avocat d'Alton se
poursuit par accident
Machine
Translation
Question
Generation
When did the Lakin firm file a complaint against Alliance Mortgage?
Question Answering
Q: What are the consequences?
A: Emert Wyss had hired four law firms
and now all of them are after his money.
Text-to-Text NLG
Natural Language Generation
Gatt et al., 2017
Multimodal
Multilingual
Data-to-text NLG
{
"answer":
{
"premium": {"$":502.83},
"initial_payment": {"$":100},
"monthly_payment": {"$":85.57}
}
}
The child and his mother:
A curious child asked his mother: “Mommy, why are some of your hairs turning grey?”
The mother tried to use this occasion to teach her child: “It is because of you, dear. Every bad action of yours will turn one of my hairs grey!”
The child replied innocently: “Now I know why grandmother has only grey hairs on her head.”
�
Unstructured Text
Table
Graph
XML
JSON
Data-to-text NLG: A 4D perspective
Sentiment
Emotion
Complexity
Formalness
Tone
Generation Facets
Heuristic
Statistical
Neural
Paradigms
Hybrid
Finance
Healthcare
Practical
(Domain)
Retail
Tasks
Summarization
Insightful Narratives
Report Generation
Interaction & Dialog
Tabular Data Comprehension
Open-ended vs closed generation
Input type
Structured, Unstructured – textual
Image, Video
Cognitive signals – EEG, Eye tracking, MEG
Concept: CS626, IIT Bombay
What this tutorial is NOT about?
What this tutorial is NOT about?
Tutorial Roadmap
PART 1:
PART 2:
PART - 1
Traditional NLG
Statistical and Neural Methods
Evaluation Methods for NLG
Traditional NLG
Rule based NLG
Template based NLG
Current Approaches
Industry Solutions
Shortcomings
Rule based Generation – When and When Not
Source: CS626 NLP, IIT Bombay
Table Description in Natural Language Text: High Level Rules
Name | Birth City |
Albert Einstein | Ulm, Germany |
Enrichment
(Verb phrase)
was born in
Subject
Object
Albert Einstein was born in Ulm, Germany
Rules:
Name | Nationality |
Albert Einstein | Ulm, Germany |
Albert Einstein’s nationality is German ✅
Albert Einstein is from Germany ✅
Exception
Verb ???
nationalized??
Albert Einstein …….. Germany ❌
Step back…
Communicative Goal
Knowledge
Source
Content Planning
Micro planning
Realization
Text
Natural Language Generation Pipeline
Sentence Planning
Linguistic Realization
Reiter at al. 2000
Example:
Communicative Goal
Knowledge
Source
Natural Language Generation Pipeline
Reiter at al. 2000
Matthew Paige Damon who was born in October 8, 1970 is an American actor, film producer, and screenwriter.
Content Planning
Micro planning
Realization
Text
Communicative Goal
Knowledge
Source
Content Planning
Natural Language Generation Pipeline
At this stage we know what we want to talk about .. but still have no idea about how.
Content determination and selection
Content Planning
Natural Language Generation Pipeline
Micro planning
Fakeness alert: For example purpose there is some structure in the sentences, but in reality everything will be in the form of data structures passed from one layer to another. There are no sentences yet!
Sentence aggregation, Lexicalization and referring expression
Content Planning
Natural Language Generation Pipeline
Matthew Paige Damon who was born in October 8, 1970 is an American actor, film producer, and screenwriter.
Micro planning
Matthew Paige Damon(N) born in(VP, TENSE: PAST) October 8, 1970 … American(Adj). … [Actor, filmmaker, screenwriter]
Realization
Realizer
Extremely Simple Template-driven NLG Architecture: Insurance case
Output
Template Manager
Intent – Template mapping
Template Repository
Query: How much should I pay ?
Info 1 (intent) : query(amount(payment)).
Info 2: {
“result":
{
"premium": {"$":502.83},
"initial_payment": {"$":100},
"monthly_payment": {"$":85.57}
}
}
Query Intent ⬄ Template ID
query(amount(payment)) ⬄ all_payment
Template ID : all_payment
NL text : You can choose to pay an initial payment of $ {InitPay} and a monthly payment of $ {MonthPay}, or you can pay a one-time premium of $ {prm}.
Parameters : InitPay : 100, MonthPay:85.57,
prm:502.83
You can choose to pay an initial payment of $100 and a monthly payment of $85.57, or you can pay a one-time premium of $502.83.
If 90% of your customers are asking same 10 questions, you can build a template driven system quickly with a human as fallback.
Else, templates based techniques quickly becomes difficult to manage.
Rule base NLG System: SimpleNLG
[data to realize ] : [Related information]
Realization
Engine
The teacher delivered a lecture while he was in class.
SimpleNLG - Usage
SPhraseSpec sentObj = new SPhraseSpec(nlgFactory);
sentObj.setSubject("John");
sentObj.setVerb("write");
sentObj.setObject("story");
String sentence = realiser.realiseSentence(sentObj);
System.out.println(sentence);
sentObj.getVerbPhrase().setFeature(Feature.TENSE, Tense.PAST);
sentObj.getVerbPhrase().setFeature(Feature.NEGATED, true);
sentObj.getVerbPhrase().setFeature(Feature.PASSIVE, true);
sentence = realiser.realiseSentence(sentObj);
System.out.println(sentence);
“John writes story”
“Story was not written by John”
“Does John write story?”
sentObj.setFeature(Feature.INTERROGATIVE_TYPE,
InterrogativeType.YES_NO);
sentence = realiser.realiseSentence(sentObj);
System.out.println(sentence);
Representative Public Datasets
Other NLG datasets: https://aclweb.org/aclwiki/Data_sets_for_NLG
Heuristic driven NLG Systems
stay
(I John [class:proper-noun]
II New-york [class: proper-noun]
John stays in New-york
https://aclweb.org/aclwiki/Downloadable_NLG_systems
Other Industrial NLG Systems
Shortcomings of Traditional Approaches
Statistical and Neural Methods
Pre-neural Statistical
Neural Methods
Simplified Steps
We will continue explaining recent NLG systems from this pipeline perspective
Content Selection
Content Planning
Surface Realization
Pre-neural
Moving away from Templates…..
Flexible Surface Realization
[Langkilde and Knight, 1998]
WeatherGov Table Format
RECORDS
FIELDS
RECORD TYPE
Generative Modeling Approach
[Liang et al, 2009]
Generative Modeling Approach (2)
[Liang et al, 2009]
Generative Modeling Approach (3)
[Liang et al, 2009]
Coherence
Saliency
Generative Modeling Approach (4)
[Liang et al, 2009]
[Kim and Mooney, 2010]
End-to-end Probabilistic Approach
[Angeli et al, 2010]
End-to-end Probabilistic Approach (2)
[Angeli et al, 2010]
End-to-end Probabilistic Approach (2)
[Angeli et al, 2010]
Activation of Rules
Rule definitions
End-to-end Probabilistic Approach (3)
Simple, but effective
More diverse outputs
More computation!!
[Angeli et al, 2010]
End-to-end Probabilistic Approach (4)
[Angeli et al, 2010]
Using Probabilistic Context-Free Grammars
[Konstas and Lapata 2012]
[Konstas and Lapata 2013]
RECORDS
FIELDS
RECORD TYPE
The grammar captures the structure of the table
Note the difference from parsing
Using Probabilistic Context-Free Grammars (2)
[Konstas and Lapata 2012]
[Konstas and Lapata 2013]
Using Probabilistic Context-Free Grammars (3)
Likelihood
Derived from hypergraph
Language Model
[Konstas and Lapata 2012]
[Konstas and Lapata 2013]
Using Probabilistic Context-Free Grammars (4)
[Konstas and Lapata 2013]
Neural
Sequence to sequence models
Bahdanau et al., 2014
Xu et al., 2015
Rush et al.. 2015
ENCODER
Encoder States
Word Embedding
……
……
Decoder States
Output
Sequence to sequence models
Bahdanau et al., 2014
Xu et al., 2015
Rush et al.. 2015
Decoder States
Output
ENCODER
Encoder States
Word Embedding
……
…
Attention Mechanism
How to use Seq2Seq for structured data?
Matt
Damon
Oct
8
1970
U.S.
actor
filmmaker
screen
writer
…
How to use Seq2Seq for structured data?
Matt
Damon
Oct
8
1970
U.S.
actor
filmmaker
screen
writer
…
Attention
Matt Damon born on Oct 8 is an American actor…
Encoder
Attention
Decoder
Sequence of records…
Record
Sequence of records…
Mei et al. 2016
ENCODER
Encoder States
Word Embedding
……
Decoder States
Output
…
Attention Mechanism
Sequence of records…
Mei et al. 2016
Decoder States
Output
ENCODER
Encoder States
Word Embedding
……
…
Refiner
Helps attention to fix on important records and not be distracted by non-salient records
Prior attention
time independent
Attention Mechanism
57
Matt
Damon
Oct
8
1970
U.S.
actor
filmmaker
screen
writer
…
Attention
Matt Damon born on Oct 8
is an American actor…
Encoder
Attention
Decoder
How to use structural information while encoding?
RECORDS
RECORDS / FIELDS
ATTRIBUTES
VALUES
RECORD TYPE
RECORD TYPE
Capturing hierarchical structure
Jain et al. 2018
Record encoder
Attribute encoder
It’s difficult to remember floccinaucinihilipilification, can I copy?
Nallapati et al. 2016
Miao et al, 2016
Gu et al, 2016
See et al, 2017
Copy actions
Matthew Paige Damon who was born in October 8, 1970 is an American actor, film producer, and screenwriter.
Input
Output
Copy mechanism
Nallapati et al. 2016
Miao et al, 2016
Gu et al, 2016
See et al, 2017
Context
Attention
Encoder
Decoder
Input sequence
At each time step t.
Decide: Generate or copy
Typical approaches for incorporating copy
Copy
Sequence level copy
Word level copy
Conditional
Mixture dist.
Copy/Gen. switch
Shared SoftMax
Gu et al. 2016
Output vocab
Input vocab
SoftMax
See et al. 2017
No explicit supervision
Explicit supervision
Gulcehre et al. 2016
Zhou et al. 2018
Other notable work:
Nallapati et al 2016
Miao et al, 2016
Nema et al. 2018
Conditional LM with structured input
Lebret et al. 2016
Introduced WikiBio dataset
Conditional LM with structured input
Lebret et al. 2016
Introduced WikiBio dataset
Conditional LM with structured input
Lebret et al. 2016
Conditional LM with structured input
Lebret et al. 2016
Conditional LM with structured input
Lebret et al. 2016
Conditional LM with structured input
Lebret et al. 2016
Conditional LM with structured input
Lebret et al. 2016
Conditional LM with structured input
Lebret et al. 2016
Conditional LM with structured input
Lebret et al. 2016
Conditional LM with structured input
Lebret et al. 2016
Lebret et al. 2016
Conditional LM with structured input
Conditional LM with structured input
Lebret et al. 2016
Decoder
Matt Damon born on Oct 8
is an American actor…
Micro attention
Fused Attention
Matt
Damon
Oct
8
actor
Luciana
Bozan
writer
K1
K2
KM
…..
α
[f(K1); Born]
[f(K2); Occupation]
[f(KM); spouse]
…..
Macro attention
Decoder State
β
Nema et al. 2018
Liu et al. 2018
Hierarchical structure aware encoding
78
Matthew
Matthew Paige
Matthew Paige Damon
Matthew Paige Damon (born October 8,
Matthew Paige Damon (born October 8, 1970)
Matthew Paige Damon (born October 8, 1970) is an American
Matthew Paige Damon (born October 8, 1970) is an American actor,
Matthew Paige Damon (born October 8, 1970) is an American actor, film producer,
Matthew Paige Damon (born October 8, 1970) is an American actor, film producer, and screenwriter.
Stay on and never look back
FORGET GATE: decides till when to stay on a field
Context vector seen at last time-step
79
Modeling Stay-On Behaviour
Nema et al. 2018
Introduced German & French version of WikiBio
FORGET GATE: decides till when to stay on a field
(Soft) Orthogonalize the context vector once it is time to forget
80
Modeling Never-Look-Back
Modified
Nema et al. 2018
Micro attention
Fused Attention
Matt
Damon
Oct
8
actor
Luciana
Bozan
writer
K1
K2
KM
[f(K1); Born]
[f(K2); Occupation]
[f(KM); spouse]
…..
…..
Macro attention
Decoder
Matt Damon born on Oct 8
is an American actor…
Gated Orthogonalization
Decoder State
β
α
Nema et al. 2018
Order-planning
Sha et al. 2018
Which field are we talking about?
ROTOWIRE Dataset
Matthew Paige Damon who was born in October 8, 1970 is an American actor, film producer, and screenwriter.
Wiseman et al. 2017
Wiseman et al. 2017
Introduced ROTOWIRE & SBNATION dataset
Content selection and planning
Text generation
Content selection and Planning
Puduppully et al. 2019
Content Selection Gate
Puduppully et al. 2019
Content selection and Planning
Puduppully et al. 2019
Content Planning
Puduppully et al. 2019
Some issues…
| Template based generation | End2End methods |
Interpretable | ✅ You can check which template was picked. | Difficult. Needs a lot of analysis to get insights. |
Output control | ✅You can select which template makes sense. | Almost None |
Scalable | Needs a lot of templates. | ✅ Can scale well (in domain/task) |
Neural Templates for Text Generation
Wiseman et al. 2018
HMM vs HSMMs (Hidden Semi-Markov Models)
HMM
HSMM
Wiseman et al. 2018
A Conditional (Neural) HSMM
Parameterize probabilities with neural components:
Wiseman et al. 2018
Knowledge Graph to Text
Knowledge Graph to text
Neil Armstrong
United States
Astronaut
Wapakoneta
occupation
birthPlace
location
nationality
<Neil Armstrong, occupation, Astronaut>
RDF triples
Knowledge Graph
Zhu et al. 2019
Knowledge Graph to text
Neil Armstrong
United States
Astronaut
Wapakoneta
occupation
birthPlace
location
nationality
<Neil Armstrong, occupation, Astronaut>
<Neil Armstrong, nationality , United States>
<Neil Armstrong, birthPlace, Wapakoneta>
<Wapakoneta, location, United States>
RDF triples
Knowledge Graph
Zhu et al. 2019
Knowledge Graph to text
Neil Armstrong was an American astronaut in Wapakoneta, a city in United States.
Neil Armstrong
United States
Astronaut
Wapakoneta
birthPlace
location
nationality
<Neil Armstrong, occupation, Astronaut>
<Neil Armstrong, nationality , United States>
<Neil Armstrong, birthPlace, Wapakoneta>
<Wapakoneta, location, United States>
RDF triples
Knowledge Graph
Triple to text
Zhu et al. 2019
Minimizing KL divergence
Less loss
Allows fake/diverse/creative generation
But, low quality
Zhu et al. 2019
Minimizing inverse KL divergence
Zhu et al. 2019
Training
Zhu et al. 2019
Capture relationships�� between and within ��triples?
Triple encoder
Trisedy et al. 2018
Triple encoder
Trisedy et al. 2018
Triple encoder
Trisedy et al. 2018
Tutorial Roadmap
PART 1:
PART 2:
Evaluation Methods
Overlap based Metrics
Intrinsic Evaluation
Human Evaluation
Expectation from a Good Evaluation Metric
Perfect
Fair
Acceptable
Nonsense
fluency
adequacy
Overlap Based Metrics
BLEU
the better it is.
[Papineni et al., 2002]
BLEU evaluation
[Papineni et al., 2002]
Consider this….
[Papineni et al., 2002]
Modified n-gram precision
[Papineni et al., 2002]
Brevity Penalty
[Papineni et al., 2002]
Final BLEU score
[Papineni et al., 2002]
Evaluation of data-to–text NLG: More BLUEs for BLEU
ROUGE
[Lin 2004]
Variants of ROUGE
[Lin 2004]
Other Metrics: METEOR, TER, WER
Other Metrics: NIST
Problems with overlap based metrics
BLEU not perfect for evaluation…..
[Liu et al., 2016]
ROUGE comes at a cost….
Slide credit: CS224n, Stanford
[Paulus et al., 2017]
Summary...
Slide credit: CS224n, Stanford
Intrinsic Evaluation
Document Similarity techniques
BERT / Skip thought / Universal Encoder
Sentences
RNN Encoder
Decoder
Decoder
Previous Sent
Next Sent
Sentence Vector
Sentences
LSTM / GRU
Bidirectional
Decoder
Next Sent
Task specific
Linear combination
Of hidden
representations
Sentence Vector
Sentences
Unidirectional
Transformers
Decoder
Next Sent
Sentence Vector
Sentences
Bidirectional
Transformers
Decoder
Next Sent
Sentence Vector
Skip-thought
ELMo
BERT
GPT
Problems with Document Similarity
Next we discuss intrinsic metrics like complexity, grammaticality,�coherence…..���These metrics DO NOT require reference text!!!!
Text Complexity (Lexical Complexity)
It is possible that this is tough sentence. =>
{ it:1, is: 13, possible: 4, that: 1, this: 1, tough: 12, sentence: 4} = 34 / 8 = 4.25
Intuition: More polysemy + less context = harder to disambiguate
Adaptation and mitigation efforts must therefore go hand in hand.
Intuition: Define semantic roles
It is possible that this is tough sentence.
[Mishra et al., 2018]
Text Complexity (Readability)
[Mishra et al., 2018]
Text Complexity (Syntactic Complexity)
The structural complexity of the sentence is 15/7 = 2.14
[Mishra et al., 2018]
Text Complexity (Syntactic Complexity)
The non-terminal to terminal ratio is thus 10 / 9 = 1.11
[Mishra et al., 2018]
Text Complexity (Syntactic Complexity)
The house is guarded by the dog that is taken care of by the homeowner.
[Mishra et al., 2018]
Grammaticality (types of grammar error)
Grammaticality (solutions)
Discourse Coherence
Human Evaluation
Human judgement scores typically considered in NLG
“Ah, go boil yer heads, both of yeh. Harry—yer a wizard.”
INPUT: <Einstein, birthplace, Ulm> | OUTPUT: Einstein was born in Florence
The most important part of an essay is the thesis statement. Essays can be written on various topics
from domains such as politics, sports, current affairs etc. I like to write about Football because it is the
most popular team sport played at international level.
A neutron walks into a bar and asks how much for a drink. The bartender replies “for you no charge.”
MasterCard: "There are some things money can't buy. For everything else, there's MasterCard."
MasterCard: ”You can use this for shopping."
vs
Problems with human evaluation
Slide credit: CS224n, Stanford
PART - 2
Hybrid Methods
Role of Semantics and Pragmatics
Problems beyond Simple Generation
Conclusion and Future Directions
Hybrid Methods�
Scalable Micro-planned ��Generation of Discourse��from Structured Data
Structured data input formats
Laha et al. 2018
Central idea?
Laha et al. 2018
Method
Laha et al. 2018
Canonicalization
name | birth place | birth date | wife |
Albert Einstein | Ulm, Germany | 14 March 1879 | Elsa Lowenthal |
name | birth place |
Albert Einstein | Ulm, Germany |
name | birth date |
Albert Einstein | 14 March 1879 |
name | wife |
Albert Einstein | Elsa Lowenthal |
“Albert Einstein”
“birth place”
“Ulm, Germany”
“Albert Einstein”,
“birth date”
“14 March 1879”
“Albert Einstein”,
“wife”,
“Elsa Lowenthal”
< PERSON birth place GPE >
< PERSON birth date DATE >
< PERSON wife PERSON >
Splitting
Flattening
NE tagging
Flattening
Flattening
NE tagging
NE tagging
Conversion from various formats to triples made of binary relations among two entities types
Laha et al. 2018
Data Creation for Keyword/Triple to Text Generation
EXAMPLE:
Input:
AlbertEinstein, HasWonPrize, NobelPrize
Segmentation:
Albert Einstein, has won prize, Nobel prize
Concatination:
Albert Einstein has won prize Nobel prize
Post-process:
Albert Einstein has won Nobel prize
DeLex: PERSON has won AWARD
Concatenation and Grammar Correction
Triples from rich KBs
(Freebase, DBPedia, Yago)
Entity tagging
Original Parallel
Original
Triples
Synthesized
Sentences
Delexicalized Parallel
DeLex
Triples
DeLex
Sentences
EXAMPLE:
Input:
Obama was born in Honolulu
OpenIE:
<Obama, born in, Honolulu>
Original parallel instance:
Src: <Obama, born in, Honolulu>
Tgt: Obama was born in Honolulu
Domain agnostic parallel instance:
Src: <PERSON, born in, LOCATION>
Tgt: PERSON was born in LOCATION
Simple sentences from webscale corpus (e.g., Wikipedia Dump)
Open Information Extraction
Entity tagging
Original Parallel
Extracted
Triples
Original
Sentences
Delexicalized Parallel
DeLex
Triples
DeLex
Sentences
Combinations
of Possible
Entity
Types
VerbNet
Verbs
SVO
Template
Triples
Sentences
EXAMPLE:
Input : “go”
Possible Entities:
PERSON, LOCATION, WORK OF ART …
Possible Sentences (after correction):
1. PERSON goes to LOCATION
2. PERSON goes to WORK OF ART
…
N. WORK OF ART goes to PERSON
Best sentence:
PERSON goes to LOCATION
Concatenation + Correction +LM based ranking
Simple sentences from web corpus (e.g., Wikipedia Dump)
Stemming and Stopword
Removal
Entity tagging
Original Parallel
Extracted
Keywords
Original
Sentences
Delexicalized Parallel
DeLex
Triples
DeLex
Sentences
EXAMPLE:
Input :
Albert Einstein has won Nobel prize
Preprocessing:
Albert Einstein win Nobel Prize
Original parallel instance:
Src: <Albert Einstein, win, Nobel Prize>
Tgt: Albert Einstein has won Nobel prize
Domain agnostic parallel instance:
Src: PERSON win AWARD
Tgt: PERSON has won award
Laha et al. 2018
Simple Language Generation: Triple2Text
<Sachin Tendulkar, born in, India>
<PERSON, born in, GPE>
Seq2Seq
PERSON was born in GPE.
{Sachin Tendulkar: PERSON,
India: GPE}
Sachin Tendulkar was born in India.
Laha et al. 2018
MorphKey2Text: Rich Parallel Data extraction
Albert Einstein married Elsa Lowenthal in 1919 .
PERSON NOUN married VERB PERSON NOUN DATE NOUN
1. Coarse POS Tagging
2. NE Replacement
3. Stopword Removal
1. Fine-grained POS Tagging
2. POS retention for VERBs
3. NE Replacement
PERSON marry VBD PERSON in DATE
Source
Target
Original Sentence
Laha et al. 2018
Simple Language Generation: MorphKey2Text
Laha et al. 2018
Ranking of simple sentences
Fluency
Adequacy
Laha et al. 2018
Sentence Compounding/Aggregation (rule based)
split
Jordan played basketball
Jordan played football
<Jordan, played, basketball>
<Jordan, played, football>
Jordan played basketball and football.
e11 == e21 && rvp1 == rvp2
Rule: e11 rvp1 e12 and e22
<e11 rvp1 e12>
<e21 rvp2 e22>
Example
Laha et al. 2018
Sentence Compounding/Aggregation (rule based)
split
Jordan played basketball
Jordan represented USA
<Jordan, played, basketball>
<Jordan, represented, USA>
Jordan played basketball and represented U.S.A.
e11 == e21
Rule: e11 rvp1 e12 and rvp2 e22
<e11 rvp1 e12>
<e21 rvp2 e22>
Example
Laha et al. 2018
Coreference Replacement(for entities)
Jordan played basketball and represented USA. Jordan was born in New York.
Jordan<PERSON> played basketball and represented USA<GPE>. Jordan<PERSON> was born in New York<GPE>.
Jordan<PERSON>
Gender detection
He
Jordan played basketball and represented USA. He was born in New York.
Laha et al. 2018
Step-by-Step: Separating Planning from Realization in Neural Data-to-Text Generation�NAACL 2019
Moryossef et al. 2019
Triple-to-text Variations (Planning)
John, who was born in London, works for IBM.
John, who works for IBM, was born in London.
IBM employs John, who was born in London.
IBM employs John. John was born in London.
Moryossef et al. 2019
Triple-to-Text Variations (Realization)
One-way (Sentence-split):
Verbalization:
IBM employs John. John was born in London.
IBM employs John. He was born in London.
Moryossef et al. 2019
Issues with end-to-end Neural Approaches
Moryossef et al. 2019
Remedy: Two-step Approach
Text Planning
Plan Realization
Moryossef et al. 2019
Triple-to-Plan Generation
John, residence, London
England, capital, London
John, residence, London
John, occupation, Bartender
John, residence, London
England, capital, London
John, occupation, Bartender
Moryossef et al. 2019
Plan-to-Text Generation
Input Sequence:
Output Sequence:
Linearization
Seq2seq + Copy
Text Plan
Moryossef et al. 2019
Key Takeaway
Faithfulness to the input is improved compared to end-to-end Neural Approaches!!!
Also known adequacy or correctness
Moryossef et al. 2019
Gaps
Moryossef et al. 2019
Microplanning for ��Sentence Realization from ��Data
Verb Selection
Name | Work City | Occupation | Award |
Albert Einstein | Ulm, Germany | Physicist | Nobel Prize |
Subject
Complement
Object
Albert Einstein worked in Ulm, Germany
Albert Einstein received Nobel Prize
Zhang et al. 2018
Often verb prediction is important
Input: PERSON, CITY -> stay / work
Input: PERSON, AWARD -> receive
Data-driven Solution to Verb Selection
Raw
Corpus
(WSJ, Reuter, Wiki)
Triples
Triple
Extraction
(OpenIE)
Tagged
Triples
1:<e1, e2: verb>
2: <e1, e2: verb>
3: <e1, e2: verb>
…
N: <e1, e2: verb>
Tagged entities
and Verbs
Entity
Tagging
and
Delexicalization
POS and
Verb selection
Training data
Model
Massive
Classification
(MLE, Neural)
Revenue rose highly by 13%
<Revenue, rose by, 13%>
<VALUE rose by PERCENTAGE>
<VALUE rise PERCENTAGE>
<VALUE , PERCENTAGE: rise >
Entity1, Entity2
Verb
training
test
Zhang et al. 2018
Preposition selection
<work, location: at>
<join, position_holder : as>
<position_holder, organization : of>
Role of Semantics and Pragmatics
Semantics and Pragmatics in NLG
What does John do for a living? ⬄ What is john’s job?
(Not merely lexical / syntactic paraphrasing)
Restaurant | Food Type |
China Town | Chinese |
China town’s food type is Chinese
VS
China town serves Chinese food
Semantics: Situation agnoistic but deeper
Pragmatics: May vary according to situation, depends on who is listening
what is the environment
NLG Under Pragmatic Constraints
PAULINE: System Overview
Topic
Collection
Topic Organization
Realization
Input topics
Text
S
T
R
A
T
E
G
I
E
S
Pragmatic aspects
of conversation
Hybrid System for Enriching NLG with Pragmatic Information
Embedding
Attention
Input tuple
Generated Sentence
Speaker
Model
Embedding
Multiclass
Multitask
Classifier
Input tuple
Listener
Model
Reconstruction based model
base 🡪 vanilla seq2seq
R🡪 reconstruction based model
Example output (Shen et al, 2019)
Input: NAME [FITZBILLIES], EATTYPE [COFFEE SHOP], FOOD [ENGLISH], PRICERANGE [CHEAP], CUSTOMERRATING [5 OUT OF 5], AREA [RIVERSIDE], FAMILYFRIENDLY [YES] |
Human written A cheap coffee shop in riverside with a 5 out of 5 customer rating is Fitzbillies. Fitzbillies is family friendly and serves English food. |
Basic Seq2Seq Fitzbillies is a family friendly coffee shop located near the river. |
Reconstructor-based pragmatic system Fitzbillies is a family friendly coffee shop that serves cheap English food in the riverside area. It has a customer rating of 5 out of 5. |
Note:
Problems beyond Simple Generation
Controllable Text Generation
Argument Generation
Persuasive Text Generation
Theme / Topic based Generation
Creative Storytelling
Controllable Text Generation
Key Goal of “Strong AI”
Source: https://www.slideshare.net/kimveale/building-a-sense-of-humour-the-robots-guide-to-humorous-incongruity
Configurable Personalities
Set Humor to 75%
Interstellar (2014)
You want 55?
Confirmed. Self destructing in
10, 9, 8 …
Make that 60?
60% confirmed
Knock Knock…
Controllable Text Transformation – System overview
Transformer
Input Text
Transformed Text
{Style1:Value1, Style1:Value2, …, StyleN:ValueN}
“A deep learning server needs at least 32 GB of RAM and an NVIDIA GPU”
{Wording: “Formal”, Sentiment: “Negative”, Word Count: “<30”}
“A server with having less than 32 GB of RAM, without an NVIDIA GPU is not recommended for running deep learning algorithms.”
(Control Intention: The user wants cautionary, yet formal text to be generated)
Control-based Text Transformation
Examples:
Sentence: The movie is terrible
Transformation: It is messy, uncouth, incomprehensible, vicious and absurd.
(Lexical, Sentiment Intensity, Formal, Complex)
Sentence: The movie is terrible
Transformation: A somewhat crudely constructed and hence, quite an unwatchable movie (it was)
(Syntactic, Semantic, Semi-Formal)
Sentence: The movie is terrible
Transformation: You sit through these kinds of movies because the theatre has air conditioning
(Pragmatic, Sentiment Intensity, Informal)
Lexical
Syntactic
Semantic
Pragmatic
Tone
Formalness
Sentiment
Emotion
Complexity
Linguistic
Perceptual
Finance
Healthcare
Retail
Practical
(Domain)
Controls
Need for Unsupervised Methods
Unsupervised Approaches: Background
Unsupervised Text Formalization (Jain et al, 2018)
as input during runtime
Central Idea (Jain et al, 2018)
Exploration
(generate training data)
Exploitation
(retrain model)
<Sentences from unlabeled corpora, model>
<Sampled paraphrases, control values>
Model
<Model>
Control value
Input Sentence
Transformed Sentence
Training
Testing
Controllable Generation Architecture (Jain et al, 2018)
Argument Generation
IBM Project Debater
Project Debater
Human Debater
Grand Challenge
like Deep Blue, Jeopardy!
Man vs Machine
Debate
(Feb 11, 2019)
What is debating?
Debate Topic: “We should ban smoking”
For the Motion:
Against the Motion:
Smoking causes cancer
Almost half the deaths (48.5%) from 12 different types of cancer combined are attributable to cigarette smoking, according to a study by researchers from the American Cancer Society and colleagues.
Smoking creates jobs
As tobacco smoking is a common activity, there are currently 1% of the population in the country who are involved in the growing, manufacturing and ultimately distribution of tobacco in various forms.
Claim
Evidence
How Project Debater works?
Challenges in Debate Speech Construction
Project Debater is here at ACL 2019!!!!
Please visit IBM Booth for a demo
Persuasive Text Generation
Persuasion
System Architecture [PersuAIDE!]
[Munigala et al, 2018]
Example outputs
[Munigala et al, 2018]
Theme / Topic based Text ��Generation
Overview
[Lau et al, 2017]
Approach�(Lau et al, 2017)
Example Generated Sentences
[Lau et al, 2017]
Creative Storytelling
Desiderata for Storytelling
[Fan et al., 2018]
Generating Story from a prompt [Fan et al., 2018]
Two main challenges:
Tackling challenge 1….
Self-attention at a single head
Multi-head self-attention
[Fan et al., 2018]
Tackling challenge 2….
[Fan et al., 2018]
Conclusion and Future Directions
Holy Grail of data-to-text Systems
Data Scientist
Artist
Psychologist
+
+
Future Goals
Short-term
Mid-term
Long-Term
In a couple of years
In 5-10 years
In at least a decade
Cross-lingual Inference (Short-term Goal)
Leonardo di ser Piero da Vinci was an Italian painter and scientist.
Léonard de Piero da Vinci était un peintre et scientifique italien.
Leonardo di ser Piero da Vinci era un pittore e scienziato italiano.
English
French
Italian
Entity-focused Knowledge Graph Summarization (Short-Term)
General graph summary:
Hugo Weaving acted in movie Cloud Atlas(as Bill Smoke) along with Tom Hanks(as Zachry) and in movie The Matrix(as Agent Smith). Both the movies were directed by Lana Wachowski.
Query: Show me movies directed by Lana and their lead actors.
Focus Lana
Entity focused summary(Focus Lana):
Lana Wachowski born in 1965 is the director of movies Cloud Atlas(released in 2012) and The Matrix(released in 1999)
Cross-lingual Learning (Mid-term Goal)
Leonardo di ser Piero da Vinci (15 April 1452 – 2 May 1519), more commonly Leonardo da Vinci or simply Leonardo, was an Italian Renaissance polymath whose areas of interest included invention, painting, sculpting, architecture, science, music, mathematics, engineering, literature, anatomy, geology, astronomy, botany, writing, history, and cartography.
English
French
Hierarchical Table Understanding (Mid-Term)
Data++ To Text (Mid-term)
name | birth place | birth date | wife |
Albert Einstein | Ulm, Germany | 14 March 1879 | Elsa Lowenthal |
+
Albert Einstein (14 March 1879 – 18 April 1955) was a German-born theoretical physicist[5] who developed the theory of relativity, one of the two pillars of modern physics (alongside quantum mechanics). His work is also known for its influence on the philosophy of science. He is best known to the general public for his mass–energy equivalence formula, which has been dubbed "the world's most famous equation". He received the 1921 Nobel Prize in Physics "for his services to theoretical physics, and especially for his discovery of the law of the photoelectric effect", a pivotal step in the development of quantum theory.
Albert Einstein, a theoretical physicist born on 14 March 1879 in Ulm, Germany is prominently known for developing the theory of relativity. Here we can see him interacting with Mahatma Gandhi.
Table
Image
Text
Interesting Narratives Generation from Data (Long-term)
Player | Goals | World Cup Wins | Nationality |
Messi | 419 | 0 | Argentina |
Ronaldo | 311 | 0 | Portugal |
Zidane | 155 | 1 | France |
Even though Zidane has scored lesser goals than both Messi and Ronaldo, he has won the World Cup once compared to others.
More examples of Interesting Facts :
“Messi going goal-less in a match”
“Indian football team scoring 10 goals against Brazil”
“3 red cards in a single match”
Anomalies
Two parts to the problem:
Persuasive Argument Generation from Data (Long-Term)
OnePlus 7 Pro has a better camera and with larger memory space to capture all
your holiday photos in high quality without the fear of running out of space
This is possible through rules and templates in limited/restricted settings!!
Can we do in more generalized way across domains??
https://sites.google.com/view/acl-19-nlg/
Tutorial Website:
THANK YOU
References
References
References
References
References
References
References
References
References
References
References
References