This presentation summarizes a neural entity-based text generation model called ENGEN. It combines three sources of contextual information - context from entities, content of the current sentence, and context from the previous sentence. The model assigns vector representations to entities that are updated each time an entity is mentioned. It was evaluated on three tasks: mention generation, pairwise sentence selection, and human evaluation of sentence generation. For mention generation, ENGEN performed better than baselines by leveraging entity representations. For sentence selection, S2SA performed best due to importance of local context. In human evaluation, ENGEN was rated better than S2SA for 27 out of 50 passages due to its ability to model coreference and generate coherent new entities.
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ℎ 𝑡,𝑖
𝑒𝑡,𝑖
𝑝𝑡,𝑖
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
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
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)
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