Estimating Social Network Sizes: Why Biased Sampling is Your Best Friend

Estimating Sizes of Social Networks via Biased Sampling

2014-03-20
Liran Katzir, Edo Liberty, Oren Somekh, Ioana A. Cosma
Summary
Problem
Method
Results
Takeaways
Abstract

This paper introduces a novel approach for estimating the size of online social networks (OSNs) using biased sampling through random walks. By leveraging the stationary distribution of a graph (where higher-degree nodes are sampled more frequently), the authors propose two estimators—the Collision Counter and the Non-unique Element Counter—that achieve SOTA performance in sample efficiency.

TL;DR

Estimating the size of massive social networks like Facebook via public APIs is a "black box" challenge. Traditional methods struggle because they demand uniform samples. This paper proves that biased sampling—sampling "popular" nodes more often via random walks—actually makes the estimation much faster, reducing the required samples from to .

Motivation: The Uniform Sampling Trap

In the world of graph theory and OSNs, we often want to know "How big is this network?" without having backend access. The standard statistical tool is Mark-and-Recapture (the "Birthday Paradox" logic): if you pick two random users and they happen to be the same person, you can starts to guess the total population.

However, there is a catch: this requires uniform sampling. To get a uniform sample from an API that only lets you see a user’s friends, you usually have to use "Rejection Sampling" (discarding many samples) or complex walks that converge slowly. In large-scale networks, this is prohibitively expensive in terms of API calls and time.

The Insight: Lean into the Bias

The authors ask: What if we don't try to be fair? A simple random walk on a graph (moving from friend to friend) naturally drifts toward "hubs"—users with many friends. Mathematically, the probability of hitting a node is proportional to its degree . This is the stationary distribution.

Instead of fighting this bias, the authors use it. They track three specific metrics during a random walk:

  1. (Collisions): Pairs of identical users sampled.
  2. (Sum of Degrees): Total friend counts of all sampled users.
  3. (Sum of Reciprocals): Total of for sampled users.

The Core Formula

By combining these, they derive a simple, elegant estimator:

This formula works because it compensates for the fact that high-degree nodes are more likely to collide.

Model Architecture and Sampling Logic

Why It Works: The Zipfian Advantage

Social networks aren't random; they follow power-law distributions (Zipfian). In these networks, a few "celebrity" nodes have massive degrees. The paper shows that on such graphs, collisions happen much faster in a biased walk than in a uniform one. This "acceleration" allows the algorithm to converge with only samples. For a network of a billion nodes, this is the difference between needing 30,000 samples and just 6,000.

Experimental Results

The authors tested their algorithms on synthetic data and real-world datasets including DBLP and IMDB.

Performance Comparison on DBLP and IMDB

  • Accuracy: On the IMDB network, the degree-biased sampling achieved a 10% error margin with 3x fewer samples than uniform methods.
  • The "Facebook" Test: The team analyzed Facebook crawls from 2009 and 2010. Their estimate of ~475 million users in Oct 2010 was remarkably close to Facebook's official "500 million active users" report, accounting for private profiles and inactive accounts.

Collision vs. Non-unique Estimator

Deep Insight: Subgraph Estimation

One of the most powerful features of this method is its ability to estimate the size of sub-populations (e.g., "How many Facebook users live in Hyderabad?"). The authors demonstrate that you can estimate a subgraph's size even more efficiently by first estimating the total graph size and then looking at the relative frequency of the sub-population in your samples.

Final Analysis

This work is a masterclass in turning a statistical "problem" (sampling bias) into a computational "solution."

  • Takeaway: If you are dealing with a graph that has a heavy-tailed degree distribution, stop trying to sample uniformly. You are throwing away valuable information.
  • Limitation: The method assumes the graph is "well-mixed" (that a random walk can reach most parts of the graph quickly). If a network is highly fragmented into isolated islands, any sampling method will struggle.

For engineers and data scientists looking to benchmark competitor platforms or understand network growth, this biased sampling approach remains a foundational, high-efficiency technique.

Find Similar Papers

Try Our Examples

  • Find recent papers that extend biased random walk sampling to estimate other graph properties like clustering coefficients or average path length in OSNs.
  • Which paper first introduced the Metropolis-Hastings random walk for uniform sampling in social networks, and how does its mixing rate compare to the degree-proportional walk analyzed here?
  • Are there any studies applying Collision Counting estimators to estimate the size of non-graph structures, such as hidden deep-web databases or distributed peer-to-peer networks?
Contents
Estimating Social Network Sizes: Why Biased Sampling is Your Best Friend
1. TL;DR
2. Motivation: The Uniform Sampling Trap
3. The Insight: Lean into the Bias
3.1. The Core Formula
4. Why It Works: The Zipfian Advantage
5. Experimental Results
6. Deep Insight: Subgraph Estimation
7. Final Analysis