SlideShare a Scribd company logo
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 completion
Yichen Feng
 
Online Learning to Rank
Online Learning to RankOnline Learning to Rank
Online Learning to Rank
ewhuang3
 
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 vectors
Simon 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 Matching
Simon Hughes
 
Recommender systems
Recommender systemsRecommender systems
Recommender systems
Tamer Rezk
 
Replicable Evaluation of Recommender Systems
Replicable Evaluation of Recommender SystemsReplicable Evaluation of Recommender Systems
Replicable Evaluation of Recommender Systems
Alejandro Bellogin
 
Recommender Systems! @ASAI 2011
Recommender Systems! @ASAI 2011Recommender Systems! @ASAI 2011
Recommender Systems! @ASAI 2011
Ernesto 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 web
Karishma chaudhary
 
Tag based recommender system
Tag based recommender systemTag based recommender system
Tag based recommender system
Karen 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 paper
Changsung Moon
 
Arabic question answering ‫‬
Arabic question answering ‫‬Arabic question answering ‫‬
Arabic question answering ‫‬
Arabic_NLP_ImamU2013
 
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
Ahmed 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 Recommendation
Arjen 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 Talk
Simon Hughes
 
Factorization Machines with libFM
Factorization Machines with libFMFactorization Machines with libFM
Factorization Machines with libFM
Liangjie 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 Story generation-Sarah Saneei

Extraction Based automatic summarization
Extraction Based automatic summarizationExtraction Based automatic summarization
Extraction Based automatic summarization
Abdelaziz 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 Transcripts
Jinho Choi
 
Why Watson Won: A cognitive perspective
Why Watson Won: A cognitive perspectiveWhy Watson Won: A cognitive perspective
Why Watson Won: A cognitive perspective
James 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 Survey
Rimzim 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.ppt
aashnareddy1
 
sa.ppt
sa.pptsa.ppt
sa-mincut-aditya.ppt
sa-mincut-aditya.pptsa-mincut-aditya.ppt
sa-mincut-aditya.ppt
ShaliniVerma380300
 
NLP_KASHK:Evaluating Language Model
NLP_KASHK:Evaluating Language ModelNLP_KASHK:Evaluating Language Model
NLP_KASHK:Evaluating Language Model
Hemantha 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 Extraction
ssbd6985
 
Information Extraction
Information ExtractionInformation Extraction
Information Extraction
ssbd6985
 
Information Extraction
Information ExtractionInformation Extraction
Information Extraction
ssbd6985
 
Final presentation
Final presentationFinal presentation
Final presentation
Nitish Upreti
 
Weakly Supervised Machine Reading
Weakly Supervised Machine ReadingWeakly Supervised Machine Reading
Weakly Supervised Machine Reading
Isabelle 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 Memory
Priyatham Bollimpalli
 
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
Matīss ‎‎‎‎‎‎‎  
 
presentation.ppt
presentation.pptpresentation.ppt
presentation.ppt
MadhuriChandanbatwe
 
CSA 3702 machine learning module 4
CSA 3702 machine learning module 4CSA 3702 machine learning module 4
CSA 3702 machine learning module 4
Nandhini S
 
Word vectorization(embedding) with nnlm
Word vectorization(embedding) with nnlmWord vectorization(embedding) with nnlm
Word vectorization(embedding) with nnlm
hyunsung lee
 

Similar to Story generation-Sarah Saneei (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 step
SRah Sanei
 
Chart parsing with features
Chart parsing with featuresChart parsing with features
Chart parsing with features
SRah Sanei
 
Morphological rules- Sarah Saneei
Morphological rules- Sarah SaneeiMorphological rules- Sarah Saneei
Morphological rules- Sarah Saneei
SRah Sanei
 
Basic concepts-Sarah Saneei
Basic concepts-Sarah SaneeiBasic concepts-Sarah Saneei
Basic concepts-Sarah Saneei
SRah Sanei
 
Viterbi-Sarah Saneei
Viterbi-Sarah SaneeiViterbi-Sarah Saneei
Viterbi-Sarah Saneei
SRah Sanei
 
Chart parsing- Sarah Saneei
Chart parsing- Sarah SaneeiChart parsing- Sarah Saneei
Chart parsing- Sarah Saneei
SRah 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

How to Manage Your Lost Opportunities in Odoo 17 CRM
How to Manage Your Lost Opportunities in Odoo 17 CRMHow to Manage Your Lost Opportunities in Odoo 17 CRM
How to Manage Your Lost Opportunities in Odoo 17 CRM
Celine George
 
S1-Introduction-Biopesticides in ICM.pptx
S1-Introduction-Biopesticides in ICM.pptxS1-Introduction-Biopesticides in ICM.pptx
S1-Introduction-Biopesticides in ICM.pptx
tarandeep35
 
Community pharmacy- Social and preventive pharmacy UNIT 5
Community pharmacy- Social and preventive pharmacy UNIT 5Community pharmacy- Social and preventive pharmacy UNIT 5
Community pharmacy- Social and preventive pharmacy UNIT 5
sayalidalavi006
 
What is Digital Literacy? A guest blog from Andy McLaughlin, University of Ab...
What is Digital Literacy? A guest blog from Andy McLaughlin, University of Ab...What is Digital Literacy? A guest blog from Andy McLaughlin, University of Ab...
What is Digital Literacy? A guest blog from Andy McLaughlin, University of Ab...
GeorgeMilliken2
 
Liberal Approach to the Study of Indian Politics.pdf
Liberal Approach to the Study of Indian Politics.pdfLiberal Approach to the Study of Indian Politics.pdf
Liberal Approach to the Study of Indian Politics.pdf
WaniBasim
 
Executive Directors Chat Leveraging AI for Diversity, Equity, and Inclusion
Executive Directors Chat  Leveraging AI for Diversity, Equity, and InclusionExecutive Directors Chat  Leveraging AI for Diversity, Equity, and Inclusion
Executive Directors Chat Leveraging AI for Diversity, Equity, and Inclusion
TechSoup
 
Digital Artefact 1 - Tiny Home Environmental Design
Digital Artefact 1 - Tiny Home Environmental DesignDigital Artefact 1 - Tiny Home Environmental Design
Digital Artefact 1 - Tiny Home Environmental Design
amberjdewit93
 
How to Build a Module in Odoo 17 Using the Scaffold Method
How to Build a Module in Odoo 17 Using the Scaffold MethodHow to Build a Module in Odoo 17 Using the Scaffold Method
How to Build a Module in Odoo 17 Using the Scaffold Method
Celine George
 
ISO/IEC 27001, ISO/IEC 42001, and GDPR: Best Practices for Implementation and...
ISO/IEC 27001, ISO/IEC 42001, and GDPR: Best Practices for Implementation and...ISO/IEC 27001, ISO/IEC 42001, and GDPR: Best Practices for Implementation and...
ISO/IEC 27001, ISO/IEC 42001, and GDPR: Best Practices for Implementation and...
PECB
 
clinical examination of hip joint (1).pdf
clinical examination of hip joint (1).pdfclinical examination of hip joint (1).pdf
clinical examination of hip joint (1).pdf
Priyankaranawat4
 
Advanced Java[Extra Concepts, Not Difficult].docx
Advanced Java[Extra Concepts, Not Difficult].docxAdvanced Java[Extra Concepts, Not Difficult].docx
Advanced Java[Extra Concepts, Not Difficult].docx
adhitya5119
 
The basics of sentences session 6pptx.pptx
The basics of sentences session 6pptx.pptxThe basics of sentences session 6pptx.pptx
The basics of sentences session 6pptx.pptx
heathfieldcps1
 
Your Skill Boost Masterclass: Strategies for Effective Upskilling
Your Skill Boost Masterclass: Strategies for Effective UpskillingYour Skill Boost Masterclass: Strategies for Effective Upskilling
Your Skill Boost Masterclass: Strategies for Effective Upskilling
Excellence Foundation for South Sudan
 
South African Journal of Science: Writing with integrity workshop (2024)
South African Journal of Science: Writing with integrity workshop (2024)South African Journal of Science: Writing with integrity workshop (2024)
South African Journal of Science: Writing with integrity workshop (2024)
Academy of Science of South Africa
 
writing about opinions about Australia the movie
writing about opinions about Australia the moviewriting about opinions about Australia the movie
writing about opinions about Australia the movie
Nicholas Montgomery
 
বাংলাদেশ অর্থনৈতিক সমীক্ষা (Economic Review) ২০২৪ UJS App.pdf
বাংলাদেশ অর্থনৈতিক সমীক্ষা (Economic Review) ২০২৪ UJS App.pdfবাংলাদেশ অর্থনৈতিক সমীক্ষা (Economic Review) ২০২৪ UJS App.pdf
বাংলাদেশ অর্থনৈতিক সমীক্ষা (Economic Review) ২০২৪ UJS App.pdf
eBook.com.bd (প্রয়োজনীয় বাংলা বই)
 
Pride Month Slides 2024 David Douglas School District
Pride Month Slides 2024 David Douglas School DistrictPride Month Slides 2024 David Douglas School District
Pride Month Slides 2024 David Douglas School District
David Douglas School District
 
PIMS Job Advertisement 2024.pdf Islamabad
PIMS Job Advertisement 2024.pdf IslamabadPIMS Job Advertisement 2024.pdf Islamabad
PIMS Job Advertisement 2024.pdf Islamabad
AyyanKhan40
 
BÀI TẬP BỔ TRỢ TIẾNG ANH 8 CẢ NĂM - GLOBAL SUCCESS - NĂM HỌC 2023-2024 (CÓ FI...
BÀI TẬP BỔ TRỢ TIẾNG ANH 8 CẢ NĂM - GLOBAL SUCCESS - NĂM HỌC 2023-2024 (CÓ FI...BÀI TẬP BỔ TRỢ TIẾNG ANH 8 CẢ NĂM - GLOBAL SUCCESS - NĂM HỌC 2023-2024 (CÓ FI...
BÀI TẬP BỔ TRỢ TIẾNG ANH 8 CẢ NĂM - GLOBAL SUCCESS - NĂM HỌC 2023-2024 (CÓ FI...
Nguyen Thanh Tu Collection
 
PCOS corelations and management through Ayurveda.
PCOS corelations and management through Ayurveda.PCOS corelations and management through Ayurveda.
PCOS corelations and management through Ayurveda.
Dr. Shivangi Singh Parihar
 

Recently uploaded (20)

How to Manage Your Lost Opportunities in Odoo 17 CRM
How to Manage Your Lost Opportunities in Odoo 17 CRMHow to Manage Your Lost Opportunities in Odoo 17 CRM
How to Manage Your Lost Opportunities in Odoo 17 CRM
 
S1-Introduction-Biopesticides in ICM.pptx
S1-Introduction-Biopesticides in ICM.pptxS1-Introduction-Biopesticides in ICM.pptx
S1-Introduction-Biopesticides in ICM.pptx
 
Community pharmacy- Social and preventive pharmacy UNIT 5
Community pharmacy- Social and preventive pharmacy UNIT 5Community pharmacy- Social and preventive pharmacy UNIT 5
Community pharmacy- Social and preventive pharmacy UNIT 5
 
What is Digital Literacy? A guest blog from Andy McLaughlin, University of Ab...
What is Digital Literacy? A guest blog from Andy McLaughlin, University of Ab...What is Digital Literacy? A guest blog from Andy McLaughlin, University of Ab...
What is Digital Literacy? A guest blog from Andy McLaughlin, University of Ab...
 
Liberal Approach to the Study of Indian Politics.pdf
Liberal Approach to the Study of Indian Politics.pdfLiberal Approach to the Study of Indian Politics.pdf
Liberal Approach to the Study of Indian Politics.pdf
 
Executive Directors Chat Leveraging AI for Diversity, Equity, and Inclusion
Executive Directors Chat  Leveraging AI for Diversity, Equity, and InclusionExecutive Directors Chat  Leveraging AI for Diversity, Equity, and Inclusion
Executive Directors Chat Leveraging AI for Diversity, Equity, and Inclusion
 
Digital Artefact 1 - Tiny Home Environmental Design
Digital Artefact 1 - Tiny Home Environmental DesignDigital Artefact 1 - Tiny Home Environmental Design
Digital Artefact 1 - Tiny Home Environmental Design
 
How to Build a Module in Odoo 17 Using the Scaffold Method
How to Build a Module in Odoo 17 Using the Scaffold MethodHow to Build a Module in Odoo 17 Using the Scaffold Method
How to Build a Module in Odoo 17 Using the Scaffold Method
 
ISO/IEC 27001, ISO/IEC 42001, and GDPR: Best Practices for Implementation and...
ISO/IEC 27001, ISO/IEC 42001, and GDPR: Best Practices for Implementation and...ISO/IEC 27001, ISO/IEC 42001, and GDPR: Best Practices for Implementation and...
ISO/IEC 27001, ISO/IEC 42001, and GDPR: Best Practices for Implementation and...
 
clinical examination of hip joint (1).pdf
clinical examination of hip joint (1).pdfclinical examination of hip joint (1).pdf
clinical examination of hip joint (1).pdf
 
Advanced Java[Extra Concepts, Not Difficult].docx
Advanced Java[Extra Concepts, Not Difficult].docxAdvanced Java[Extra Concepts, Not Difficult].docx
Advanced Java[Extra Concepts, Not Difficult].docx
 
The basics of sentences session 6pptx.pptx
The basics of sentences session 6pptx.pptxThe basics of sentences session 6pptx.pptx
The basics of sentences session 6pptx.pptx
 
Your Skill Boost Masterclass: Strategies for Effective Upskilling
Your Skill Boost Masterclass: Strategies for Effective UpskillingYour Skill Boost Masterclass: Strategies for Effective Upskilling
Your Skill Boost Masterclass: Strategies for Effective Upskilling
 
South African Journal of Science: Writing with integrity workshop (2024)
South African Journal of Science: Writing with integrity workshop (2024)South African Journal of Science: Writing with integrity workshop (2024)
South African Journal of Science: Writing with integrity workshop (2024)
 
writing about opinions about Australia the movie
writing about opinions about Australia the moviewriting about opinions about Australia the movie
writing about opinions about Australia the movie
 
বাংলাদেশ অর্থনৈতিক সমীক্ষা (Economic Review) ২০২৪ UJS App.pdf
বাংলাদেশ অর্থনৈতিক সমীক্ষা (Economic Review) ২০২৪ UJS App.pdfবাংলাদেশ অর্থনৈতিক সমীক্ষা (Economic Review) ২০২৪ UJS App.pdf
বাংলাদেশ অর্থনৈতিক সমীক্ষা (Economic Review) ২০২৪ UJS App.pdf
 
Pride Month Slides 2024 David Douglas School District
Pride Month Slides 2024 David Douglas School DistrictPride Month Slides 2024 David Douglas School District
Pride Month Slides 2024 David Douglas School District
 
PIMS Job Advertisement 2024.pdf Islamabad
PIMS Job Advertisement 2024.pdf IslamabadPIMS Job Advertisement 2024.pdf Islamabad
PIMS Job Advertisement 2024.pdf Islamabad
 
BÀI TẬP BỔ TRỢ TIẾNG ANH 8 CẢ NĂM - GLOBAL SUCCESS - NĂM HỌC 2023-2024 (CÓ FI...
BÀI TẬP BỔ TRỢ TIẾNG ANH 8 CẢ NĂM - GLOBAL SUCCESS - NĂM HỌC 2023-2024 (CÓ FI...BÀI TẬP BỔ TRỢ TIẾNG ANH 8 CẢ NĂM - GLOBAL SUCCESS - NĂM HỌC 2023-2024 (CÓ FI...
BÀI TẬP BỔ TRỢ TIẾNG ANH 8 CẢ NĂM - GLOBAL SUCCESS - NĂM HỌC 2023-2024 (CÓ FI...
 
PCOS corelations and management through Ayurveda.
PCOS corelations and management through Ayurveda.PCOS corelations and management through Ayurveda.
PCOS corelations and management through Ayurveda.
 

Story generation-Sarah Saneei

  • 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 :)