SlideShare a Scribd company logo
1 of 40
Download to read offline
SNLP Presentation
Sarah Saneei
Studying master of
Computational Linguistics
Neural Text Generation in Stories using
Entity Representation as Context
Elizabeth Clark Yangfeng Ji Noah A. Smith
How was the idea born?
Neural Text
Generation in
Stories using
Entity
Representation
as Context
RNN
Topical inf
Neural Models
for Text Generation
S2SA Story Generation
Inspired by Ref.
exp. Generation
& Entity Prediction
Defined by
authors
Mention Generation
entity ~
coherence
Centering Theory
EntityNLMEntity-related Generation
Used for coref. , Lang.
Model & scoring
How was the idea born?
Neural Text
Generation in
Stories using
Entity
Representation
as Context
Topical inf
Neural Models
for Text Generation
Story Generation
Inspired by Ref.
exp. Generation
& Entity Prediction
Defined by
authors
Mention Generation
~
coherence
Centering Theory
Entity-related Generation
Used for coref. , Lang.
Model & scoring
Model Description
• Entity-based generation model (ENGEN)
• Combines 3 sources of contextual information for text generation
• Each of these types of info is encoded in vector form
ENGEN
Context
from
entities
Content
of current
sentence
Context
from
previous
sentence
Model Description
• Entity-based generation model (ENGEN)
• Combines 3 sources of contextual information for text generation
• Each of these types of info is encoded in vector form
ENGEN
Context
from
entities
Content
of current
sentence
Context
from
previous
sentenceℎ 𝑡,𝑖
𝑒𝑡,𝑖
𝑝𝑡,𝑖
Model Description
ENGEN
Context
from
entities
Content
of current
sentence
Context
from
previous
sentenceℎ 𝑡,𝑖
𝑒𝑡,𝑖
𝑝𝑡,𝑖
• Every entity is assigned a vector representation
• Update every time the entity mentioned
• Appropriate for generating narrative stories
• Characters develop and change
• Each time m+1 options (why?)
Model Description
ENGEN
Context
from
entities
Content
of current
sentence
Context
from
previous
sentenceℎ 𝑡,𝑖
𝑒𝑡,𝑖
𝑝𝑡,𝑖
• When an entity is selected, its vector is assigned to
• :
• Should not refer to an entity
• Rep. of most recently mentioned entity
• Should refer to a new entity
• Generate from a normal dist.
• has been generated
• Entity rep. update base on
𝑒 𝑐𝑢𝑟𝑟𝑒𝑛𝑡
𝑤𝑡
𝑒 𝑐𝑢𝑟𝑟𝑒𝑛𝑡
𝑤𝑡
ℎ 𝑡
Model Description
ENGEN
Context
from
entities
Content
of current
sentence
Context
from
previous
sentence
S2SA
ENTITYNLM
Capture local
Contextual
features
Model Description
ENGEN
Context
from
entities
Content
of current
sentence
Context
from
previous
sentence
S2SA
ENTITYNLM
Capture local
Contextual
features
• No extra param
• : Combined context vector use to generate
by calculating probability of each word type
in the vocabulary
𝑐𝑡 𝑤𝑡
Eq. 6
Learning
• Training objective : maximize
All the model’s paramAll decisions at timestep t
Learning
• Training objective : maximize
• The model
• Predicts the word
• The entity info. associated with that word
• Same training method used for ENTITYNLM
• Requires training data annotated with mention and coref. Info. (entity cluster)
All the model’s paramAll decisions at timestep t
(whether it is part of a entity mention,
if so the entity the mention refers to,
the length of the mention, and the
word itself)
Data
• Training data: 312 adventure books
from the Toronto Book Corpus
• Development: 39 books
• Test: 39 books
• Divide to segments (include up to 50 sentences)
• Used Stanford CoreNLP system
• In coref. results:
Entity mentions: even more than 70
keep only 3 word or fewer(95% of mentions)
others replace by head word
All tokens were down cased
Numbers > NUM
Frequency less than 10 > UNK
1
Mention Generation
2
Pairwise Sentence Selection
3
Sentence Generation
EVALUATIONS
1/ Experiment: Mention Generation
• Given a text and a slot to be filled with an entity mention,
• A model must choose among all preceding entity mentions
and the correct mention
• To perform well:
• Choose both the entity and the words used to refer to it
• Requires the greatest precision:
• Possible to select the correct mention
• But not the correct cluster and vice versa
select between all the previous entity mentions
(Emily, the dragon, Seth, and her)
and the correct mention (she).
1/ Experiment: Mention Generation
• Given a text and a slot to be filled with an entity mention,
• A model must choose among all preceding entity mentions
and the correct mention
S2SA does not model entities
1/ Experiment: Mention Generation
• Size of candidate list can exceed 100
• Reporting MAP (Mean Average Precision) to aggregate
across contexts of all lengths
• Using language model scores to rank candidates
1/ Experiment: Mention Generation
• Size of candidate list can exceed 100
• Reporting MAP (Mean Average Precision) to aggregate
across contexts of all lengths
• Using language model scores to rank candidates
Baselines:
• S2SA
• ENTITYNLM
• Reverse order (rank mentions by recency)
1/ Experiment: Mention Generation
Baselines:
• S2SA
• ENTITYNLM
• Reverse order (rank mentions by recency)
Higher MAP > better system
1/ Experiment: Mention Generation
• Line 1: distance alone not an effective heuristic for mention generation
(but useful in coref.)
• Line 4 and 2: benefit of adding entity representations for text generation
• Line 3 and 4: local context also gives small boost
1
Mention Generation
2
Pairwise Sentence Selection
3
Sentence Generation
EVALUATIONS
2/ Experiment: Pairwise Sentence Selection
• Inspired by tests of coherence
• to assess text generation automatically
• without human evaluation
• Model is generative
• Can assign scores to candidate sentences, given a context
2/ Experiment: Pairwise Sentence Selection
Inputs:
• 49 sentences of preceding context
• Two choices:
• The actual 50th
• A distractor sentence (randomly chosen from next 50 sentences)
• Random baseline achieve 50% accuracy
• Not a trivial task:
• Distractor: similar lang., chars, topics
• Relatively nearby (in 2% cases, the very next sentence)
2/ Experiment: Pairwise Sentence Selection
Inputs:
• 49 sentences of preceding context
• Two choices:
• The actual 50th
• A distractor sentence (randomly chosen from next 50 sentences)
48 lines away
10 lines away
2/ Experiment: Pairwise Sentence Selection
To select
• Model scores each of two based on
• Its probability on words
• All entity-related info. (Eq 6)
48 lines away
10 lines away
2/ Experiment: Pairwise Sentence Selection
To select
• Model scores each of two based on
• Its probability on words
• All entity-related info. (Eq 6)
Ran this pairwise decision 5 times and average the performance
• Different set of random distractors
2/ Experiment: Pairwise Sentence Selection
To select
• Model scores each of two based on
• Its probability on words
• All entity-related info. (Eq 6)
Ran this pairwise decision 5 times and average the performance
• Different set of random distractors
2/ Experiment: Pairwise Sentence Selection
To select
• Model scores each of two based on
• Its probability on words
• All entity-related info. (Eq 6)
Ran this pairwise decision 5 times and average the performance
• Different set of random distractors
• Unlike the mention generation task
• S2SA beats ENTITYNLM
• Importance of local context
2/ Experiment: Pairwise Sentence Selection
To select
• Model scores each of two based on
• Its probability on words
• All entity-related info. (Eq 6)
Ran this pairwise decision 5 times and average the performance
• Different set of random distractors
• Unlike the mention generation task
• S2SA beats ENTITYNLM
• Importance of local context
Consistency
(regardless
of the
distance of
distractors)
1
Mention Generation
2
Pairwise Sentence Selection
3
Sentence Generation
EVALUATIONS
3/ Human evaluation: Sentence Generation
• Best measure of the quality
• Among AMTs (Amazon Mechanical Turkers)
• Americans
• Completed over 1000 tasks
• Over 95% task acceptance rate
• 11 selected
3/ Human evaluation: Sentence Generation
• Best measure of the quality
• Among AMTs (Amazon Mechanical Turkers)
• Americans
• Completed over 1000 tasks
• Over 95% task acceptance rate
• 11 selected
• Input:
• Short excerpt from a story
• Two generated sentences (ENGEN & entity-unaware S2SA)
• Asking them to “Choose a sentence to continue the story” and explain
why
• Not primed by “focus on entities”
3/ Human evaluation: Sentence Generation
• Subset of 50 randomly selected text
• Final 60 words of segments selected
• Same for model
• Generated 100 sentences and choose the best one (ranked with 5-gram)
3/ Human evaluation: Sentence Generation
• Subset of 50 randomly selected text
• Final 60 words of segments selected
• Same for model
• Generated 100 sentences and choose the best one (ranked with 5-gram)
• Results
• 27 of the passages > ENGEN
• 23 > S2SA
• Many cases of same scores (both would have worked)
3/ Human evaluation: Sentence Generation
• Reasons:
• ENGEN > Connection between pronouns
• ENGEN> Mismatch in entities (starting with “she” while no female
character exists)
• S2SA > new proper noun (gives some context of characters of the story)
• Importance the ability to generate new entities
• Move the plot forward
• Fit better with “the theme” or “the tone”
• Dialogue vs. descriptive sentence
• Statement vs. question
• Social knowledge
3/ Human evaluation: Sentence Generation
3/ Human evaluation: Sentence Generation
“the introduction makes the man
sound like he is a stranger,
so ‘I’m proud of you’
seems out of place.”
1
Mention Generation
2
Pairwise Sentence Selection
3
Sentence Generation
EVALUATIONS
Ref.
http://ling.uni-konstanz.de/pages/home/romero_courses/sose09/216/Centering-PragmII.pdf
https://homes.cs.washington.edu/~nasmith/papers/clark+ji+smith.naacl18.pdf
Thanks for your attention :)

More Related Content

What's hot

Tutorial on query auto completion
Tutorial on query auto completionTutorial on query auto completion
Tutorial on query auto completionYichen Feng
 
Online Learning to Rank
Online Learning to RankOnline Learning to Rank
Online Learning to Rankewhuang3
 
Search Accuracy Metrics and Predictive Analytics - A Big Data Use Case: Prese...
Search Accuracy Metrics and Predictive Analytics - A Big Data Use Case: Prese...Search Accuracy Metrics and Predictive Analytics - A Big Data Use Case: Prese...
Search Accuracy Metrics and Predictive Analytics - A Big Data Use Case: Prese...Lucidworks
 
Automatically Build Solr Synonyms List using Machine Learning - Chao Han, Luc...
Automatically Build Solr Synonyms List using Machine Learning - Chao Han, Luc...Automatically Build Solr Synonyms List using Machine Learning - Chao Han, Luc...
Automatically Build Solr Synonyms List using Machine Learning - Chao Han, Luc...Lucidworks
 
RecSys 2015 Tutorial - Scalable Recommender Systems: Where Machine Learning m...
RecSys 2015 Tutorial - Scalable Recommender Systems: Where Machine Learning m...RecSys 2015 Tutorial - Scalable Recommender Systems: Where Machine Learning m...
RecSys 2015 Tutorial - Scalable Recommender Systems: Where Machine Learning m...Joaquin Delgado PhD.
 
Searching with vectors
Searching with vectorsSearching with vectors
Searching with vectorsSimon Hughes
 
Vectors in Search - Towards More Semantic Matching
Vectors in Search - Towards More Semantic MatchingVectors in Search - Towards More Semantic Matching
Vectors in Search - Towards More Semantic MatchingSimon Hughes
 
Recommender systems
Recommender systemsRecommender systems
Recommender systemsTamer Rezk
 
Replicable Evaluation of Recommender Systems
Replicable Evaluation of Recommender SystemsReplicable Evaluation of Recommender Systems
Replicable Evaluation of Recommender SystemsAlejandro Bellogin
 
Recommender Systems! @ASAI 2011
Recommender Systems! @ASAI 2011Recommender Systems! @ASAI 2011
Recommender Systems! @ASAI 2011Ernesto Mislej
 
Aspect Opinion Mining From User Reviews on the web
Aspect Opinion Mining From User Reviews on the webAspect Opinion Mining From User Reviews on the web
Aspect Opinion Mining From User Reviews on the webKarishma chaudhary
 
Tag based recommender system
Tag based recommender systemTag based recommender system
Tag based recommender systemKaren Li
 
Arabic Question Answering: Challenges, Tasks, Approaches, Test-sets, Tools, A...
Arabic Question Answering: Challenges, Tasks, Approaches, Test-sets, Tools, A...Arabic Question Answering: Challenges, Tasks, Approaches, Test-sets, Tools, A...
Arabic Question Answering: Challenges, Tasks, Approaches, Test-sets, Tools, A...Ahmed Magdy Ezzeldin, MSc.
 
Summary of a Recommender Systems Survey paper
Summary of a Recommender Systems Survey paperSummary of a Recommender Systems Survey paper
Summary of a Recommender Systems Survey paperChangsung Moon
 
Answer Selection and Validation for Arabic Questions
Answer Selection and Validation for Arabic QuestionsAnswer Selection and Validation for Arabic Questions
Answer Selection and Validation for Arabic QuestionsAhmed Magdy Ezzeldin, MSc.
 
Models for Information Retrieval and Recommendation
Models for Information Retrieval and RecommendationModels for Information Retrieval and Recommendation
Models for Information Retrieval and RecommendationArjen de Vries
 
A Review of Distributional models of word meaning (Lenci, 2018)
A Review of Distributional models of word meaning (Lenci, 2018)A Review of Distributional models of word meaning (Lenci, 2018)
A Review of Distributional models of word meaning (Lenci, 2018)Shuntaro Yada
 
Dice.com Bay Area Search - Beyond Learning to Rank Talk
Dice.com Bay Area Search - Beyond Learning to Rank TalkDice.com Bay Area Search - Beyond Learning to Rank Talk
Dice.com Bay Area Search - Beyond Learning to Rank TalkSimon Hughes
 
Factorization Machines with libFM
Factorization Machines with libFMFactorization Machines with libFM
Factorization Machines with libFMLiangjie Hong
 

What's hot (20)

Tutorial on query auto completion
Tutorial on query auto completionTutorial on query auto completion
Tutorial on query auto completion
 
Online Learning to Rank
Online Learning to RankOnline Learning to Rank
Online Learning to Rank
 
Search Accuracy Metrics and Predictive Analytics - A Big Data Use Case: Prese...
Search Accuracy Metrics and Predictive Analytics - A Big Data Use Case: Prese...Search Accuracy Metrics and Predictive Analytics - A Big Data Use Case: Prese...
Search Accuracy Metrics and Predictive Analytics - A Big Data Use Case: Prese...
 
Automatically Build Solr Synonyms List using Machine Learning - Chao Han, Luc...
Automatically Build Solr Synonyms List using Machine Learning - Chao Han, Luc...Automatically Build Solr Synonyms List using Machine Learning - Chao Han, Luc...
Automatically Build Solr Synonyms List using Machine Learning - Chao Han, Luc...
 
RecSys 2015 Tutorial - Scalable Recommender Systems: Where Machine Learning m...
RecSys 2015 Tutorial - Scalable Recommender Systems: Where Machine Learning m...RecSys 2015 Tutorial - Scalable Recommender Systems: Where Machine Learning m...
RecSys 2015 Tutorial - Scalable Recommender Systems: Where Machine Learning m...
 
Searching with vectors
Searching with vectorsSearching with vectors
Searching with vectors
 
Vectors in Search - Towards More Semantic Matching
Vectors in Search - Towards More Semantic MatchingVectors in Search - Towards More Semantic Matching
Vectors in Search - Towards More Semantic Matching
 
Recommender systems
Recommender systemsRecommender systems
Recommender systems
 
Replicable Evaluation of Recommender Systems
Replicable Evaluation of Recommender SystemsReplicable Evaluation of Recommender Systems
Replicable Evaluation of Recommender Systems
 
Recommender Systems! @ASAI 2011
Recommender Systems! @ASAI 2011Recommender Systems! @ASAI 2011
Recommender Systems! @ASAI 2011
 
Aspect Opinion Mining From User Reviews on the web
Aspect Opinion Mining From User Reviews on the webAspect Opinion Mining From User Reviews on the web
Aspect Opinion Mining From User Reviews on the web
 
Tag based recommender system
Tag based recommender systemTag based recommender system
Tag based recommender system
 
Arabic Question Answering: Challenges, Tasks, Approaches, Test-sets, Tools, A...
Arabic Question Answering: Challenges, Tasks, Approaches, Test-sets, Tools, A...Arabic Question Answering: Challenges, Tasks, Approaches, Test-sets, Tools, A...
Arabic Question Answering: Challenges, Tasks, Approaches, Test-sets, Tools, A...
 
Summary of a Recommender Systems Survey paper
Summary of a Recommender Systems Survey paperSummary of a Recommender Systems Survey paper
Summary of a Recommender Systems Survey paper
 
Arabic question answering ‫‬
Arabic question answering ‫‬Arabic question answering ‫‬
Arabic question answering ‫‬
 
Answer Selection and Validation for Arabic Questions
Answer Selection and Validation for Arabic QuestionsAnswer Selection and Validation for Arabic Questions
Answer Selection and Validation for Arabic Questions
 
Models for Information Retrieval and Recommendation
Models for Information Retrieval and RecommendationModels for Information Retrieval and Recommendation
Models for Information Retrieval and Recommendation
 
A Review of Distributional models of word meaning (Lenci, 2018)
A Review of Distributional models of word meaning (Lenci, 2018)A Review of Distributional models of word meaning (Lenci, 2018)
A Review of Distributional models of word meaning (Lenci, 2018)
 
Dice.com Bay Area Search - Beyond Learning to Rank Talk
Dice.com Bay Area Search - Beyond Learning to Rank TalkDice.com Bay Area Search - Beyond Learning to Rank Talk
Dice.com Bay Area Search - Beyond Learning to Rank Talk
 
Factorization Machines with libFM
Factorization Machines with libFMFactorization Machines with libFM
Factorization Machines with libFM
 

Similar to SNLP Presentation on Neural Text Generation in Stories using Entity Representation as Context

Extraction Based automatic summarization
Extraction Based automatic summarizationExtraction Based automatic summarization
Extraction Based automatic summarizationAbdelaziz Al-Rihawi
 
FriendsQA: Open-domain Question Answering on TV Show Transcripts
FriendsQA: Open-domain Question Answering on TV Show TranscriptsFriendsQA: Open-domain Question Answering on TV Show Transcripts
FriendsQA: Open-domain Question Answering on TV Show TranscriptsJinho Choi
 
Why Watson Won: A cognitive perspective
Why Watson Won: A cognitive perspectiveWhy Watson Won: A cognitive perspective
Why Watson Won: A cognitive perspectiveJames Hendler
 
Natural Language Processing Advancements By Deep Learning: A Survey
Natural Language Processing Advancements By Deep Learning: A SurveyNatural Language Processing Advancements By Deep Learning: A Survey
Natural Language Processing Advancements By Deep Learning: A SurveyRimzim Thube
 
Colloquium talk on modal sense classification using a convolutional neural ne...
Colloquium talk on modal sense classification using a convolutional neural ne...Colloquium talk on modal sense classification using a convolutional neural ne...
Colloquium talk on modal sense classification using a convolutional neural ne...Ana Marasović
 
sa-mincut-aditya.ppt
sa-mincut-aditya.pptsa-mincut-aditya.ppt
sa-mincut-aditya.pptaashnareddy1
 
NLP_KASHK:Evaluating Language Model
NLP_KASHK:Evaluating Language ModelNLP_KASHK:Evaluating Language Model
NLP_KASHK:Evaluating Language ModelHemantha Kulathilake
 
Chapter 5 class version b(1)
Chapter 5 class version b(1)Chapter 5 class version b(1)
Chapter 5 class version b(1)jbnx
 
Information Extraction
Information ExtractionInformation Extraction
Information Extractionssbd6985
 
Information Extraction
Information ExtractionInformation Extraction
Information Extractionssbd6985
 
Information Extraction
Information ExtractionInformation Extraction
Information Extractionssbd6985
 
Weakly Supervised Machine Reading
Weakly Supervised Machine ReadingWeakly Supervised Machine Reading
Weakly Supervised Machine ReadingIsabelle Augenstein
 
Interface for Finding Close Matches from Translation Memory
Interface for Finding Close Matches from Translation MemoryInterface for Finding Close Matches from Translation Memory
Interface for Finding Close Matches from Translation MemoryPriyatham Bollimpalli
 
CSA 3702 machine learning module 4
CSA 3702 machine learning module 4CSA 3702 machine learning module 4
CSA 3702 machine learning module 4Nandhini S
 
Word vectorization(embedding) with nnlm
Word vectorization(embedding) with nnlmWord vectorization(embedding) with nnlm
Word vectorization(embedding) with nnlmhyunsung lee
 

Similar to SNLP Presentation on Neural Text Generation in Stories using Entity Representation as Context (20)

Extraction Based automatic summarization
Extraction Based automatic summarizationExtraction Based automatic summarization
Extraction Based automatic summarization
 
FriendsQA: Open-domain Question Answering on TV Show Transcripts
FriendsQA: Open-domain Question Answering on TV Show TranscriptsFriendsQA: Open-domain Question Answering on TV Show Transcripts
FriendsQA: Open-domain Question Answering on TV Show Transcripts
 
Why Watson Won: A cognitive perspective
Why Watson Won: A cognitive perspectiveWhy Watson Won: A cognitive perspective
Why Watson Won: A cognitive perspective
 
Natural Language Processing Advancements By Deep Learning: A Survey
Natural Language Processing Advancements By Deep Learning: A SurveyNatural Language Processing Advancements By Deep Learning: A Survey
Natural Language Processing Advancements By Deep Learning: A Survey
 
Colloquium talk on modal sense classification using a convolutional neural ne...
Colloquium talk on modal sense classification using a convolutional neural ne...Colloquium talk on modal sense classification using a convolutional neural ne...
Colloquium talk on modal sense classification using a convolutional neural ne...
 
sa-mincut-aditya.ppt
sa-mincut-aditya.pptsa-mincut-aditya.ppt
sa-mincut-aditya.ppt
 
sa.ppt
sa.pptsa.ppt
sa.ppt
 
sa-mincut-aditya.ppt
sa-mincut-aditya.pptsa-mincut-aditya.ppt
sa-mincut-aditya.ppt
 
NLP_KASHK:Evaluating Language Model
NLP_KASHK:Evaluating Language ModelNLP_KASHK:Evaluating Language Model
NLP_KASHK:Evaluating Language Model
 
Chapter 5 class version b(1)
Chapter 5 class version b(1)Chapter 5 class version b(1)
Chapter 5 class version b(1)
 
Information Extraction
Information ExtractionInformation Extraction
Information Extraction
 
Information Extraction
Information ExtractionInformation Extraction
Information Extraction
 
Information Extraction
Information ExtractionInformation Extraction
Information Extraction
 
Final presentation
Final presentationFinal presentation
Final presentation
 
Weakly Supervised Machine Reading
Weakly Supervised Machine ReadingWeakly Supervised Machine Reading
Weakly Supervised Machine Reading
 
Interface for Finding Close Matches from Translation Memory
Interface for Finding Close Matches from Translation MemoryInterface for Finding Close Matches from Translation Memory
Interface for Finding Close Matches from Translation Memory
 
Searching for the Best Machine Translation Combination
Searching for the Best Machine Translation CombinationSearching for the Best Machine Translation Combination
Searching for the Best Machine Translation Combination
 
presentation.ppt
presentation.pptpresentation.ppt
presentation.ppt
 
CSA 3702 machine learning module 4
CSA 3702 machine learning module 4CSA 3702 machine learning module 4
CSA 3702 machine learning module 4
 
Word vectorization(embedding) with nnlm
Word vectorization(embedding) with nnlmWord vectorization(embedding) with nnlm
Word vectorization(embedding) with nnlm
 

More from SRah Sanei

Forward algorithm step by step
Forward algorithm step by stepForward algorithm step by step
Forward algorithm step by stepSRah Sanei
 
Chart parsing with features
Chart parsing with featuresChart parsing with features
Chart parsing with featuresSRah Sanei
 
Morphological rules- Sarah Saneei
Morphological rules- Sarah SaneeiMorphological rules- Sarah Saneei
Morphological rules- Sarah SaneeiSRah Sanei
 
Basic concepts-Sarah Saneei
Basic concepts-Sarah SaneeiBasic concepts-Sarah Saneei
Basic concepts-Sarah SaneeiSRah Sanei
 
Viterbi-Sarah Saneei
Viterbi-Sarah SaneeiViterbi-Sarah Saneei
Viterbi-Sarah SaneeiSRah Sanei
 
Chart parsing- Sarah Saneei
Chart parsing- Sarah SaneeiChart parsing- Sarah Saneei
Chart parsing- Sarah SaneeiSRah Sanei
 

More from SRah Sanei (6)

Forward algorithm step by step
Forward algorithm step by stepForward algorithm step by step
Forward algorithm step by step
 
Chart parsing with features
Chart parsing with featuresChart parsing with features
Chart parsing with features
 
Morphological rules- Sarah Saneei
Morphological rules- Sarah SaneeiMorphological rules- Sarah Saneei
Morphological rules- Sarah Saneei
 
Basic concepts-Sarah Saneei
Basic concepts-Sarah SaneeiBasic concepts-Sarah Saneei
Basic concepts-Sarah Saneei
 
Viterbi-Sarah Saneei
Viterbi-Sarah SaneeiViterbi-Sarah Saneei
Viterbi-Sarah Saneei
 
Chart parsing- Sarah Saneei
Chart parsing- Sarah SaneeiChart parsing- Sarah Saneei
Chart parsing- Sarah Saneei
 

Recently uploaded

ECONOMIC CONTEXT - LONG FORM TV DRAMA - PPT
ECONOMIC CONTEXT - LONG FORM TV DRAMA - PPTECONOMIC CONTEXT - LONG FORM TV DRAMA - PPT
ECONOMIC CONTEXT - LONG FORM TV DRAMA - PPTiammrhaywood
 
Employee wellbeing at the workplace.pptx
Employee wellbeing at the workplace.pptxEmployee wellbeing at the workplace.pptx
Employee wellbeing at the workplace.pptxNirmalaLoungPoorunde1
 
Paris 2024 Olympic Geographies - an activity
Paris 2024 Olympic Geographies - an activityParis 2024 Olympic Geographies - an activity
Paris 2024 Olympic Geographies - an activityGeoBlogs
 
How to Configure Email Server in Odoo 17
How to Configure Email Server in Odoo 17How to Configure Email Server in Odoo 17
How to Configure Email Server in Odoo 17Celine George
 
Software Engineering Methodologies (overview)
Software Engineering Methodologies (overview)Software Engineering Methodologies (overview)
Software Engineering Methodologies (overview)eniolaolutunde
 
Alper Gobel In Media Res Media Component
Alper Gobel In Media Res Media ComponentAlper Gobel In Media Res Media Component
Alper Gobel In Media Res Media ComponentInMediaRes1
 
18-04-UA_REPORT_MEDIALITERAСY_INDEX-DM_23-1-final-eng.pdf
18-04-UA_REPORT_MEDIALITERAСY_INDEX-DM_23-1-final-eng.pdf18-04-UA_REPORT_MEDIALITERAСY_INDEX-DM_23-1-final-eng.pdf
18-04-UA_REPORT_MEDIALITERAСY_INDEX-DM_23-1-final-eng.pdfssuser54595a
 
Introduction to ArtificiaI Intelligence in Higher Education
Introduction to ArtificiaI Intelligence in Higher EducationIntroduction to ArtificiaI Intelligence in Higher Education
Introduction to ArtificiaI Intelligence in Higher Educationpboyjonauth
 
BASLIQ CURRENT LOOKBOOK LOOKBOOK(1) (1).pdf
BASLIQ CURRENT LOOKBOOK  LOOKBOOK(1) (1).pdfBASLIQ CURRENT LOOKBOOK  LOOKBOOK(1) (1).pdf
BASLIQ CURRENT LOOKBOOK LOOKBOOK(1) (1).pdfSoniaTolstoy
 
EPANDING THE CONTENT OF AN OUTLINE using notes.pptx
EPANDING THE CONTENT OF AN OUTLINE using notes.pptxEPANDING THE CONTENT OF AN OUTLINE using notes.pptx
EPANDING THE CONTENT OF AN OUTLINE using notes.pptxRaymartEstabillo3
 
Computed Fields and api Depends in the Odoo 17
Computed Fields and api Depends in the Odoo 17Computed Fields and api Depends in the Odoo 17
Computed Fields and api Depends in the Odoo 17Celine George
 
A Critique of the Proposed National Education Policy Reform
A Critique of the Proposed National Education Policy ReformA Critique of the Proposed National Education Policy Reform
A Critique of the Proposed National Education Policy ReformChameera Dedduwage
 
History Class XII Ch. 3 Kinship, Caste and Class (1).pptx
History Class XII Ch. 3 Kinship, Caste and Class (1).pptxHistory Class XII Ch. 3 Kinship, Caste and Class (1).pptx
History Class XII Ch. 3 Kinship, Caste and Class (1).pptxsocialsciencegdgrohi
 
Final demo Grade 9 for demo Plan dessert.pptx
Final demo Grade 9 for demo Plan dessert.pptxFinal demo Grade 9 for demo Plan dessert.pptx
Final demo Grade 9 for demo Plan dessert.pptxAvyJaneVismanos
 
Sanyam Choudhary Chemistry practical.pdf
Sanyam Choudhary Chemistry practical.pdfSanyam Choudhary Chemistry practical.pdf
Sanyam Choudhary Chemistry practical.pdfsanyamsingh5019
 
internship ppt on smartinternz platform as salesforce developer
internship ppt on smartinternz platform as salesforce developerinternship ppt on smartinternz platform as salesforce developer
internship ppt on smartinternz platform as salesforce developerunnathinaik
 
Crayon Activity Handout For the Crayon A
Crayon Activity Handout For the Crayon ACrayon Activity Handout For the Crayon A
Crayon Activity Handout For the Crayon AUnboundStockton
 
CARE OF CHILD IN INCUBATOR..........pptx
CARE OF CHILD IN INCUBATOR..........pptxCARE OF CHILD IN INCUBATOR..........pptx
CARE OF CHILD IN INCUBATOR..........pptxGaneshChakor2
 

Recently uploaded (20)

ECONOMIC CONTEXT - LONG FORM TV DRAMA - PPT
ECONOMIC CONTEXT - LONG FORM TV DRAMA - PPTECONOMIC CONTEXT - LONG FORM TV DRAMA - PPT
ECONOMIC CONTEXT - LONG FORM TV DRAMA - PPT
 
Employee wellbeing at the workplace.pptx
Employee wellbeing at the workplace.pptxEmployee wellbeing at the workplace.pptx
Employee wellbeing at the workplace.pptx
 
Paris 2024 Olympic Geographies - an activity
Paris 2024 Olympic Geographies - an activityParis 2024 Olympic Geographies - an activity
Paris 2024 Olympic Geographies - an activity
 
How to Configure Email Server in Odoo 17
How to Configure Email Server in Odoo 17How to Configure Email Server in Odoo 17
How to Configure Email Server in Odoo 17
 
Software Engineering Methodologies (overview)
Software Engineering Methodologies (overview)Software Engineering Methodologies (overview)
Software Engineering Methodologies (overview)
 
Alper Gobel In Media Res Media Component
Alper Gobel In Media Res Media ComponentAlper Gobel In Media Res Media Component
Alper Gobel In Media Res Media Component
 
18-04-UA_REPORT_MEDIALITERAСY_INDEX-DM_23-1-final-eng.pdf
18-04-UA_REPORT_MEDIALITERAСY_INDEX-DM_23-1-final-eng.pdf18-04-UA_REPORT_MEDIALITERAСY_INDEX-DM_23-1-final-eng.pdf
18-04-UA_REPORT_MEDIALITERAСY_INDEX-DM_23-1-final-eng.pdf
 
Introduction to ArtificiaI Intelligence in Higher Education
Introduction to ArtificiaI Intelligence in Higher EducationIntroduction to ArtificiaI Intelligence in Higher Education
Introduction to ArtificiaI Intelligence in Higher Education
 
BASLIQ CURRENT LOOKBOOK LOOKBOOK(1) (1).pdf
BASLIQ CURRENT LOOKBOOK  LOOKBOOK(1) (1).pdfBASLIQ CURRENT LOOKBOOK  LOOKBOOK(1) (1).pdf
BASLIQ CURRENT LOOKBOOK LOOKBOOK(1) (1).pdf
 
Model Call Girl in Tilak Nagar Delhi reach out to us at 🔝9953056974🔝
Model Call Girl in Tilak Nagar Delhi reach out to us at 🔝9953056974🔝Model Call Girl in Tilak Nagar Delhi reach out to us at 🔝9953056974🔝
Model Call Girl in Tilak Nagar Delhi reach out to us at 🔝9953056974🔝
 
EPANDING THE CONTENT OF AN OUTLINE using notes.pptx
EPANDING THE CONTENT OF AN OUTLINE using notes.pptxEPANDING THE CONTENT OF AN OUTLINE using notes.pptx
EPANDING THE CONTENT OF AN OUTLINE using notes.pptx
 
Computed Fields and api Depends in the Odoo 17
Computed Fields and api Depends in the Odoo 17Computed Fields and api Depends in the Odoo 17
Computed Fields and api Depends in the Odoo 17
 
Staff of Color (SOC) Retention Efforts DDSD
Staff of Color (SOC) Retention Efforts DDSDStaff of Color (SOC) Retention Efforts DDSD
Staff of Color (SOC) Retention Efforts DDSD
 
A Critique of the Proposed National Education Policy Reform
A Critique of the Proposed National Education Policy ReformA Critique of the Proposed National Education Policy Reform
A Critique of the Proposed National Education Policy Reform
 
History Class XII Ch. 3 Kinship, Caste and Class (1).pptx
History Class XII Ch. 3 Kinship, Caste and Class (1).pptxHistory Class XII Ch. 3 Kinship, Caste and Class (1).pptx
History Class XII Ch. 3 Kinship, Caste and Class (1).pptx
 
Final demo Grade 9 for demo Plan dessert.pptx
Final demo Grade 9 for demo Plan dessert.pptxFinal demo Grade 9 for demo Plan dessert.pptx
Final demo Grade 9 for demo Plan dessert.pptx
 
Sanyam Choudhary Chemistry practical.pdf
Sanyam Choudhary Chemistry practical.pdfSanyam Choudhary Chemistry practical.pdf
Sanyam Choudhary Chemistry practical.pdf
 
internship ppt on smartinternz platform as salesforce developer
internship ppt on smartinternz platform as salesforce developerinternship ppt on smartinternz platform as salesforce developer
internship ppt on smartinternz platform as salesforce developer
 
Crayon Activity Handout For the Crayon A
Crayon Activity Handout For the Crayon ACrayon Activity Handout For the Crayon A
Crayon Activity Handout For the Crayon A
 
CARE OF CHILD IN INCUBATOR..........pptx
CARE OF CHILD IN INCUBATOR..........pptxCARE OF CHILD IN INCUBATOR..........pptx
CARE OF CHILD IN INCUBATOR..........pptx
 

SNLP Presentation on Neural Text Generation in Stories using Entity Representation as Context

  • 1. SNLP Presentation Sarah Saneei Studying master of Computational Linguistics
  • 2. Neural Text Generation in Stories using Entity Representation as Context Elizabeth Clark Yangfeng Ji Noah A. Smith
  • 3. How was the idea born? Neural Text Generation in Stories using Entity Representation as Context RNN Topical inf Neural Models for Text Generation S2SA Story Generation Inspired by Ref. exp. Generation & Entity Prediction Defined by authors Mention Generation entity ~ coherence Centering Theory EntityNLMEntity-related Generation Used for coref. , Lang. Model & scoring
  • 4. How was the idea born? Neural Text Generation in Stories using Entity Representation as Context Topical inf Neural Models for Text Generation Story Generation Inspired by Ref. exp. Generation & Entity Prediction Defined by authors Mention Generation ~ coherence Centering Theory Entity-related Generation Used for coref. , Lang. Model & scoring
  • 5. Model Description • Entity-based generation model (ENGEN) • Combines 3 sources of contextual information for text generation • Each of these types of info is encoded in vector form ENGEN Context from entities Content of current sentence Context from previous sentence
  • 6. Model Description • Entity-based generation model (ENGEN) • Combines 3 sources of contextual information for text generation • Each of these types of info is encoded in vector form ENGEN Context from entities Content of current sentence Context from previous sentenceℎ 𝑡,𝑖 𝑒𝑡,𝑖 𝑝𝑡,𝑖
  • 7. Model Description ENGEN Context from entities Content of current sentence Context from previous sentenceℎ 𝑡,𝑖 𝑒𝑡,𝑖 𝑝𝑡,𝑖 • Every entity is assigned a vector representation • Update every time the entity mentioned • Appropriate for generating narrative stories • Characters develop and change • Each time m+1 options (why?)
  • 8. Model Description ENGEN Context from entities Content of current sentence Context from previous sentenceℎ 𝑡,𝑖 𝑒𝑡,𝑖 𝑝𝑡,𝑖 • When an entity is selected, its vector is assigned to • : • Should not refer to an entity • Rep. of most recently mentioned entity • Should refer to a new entity • Generate from a normal dist. • has been generated • Entity rep. update base on 𝑒 𝑐𝑢𝑟𝑟𝑒𝑛𝑡 𝑤𝑡 𝑒 𝑐𝑢𝑟𝑟𝑒𝑛𝑡 𝑤𝑡 ℎ 𝑡
  • 10. Model Description ENGEN Context from entities Content of current sentence Context from previous sentence S2SA ENTITYNLM Capture local Contextual features • No extra param • : Combined context vector use to generate by calculating probability of each word type in the vocabulary 𝑐𝑡 𝑤𝑡 Eq. 6
  • 11. Learning • Training objective : maximize All the model’s paramAll decisions at timestep t
  • 12. Learning • Training objective : maximize • The model • Predicts the word • The entity info. associated with that word • Same training method used for ENTITYNLM • Requires training data annotated with mention and coref. Info. (entity cluster) All the model’s paramAll decisions at timestep t (whether it is part of a entity mention, if so the entity the mention refers to, the length of the mention, and the word itself)
  • 13. Data • Training data: 312 adventure books from the Toronto Book Corpus • Development: 39 books • Test: 39 books • Divide to segments (include up to 50 sentences) • Used Stanford CoreNLP system • In coref. results: Entity mentions: even more than 70 keep only 3 word or fewer(95% of mentions) others replace by head word All tokens were down cased Numbers > NUM Frequency less than 10 > UNK
  • 14. 1 Mention Generation 2 Pairwise Sentence Selection 3 Sentence Generation EVALUATIONS
  • 15. 1/ Experiment: Mention Generation • Given a text and a slot to be filled with an entity mention, • A model must choose among all preceding entity mentions and the correct mention • To perform well: • Choose both the entity and the words used to refer to it • Requires the greatest precision: • Possible to select the correct mention • But not the correct cluster and vice versa select between all the previous entity mentions (Emily, the dragon, Seth, and her) and the correct mention (she).
  • 16. 1/ Experiment: Mention Generation • Given a text and a slot to be filled with an entity mention, • A model must choose among all preceding entity mentions and the correct mention S2SA does not model entities
  • 17. 1/ Experiment: Mention Generation • Size of candidate list can exceed 100 • Reporting MAP (Mean Average Precision) to aggregate across contexts of all lengths • Using language model scores to rank candidates
  • 18. 1/ Experiment: Mention Generation • Size of candidate list can exceed 100 • Reporting MAP (Mean Average Precision) to aggregate across contexts of all lengths • Using language model scores to rank candidates Baselines: • S2SA • ENTITYNLM • Reverse order (rank mentions by recency)
  • 19. 1/ Experiment: Mention Generation Baselines: • S2SA • ENTITYNLM • Reverse order (rank mentions by recency) Higher MAP > better system
  • 20. 1/ Experiment: Mention Generation • Line 1: distance alone not an effective heuristic for mention generation (but useful in coref.) • Line 4 and 2: benefit of adding entity representations for text generation • Line 3 and 4: local context also gives small boost
  • 21. 1 Mention Generation 2 Pairwise Sentence Selection 3 Sentence Generation EVALUATIONS
  • 22. 2/ Experiment: Pairwise Sentence Selection • Inspired by tests of coherence • to assess text generation automatically • without human evaluation • Model is generative • Can assign scores to candidate sentences, given a context
  • 23. 2/ Experiment: Pairwise Sentence Selection Inputs: • 49 sentences of preceding context • Two choices: • The actual 50th • A distractor sentence (randomly chosen from next 50 sentences) • Random baseline achieve 50% accuracy • Not a trivial task: • Distractor: similar lang., chars, topics • Relatively nearby (in 2% cases, the very next sentence)
  • 24. 2/ Experiment: Pairwise Sentence Selection Inputs: • 49 sentences of preceding context • Two choices: • The actual 50th • A distractor sentence (randomly chosen from next 50 sentences) 48 lines away 10 lines away
  • 25. 2/ Experiment: Pairwise Sentence Selection To select • Model scores each of two based on • Its probability on words • All entity-related info. (Eq 6) 48 lines away 10 lines away
  • 26. 2/ Experiment: Pairwise Sentence Selection To select • Model scores each of two based on • Its probability on words • All entity-related info. (Eq 6) Ran this pairwise decision 5 times and average the performance • Different set of random distractors
  • 27. 2/ Experiment: Pairwise Sentence Selection To select • Model scores each of two based on • Its probability on words • All entity-related info. (Eq 6) Ran this pairwise decision 5 times and average the performance • Different set of random distractors
  • 28. 2/ Experiment: Pairwise Sentence Selection To select • Model scores each of two based on • Its probability on words • All entity-related info. (Eq 6) Ran this pairwise decision 5 times and average the performance • Different set of random distractors • Unlike the mention generation task • S2SA beats ENTITYNLM • Importance of local context
  • 29. 2/ Experiment: Pairwise Sentence Selection To select • Model scores each of two based on • Its probability on words • All entity-related info. (Eq 6) Ran this pairwise decision 5 times and average the performance • Different set of random distractors • Unlike the mention generation task • S2SA beats ENTITYNLM • Importance of local context Consistency (regardless of the distance of distractors)
  • 30. 1 Mention Generation 2 Pairwise Sentence Selection 3 Sentence Generation EVALUATIONS
  • 31. 3/ Human evaluation: Sentence Generation • Best measure of the quality • Among AMTs (Amazon Mechanical Turkers) • Americans • Completed over 1000 tasks • Over 95% task acceptance rate • 11 selected
  • 32. 3/ Human evaluation: Sentence Generation • Best measure of the quality • Among AMTs (Amazon Mechanical Turkers) • Americans • Completed over 1000 tasks • Over 95% task acceptance rate • 11 selected • Input: • Short excerpt from a story • Two generated sentences (ENGEN & entity-unaware S2SA) • Asking them to “Choose a sentence to continue the story” and explain why • Not primed by “focus on entities”
  • 33. 3/ Human evaluation: Sentence Generation • Subset of 50 randomly selected text • Final 60 words of segments selected • Same for model • Generated 100 sentences and choose the best one (ranked with 5-gram)
  • 34. 3/ Human evaluation: Sentence Generation • Subset of 50 randomly selected text • Final 60 words of segments selected • Same for model • Generated 100 sentences and choose the best one (ranked with 5-gram) • Results • 27 of the passages > ENGEN • 23 > S2SA • Many cases of same scores (both would have worked)
  • 35. 3/ Human evaluation: Sentence Generation • Reasons: • ENGEN > Connection between pronouns • ENGEN> Mismatch in entities (starting with “she” while no female character exists) • S2SA > new proper noun (gives some context of characters of the story) • Importance the ability to generate new entities • Move the plot forward • Fit better with “the theme” or “the tone” • Dialogue vs. descriptive sentence • Statement vs. question • Social knowledge
  • 36. 3/ Human evaluation: Sentence Generation
  • 37. 3/ Human evaluation: Sentence Generation “the introduction makes the man sound like he is a stranger, so ‘I’m proud of you’ seems out of place.”
  • 38. 1 Mention Generation 2 Pairwise Sentence Selection 3 Sentence Generation EVALUATIONS
  • 40. Thanks for your attention :)