Feuding Families and Former Friends: Unsupervised Learning for Dynamic Fictional Relationships
Mohit Iyyer, Anupam Guha, Snigdha Chaturvedi, Jordan Boyd-Graber, and Hal Daumé III
University of Maryland, College Park University of Colorado, Boulder
1
Feuding Families and Former Friends: Unsupervised Learning for - - PowerPoint PPT Presentation
Feuding Families and Former Friends: Unsupervised Learning for Dynamic Fictional Relationships Mohit Iyyer, Anupam Guha, Snigdha Chaturvedi, Jordan Boyd-Graber, and Hal Daum III University of Maryland, College Park University of
Mohit Iyyer, Anupam Guha, Snigdha Chaturvedi, Jordan Boyd-Graber, and Hal Daumé III
University of Maryland, College Park University of Colorado, Boulder
1
2
relationship descriptor) from a predetermined set Friend or foe?
3
relationship descriptor) from a predetermined set Friend or foe?
Peter Pan and Captain Hook (Peter Pan)
4
relationship descriptor) from a predetermined set Friend or foe?
Peter Pan and Captain Hook (Peter Pan)
5
relationship descriptor) from a predetermined set Friend or foe?
Peter Pan and Captain Hook (Peter Pan) Frodo and Sam (Lord of the Rings)
6
relationship descriptor) from a predetermined set Friend or foe?
Peter Pan and Captain Hook (Peter Pan) Frodo and Sam (Lord of the Rings)
7
relationship descriptor) from a predetermined set Friend or foe?
Peter Pan and Captain Hook (Peter Pan) Frodo and Sam (Lord of the Rings) Winston and Julia (1984)
8
relationship descriptor) from a predetermined set Friend or foe?
Peter Pan and Captain Hook (Peter Pan) Frodo and Sam (Lord of the Rings) Winston and Julia (1984) ???
9
relationship descriptor) from a predetermined set Friend or foe?
Peter Pan and Captain Hook (Peter Pan) Frodo and Sam (Lord of the Rings) Winston and Julia (1984) ??? Harry Potter and Sirius (Prisoner of Azkaban)
10
relationship descriptor) from a predetermined set Friend or foe?
Peter Pan and Captain Hook (Peter Pan) Frodo and Sam (Lord of the Rings) Winston and Julia (1984) ??? Harry Potter and Sirius (Prisoner of Azkaban) ???
11
trajectories) of descriptors? (Chaturvedi et al., 2016) Tom Sawyer and Becky Thatcher: friends -> foes -> friends
12
trajectories) of descriptors? (Chaturvedi et al., 2016) Tom Sawyer and Becky Thatcher: friends -> foes -> friends
13
passage of time
Arthur and Lucy (Dracula)
passage of time
I love him more than ever. We are to be married on 28 September.
Arthur and Lucy (Dracula)
passage of time
love joy marriage
I love him more than ever. We are to be married on 28 September.
Arthur and Lucy (Dracula)
passage of time
love joy marriage
I love him more than ever. We are to be married on 28 September.
I feel so weak and worn
… I hadn't the spirit
Arthur and Lucy (Dracula)
passage of time
love joy marriage love sadness sickness
I love him more than ever. We are to be married on 28 September.
I feel so weak and worn
… I hadn't the spirit
Arthur and Lucy (Dracula)
passage of time
love joy marriage love sadness sickness
I love him more than ever. We are to be married on 28 September.
I feel so weak and worn
… I hadn't the spirit
poor girl, there is peace for her at
Arthur and Lucy (Dracula)
passage of time
love joy marriage love sadness sickness love fantasy sickness sadness death
I love him more than ever. We are to be married on 28 September.
I feel so weak and worn
… I hadn't the spirit
poor girl, there is peace for her at
Arthur and Lucy (Dracula)
passage of time
love joy marriage love sadness sickness love fantasy sickness sadness death
I love him more than ever. We are to be married on 28 September.
I feel so weak and worn
… I hadn't the spirit
poor girl, there is peace for her at
Arthur placed the stake over her heart … he struck with all his might. The Thing in the coffin writhed …
Arthur and Lucy (Dracula)
passage of time
love joy marriage love sadness sickness love fantasy sickness sadness death love fantasy death murder
I love him more than ever. We are to be married on 28 September.
I feel so weak and worn
… I hadn't the spirit
poor girl, there is peace for her at
Arthur placed the stake over her heart … he struck with all his might. The Thing in the coffin writhed …
Arthur and Lucy (Dracula)
scholars collect examples of specific relationship types
15
“Do Jane Austen’s female and male protagonists have a pattern in their evolving relationship (e.g., mutual disdain followed by romantic love)?” (Butler, 1975; Stovel, 1987; Hinant, 2006) “Do certain authors or novels portray relationships of desire more than others?” (Polhemus, 1990) “Can we detect positive or negative subtext underlying meals between two characters?” (Foster, 2009; Cognard-Black et al., 2014)
trajectories
16
17
all spans of text that contain mentions to both characters
17
“If anyone was ever minding his business, it was I," Ignatius breathed. "Please. We must stop. I think I'm going to have a hemorrhage.” "Okay." Mrs. Reilly looked at her son's reddening face and realized that he would very happily collapse at her feet just to prove his point.”
t=0
all spans of text that contain mentions to both characters
17
“If anyone was ever minding his business, it was I," Ignatius breathed. "Please. We must stop. I think I'm going to have a hemorrhage.” "Okay." Mrs. Reilly looked at her son's reddening face and realized that he would very happily collapse at her feet just to prove his point.”
t=0
“Ignatius belched the gas of a dozen brownies trapped by his valve. "Grant me a little peace.…” "You know I appreciate you, babe," Mrs. Reilly sniffed. "Come on and gimme a little goodbye kiss like a good boy.”
t=1
all spans of text that contain mentions to both characters
17
“If anyone was ever minding his business, it was I," Ignatius breathed. "Please. We must stop. I think I'm going to have a hemorrhage.” "Okay." Mrs. Reilly looked at her son's reddening face and realized that he would very happily collapse at her feet just to prove his point.”
t=0
“Ignatius belched the gas of a dozen brownies trapped by his valve. "Grant me a little peace.…” "You know I appreciate you, babe," Mrs. Reilly sniffed. "Come on and gimme a little goodbye kiss like a good boy.”
t=1
not a communiss?" "Oh, my God!" Ignatius bellowed. "Every day I am subjected to a McCarthyite witchhunt in this crumbling
t=2
all spans of text that contain mentions to both characters
Internet sources
character mention
18
19
20
"Ignatius, you sure you not a communiss?" "Oh, my God!" Ignatius bellowed. "Every day I am subjected to a McCarthyite witchhunt in this crumbling building. No!" “Ignatius belched the gas of a dozen brownies trapped by his valve. "Grant me a little peace.…” "You know I appreciate you, babe," Mrs. Reilly
kiss like a good boy.”
"Ignatius, you sure you not a communiss?" "Oh, my God!" Ignatius bellowed. "Every day I am subjected to a McCarthyite witchhunt in this crumbling building. No!"
"Ignatius, you sure you not a communiss?" "Oh, my God!" Ignatius bellowed. "Every day I am subjected to a McCarthyite witchhunt in this crumbling building. No!" “Ignatius belched the gas of a dozen brownies trapped by his valve. "Grant me a little peace.…” "You know I appreciate you, babe," Mrs. Reilly
kiss like a good boy.”
"Ignatius, you sure you not a communiss?" "Oh, my God!" Ignatius bellowed. "Every day I am subjected to a McCarthyite witchhunt in this crumbling building. No!"
21
reconstruct inputs
"Ignatius, you sure you not a communiss?" "Oh, my God!" Ignatius bellowed. "Every day I am subjected to a McCarthyite witchhunt in this crumbling building. No!" “Ignatius belched the gas of a dozen brownies trapped by his valve. "Grant me a little peace.…” "You know I appreciate you, babe," Mrs. Reilly
kiss like a good boy.”
"Ignatius, you sure you not a communiss?" "Oh, my God!" Ignatius bellowed. "Every day I am subjected to a McCarthyite witchhunt in this crumbling building. No!"
22
descriptor matrix
"Ignatius, you sure you not a communiss?" "Oh, my God!" Ignatius bellowed. "Every day I am subjected to a McCarthyite witchhunt in this crumbling building. No!" “Ignatius belched the gas of a dozen brownies trapped by his valve. "Grant me a little peace.…” "You know I appreciate you, babe," Mrs. Reilly
kiss like a good boy.”
"Ignatius, you sure you not a communiss?" "Oh, my God!" Ignatius bellowed. "Every day I am subjected to a McCarthyite witchhunt in this crumbling building. No!"
23
reconstruct inputs
24
rt = RTdt
"Ignatius, you sure you not a communiss?" "Oh, my God!" Ignatius bellowed. "Every day I am subjected to a McCarthyite witchhunt in this crumbling building. No!"
Ignatius “A Confederacy
ht = f(Wh · [vst; vc1; vc2; vb])
vst vc1 vc2 vb dt−1 R dt = α · softmax(Wd · [ht; dt−1])+ (1 − α) · dt−1
: previous state : descriptor matrix : reconstruction
: distribution over descriptors
reconstructed vector close to the input span vector
embedding average
character embeddings and book embeddings
connection that copies over some
hidden state
activation function to make the hidden state a probability distribution over descriptors…
state by the descriptor matrix to obtain a reconstruction of the span vector
25
rt = RTdt
"Ignatius, you sure you not a communiss?" "Oh, my God!" Ignatius bellowed. "Every day I am subjected to a McCarthyite witchhunt in this crumbling building. No!"
Ignatius “A Confederacy
ht = f(Wh · [vst; vc1; vc2; vb])
vst vc1 vc2 vb dt−1 R dt = α · softmax(Wd · [ht; dt−1])+ (1 − α) · dt−1
: previous state : descriptor matrix : reconstruction
: distribution over descriptors
reconstructed vector close to the input span vector
embedding average
embeddings for characters and books
connection that copies over some
hidden state
activation function to make the hidden state a probability distribution over descriptors…
state by the descriptor matrix to obtain a reconstruction of the span vector
26
rt = RTdt
"Ignatius, you sure you not a communiss?" "Oh, my God!" Ignatius bellowed. "Every day I am subjected to a McCarthyite witchhunt in this crumbling building. No!"
Ignatius “A Confederacy
ht = f(Wh · [vst; vc1; vc2; vb])
vst vc1 vc2 vb dt−1 R dt = α · softmax(Wd · [ht; dt−1])+ (1 − α) · dt−1
: previous state : descriptor matrix : reconstruction
: distribution over descriptors
reconstructed vector close to the input span vector
embedding average
embeddings for characters and books
connection that copies over some
hidden state
activation function to make the hidden state a probability distribution over descriptors…
state by the descriptor matrix to obtain a reconstruction of the span vector
27
rt = RTdt
"Ignatius, you sure you not a communiss?" "Oh, my God!" Ignatius bellowed. "Every day I am subjected to a McCarthyite witchhunt in this crumbling building. No!"
Ignatius “A Confederacy
ht = f(Wh · [vst; vc1; vc2; vb])
vst vc1 vc2 vb dt−1 R dt = α · softmax(Wd · [ht; dt−1])+ (1 − α) · dt−1
: previous state : descriptor matrix : reconstruction
: distribution over descriptors
reconstructed vector close to the input span vector
embedding average
embeddings for characters and books
connection that copies over some
hidden state
activation function to make the hidden state a probability distribution over descriptors…
state by the descriptor matrix to obtain a reconstruction of the span vector
linear interpolation
28
rt = RTdt
"Ignatius, you sure you not a communiss?" "Oh, my God!" Ignatius bellowed. "Every day I am subjected to a McCarthyite witchhunt in this crumbling building. No!"
Ignatius “A Confederacy
ht = f(Wh · [vst; vc1; vc2; vb])
vst vc1 vc2 vb dt−1 R dt = α · softmax(Wd · [ht; dt−1])+ (1 − α) · dt−1
: previous state : descriptor matrix : reconstruction
: distribution over descriptors
reconstructed vector close to the input span vector
embedding average
embeddings for characters and books
connection that copies over some
hidden state
activation function to make the hidden state a probability distribution over descriptors…
state by the descriptor matrix to obtain a reconstruction of the span vector
softmax activation
29
rt = RTdt
"Ignatius, you sure you not a communiss?" "Oh, my God!" Ignatius bellowed. "Every day I am subjected to a McCarthyite witchhunt in this crumbling building. No!"
Ignatius “A Confederacy
ht = f(Wh · [vst; vc1; vc2; vb])
vst vc1 vc2 vb dt−1 R dt = α · softmax(Wd · [ht; dt−1])+ (1 − α) · dt−1
: previous state : descriptor matrix : reconstruction
: distribution over descriptors
reconstructed vector close to the input span vector
embedding average
embeddings for characters and books
connection that copies over some
hidden state
activation function to make the hidden state a probability distribution over descriptors…
state by the descriptor matrix to obtain a reconstruction of the span vector
30
rt = RTdt
"Ignatius, you sure you not a communiss?" "Oh, my God!" Ignatius bellowed. "Every day I am subjected to a McCarthyite witchhunt in this crumbling building. No!"
Ignatius “A Confederacy
ht = f(Wh · [vst; vc1; vc2; vb])
vst vc1 vc2 vb dt−1 R dt = α · softmax(Wd · [ht; dt−1])+ (1 − α) · dt−1
: previous state : descriptor matrix : reconstruction
: distribution over descriptors
reconstructed vector close to the input span vector
embedding average
embeddings for characters and books
connection that copies over some
hidden state
activation function to make the hidden state a probability distribution over descriptors…
state by the descriptor matrix to obtain a reconstruction of the span vector
row of the descriptor matrix R, which humans use to provide external labels.
31
violence: grenades, guns, bullets sadness: regretful, rueful, pity politics: political, leadership, rule fantasy: cosmic, realms, universe suffering: fear, nightmares, suffer
document-topic assignments z
2008)
32
33
the topics learned by our topic model baselines
—other than the intruder—come from the same descriptor
34
contempt malice condescend praise distaste mock worship pray devote yourselves gods gather
the topics learned by our topic model baselines
—other than the intruder—come from the same descriptor
35
contempt malice condescend praise distaste mock worship pray devote yourselves gods gather
the topics learned by our topic model baselines
—other than the intruder—come from the same descriptor
36
contempt malice condescend praise distaste mock worship pray devote yourselves gods gather
37
K=10 K=30 K=50 0.4 0.5 0.6 0.7 0.8
Model Precision
LDA Nubbi HTMM GRMN RMN
38
39
HTMM crime: blood knife pain legs steal food: kitchen mouth glass food bread violence: sword shot blood shouted swung boats: ship boat captain deck crew
RMN
sadness: regretful rueful pity pained despondent education: teaching graduate year teacher attended love: love delightful happiness enjoyed enjoyable murder: autopsy arrested homicide murdered
40
HTMM crime: blood knife pain legs steal food: kitchen mouth glass food bread violence: sword shot blood shouted swung boats: ship boat captain deck crew
RMN
sadness: regretful rueful pity pained despondent education: teaching graduate year teacher attended love: love delightful happiness enjoyed enjoyable murder: autopsy arrested homicide murdered
41
compute argmax
vertically
42
compute argmax
vertically
43
time love death money crime 0.95 0.01 0.03 0.01 1 0.8 0.01 0.18 0.01 2 0.4 0.01 0.5 0.09 3 0.3 0.01 0.2 0.5 4 0.2 0.7 0.05 0.05
44
love time
time love death money crime 0.95 0.01 0.03 0.01 1 0.8 0.01 0.18 0.01 2 0.4 0.01 0.5 0.09 3 0.3 0.01 0.2 0.5 4 0.2 0.7 0.05 0.05
compute argmax
vertically
45
love time
time love death money crime 0.95 0.01 0.03 0.01 1 0.8 0.01 0.18 0.01 2 0.4 0.01 0.5 0.09 3 0.3 0.01 0.2 0.5 4 0.2 0.7 0.05 0.05
compute argmax
vertically
46
money love time
time love death money crime 0.95 0.01 0.03 0.01 1 0.8 0.01 0.18 0.01 2 0.4 0.01 0.5 0.09 3 0.3 0.01 0.2 0.5 4 0.2 0.7 0.05 0.05
compute argmax
vertically
47
money love time
time love death money crime 0.95 0.01 0.03 0.01 1 0.8 0.01 0.18 0.01 2 0.4 0.01 0.5 0.09 3 0.3 0.01 0.2 0.5 4 0.2 0.7 0.05 0.05
crime
compute argmax
vertically
48
death money love time
time love death money crime 0.95 0.01 0.03 0.01 1 0.8 0.01 0.18 0.01 2 0.4 0.01 0.5 0.09 3 0.3 0.01 0.2 0.5 4 0.2 0.7 0.05 0.05
crime
compute argmax
vertically
pairs to evaluate
relationships (69.6%, Fleiss κ=0.32)
49
In this task, you will be comparing two timelines
characters changes over time. We will provide you with a summary of the relationship, and your job is to select which of the two timelines (A or B) better captures the content of the summary.
50
Summary: Govinda is Siddhartha’s best friend and sometimes his follower. Like Siddhartha, Govinda devotes his life to the quest for understanding and
leaves the Samanas to follow Gotama. He searches for enlightenment independently
end, he is able to achieve enlightenment only because of Siddhartha’s love for him.
51
52
TIME HTMM RMN Dracula: Arthur and Lucy
love love sadness joy love fantasy love fantasy sickness death sadness death marriage sickness murder
passage of time
I love him more than ever. We are to be married on 28 September. I feel so weak and worn
… I hadn't the spirit poor girl, there is peace for her at
Arthur placed the stake over her heart … he struck with all his might. The Thing in the coffin writhed …
Arthur and Lucy “ground-truth”:
marriage -> sickness -> death -> murder
53
TIME HTMM RMN Dracula: Arthur and Lucy
love love sadness joy love fantasy love fantasy sickness death sadness death marriage sickness murder
passage of time
I love him more than ever. We are to be married on 28 September. I feel so weak and worn
… I hadn't the spirit poor girl, there is peace for her at
Arthur placed the stake over her heart … he struck with all his might. The Thing in the coffin writhed …
Arthur and Lucy “ground-truth”:
marriage -> sickness -> death -> murder
learned trajectories:
54
HTMM RMN Storm Island: David and Lucy HTMM RMN A Tale of Two Cities: Darnay and Lucie
Event-based similarities between the two models The RMN is led astray by the novel’s sad tone
55
HTMM RMN Storm Island: David and Lucy HTMM RMN A Tale of Two Cities: Darnay and Lucie
Event-based similarities between the two models The RMN is led astray by the novel’s sad tone
56
annotations for relationships in Project Gutenberg
57
annotations for relationships in Project Gutenberg
58
love death sadness 0.9 0.05 0.05 0.8 0.1 0.1 0.6 0.3 0.1 0.7 0.1 0.2 0.8 0.1 0.1 love death sadness 0.1 0.7 0.2 0.2 0.3 0.5 0.15 0.25 0.6 0.05 0.65 0.3 0.1 0.2 0.7
positive negative
Don Quixote & Sancho Panza Candide & Cunégonde Anna Karenina & Vronsky … Dracula & Jonathan Harker
Hester Prynne & Chillingworth …
annotations for relationships in Project Gutenberg
59
love death sadness 0.9 0.05 0.05 0.8 0.1 0.1 0.6 0.3 0.1 0.7 0.1 0.2 0.8 0.1 0.1 0.76 0.13 0.11 love death sadness 0.1 0.7 0.2 0.2 0.3 0.5 0.15 0.25 0.6 0.05 0.65 0.3 0.1 0.2 0.7 0.12 0.42 0.46
positive negative average the positive and negative trajectories
annotations for relationships in Project Gutenberg
60
love death sadness 0.9 0.05 0.05 0.8 0.1 0.1 0.6 0.3 0.1 0.7 0.1 0.2 0.8 0.1 0.1 0.76 0.13 0.11 love death sadness 0.1 0.7 0.2 0.2 0.3 0.5 0.15 0.25 0.6 0.05 0.65 0.3 0.1 0.2 0.7 0.12 0.42 0.46
positive negative
61
RMN education love religion sex HTMM love parental business
Most Positive Descriptors
62
RMN education love religion sex RMN politics murder sadness royalty HTMM love parental business
HTMM love politics violence crime Most Positive Descriptors Most Negative Descriptors
63
RMN education love religion sex RMN politics murder sadness royalty HTMM love parental business
HTMM love politics violence crime Most Positive Descriptors Most Negative Descriptors
Victorian-era authors (e.g., Charles Dickens and George Eliot)
64
Victorian-era authors are “obsessed with otherness… of antiquated social and legal institutions, and of autocratic and/or dictatorial abusive government” (Zarifopol-Johnston,1995)
modeling, requires considerable human effort
relationship are mentioned
character disambiguation and coreference resolution
65
modeling as well as an interpretable neural network architecture, the RMN, for this task
descriptors and more interpretable trajectories than topic model baselines
to help answer literary questions with the RMN
66
code/data @ github.com/miyyer/rmn
67