Skip to main content
QUICK REVIEW

[Paper Review] Social Network Analysis: From Graph Theory to Applications with Python

Dmitri Goldenberg|arXiv (Cornell University)|Feb 5, 2021
Complex Network Analysis TechniquesPhysics and Astronomy17 references16 citations
TL;DR

This paper presents a practical guide to social network analysis using Python, integrating graph theory with real-world applications. It demonstrates constructing networks from datasets (e.g., Eurovision votes, Game of Thrones characters) using NetworkX, applying centrality measures and influence diffusion models (Independent Cascade, Threshold), and evaluating influence maximization with heuristics and brute-force comparison, showing that top central nodes can achieve 50% network coverage with a single seed.

ABSTRACT

Social network analysis is the process of investigating social structures through the use of networks and graph theory. It combines a variety of techniques for analyzing the structure of social networks as well as theories that aim at explaining the underlying dynamics and patterns observed in these structures. It is an inherently interdisciplinary field which originally emerged from the fields of social psychology, statistics and graph theory. This talk will covers the theory of social network analysis, with a short introduction to graph theory and information spread. Then we will deep dive into Python code with NetworkX to get a better understanding of the network components, followed-up by constructing and implying social networks from real Pandas and textual datasets. Finally we will go over code examples of practical use-cases such as visualization with matplotlib, social-centrality analysis and influence maximization for information spread.

Motivation & Objective

  • To bridge theoretical social network analysis with practical implementation using Python.
  • To demonstrate how real-world datasets (e.g., Eurovision voting, Game of Thrones character co-occurrences) can be transformed into network structures.
  • To evaluate the effectiveness of centrality measures and influence maximization heuristics in predicting network spread.
  • To compare heuristic-based influence seeding with brute-force optimization in terms of coverage and computational cost.

Proposed method

  • Construct directed, weighted networks from tabular data (e.g., Excel) using NetworkX’s from_pandas_edgelist function.
  • Apply position-based layout using geographic coordinates and customize node/edge styling (size, color, width) for visual clarity.
  • Implement the Independent Cascade model for stochastic influence diffusion, where each active neighbor independently activates a node with a probability proportional to edge weight.
  • Use the Threshold model for cumulative influence, where a node activates when the sum of weighted influences from active neighbors exceeds a threshold.
  • Evaluate influence spread using simulation over discrete time steps, tracking infection times and coverage.
  • Compare influence maximization results using centrality-based heuristics (degree, betweenness, PageRank) against a brute-force search for optimal seeding sets.

Experimental results

Research questions

  • RQ1How can real-world datasets such as Eurovision voting patterns be transformed into analyzable social networks?
  • RQ2To what extent do different centrality measures (degree, betweenness, PageRank) identify influential nodes in a social network?
  • RQ3How effective are heuristic-based influence seeding strategies compared to exhaustive search in maximizing network coverage?
  • RQ4How do different diffusion models (Independent Cascade vs. Threshold) affect the dynamics and speed of information spread?
  • RQ5What is the trade-off between computational cost and influence coverage when selecting seeding nodes for marketing or information campaigns?

Key findings

  • The most central nodes—particularly Tyrion Lannister—rank highly across multiple centrality measures (degree, weighted degree, PageRank, betweenness), indicating strong social influence.
  • Selecting a single top-centrality node (e.g., Robert Baratheon) achieved approximately 50% network coverage, demonstrating the power of key influencers.
  • A brute-force search for the optimal pair of seeding nodes achieved 56% coverage after 41 minutes, highlighting the computational cost of exact optimization.
  • The Independent Cascade model successfully simulated rumor propagation in the Game of Thrones network, showing rapid spread from initial seeds to the entire network within 10 time steps.
  • Visualizing networks with position, color, and size attributes significantly improved interpretability compared to default NetworkX layouts.
  • Centrality-based heuristics provided a scalable and effective alternative to computationally expensive brute-force methods for influence maximization.

Read this paper

Open the full text in the Nubint reader and ask about any passage as you read.

Read this paper on Nubint

This review was generated by AI from the original paper. Please check the paper before citing it.