NeurIPS 2026Coming to NeurIPS?Explore papers, orals & directions

Subgraph frequencies: mapping the empirical and extremal geography of large graph collections

Johan Ugander, Lars Backstrom, Jon M. Kleinberg

Introduction

When analyzing massive social networks like Facebook, researchers typically treat them as single, billion-node behemoths. However, many practical applications involve dealing with millions of small, dense graphs embedded within the larger network—such as a user's immediate friend group, the members of a specific club, or the attendees of an event.

This research introduces a universal "coordinate system" for analyzing these collections by mapping them to their frequencies of 3- and 4-node subgraphs. By combining a novel random walk model with extremal graph theory, the authors disentangle the mathematical constraints inherent to all graphs from the specific sociological behaviors, such as triadic closure, that drive real-world network formation.

Methods: Disentangling Social and Mathematical Properties

The authors map graphs into a coordinate system based on subgraph frequencies—specifically, the probability of finding specific 3-node or 4-node induced subgraphs within a larger graph. To understand this space, they approach it from two distinct angles:

1. Empirical Modeling (The "Social" Properties)

They introduce the Edge Formation Random Walk with Triadic Closure. This is a continuous-time Markov chain model that extends the classic Erdős-Rényi random graph. While edges randomly appear and disappear, the authors add a single parameter (λ) that boosts the probability of an edge forming if it closes an open triangle. This captures the sociological tendency for "friends of friends" to become friends.

State transition diagram for the 4-node subgraph random walk model, illustrating the rates of transition between different subgraph configurations.

2. Extremal Bounds (The "Graph" Properties)

To find the absolute mathematical limits of this coordinate space, the researchers use graph homomorphism theory. They construct a Linear Program (LP) that calculates the maximum and minimum mathematically possible frequencies for any given subgraph, effectively drawing the "walls" of the coordinate space. This allows them to determine if a structural pattern is driven by human behavior or if it is simply a fundamental mathematical constraint.

Key Insights: The 1D Backbone of Social Graphs

The study utilizes anonymized, aggregated data from the Facebook social graph, extracting three distinct collections: Neighborhoods, Groups, and Events. Analysis revealed several striking patterns:

  • The 1D Backbone: Real social graphs do not scatter randomly across the space of possible subgraph frequencies. Instead, regardless of their origin, they tightly cluster along a simple, one-dimensional curve.
  • Math vs. Sociology: Sociologists have long noted the rarity of the "forbidden triad" (where Person A knows B and C, but B and C don't know each other). The authors' LP proves that the frequency of this triad has a strict mathematical upper bound of approximately 75%. Its rarity is partly a mathematical constraint, not just human behavior.
  • The Power of Triadic Closure: The single parameter (λ) in their random walk model explains why real graphs deviate from standard random graphs. Fitting this parameter accurately predicts the frequencies of all 11 possible 4-node subgraphs.

Key Results and Performance

By tuning just the triadic closure rate, the generative model matches the empirical mean frequencies of 4-node subgraphs with striking accuracy. As shown in the comparison below, the fit model (black line) closely tracks the actual Facebook event data (blue line), significantly outperforming the standard Erdős-Rényi (Gnp) model.

Comparison of empirical subgraph frequencies from Facebook Events with the fitted triadic closure model and standard random graph models.

Beyond modeling, the authors tested if subgraph frequencies could distinguish between different types of social gatherings. Using a simple logistic regression on 4-node subgraph frequencies, they achieved approximately 77% accuracy in classifying Neighborhoods vs. Events. This local subgraph approach outperformed a suite of complex, global graph features like k-cores and degeneracy, which achieved 69-76% accuracy. Combining both local and global features pushed accuracy to 81-82%.

Conclusion and Future Directions

The research reveals that human social graphs occupy a surprisingly narrow, 1D slice of mathematically possible structures. While the current study focuses on undirected graphs, extending this framework to directed graphs (like Twitter or Instagram followers) is a natural next step. Furthermore, the authors suggest that exploring the frequencies of connected subgraphs (graphlet kernels) could further improve classification tasks and our understanding of the "uninhabited geography" of graph space.

Summary updated

BibTeX
@inproceedings{ugander2013subgraph,
  author = {Johan Ugander and Lars Backstrom and Jon M. Kleinberg},
  title = {{Subgraph frequencies: mapping the empirical and extremal geography of large graph collections}},
  booktitle = {The Web Conference},
  year = {2013},
  doi = {10.1145/2488388.2488502},
}
Figure