Mining and modeling character networks

Anthony Bonato, David Ryan D'Angelo, Ethan R. Elenberg, David F. Gleich, Yangyang Hou

Introduction

While the study of massive social networks like Facebook or Twitter has yielded significant insights into human behavior, "character networks" found in literature and film present a unique structural challenge. These networks are typically smaller—comprising dozens to hundreds of nodes—yet they are remarkably dense and exhibit distinct community structures centered around protagonists. This research explores the mathematical blueprints underlying these fictional social structures, seeking to identify which stochastic graph models best mimic the creative process of human authors.

Methodology

The researchers developed a multi-step pipeline to extract and analyze character interactions across two primary datasets: a manually processed set of three novels (Twilight, The Stand, and Harry Potter and the Goblet of Fire) and a large-scale dataset of 800 film networks from Moviegalaxies.

For novels, networks were extracted using a "co-occurrence" method, where an edge is established if two characters' names appear within a 15-word window. To determine the most accurate mathematical representation of these networks, the team compared real-world data against four synthetic models:

  • Erdős-Rényi (ER): A baseline model of purely random connections.
  • Preferential Attachment (PA): A model where new nodes link to already popular nodes, simulating a "rich-get-richer" dynamic.
  • Configuration Model (CFG): A model that preserves the exact degree sequence of the original graph but randomizes connections.
  • Chung-Lu (CL): A generalization of random graphs that utilizes "expected degrees" to determine edge probabilities, allowing for a predefined hierarchy.

The core innovation involved using machine learning classifiers (SVMs, Random Forests, and AdaBoost) trained on "graph 4-profiles"—the frequency of all possible 4-node subgraphs—to distinguish between these models.

Character Network Analysis

Centrality analysis confirmed that standard network metrics can accurately identify protagonists and key supporting characters. Metrics such as PageRank, Betweenness, and Closeness consistently ranked main characters at the top of the hierarchy.

Social network graph of characters in Harry Potter and the Goblet of Fire, illustrating dense community structures.

Furthermore, community detection using the Louvain method successfully identified plot-relevant groups. In Harry Potter, for instance, the algorithm automatically clustered characters into recognizable groups such as "Hogwarts," "The Dursleys," and "The Weasleys."

Comparison of various centrality metrics for the top characters in Harry Potter, showing Harry's dominance across all measures.

Model Selection and Key Results

The study's most significant finding is the consistent performance of the Chung-Lu (CL) model. Across every machine learning classifier and both datasets (novels and films), the CL model was selected as the best fit for character networks.

The researchers suggest that the CL model aligns with "Author's Intent." Unlike the Preferential Attachment model, which suggests organic growth, the CL model allows an author to intuit a hierarchy (Protagonist > Supporting Cast > Background Characters) and then populate the world with social ties based on those expected roles.

The classifiers achieved remarkable accuracy, with precision and recall exceeding 0.98 on holdout sets. This high performance indicates that different mathematical models produce structurally distinct "fingerprints" or motifs that can be reliably identified.

Conclusion and Future Work

Character networks are "small-world" systems characterized by high density and short path lengths, reflecting the narrative necessity for characters to be relevant to the central plot. The success of the Chung-Lu model provides a quantitative bridge to qualitative literary analysis, suggesting a structured approach to fictional world-building.

Future research aims to expand the novel dataset using the Project Gutenberg library and to explore dynamic networks that track how social graphs evolve scene-by-scene. Additionally, more complex models like Kronecker graphs may be investigated to further refine the mathematical representation of human storytelling.

Summary updated

BibTeX
@inproceedings{bonato2016mining,
  author = {Anthony Bonato and David Ryan D'Angelo and Ethan R. Elenberg and David F. Gleich and Yangyang Hou},
  title = {{Mining and modeling character networks}},
  booktitle = {WAW},
  year = {2016},
  doi = {10.1007/978-3-319-49787-7\_9},
}
Figure