The Emotional Arcs of Stories Are Dominated by Six Basic Shapes
The Emotional Arcs of Stories Are Dominated by Six Basic Shapes
The Emotional Arcs of Stories Are Dominated by Six Basic Shapes
Andrew J. Reagan,1 Lewis Mitchell,2 Dilan Kiley,1 Christopher M. Danforth,1 and Peter Sheridan Dodds1
1
I.
INTRODUCTION
2
Seven plots: Representing over three decades of
work, Christopher Bookers The Seven Basic Plots:
Why we tell stories describes in great detail seven
narrative structures: [20]
Overcoming the monster (e.g., Beowulf ).
Hedonometric
analysis
Average
happiness
% of text
FIG. 1:
Schematic of how we compute emotional arcs.
The indicated uniform length segments (gap between samples) taken from the text form the sample with fixed window
size set at Nw = 10, 000 words. The segment length is thus
Ns = (N (Nw +1))/n for N the length of the book in words,
and n the number of points in the time series. Sliding this
fixed size window through the book, we generate n sentiment
scores with the Hedonometer, which comprise the emotional
arc [27].
B.
II.
A.
METHODS
FIG. 2: Annotated emotional arc of Harry Potter and the Deathly Hallows, by J.K. Rowling, inspired by the illustration
made by Medaris for The Why Files [28]. The entire seven book series can be classified as a Rags to riches and Kill the
monster story, while the many sub plots and connections between them complicate the emotional arc of each individual book.
The emotional arc shown here, captures the major highs and lows of the story, and should be familiar to any reader well
acquainted with Harry Potter. Our method does not pick up emotional moments discussed briefly, perhaps in one paragraph
or sentence (e.g., the first kiss of Harry and Ginny). We provide interactive visualizations of all Project Gutenberg books at
http://hedonometer.org/books/v3/1/ and a selection of classic and popular books at http://hedonometer.org/books/v1/.
(1)
4
Mode 1
Mode 2
Mode 3
0.1
0.5
0.0
-0.5
0.1
Mode 4
Mode 5
Mode 6
0.1
0.5
0.0
-0.5
Right
singular
vectors
(modes)
0.1
Mode 7
Mode 8
Mode
coefficients
from W
Mode 9
0.1
0.5
0.0
-0.5
0.1
Mode 10
Mode 11
Mode 12
0.1
0.5
0.0
-0.5
0.1
0
20
40
60
80
100
20
40
60
80
100
20
40
60
80
100
Percentage of book
FIG. 3: Top 12 modes from the Singular Value Decomposition of 1,737 Project Gutenberg books. We show in a lighter color
modes weighted by their corresponding singular value, where we have scaled the matrix such that the first entry is 1 for
comparison (for reference, the largest singular value is 27.3). The mode coefficients normalized for each book are shown in the
right panel accompanying each mode, in the range -1 to 1, with the Tukey box plot.
5
0.25
SV 1
Closest 20 Books
0.20
0.15
SV 2
SV 3
0.10
Modespace
havg 0.05
0.00
0.05
0.10
0.15
0.20
% of Book
10
30
50
70
90
% of Book
10
30
50
70
90
% of Book
10
30
50
70
90
Top Stories:
Top Stories:
Top Stories:
0.25
(SV 1)
0.20
(SV 2)
(SV 3)
0.15
0.10
Modespace
havg 0.05
0.00
0.05
0.10
0.15
0.20
10
30
50
70
% of Book
90
10
30
50
70
% of Book
90
10
30
50
70
% of Book
90
Top Stories:
Top Stories:
Top Stories:
FIG. 4: First 3 SVD modes and their negation with the closest stories to each. To locate the emotional arcs on the same scale
as the modes, we show the modes directly from the rows of V T and weight the emotional arcs by the inverse of their coefficient in
W for the particular mode. The closest stories shown for each mode are those stories with emotional arcs which have the greatest
coefficient in W . In parenthesis for each story is the Project Gutenberg ID and the number of downloads from the Project
Gutenberg website, respectively. Links below each story point to an interactive visualization on http://hedonometer.org
which enables detailed exploration of the emotional arc for the story.
III.
RESULTS
We obtain a collection of 1,737 books that are mostly, but not all, fictional stories by using metadata from
Project Gutenberg to construct a rough filter. Using
principal component analysis, we find broad support for
six emotional arcs:
6
Mode
SV 1
-SV 1
SV 2
-SV 2
SV 3
-SV 3
SV 4
-SV 4
SV 5
-SV 5
Mode Arc
Nm
267
440
219
167
104
109
108
47
48
44
Nm /N
15.4%
25.4%
12.7%
9.7%
6.0%
6.3%
6.2%
2.7%
2.8%
2.5%
DL Median H
289.0
337.5
327.0
297.0
298.0
303.0
311.5
286.0
280.0
280.5
DL Mean O
638.0
633.6
652.3
540.2
896.3
803.9
823.5
790.6
397.1
452.0
DL Variance
2176764
907943
1122421
554142
7829052
2839614
2728083
1637200
146597
188580
% > Average
20.6%
25.0%
21.9%
16.8%
22.1%
26.6%
26.9%
19.1%
8.3%
13.6%
Download Distribution
FIG. 5: Download statistics for stories whose SVD Modes comprise more than 2.5% of books, for N the total number of books
and Nm the number corresponding to the particular mode. Modes SV 3 through -SV 4 (both polarities of modes 3 and 4)
exhibit a higher average number of downloads and more variance than the others. Mode arcs are rows of V T and the download
distribution is show in log10 space from 150 to 30,000 downloads.
IV.
CONCLUSION
7
each present. By considering the results of each tool in
support of each other we are able to confirm our findings.
We have also shown that consideration of the emotional
arc for a given story is important for the success of that
story.
Our approach could applied in the opposite direction:
namely by beginning with the emotional arc and aiding
in the automatic generation of compelling stories [30].
The emotional arcs of stories may be useful to aid in
constructing arguments [31] and teaching common sense
to artificial intelligence systems [32].
Extensions of our analysis that use a more curated
selection of full-text fiction can answer more detailed
questions about which stories are the most popular
throughout time, and across regions [10]. Automatic extraction of character networks would allow a more
detailed analysis of plot structure for the Project Guten-
berg corpus used here [11, 33, 34]. Bridging the gap
between the full text stories [35] and systems that analyze plot sequences will allow such systems to undertake
studies of this scale [36]. Place could also be used to consider separate character networks through time, and to
help build an analog to Randall Munroes Movie Narrative Charts [37].
[16]
[17]
[18]
[19]
[20]
[21]
[22]
[23]
[24]
[25]
[26]
[27]
[28]
[29]
[30]
[31]
[32]
[33]
[34]
[35]
[36]
[37]
[38]
S1
Appendix A: Emotional Arc Construction
To generate emotional arcs, we consider many different approaches with the goal of generating time series that
meaningfully reflect the narrative sentiment. In general, we proceed as described in Fig. 1 and consider a method of
breaking up the text as having three (interdependent) parameter choices for a sliding window:
1. Length of the desired sample text.
2. Breakpoint between samples.
3. Overlap of each sample.
These methods vary between rating individual words with no overlap to rating the entire text. To make our choice,
we consider competing two objectives of time series generation: meaningfulness of sentiment scores and increased
temporal resolution of time series. For the most accurate sentiment scores, we can use the entire book. The highest
temporal resolution is possible with a sliding window of length 1, generating time series that have potentially as many
data points as words in the book.
Since our goal is not only the generation of time series, but the comparison of time series across texts, we consider
the additional objective of consistency. We seek time series which are consistent both in the accuracy of the time
series, as well as consistent in the length of the resulting time series. Again these goals are orthogonal, and we note
that our choice here can be tuned to test the sensitivity.
We normalize the length of emotional arcs for books of different length (while using a fixed window size) by varying
the amount that the window needs to move. To make a time series of length l from a book with N words, we fix the
sample length at k and set the overlap of samples to
(N k 1)/l
words. This guarantees that we have temporal resolution l and sample length k for any N > k + l. We do not consider
books with N k + l words.
To generate a sentiment score as in Fig. 1, we use a dictionary based approach for transparency and understanding
of sentiment. We select the LabMT dictionary for robust performance over many corpora and best coverage of word
usage. In particular, we determine a sample T s average happiness using the equation:
PN
havg (T ) =
havg (wi ) fi (T ) X
=
havg (wi ) pi (T ),
PN
i=1 fi (T )
i=1
i=1
(A1)
where we denote each of the N words in a given dictionary as wi , word sentiment scores as havg (wi ), word frequency
PN
as fi (T ), and normalized frequency of wi in T as pi (T ) = fi (T )/ i=1 fi (T ).
We note here for the general case, and additionally specify with the details of each method, that for each emotional
arc we subtract the mean before computing the distance or clustering. To compute the distance between two emotional
arcs, we use the city block distance metric:
D(bi , bj ) = l1
l
X
t=1
(A2)
Our null set of emotional arc time series is generated by randomly shuffling the words of each book that we consider.
Other variations on generating this null set include sampling from a phrase-level parse of the book with a Markov
process, using continuous space random walks directly, or shuffling on sentences.
4.5
7.0
5.4
4.0
6.5
5.2
3.5
6.0
3.0
5.5
2.5
2.0
1.5
5.0
4.5
4.0
1.0
3.5
0.5
3.0
0.0
2.5
2
3
log10 (Rank)
5.0
log10 (Length)
log10 (Length)
S2
4.8
4.6
4.4
4.2
4.0
2
3
log10 (Rank)
3.8
2.0
2.5
3.0
3.5
4.0
log10 (Downloads)
4.5
5.0
FIG. S1: Rank-frequency distributions of book downloads and length in the Gutenberg corpus: (A) downloads, (B) book
length in words, and (C) both downloads and length. We filter by both number of downloads and book length to select for
fiction books, with the filters shown as grey boxes in Panels A and B. In Panel C, we plot each of the resulting 1,748 books in
download-length space.
S3
Appendix B: Principal Component Analysis (SVD)
In this section we provide (1) more results from the SVD analysis and (2) a more in-depth, intuitive explanation of
the method.
First we have consider modes 46 and their closest stories in Fig. S2.
0.5
SV 4
Closest 20 Books
0.4
0.3
SV 5
SV 6
0.2
Modespace
havg 0.1
0.0
0.1
0.2
0.3
0.4
% of Book
10
30
50
70
90
% of Book
10
30
50
70
90
% of Book
10
30
50
70
90
Top Stories:
Top Stories:
Top Stories:
0.5
(SV 4)
0.4
(SV 5)
(SV 6)
0.3
0.2
Modespace
havg 0.1
0.0
0.1
0.2
0.3
0.4
10
30
50
70
% of Book
90
10
30
50
70
% of Book
90
10
30
50
70
% of Book
90
Top Stories:
Top Stories:
Top Stories:
FIG. S2: SVD modes 46 (and their negation) with closest stories. First 3 SVD modes and their negation with the closest
stories to each. Again, to show the emotional arcs on the same scale as the modes, we show the modes directly from the rows
of V T and weight the emotional arcs by the inverse of their coefficient in W for the particular mode. Shown in parenthesis for
each story is the Project Gutenberg ID and the number of downloads from the Project Gutenberg website, respectively. Links
below each story point to an interactive visualization on http://hedonometer.org which enables detailed exploration of the
emotional arc for the story.
In an effort to develop a better intuition for the results of the principal component analysis by way of SVD, we plot
Eq. 1 along with representations of the matrices in Fig. S3.
Further, we considered in Eq. 1 the mode coefficient in the matrix W , and in Fig S4 we plot the second line of the
equation with W :
With A written as W V T , the coefficients for each mode (row of V T ) for a book i are given as the rows of W . To
reconstruct the emotional arc of book i, using mode j from V T , we simply multiply W [i, j] V T [j, :]. Shown below in
Fig. S5, we built the emotional arc for an example story using only the first mode through the first 12 modes.
S4
FIG. S3: Schematic of the Singular Value Decomposition applied to emotional arcs of Project Gutenberg books. Shown in A
are 10 randomly chosen emotional arcs, in U a spy of the matrix, in the decreasing singular values, and in V T sinusoidal
modes. We emphasize that this representation is purely for intuition, as only U is a image of the actual matrix, and A has only
10 of the 1,737 books.
FIG. S4: Schematic of the Singular Value Decomposition applied to emotional arcs of Project Gutenberg books, with W = U
containing the mode coefficients. Again shown in A are 10 randomly chosen emotional arcs, in W a spy of the matrix used
in the analysis, and in V T representative sinusoidal modes.
S5
0.15
0.10
0.05
0.00
0.05
0.10
1 Mode Approx.
2 Mode Approx.
3 Mode Approx.
0.15
0.15
0.10
0.05
0.00
0.05
0.10
4 Mode Approx.
5 Mode Approx.
6 Mode Approx.
0.15
0.15
0.10
0.05
0.00
0.05
0.10
7 Mode Approx.
8 Mode Approx.
9 Mode Approx.
0.15
0.15
0.10
0.05
0.00
0.05
0.10
0.15
10 Mode Approx.
0
20
40
60
Percentage of book
80
11 Mode Approx.
1000
20
40
60
Percentage of book
80
12 Mode Approx.
1000
20
40
60
80
100
Percentage of book
FIG. S5: Reconstruction of the emotional arc from Alices Adventures Under Ground, by Lewis Carroll. The addition of more
modes from the SVD more closely reconstructs the detailed emotional arc. This book is well represented by the first mode
alone, with only minor corrections from modes 2-11, as we should expect for a book whose emotional arc so closely resembles
the Rags to Riches arc.
S6
Appendix C: Hierarchical Clustering
We use Wards method to generate a hierarchical clustering of stories, which proceeds by minimizing variance
between clusters of books [38]. We again use the mean-centered books and the distance function given in Eq. A2 to
generate the distance matrix.
We show a dendrogram of the 60 clusters with highest linkage cost in Fig. S6. A characteristic book from each
cluster is shown on the right by sorting the books within each cluster by the total distance to other books in the
cluster (e.g., considering each intra-cluster collection as a fully connected weighted network, we take the most central
node), and in parenthesis the number of books in that cluster. In other words, we label each cluster by considering
the network centrality of the fully connected cluster with edges weighted by the distance between stories. By cutting
the dendrogram in Fig. S6 at various costs we are able to extract clusters of the desired granularity. For the cuts
labeled 0, 1, and 2, we show these clusters in Figs. S7, S8, and S9.
The final linkage in the hierarchical clustering combines the two clusters in Fig. S7 of size 1203 (Panel A, Threshold
8000 Cluster 1) and size 548 (Panel B, Threshold 800 Cluster 2). Cluster 1 is much larger, and the main difference
between these clusters appears to be their variance. Nevertheless, we are able to see from the cluster average emotional
arc (shown in orange) that Cluster 1 most closely follows a Tragedy with the happy ending and Cluster 2 follows
the Man in a hole story. The top stories in Cluster 1 are Piper in the Woods and Butterfly 9, in the Figure they
are shown with their ID in the Project Gutenberg database. The most central stories for Cluster 2 are Asmodeus; or,
The Devil on Two Sticks and Ghost Stories of an Antiquary.
Going through the linkage procedure in reverse, we see in Fig. S8 that Threshold 8000 Cluster 1 is the linkage of
Threshold 3850 Cluster 1 and Threshold 3850 Cluster 3. We see that what was a Tragedy with the happy ending
splits into a tragedy in Cluster 1 (with perhaps a small uptick) and a mostly flat Cluster 3. Threshold 8000 Cluster
2 is the linkage of Threshold 3850 Cluster 2 and Threshold 3850 Cluster 4, Panels B and D in Fig. S8, respectively.
Cluster 2 here again shows the most variance, with what mostly closely resembles a Romance story shape. Cluster
4, on average, is the man in the hole story type.
Finally, in Fig. S9 we see the 8 most different clusters as a collection of a familiar story types. In Panel A, Threshold
2050 Cluster 1 we have the Romance story. In Panel C, we have the Rags to riches (Cinderella) story. Panels E,
F, and G are all Man in a hole stories of varying strength. In Panel H we find a large number of stories (360) that
fall squarely into the Tragedy story type.
S7
Threshold = 8000
Threshold = 3850
Threshold = 2050
2 Clusters
4 Clusters
8 Clusters
8000
6000
4000
2000
S8
0.4
0.3
0.2
0.1
0.0
0.1
0.2
0.3
4. Butterfly 9 (51167)
S9
0.6
0.4
0.2
0.0
0.2
0.4
0.6
0.6
2. Butterfly 9 (51167)
5. Euthyphro (1642)
0.4
0.2
0.0
0.2
0.4
0.6
1. An Enemy of the People (2446)
2. Ghosts (8121)
3. Othello (2267)
4. Pierre and Jean (3804)
5. All Things Considered (11505)
S10
0.6
0.4
0.2
0.0
0.2
0.4
0.6
0.6
0.4
0.2
0.0
0.2
0.4
0.6
0.6
2. Euthyphro (1642)
4. Dreams (1439)
0.4
0.2
0.0
0.2
0.4
0.6
1. A General Introduction to Psychoanalysis (38219)
1. Othello (2267)
2. Ghosts (8121)
S11
Appendix D: Unsupervised Machine Learning
The SOM works by finding the most similar emotional arc in a random collection of arcs. We use a 13x13 SOM
(for 169 nodes, roughly 10% of the number of books), connected on a square grid, training according to the original
procedure (with winner take all, and scaling functions across both distance and magnitude). We take the neighborhood
influence function at iteration i as
i
h
(D1)
Nbdk (i) = j N | d(k, j) < N (i + 1)
for a node k in the set of nodes N , with distance function d and total number of nodes N . For result shown here we
take = 0.15. We implement the learning adaptation function at training iteration i as
f (i) = (i + 1) ,
(D2)
12
13.5
12
F
140
12.0
10
10
120
10.5
8
9.0
100
Nj
Nj
7.5
80
6.0
60
4
4.5
E
3.0
2
D
C
0
0
6
Ni
0
8
10
12
0.0
20
1.5
40
A
6
Ni
10
12
FIG. S10: Left panel: Nodes on the 2D SOM grid are shaded by the number of stories for which they are the winner. Right
panel: The B-Matrix shows that there are clear clusters of stories in the 2D space imposed by the SOM network.
The top 9 SOM stories for our set of null emotional arcs are shown in Fig. S17. We observe that, as hypothesized, the
shuffled versions of stories lack coherent structure and are not emotional experiences that we can attach to meaningful
stories.
S12
0.3
0.2
0.1
0.0
0.1
0.2
0.3
0.3
2. Carmen (2465)
0.2
0.1
0.0
0.1
0.2
0.3
0.3
4. Anthem (1250)
0.2
0.1
0.0
0.1
0.2
0.3
1. Hamlet, Prince of Denmark (1524)
3. Hamlet (1787)
5. East of the Sun and West of the Moon: Old Tales... (30973)
5. The Man with Two Left Feet, and Other Stories (7471)
FIG. S11: The vector for each of the top 9 SOM nodes, accompanied with those sentiment time series which are closest to
that node. The core stories which we have found with other methods are readily visible.
S13
Appendix E: Word salads (null) comparison
Figs. S12, S13, S14, S15, S16, and S17 showcase the emotional arc analysis applied to word salad books.
5.92
Gutenberg #1
Shuffled
5.90
5.88
Happs
5.86
5.84
5.82
5.80
5.78
5.76
5.74
50
100
Story time
150
200
FIG. S12: The first book in Project Gutenberg, The Declaration of Independence of the United States of America by Thomas
Jefferson, along with word salad versions.
S14
Mode 1
Mode 2
Mode 3
0.1
0.5
0.0
-0.5
0.1
Mode 4
Mode 5
Mode 6
0.1
0.5
0.0
-0.5
Right
singular
vectors
(modes)
0.1
Mode 7
Mode 8
Mode
coefficients
from W
Mode 9
0.1
0.5
0.0
-0.5
0.1
Mode 10
Mode 11
Mode 12
0.1
0.5
0.0
-0.5
0.1
0
20
40
60
80
100
20
40
60
80
100
20
40
60
80
100
Percentage of book
FIG. S13: SVD modes from the emotional arcs of word salad books. We observe higher frequency modes appearing more
quickly, and a more even spread of mode coefficients.
S15
30
S
Control
Singular Value
25
20
15
10
5
0
10
20
30
40
50
Mode
FIG. S14: Comparison of the singular value spectra from the word salad emotional arcs and the emotional arcs of individual
Project Gutenberg books. The spectra from the word salad books is muted, indicating both lower total variance explained and
less important ordering of the singular vectors.
S16
Threshold = 1500
Threshold = 850
Threshold = 490
2 Clusters
4 Clusters
8 Clusters
1500
1000
500
FIG. S15: Dendrogram of clustering using Wards method on the emotional arcs of word salad books. We observe comparatively
low linkage cost for these emotional arcs, indicating the absence of distinct clusters.
S17
A
0.05
0.00
0.05
2. Butterfly 9 (51167)
4. Ozma of Oz (486)
0.05
0.00
0.05
1. Woodwork Joints: How they are Set Out, How Made... (21531)
2. Idylls of the King (610)
3. A Rebels Recollections (51211)
4. Further Chronicles of Avonlea (5340)
5. The White Company (903)
FIG. S16: Four clusters (linkage threshold 850) from the hierarchical clustering of word salad books. We observe that the
cluster mean emotional arc and the most central emotional arcs have high variance, without a visible signal.
S18
0.3
0.2
0.1
0.0
0.1
0.2
0.3
1. Piper in the Woods (32832)
2. Butterfly 9 (51167)
3. Appointment In Tomorrow (51152)
4. Transfer Point (51115)
5. How to Live on 24 Hours a Day (2274)
0.3
0.2
0.1
0.0
0.1
0.2
0.3
1. The Go-Getter: A Story That Tells You How to be... (12257)
2. Salom : A Tragedy in One Act (42704)
3. The Nakimu Caves: Glacier Dominion Park, B. C. (51042)
4. A Strange Disappearance (1167)
5. The Riddle of the Sands (2360)
0.3
0.2
0.1
0.0
0.1
0.2
0.3
1. She Stoops to Conquer; Or, The Mistakes of a Ni... (383)
2. The Light Princess (697)
3. The Problem Makers (50971)
4. Pygmalion (3825)
5. Three Dialogues Between Hylas and Philonous in ... (4724)
FIG. S17: The vector for each of the top 9 SOM nodes for null emotional arcs, accompanied with those sentiment time series
which are closest to that node. We see that the emotional arcs from null arcs show little coherent structure, collapsing heavily
onto a single node with muted variance.
S19
Appendix F: Additional Figures
FIG. S18: Kurt Vonnegut writes in his autobiography Palm Sunday on the similarity of certain story shapes [23]. The exposition
of this particular similarity would place both of these stories in our grouping of Rags to Riches emotional arcs.
Mode
SV 1
-SV 1
SV 2
-SV 2
SV 3
-SV 3
SV 4
-SV 4
SV 5
-SV 5
SV 6
-SV 6
SV 7
-SV 7
SV 8
-SV 8
-SV 9
SV 10
Mode Arc
Nm
267
440
219
167
104
109
108
47
48
44
15
43
19
24
12
14
10
10
Nm /N
15.4%
25.4%
12.7%
9.7%
6.0%
6.3%
6.2%
2.7%
2.8%
2.5%
0.9%
2.5%
1.1%
1.4%
0.7%
0.8%
0.6%
0.6%
DL Median H
289.0
337.5
327.0
297.0
298.0
303.0
311.5
286.0
280.0
280.5
336.0
267.0
336.0
286.5
279.5
275.0
215.0
410.0
DL Mean O
638.0
633.6
652.3
540.2
896.3
803.9
823.5
790.6
397.1
452.0
500.8
689.5
678.7
786.5
509.0
764.9
275.2
756.4
DL Variance
2176764
907943
1122421
554142
7829052
2839614
2728083
1637200
146597
188580
337828
929111
643264
1597462
479830
1067329
13927
666121
% > Average
20.6%
25.0%
21.9%
16.8%
22.1%
26.6%
26.9%
19.1%
8.3%
13.6%
13.3%
25.6%
21.1%
25.0%
8.3%
28.6%
0.0%
20.0%
Download Distribution
FIG. S19: Download statistics for SVD Modes with more than 0.5% of books.