Multi-Graph Encoder-Decoder Model for Location-Based Character
Networks in Literary Narrative
Avi Bleiweiss
BShalem Research, Sunnyvale, U.S.A.
Keywords:
Narrative Intelligence, Geo-Location, Graph Theory, Community Discovery, Neural Networks.
Abstract:
In the past decade, an extended line of research developed a broad range of methods for reasoning about nar-
rative from a social perspective. This often revolved around transforming literary text into a character network
representation. However, there remain inconsistent traits of narrative structure produced computationally by
either neural language technology or network theory tools. In this paper, we propose an encoder-decoder
model with a main objective to mitigate the apparent computational divergence. Our encoder novelty lies in
generating hundreds of location-based network graphs to render a fine-grained narrative. We further formal-
ize a decoder task for detecting character communities and analyze modularity and membership affiliation.
Through empirical experiments, we present visualization of stages in our computational process for four liter-
ary fiction novels.
1 INTRODUCTION
Over a decade ago, the study of literature underwent
a major shift from close reading of individual texts to
the construction of abstract models. The quantitative
approach to literature has Moretti (2005) graphically
map out text according to history, geography, and
social connections. Moreover, by turning time into
space, a narrative plot can be further represented as a
social network of characters and interactions (Moretti,
2011). Network analysis also offers a powerful mode
of intrinsic criticism, by providing empirical mea-
sures of the novel social scale and density (Alexander,
2019).
A character network is a graph describing a narra-
tive by representing the characters as its vertices, and
their structural relationships with others through its
edges. Edges are often attributed a weight and direc-
tion properties to express multidimensional related-
ness. Because much of what the characters do or say
is narrated, a direct discourse only covers a small part
of the plot and thus the transformation of plots into
networks is a lot less consistent. Our work centers
around automating network extraction from fictional
novel text by applying advanced natural language pro-
cessing (NLP) technology.
The emergence of sociological approaches to a
narrative, cast characters as points of social intersec-
tion rather than centered subjects. In her seminal
work, Levine (2009) suggests the networked novel ex-
tends alternatives to conventional constructions and
offers a perceptive account of how disease reveals so-
cial networks. Characters in text are drawn into one
great distributed network, but often they act as nodes
on two or more different networks. Our study is mo-
tivated by having the unfolding plot revolve around
multiple principles of interconnections to capture so-
cial experience.
Understanding how spoken language is repre-
sented in a novel over time is a key question in the
digital humanities. In particular, representing social
relationships between characters is an important com-
ponent of literature, as Elson et al. (2010) took the
first steps toward automating the task of mention-level
quote attribution for literary text. In our work, in-
stead of conversational networks we render the rel-
atively understudied narrative dimension of named
places into a literary network structure that captures
character-specific physical settings and geo-locations.
We present the network as a collection of many small
location-based graphs, thus encoding an explicit spa-
tial logic of the narrative. Our study leverages recent
advances in neural NLP for the tasks of named entity
recognition (NER) and coreference resolution.
This paper offers the following key contributions:
(1) we propose a graph encoder-decoder model that
consistently retains a defined narrative structure at
each of its computational stages, (2) we introduce a
790
Bleiweiss, A.
Multi-Graph Encoder-Decoder Model for Location-Based Character Networks in Literary Narrative.
DOI: 10.5220/0011776400003393
In Proceedings of the 15th International Conference on Agents and Artificial Intelligence (ICAART 2023) - Volume 3, pages 790-797
ISBN: 978-989-758-623-1; ISSN: 2184-433X
Copyright
c
2023 by SCITEPRESS Science and Technology Publications, Lda. Under CC license (CC BY-NC-ND 4.0)
NER/
Coref
Network
Encoder
Novel
Text
GPE
PERSON
()
()
()
index
Graph
Union
Narrative
Graph
(a) Encoder.
Community
Decoder
Character
Affiliation
()
()
()
Membership
Narrative
Graph
Graph
Weighting
(b) Decoder.
Figure 1: A graph encoder-decoder model for extracting and analyzing a location network that represents a narrative in
literature. The encoder input is a literary text sequence that follows location and character NER along with coreference
resolution of aliases. In the next stage, the encoder computes n small geo-location graphs g
1:n
, each linking a handful of
characters. The graphs are then merged into a single narrative network G. The decoder operates on graph G and performs
pairwise graph weighting and community discovery to produce m communities c
1:m
. This process compresses the narrative
representation of hundreds of geo-location graphs down to under a dozen communities. Lastly, the decoder extracts character
memberships from each community.
formal decoder that is tasked with detecting charac-
ter communities that reduce the literary network com-
plexity from hundreds of small graphs to less than a
dozen entities, and (3) through extensive qualitative
and quantitative analysis we provide visualization of
the narrative network drawn from different perspec-
tives.
2 RELATED WORK
Detecting character relations plays an important role
in narrative understanding built upon social network
theory. In this context, one of the more vital con-
tributions to literary theory in the past two decades
is the concept of character-space relation, coined by
Woloch (2009). In his account of fictional characteri-
zation, a figure, central or minor, emerges in a prede-
termined position within the narrative. The configura-
tion and intersections between many character-spaces
within a single narrative are essential to the dynam-
ics of literary representation. In our work, we fol-
low this core abstraction and generate many location-
based network graphs to render a novel. We then
unionize the graphs to form a single social network
and analyze the distribution of character communi-
ties.
The critical review by Labatut and Bost (2019)
presents extensive scientific research related to ex-
tracting and analyzing fictional character networks.
We follow in more detail on the methods most rele-
vant to our study.
Considered by many the more influential work,
Elson et al. (2010) characterize a text of literary
fiction by extracting a network of social conversa-
tions. They obtain character mentions from conver-
sational segments in nineteenth-century British nov-
els by analyzing their dialogue interaction. Using
the NER pipeline in CoreNLP to discover charac-
ter names, they expand on aliases by using manually
drawn coreference chains. The use of explicit quo-
tations in text for inferring links between characters
remains however ambiguous at times.
To identify interacting agents, Agarwal and Ram-
bow (2010) build character networks using tree
kernel-based relation extraction from structured parse
tree information. A text snippet may thus describe
social relations between two individuals explicitly by
the type of a relation, or implicitly by a social event.
Whereas Lee and Yeung (2012) assert that quoted
speech need not assumed to be the main course of
encoding interpersonal relations (Elson et al., 2010).
Besides people and events, they also integrate loca-
tions in their networks. Our work expands on their
model and a geographical node is more than just a
global staging position, instead we generate many
network graphs to represent the novel text, each of
a star topology with a hub that captures a location
chronologically.
A machine learning model devised by Celikyil-
maz et al. (2010) describes a probabilistic approach
for detecting conversations between actors in a novel,
and analyzing networks built based on topical similar-
ity in actor speech. Their method follows the linguis-
tic intuition that rich contextual information can be
useful in understanding dialogues. On the other hand,
He et al. (2013) proposed an alternate venue for iden-
tifying speaker references in novels, using a proba-
bilistic model that exploits lexical and syntactic clues
in the text itself. However, they manually construct a
list of characters and their aliases, unlike Vala et al.
(2015), who proposed an eight stage pipeline for de-
tecting characters automatically, which builds a graph
where nodes are names and edges connect names be-
longing to the same character.
Compelling is Edwards et al. (2020) study
that model and compare manual to automatic co-
occurrence and unsupervised machine learning meth-
ods for extracting social networks from narratives.
In their findings, automatic extraction methods pro-
duced commensurable results for density and cen-
Multi-Graph Encoder-Decoder Model for Location-Based Character Networks in Literary Narrative
791
trality measures with the more accurate but by far
more time consuming manual approach. While edge
weights were only moderately correlated with a 0.8
Spearman coefficient for NLP networks. Although
their experiments conducted on a television show,
their conclusions are likely to extend to literary nar-
ratives.
More recently, Schmidt et al. (2021) applied both
a rule-based pipeline and an end-to-end deep learning
model to NER and coreference resolution (Lee et al.,
2018), and showed that neural networks outperform
the rule-based approach on most evaluation settings.
Lastly, the effort by Piper et al. (2021) seeks to pro-
vide a coherent theoretical foundation for implement-
ing NLP computational solutions and identify narra-
tive as an important basis for understanding human
behavior.
3 MODEL
In Figure 1, we provide an overview of our proposed
graph encoder-decoder model.
The encoder process for transforming novel text
to a list of location-based networks of characters is
straightforward. We scan the entire novel text and
extract words defined as either Geo-Political (GPE)
or PERSON entities, using the spaCy named entity
recognition (NER) and the neural coreference reso-
lution (Coref) tools.
1
A GPE occurrence triggers
both terminating the creation of the current network
and also starting to construct a new network. After
that we collect all the PERSON names that are de-
limited between a pair of GPEs or a GPE and end of
text. The graphs we construct are each of an undi-
rected star topology— they have the GPE as the root
node, and all the PERSON nodes are the leaves. In
addition, we draw timestamp attributes from the run-
ning word index of either the GPE or PERSON en-
tities. The indices aid in retaining the chronology of
the story telling.
More formally, using a colon notation, we denote
a collection of k PERSON entities p
1:k
= (p
1
,..., p
k
).
Given k characters in a location, the graph g that we
construct has k + 1 vertices and k edges emanating
from 1 : k all to vertex k + 1. The graph cardinal-
ity is thus
|
g
|
= k. PERSON names p
i
and location
identity l are attached to their corresponding vertex
labels. We unionize all n graphs g
( j)
into one network
G =
g
(1)
,...,g
(n)
that represents the narrative, ex-
pecting location graphs g
( j)
to connect each a small
number of characters— about a handful on average.
1
https://spacy.io/
The algorithm for integrating subgraphs g
( j)
has lin-
ear node complexity with the total number of charac-
ters in a narrative. Thus, the same character residing
in multiple locations is assigned an identical node ID
to effectively address large-scale and dynamic narra-
tives.
Unlike the encoder components that mostly oper-
ate in NLP space, the decoder computationally func-
tions entirely in the network theory domain. The nar-
rative network G links the encoder with the decoder,
and the latter produces a set of m communities, where
m << n. Each community c is a disjoint union of
separable geo-location graphs. We denote a commu-
nity set C =
c
(1)
,...,c
(m)
. While there are several
methods for community detection in networks, in our
work, we chose the Louvain (Blondel et al., 2008) hi-
erarchical clustering algorithm, owing to both its abil-
ity to detect high-modularity community partitions
and its exceptional computational efficiency with a
runtime of O(nlogn). The last stage of the decoder
generates character membership in each community,
we further use for visual analysis.
4 EVALUATION
In this section, we provide for our experiments visual-
ization of network modeling and report computational
metrics using igraph (Csardi and Nepusz, 2006).
2
Table 1: Our test set of fiction literary novels.
Title Chapters Tokens
Sign of the Four 12 43,736
Portrait of a Lady 27 112,661
Emma 55 159,950
David Copperfield 64 361,938
Table 2: Location character density across test novels.
Title Characters Locations Density
Sign of the Four 558 106 5.26
Portrait of a Lady 1,436 319 4.50
Emma 3,980 443 8.98
David Copperfield 5,845 1,106 5.28
Novel Test Set. We obtained unicode encoding of
the fictional literature text from Project Gutenberg,
and carried our work on four 19-century British
novels including The Sign of the Four by Co-
2
https://igraph.org
ICAART 2023 - 15th International Conference on Agents and Artificial Intelligence
792
1
3
10
Achmet
Agra
Akbar
Astrakhan
England
India
London
Singh
Tonga
Geo-Location
(a) Sign of the Four.
1
3
10
30
Albany
America
Bedfordshire
Boston
Brooklyn
England
Florence
Gardencourt
Great Britain
Italy
Liverpool
London
New York
Paris
Rome
the United States
Turkey
Uffizi
Venice
Washington
Geo-Location
(b) Portrait of a Lady.
1
10
100
Birmingham
England
Enscombe
Fairfax
Hartfield
Henry
Highbury
Ireland
Kingston
London
Maple Grove
Randalls
Richmond
Selina
Swisserland
tête
Weston
Geo-Location
(c) Emma.
1
10
100
Australia
Blunderstone
Britannia
Canterbury
Copperfield
Devonshire
Dora
Dover
Emily
England
France
India
Julia Mills
know’d
London
Murdstone
mutton
Plymouth
St. Paul’s
St. Paul’s Churchyard
Suffolk
Switzerland
Traddles
Trotwood
Geo-Location
(d) David Copperfield.
Figure 2: Named geo-location distribution in logarithmic scale over our test novels.
Abdullah
Abdullah Khan
Abel White
Achmet
Agra
Alison
Athelney Jones
Atheney Jones
Aurora
Baker
Baker Street
Bartholomew
Bartholomew Sholto
Benares
Bernstone
Bishopgate
Blondin
boatman
Bouguereau
Bromley Brown
Brown
Buddha
Bunsen
Camberwell
carboy
Cawnpore
Cecil Forrester
Colin
Corot
Dawson
Dir
Dost Akbar
Englishman
Feringhee
Forrester
Greenwich
Gregson
Hall Lane
Hindoo
Holmes
Hudson
Jack
Jean Paul
Jewels
Jezail
Jim
John Holder
John Sholto
Jonathan
Jonathan Small
Jones
Lal Chowdar
Lal Rao
Lambeth
Langham
Lestrade
Lie
Mann
Martini
Mary
Mary Morstan
McMurdo
meek
Mensch
Millbank Penitentiary
Miss Morstan
Mohammedan
Mordecai Smith
Morstan
Natur
Nelson
Newfoundland
Nine Elms
Norwood
Pinchin Lane
Pondicherry Lodge
Queen
Robert Street
Roof
Salvator Rosa
Sam Brown
Sherlock
Sherlock Holmes
Sherman
Sholto
Sholtos
Sikh
Small
Smith
Somerton
Stockwell Place
Surrey
Thaddeus
Thaddeus Sholto
This Thaddeus
Upper Norwood
Vincent Square
Watson
Wiggins
Williams
Woolwich
Worcestershire
(a) Sign of the Four.
Almanach de Gotha
Amy Osmond
Annie
Annie Climber
Archer
Ariel
Bantling
Bob Bantling
brown holland
Buddha
Bunchie
Caspar
Caspar Goodwood
Catherine
Clapham Junction
Climber
Count
Daniel Touchett
Daniel Tracy Touchett
Dickens
ecus bien
Edith
Edmund
Edmund Ludlow
Edward
Edward Rosier
Elizabeth
Empire
England
Englishman
Ezekiel Jenkins
Florence
Florence Gilbert Osmond
Florence Ralph Touchett
Florentine
Gardencourt
Genoa
George Eliot
Gilbert Osmond
Goldsmith
Goodwood
Gounod
Haycock
Henrietta Stackpole
Hilary
hitherto Ralph
Isabel
Isabel Archer
Je
Jermyn Street
jeune fille
Johnson
Jove
Juno
Justine
Keen
Keyes
Lady Jane Grey
Lady Pensil
Lancret
Lilian
Lily
Louis Philippe
Louis Quinze
Luce
Ludlow
ma fille
Machiavelli
Madonna
Matthew
Matthew Hope
Merle
Metastasio
Michael Angelo
Miss Archer
Molyneux
Monsieur Merle
Murray
Nelson
Osmond
Palazzo Crescentini
Pansy
Pau
Perugino
Philistine
Poor Ralph
Poor Ralph Touchett
Pope
Pratt
Queen Anne
Ralph
Ralph Touchett
Rosier
Saint Sophia
San Remo
Schubert
Stackpole
the Countess Gemini
Touchett
Turk
Varian
Versailles
Vittoria Colonna
Warburton
(b) Portrait of a Lady.
a Harriet Smith
a Miss
a Miss Hawkins
Abbey
Anna Weston
Anne Cox
Astley
Augusta
Augusta Hawkins
baker
Bates
Bath
Bella
Bickerton
Bird
Box Hill
Bragge
Bragges
Brunswick Square
Campbell
Campbells
Candles
Captain Weston
Catherine
Chaperon
Churchill
Churchills
Clara Partridge
Clifton
Cole
Coles
Cowper
Cox
Coxes
Dear Harriet
Dear Jane
Dixon
Donwell
Donwell Abbey
Donwell Lane
Elizabeth
Elizabeth Martin
Elton
Eltons
Emma
Emma for Harriet
Emma Woodhouse
Enscombe
Escape
Fairfax
Fetch Miss Bates
Ford
Frank
Frank Churchill
Frank to Emma
Garrick
George
George Otway
Gilbert
Goddard
Goldsmith
Graham
Green
Hannah
Harriet
Harriet Smith
Harry
Hawkins
Henry
Hetty
Hill
Hitherto
Hodges
Hughes
Hymen
Isabella
James
James Cooper
Jane
Jane Bates
Jane Fairfax
Jeffereys
John
John and
John and Isabella
John Knightley
John ostler
John Saunders
Kings Weston
Kingston
Knightley
Knightleys
La Baronne
La Comtesse
Lady Patroness
Maple Grove
Martin
Martins
Miniatures
Miss
Miss Bates
Miss Bickerton
Miss Hawkins
Miss Nash
Miss Smith
Miss Taylor
Miss Woodhouse
Nash
Nay
Otway
Partridge
Patty
Perry
Perrys
Philip Elton
Prince
Quantities
Randall
Randalls
Richardson
Robert
Robert Martin
Robin
Shakespeare
Smallridge
Smith
Stokes
Suckling
Surry
Taylor
the Miss Martins
Tom
Tupman
Uncle Knightley
Vicarage Lane
Wallis
Weston
Westons
Weymouth
William
William Cox
William Coxe
William Larkins
Windsor
Wingfield
Woodhouse
Woodhouses
Wright
ye
Yorkshire
(c) Emma.
a Hymn Book
a Model Prisoner
a Queen Bee
Abraham
Admiralty
Agnes
Agnes Wickfield
Aliens
Angel
Animal
Annie
Babley
Baby
Bailey
baker
Bare
Bark
Barkis
Beadle
Bearers
Beauty
Bedlam
Beein
beggar
Bench
Benjamin
Betsey
Betsey Trotwood
Betsey Trotwood Copperfield
bin
Blackboy
Blackheath
blew Dora
Blood
Blossom
Blunderstone Rookery
Bob
Bodgers
Bond
Booty
Bows
Brooks
Burke
Bush
Buxton
Cain
Calais
Canning
Captain
Captain Hopkins
Caroline
Charles the
Charles the First
Charley
Chestle
Chillip
Clara
Clara Peggotty
Clara Peggotty BARKIS
Clarissa
Colleges
Commons
Cook
Copperfield
Copperfull
Creakle
Crewler
Crupp
Daisy
Dan
Daniel
Dare
Dartle
David
David Copperfield
Demon
Devil
Dick
Distant
Dixon
Doady
Dobbin
Dolloby
Dolphin
Don Quixote
Doom
Dora
Dora first
Dora matches
Dora one night
Dora sang
Dora Spenlow
Dragon
Ecstasy
Edward
Edward harm
Ely Place
Emily
Emma
Englishman
Farmer
Fatima
Fibbitson
Fingers
Folkestone
Fox
Foxe
Francis
Franklin
Future
Gaul
genie
George
George Demple
Gil Blas
Gipsy
Glass
God
Grainger
Gravesen
Grayper
Greenwich
Greenwich Fair
Gregory
Grey
Grinby
Guernsey
Gulpidge
Gummidge
Guy Fawkes
Hall
Heep
Heeps
Hem
Henry Spiker
Hindoo
Holborn
Hoorah
Hopkins
Hor
Horace Crewler
Hornsey
Humphrey Clinker
Hungerford Stairs
Hush
Hymeneal
Hymn Book
Idol
Imps
Ipswich
Jack
Jack Ketch
Jack Maldon
Jackson
Jail
James
James Steerforth
Jane
Jane Murdstone
Janet
Jellips
Jip
Jip WOULD
Joe
John
Johnson
Jones
Joram
Jorkins
Julia
Julia Mills
Kidgerbury
King Charles the
Kitt
La ra la
Lady Mithers
laid heer
Larkins
Lavinia
Lazarus
lee
Lie
Lion
Littimer
Little Blossom
Little Mowcher
Lo
London Bridge
Lookee
Louisa
Lowestoft
Lucy
Macbeth
Madam
Maldon
Mama
Mangle
Margaret
Markham
Markleham
marry Dora
Martha
Martha Endell
Mary Anne
Mates
Mawther
Mealy
Mealy Potatoes
meek
Mell
MELL
Memorial
Messrs Wickfield
Micawber
MICAWBER
Michaelmas Term
Mick Walker
Mills
Minnie
Miss
Miss Betsey
Miss Crewler
Miss Dartle
Miss Dora
Miss Helena
Miss Larkins
Miss Lavinia
Miss Mills
Miss Mowcher
Miss Murdstone
Miss Trotwood
Mistress Peggotty
Mortimer
Mortimers
Moving
Mowcher
Murdering
Murdstone
mutton
Ned
Ned Beadwood
Nettingalls
Noah
Norfolk
Norwich
Omer
Outcasts
Pagoda
Passnidge
Peggotty
Peter
Pickle
Pidger
Pitt
Poor Dora
Port Middlebay
Pretty
Puss
Put Jip
Putney
Quinion
Richard Babley
RIDGER BEGS
Rip
Robin
Robinson Crusoe
Roderick Random
Rosa
Rosa Dartle
Sarah
Sarah Jane
Scotch Croesus
Sermuchser
Settle
Shakespeare
Sharp
Sheridan
Sister Lavinia
Skylark
Snobs
Sol
Sometimes Dora
Sophy
Spaniel
Speak
Spenlow
Spenlows
Spiker
Steerforth
Strong
Suffice
Suffolk
Surrey
Ta ra la
tarpaulin
Theerfur
Thomas
Thomas Benjamin
Thomas Traddles
Tidd
Tiffey
Tom
Tom Jones
Tom Pipes
Tom Tiddler
Tommy
Tommy Traddles
Topsawyer
Towzer
Traddles
TRADDLES
Trotwood
Tungay
turret
Uncle
Uncle Dan
Uriah Heep
Ury
Valentines
Viscount Sidmouth
Voyages
Waif
Walker
Waterbrook
Westminster Abbey
Westminster Bridge
Westminster Hall
Wheer
Whether Dora
Whittington
Whoo
Wickfield
Wilkins
Wilkins Micawber
William
Windsor Terrace
Yarmouth
(d) David Copperfield.
Figure 3: Network representation of our test novels. Vertices are labeled with unique character names, as edges initially
connect multi-word coreferent variations of the name.
nan Doyle (1890),
3
The Portrait of a Lady by
Henry James (1881),
4
Emma by Jane Austen (1815),
5
and David Copperfield by Charles Dickens (1849).
6
These texts totaled more than half a million words
(Table 1). Our choice of the test corpus concurs with
the test set in Elson et al. (2010) and facilitates com-
pare with a baseline. Although, unlike randomly se-
lecting a handful of chapters from each book, we used
each novel text of its entirety.
Past the NER stage, the encoder has sufficient data
to assess both geo-location density and distribution in
the novel narratives. In Table 2, we show location
density ranging from a handful up to nine characters
across our test novels. This is suggestive of the num-
ber of location networks, as well as the cardinality of
narrative graphs our encoder constructs. While in Fig-
ure 2, we show in logarithmic scale the distribution of
identified named geo-locations in each of our test nov-
els, excluding places that are mentioned only once.
We expect graphs with hubs of same-name locations
to be merged in the community discovery stage of the
decoder. To ensure high quality NER, we conducted
several iterations of increasing the train set offered by
spaCy and circumvent false-negative named entities
3
https://www.gutenberg.org/files/2097/2097-0.txt
4
https://www.gutenberg.org/files/2833/2833-0.txt
5
https://www.gutenberg.org/files/158/158-0.txt
6
https://www.gutenberg.org/files/766/766-0.txt
for failing to flag an entity. However, a few false posi-
tives for wrongly tagging a non-entity as a place entity
were unavoidable. For example, the word ‘Know’d’
in the novel David Copperfield was singled out as
GPE (Figure 2).
Our encoder retains a skeletal character network
for each literary narrative to aid analyzing charac-
ter aliases visually. Aliases transpire for mentioned
multi-word names and are learned by the neural coref-
erence resolver. We outline aliases in each of the nar-
rative network representations in Figure 3. Graph ver-
tices are labeled with unique character names, and the
edges, shown at the bottom left of the network, con-
nect vertices of character aliases.
Community Discovery. Detecting communities in
a literary narrative network based on geo-locations
is useful to broaden character social relations and
complement the downstream task of quote attribu-
tion. To this extent, community discovery can an-
swer the question of association by singling out sub-
graphs with identical named locations and effectively
merging them together into a concise representation.
Similarly, a community may link subgraphs of dif-
ferent named locations while sharing the same char-
acter node attributes. To help understand the narra-
tive space concept, a community structure facilitates
events that are likely to disseminate across a multi-
Multi-Graph Encoder-Decoder Model for Location-Based Character Networks in Literary Narrative
793
Table 3: Statistical summarization of graph node distribution that characterizes the input to our community discovery stage.
Title Graphs Nodes Min Max Mean STD
Sign of the Four 66 320 1 26 4.84 5.06
Portrait of a Lady 216 635 1 10 2.93 2.06
Emma 349 1,707 1 20 4.89 3.59
David Copperfield 672 1,890 1 20 2.81 2.50
(a) Sign of the Four.
(b) Portrait of a Lady. (c) Emma.
(d) David Copperfield.
Figure 4: Character community discovery across our test novels.
tude of places. Furthermore, uncovering organiza-
tional principles in networks sets the sphere of activity
bounds where the narrative plot unfolds.
The input to the community discovery task con-
sists of independent geo-location subgraphs. In Table
3, we provide subgraph count and statistical summa-
rization of the subgraph character nodes for each of
our test novels. As expected, literary networks are
represented for the most part with hundreds of small
networks, each of a handful of characters, on average.
In Figure 4, we provide visualization of commu-
nity partitions. The Louvain algorithm we used un-
covers community structures at different resolutions
(Lambiotte et al., 2014), and uses modularity as an
objective function to optimize for finding the best sub-
division of a network. Identified communities are
both small and large and suggest a plausible repre-
sentation compression of at least an order of magni-
tude, for a narrative network with hundreds of geo-
subgraphs reduced to around ten communities. In Ta-
ble 4, we show the number of discovered communi-
ties, along with the modularity quality scale, a nu-
merical scalar that measures the relative density of
edges inside communities with respect to edges out-
side communities. Given the [1,+1] range, our
modularity scores proved sufficiently compelling.
The geo-location distributions shown in Figure 2
present the first order for predicting community par-
titions in a literary narrative. Qualitatively, we an-
ticipated subgraphs with the same named location
at their root to be merged into a single community.
Thus, the number of communities m for each of the
narratives in our novel test set ought not to exceed
m
{
9,20,17,24
}
, respectively. The Louvain algo-
rithm effectively reduced the number of subdivisions
to m
{
7,10,7,10
}
, respectively, with an impressive
2X compression ratio for the larger three narratives.
Character Affiliation. Community graph parti-
tions are a vital resource to learn about character dis-
tributions. Allocations of member affiliation with a
community gives the division of the vertices across
communities and is outlined in Table 4. Character ap-
portions for The Sign of Four novel are evidently
fairly balanced, however, the remainder of the literary
narratives rather offer diverse cluster sizes. In Fig-
ure 5, we show a dendrogram plot of the membership
extracted from a sampled narrative community. We
applied a hierarchy plane cutoff and rendered a hand-
ful of clearly distinct character clusters for improved
visualization. We note that named entities at the leaf
nodes of each subtree may consist of both persons and
geo-locations, of which the latter can be further fil-
tered if so desired. The community dendrogram split
introduces a representation with a new and concise set
of character relationships and thus much more simpler
to understand.
Temporal Relations. Our encoder captures the
temporal aspect of narrative evolution by the asso-
ciation of named entities with a token running index
over a narrative text sequence. In Figure 6, we show
the decoder interpretation of timestamp intervals for
twenty named entities including both character and
geo-location samples obtained from The Portrait
of a Lady narrative. A few intervals shown with a
ICAART 2023 - 15th International Conference on Agents and Artificial Intelligence
794
Table 4: Output community distribution across our test novels.
Communities 7
Modularity 0.43
0
5
10
15
20
1 2 3 4 5 6 7
Community
Size
(a) Sign of the Four.
Communities 10
Modularity 0.37
0
5
10
15
20
1 2 3 4 5 6 7 8 9 10
Community
Size
(b) Portrait of a Lady.
Communities 7
Modularity 0.32
0
10
20
30
1 2 3 4 5 6 7
Community
Size
(c) Emma.
Communities 10
Modularity 0.44
0
20
40
60
1 2 3 4 5 6 7 8 9 10
Community
Size
(d) David Copperfield.
Thaddeus
Astrakhan
Roof
Bunsen
Bartholomew Sholto
Thaddeus Sholto
Ballarat
Paris
Holmes
Nelson
Broderick
Nine Elms
Kennington Lane
Jezail
morocco
Gregson
Lestrade
Watson
0 5 10 15
(a) Sign of the Four.
Englishman
Paris
Louis Philippe
Pau
Edward Rosier
Edward
Versailles
Elizabethan
Ralph Touchett
San Remo
Stackpole
Turkey
Bantling
Jermyn Street
Bob Bantling
Pope
Florence Ralph Touchett
Washington
0 5 10 15
(b) Portrait of a Lady.
Tom
Smallridge
Box Hill
Richmond
Miss Bickerton
Churchill
Windsor
Goldsmith
Randalls
Yorkshire
Frank
Frank to Emma
Mickleham
Chaperon
Elton
Maple Grove
Clayton Park
Oxford
Emma
Harriet
Madness
Stilton
0 5 10 15 20
(c) Emma.
English Grammar
Grayper
Blackboy
Clara Peggotty BARKIS
Topsawyer
George
Blunderstone
Devil
Clara Peggotty
Robin
Hoorah
Foxe
Joe
Mates
Clara
Sunderland
Dan
Uncle Dan
Speak
Blunderstone Rookery
Gummidge
Omer
Australia
Theerfur
Bows
Mawther
0 5 10 15 20 25
(d) David Copperfield.
Figure 5: Dendrogram visualization of a sample of character affiliation with a community from each of our test novels.
0
1
12
1425
153
1886
197
204
2443
2539
2756
30
3696
4
4065
4394
4648
479
487
57
5721
590
5972
603
66
6681
6732
7966
8
80
8315
8531
9405
9821
9900
Albany
America
Archer
Archer’s
Bunchie
Edith
Edward
Elizabeth
Elizabethan
England
Florence
Jove
Liverpool
London
Miss Archer
New York
Ralph
Ralph Touchett
Touchett
Warburton
Named Entity
Timestep
Figure 6: Timestamp intervals of named entity samples.
horizontal bar are of an empty order, thus indicating a
single appearance instance in the entire plot. Instead
of using network theory features (Besnier, 2020), the
unfolding of role importance over time for either a
character or a location for this matter is rather im-
plicit in our framework— the longer the interval the
higher the significance attached to the entity plot con-
tribution. In an absolute sense, an entity is given im-
portance priority that we qualify by how close is a
long-standing interval endpoint to the conclusion of
the narrative.
Table 5: Physical and virtual location-based narrative accu-
racy across our test set.
Title Physical Virtual Accuracy
Sign of the Four 54 12 0.82
Portrait of a Lady 150 66 0.70
Emma 295 54 0.85
David Copperfield 412 260 0.61
Error Analysis. In our model, character entities
share a location based on the proximity of the per-
son mention to the location mention in the narrative
text. We distinguish between physical and virtual
plot bound geo-locations, with the latter represented
as single-node graph occurrences that render no so-
cial relationship (Table 3). While virtual locations
are perfectly valid entities in an automated graph con-
struction, we consider them an exception. This lets
us attach a quality measure for transforming narrative
text to a multitude of geo-location subgraphs, using
an accuracy form: l
p
/(l
p
+ l
v
), where l
p
and l
v
are
physical and virtual locations, respectively. In Table
5, we show narrative accuracy measures across our
test novels with a plausible corpus mean of 0.75.
Multi-Graph Encoder-Decoder Model for Location-Based Character Networks in Literary Narrative
795
5 DISCUSSION
In the context of a narrative space, we sought af-
ter practical graph-based computational methods that
match our proposed model. We attend to the role
space plays in a narration as a feature capacity of the
story plot, with places that make up the physical en-
vironment in which the characters of a narrative live
and move (Brasher, 2017).
Narrative Graph to Graphormer. In this section,
we contrast our graph encoder-decoder approach with
the well established Transformer (Vaswani et al.,
2017) architecture in modeling natural language data.
We reviewed whether the Transformer is suitable to
model graphs and make graph representation learn-
ing work for the task of narrative network understand-
ing end-to-end, while considering feeding the Trans-
former with our encoder output G.
Table 6: Train scores for GNN node classification.
Title Precision Recall F1 Support
Sign of the Four 0.33 0.48 0.37 79
Portrait of a Lady 0.29 0.44 0.33 88
Emma 0.26 0.34 0.27 107
David Copperfield 0.11 0.22 0.13 255
Table 7: Comparing performance to an external baseline.
System Precision Recall F1
Elson et al. (2010) 0.54 0.55 0.48
Ours 0.25 0.37 0.28
To this end, mainstream variants of graph neural
networks (GNNs; Scarselli et al., 2009) have shown
to outperform the Transformer on many graph-level
classification tasks. Recently, Ying et al. (2021) intro-
duced the Graphormer,
7
built upon a standard Trans-
former neural network that encodes directly the struc-
tural information of graphs. Their proposed central-
ity and spatial encodings proved many GNN vari-
ants may be cast as special Graphormer cases, and
shown to lead the state-of-the-art performance on a
wide range of graph-level prediction tasks. How-
ever, in its current state the Graphormer mostly at-
tends to node classification and less on loose sub-
graph clustering— vital for learning character-centric
narratives. Moreover, the training datasets for bench-
marking the Graphormer were primarily scraped from
7
https://github.com/Microsoft/Graphormer
physical and biological science graphs and would
have to be augmented with literary-specific network
data to benefit the performance of narrative under-
standing.
Narrative Graph to GNN. To reason about our
system performance, we linked the narrative graph
structure G to a GNN. In Table 6, we outline
weighted-average train scores of GNN node classi-
fication across our literary narratives, noting that re-
call and accuracy measures are nearly identical. We
apportioned our graph data for each novel into train,
validation, and test splits of 70/10/20 percent, respec-
tively, and used degree as the node embedding rep-
resentation. Our neural model was constructed from
a two-layer graph convolutional network (GCN), and
we ran 500 training epochs on each of our narratives
using the Adam optimizer with a fixed dropout of 0.2.
Although not intended to demonstrate performance,
the observation that predicting F1 scores decline with
the length of the narratives is compelling on its own.
We sought after comparing our classification per-
formance to an external baseline. Using a test corpus
of four novels, with identical titles to the ones used in
Elson et al. (2010) for system evaluation, served our
purpose well, although the goals, tools, and resources
vary greatly between the implementations. For exam-
ple, they used a single large character network, where
we applied many small geo-location graphs. While
they explored 60 novels for their train set with over
ten million words, their novel test set is a considerable
small subset of our texts. In table 7, we compare our
average classification scores across test novels to the
mean scores across the methods for detecting conver-
sations in Elson et al. (2010). We anticipated lower
scores for connecting our system to GNN, shown at
about 0.6X of the baseline.
6 CONCLUSIONS
In this paper, we propose an encoder-decoder com-
putational model to reason about a narrative spa-
tially. Surprisingly, many questions can be answered
by measuring the relationships between places men-
tioned in text. Geo-location networks are especially
useful to narrow down the search space of a narrative,
before deploying a realistic discourse structure.
Our analyses carve several avenues of future re-
search, such as alias resolution in mentioned location
names, introduce character proximity relationships by
using graph weights to represent physical distance be-
tween places, and address a more authentic temporal
evolution of a community over an unveiling narrative.
ICAART 2023 - 15th International Conference on Agents and Artificial Intelligence
796
ACKNOWLEDGEMENTS
We would like to thank the anonymous reviewers for
their insightful suggestions and feedback.
REFERENCES
Agarwal, A. and Rambow, O. (2010). Automatic detection
and classification of social events. In Empirical Meth-
ods in Natural Language Processing (EMNLP), pages
1024–1034, Cambridge, MA.
Alexander, S. (2019). Social network analysis and the scale
of modernist fiction. Modernism/modernity, 3(4).
Besnier, C. (2020). History to myths: Social network
analysis for comparison of stories over time. In
Workshop on Computational Linguistics for Cultural
Heritage, Social Sciences, Humanities and Literature
(SIGHUM), pages 1–9, Online.
Blondel, V. D., Guillaume, J.-L., Lambiotte, R., and Lefeb-
vre, E. (2008). Fast unfolding of communities in large
networks. Journal of Statistical Mechanics: Theory
and Experiment, 2008(10):P10008.
Brasher, J. P. (2017). Narrating space/spatializing narra-
tive: Where narrative theory and geography meet.
The American Association of Geographers Review of
Books, 5(3):180–182.
Celikyilmaz, A., Hakkani-Tu, D., He, H., Kondrak, G., and
Barbosa, D. (2010). The actor-topic model for extract-
ing social networks in literary narrative. In Neural
Information Processing Systems (NIPS) in Machine
Learning for Social Computing Workshop, page 7,
Whistler, Canada.
Csardi, G. and Nepusz, T. (2006). The igraph software
package for complex network research. InterJournal,
Complex Systems:1695.
Edwards, M., Tuke, J., Roughan, M., and Mitchell, L.
(2020). The one comparing narrative social network
extraction techniques. In IEEE/ACM International
Conference on Advances in Social Networks Analysis
and Mining (ASONAM), pages 905–913.
Elson, D., Dames, N., and McKeown, K. (2010). Extracting
social networks from literary fiction. In Annual Meet-
ing of the Association for Computational Linguistics
(ACL), pages 138–147, Uppsala, Sweden.
He, H., Barbosa, D., and Kondrak, G. (2013). Identification
of speakers in novels. In Annual Meeting of the As-
sociation for Computational Linguistics (ACL), pages
1312–1320, Sofia, Bulgaria.
Labatut, V. and Bost, X. (2019). Extraction and analysis of
fictional character networks: A survey. ACM Comput-
ing Surveys, 52(5):1–40.
Lambiotte, R., Delvenne, J.-C., and Barahona, M. (2014).
Random walks, markov processes and the multiscale
modular organization of complex networks. IEEE
Transactions on Network Science and Engineering,
1(2):76–90.
Lee, J. and Yeung, C. Y. (2012). Extracting networks of
people and places from literary texts. In Pacific Asia
Conference on Language, Information, and Computa-
tion, pages 209–218, Bali, Indonesia.
Lee, K., He, L., and Zettlemoyer, L. (2018). Higher-
order coreference resolution with coarse-to-fine infer-
ence. In The North American Chapter of the Associa-
tion for Computational Linguistics: Human Language
Technologies (NAACL), pages 687–692, New Orleans,
Louisiana.
Levine, C. (2009). Narrative networks: Bleak house and
the affordances of form. Novel: A Forum on Fiction,
42(3):517–523.
Moretti, F. (2005). Graphs, Maps, Trees: Abstract Models
for a Literary History. Verso Books, Brooklyn, New
York.
Moretti, F. (2011). Network Theory, Plot Analysis. Stanford
Literary Lab, Palo Alto, California.
Piper, A., So, R. J., and Bamman, D. (2021). Narrative
theory for computational narrative understanding. In
Empirical Methods in Natural Language Processing
(EMNLP), pages 298–311, Online.
Scarselli, F., Gori, M., Tsoi, A. C., Hagenbuchner, M.,
and Monfardini, G. (2009). The graph neural net-
work model. IEEE Transactions on Neural Networks,
20(1):61–80.
Schmidt, D., Zehe, A., Lorenzen, J., Sergel, L., D
¨
uker, S.,
Krug, M., and Puppe, F. (2021). The FairyNet cor-
pus - character networks for German fairy tales. In
Workshop on Computational Linguistics for Cultural
Heritage, Social Sciences, Humanities and Literature
(SIGHUM), pages 49–56, Online).
Vala, H., Jurgens, D., Piper, A., and Ruths, D. (2015). Mr.
bennet, his coachman, and the archbishop walk into
a bar but only one of them gets recognized: On the
difficulty of detecting characters in literary texts. In
Empirical Methods in Natural Language Processing
(EMNLP), pages 769–774, Lisbon, Portugal.
Vaswani, A., Shazeer, N., Parmar, N., Uszkoreit, J., Jones,
L., Gomez, A. N., Kaiser, L. u., and Polosukhin, I.
(2017). Attention is all you need. In Advances in Neu-
ral Information Processing Systems (neurIPS), vol-
ume 30. Curran Associates, Inc.
Woloch, A. (2009). The One vs. the Many: Minor Char-
acters and the Space of the Protagonist in the Novel.
Princeton University Press, Princeton, New Jersey.
Ying, C., Cai, T., Luo, S., Zheng, S., Ke, G., He, D., Shen,
Y., and Liu, T.-Y. (2021). Do transformers really per-
form badly for graph representation? In Advances
in Neural Information Processing Systems (neurIPS),
volume 34, pages 28877–28888. Curran Associates,
Inc.
Multi-Graph Encoder-Decoder Model for Location-Based Character Networks in Literary Narrative
797