Estimating Sizes of Social Networks via Biased Sampling

Liran Katzir, Edo Liberty, Oren Somekh, Ioana A. CosmaInternet Math 2011

Abstract

Estimating the size of massive social networks is a fundamental challenge for researchers and advertisers who lack direct access to platform databases. Traditional mark-and-recapture methods rely on uniform sampling, which is often computationally expensive or impossible to implement via rate-limited APIs. This paper presents a novel approach that leverages the inherent bias of random walks toward high-degree nodes. By utilizing these "hubs" to increase collision rates, the proposed algorithms reduce sample complexity from $O(\sqrt{n})$ to as low as $O(n^{1/4} \log n)$ for power-law networks. Empirical tests on synthetic and real-world datasets, including Facebook and IMDB, demonstrate that these estimators provide accurate population counts with significantly fewer queries than standard techniques.

Introduction

How many users are actually active on a platform like Facebook? While social media giants publish their own statistics, independent validation is crucial for academic research, market analysis, and advertising auditing. However, platforms rarely provide a complete user directory. Instead, researchers must interact with public APIs that are often restricted by privacy settings and strict rate limits.

Statistically, estimating a population size usually involves "mark-and-recapture" techniques, which traditionally require uniform sampling—picking users completely at random. Unfortunately, most APIs do not provide a "random user" function. To approximate a uniform sample, researchers often resort to complex rejection sampling on random walks, a process that discards a significant portion of collected data. This research explores a more efficient alternative: embracing the natural bias of random walks to estimate network size.

Methodology

The researchers propose two primary estimators that utilize the properties of random walks on undirected graphs. Unlike uniform sampling, where every node has an equal probability of being selected, a random walk is naturally biased toward "popular" nodes with high degrees (many connections).

1. Collision Counting Estimator

This estimator tracks three primary variables during a random walk:

  • The sum of node degrees ($\psi_1$)
  • The sum of reciprocal degrees ($\psi_{-1}$)
  • The number of "collisions" ($C$), which occur when the walk visits a node it has previously encountered.

The estimate is derived from the ratio of these values, leveraging the fact that the probability of being at a specific node is proportional to its degree.

2. Nonunique Element Counting Estimator

This more sophisticated approach tracks the ratio of unique nodes discovered versus the frequency of re-visits. By solving a fixed-point equation, the algorithm identifies the most likely total network size. In comparative tests, this estimator consistently provided a marginal improvement in accuracy over the simpler collision counting method.

Theoretical Advantage: Bias as a Feature

The core innovation of this work is treating bias as an advantage rather than a hurdle. In uniform sampling, the "Birthday Paradox" dictates that one needs $O(\sqrt{n})$ samples to reliably see collisions. However, in social networks—which typically follow a power-law or Zipfian degree distribution—high-degree hubs act as magnets. These hubs facilitate collisions much faster than random nodes would.

For networks with heavy-tailed distributions, the authors prove that their method reduces sample complexity to $O(n^{1/4} \log n)$. For a network of one billion users, this represents a massive reduction in API overhead, potentially requiring only 6,000 samples where uniform methods would require 30,000.

Empirical Results

The algorithms were validated across several diverse datasets:

  • Synthetic Networks: A 1-million-node graph with a Zipfian distribution.
  • DBLP: A co-authorship graph of computer science researchers (~845,000 nodes).
  • IMDB: An actor collaboration graph (~1.95 million nodes).
  • Facebook: Real-world crawls from 2009 and 2010.

Key Findings

  • Efficiency: On synthetic data, the biased sampling approach reached a 5% error rate by sampling only 0.5% of the network. In contrast, uniform sampling required 2.5% of the network to reach the same accuracy—a fivefold increase in efficiency.
  • Facebook Case Study: Using data from a 2010 crawl, the estimators calculated a population of approximately 475 million users. At the time, Facebook's official reports claimed "more than 500 million active users." The discrepancy is likely attributable to users with strict privacy settings that prevent crawlers from traversing their friend lists.
  • Sub-population Flexibility: The method is not limited to total population counts. It can estimate the size of specific sub-groups (e.g., users in a specific geographic region) by tracking the relative frequency of hits within that group during the walk.

Limitations and Considerations

While highly efficient, the accuracy of these estimators depends on several graph properties:

  • Privacy Settings: The algorithm requires the ability to view a user's connections to continue the walk. High densities of private profiles can lead to undercounting.
  • Mixing Rates: The walk must "mix" well, meaning it must be able to traverse the entire graph easily. While most social networks exhibit "small world" properties that favor fast mixing, highly fragmented networks may require more samples.
  • Activity Definitions: External crawlers cannot distinguish between daily active users and dormant accounts, whereas official platform metrics usually focus on Monthly Active Users (MAU).

Conclusion

By mathematically accounting for the bias toward high-degree nodes in random walks, researchers can estimate the size of massive social networks with unprecedented efficiency. This approach turns the structural properties of social networks—specifically the presence of highly connected hubs—into a statistical tool, significantly lowering the barrier for independent platform analysis.

Summary updated

BibTeX
@inproceedings{katzir2011estimating,
  author = {Liran Katzir and Edo Liberty and Oren Somekh and Ioana A. Cosma},
  title = {{Estimating Sizes of Social Networks via Biased Sampling}},
  booktitle = {Internet Math},
  year = {2011},
}
Figure