Estimating the Number of Connected Components in a Graph via Subgraph Sampling

Jason M. Klusowski, Yihong Wu

Abstract

Estimating global properties of massive graphs from limited samples is a central challenge in network science. This paper addresses the problem of estimating the number of connected components using a sublinear vertex sample. We demonstrate that while this task is generally intractable due to long cycles and high-degree hubs, it becomes computationally efficient for the class of chordal graphs. By employing smoothed clique-based estimators, we achieve minimax optimal sample complexity and provide a robust heuristic for non-chordal real-world networks.

Introduction

In the era of massive datasets, observing an entire network—such as a global social network or a comprehensive genomic map—is often infeasible. Researchers must instead rely on statistical samples to infer global structural properties. A fundamental question in this domain is whether the number of connected components can be accurately estimated from a vanishingly small fraction of the nodes. While early work provided unbiased estimators for simple structures like trees, these methods often suffer from prohibitive variance in more complex topologies. This paper establishes the theoretical limits of this estimation and proposes practical algorithms that reach these limits for chordal graphs.

The Subgraph Sampling Model

The authors utilize the subgraph sampling model, where each vertex in a parent graph $G$ is sampled independently with probability $p$ (Bernoulli sampling). The observer only sees the "induced subgraph"—the set of sampled nodes and all edges that exist between them in the original graph.

An example of the subgraph sampling model where sampled nodes (black) and their induced edges are used to estimate global properties.

As shown in Figure 1, the challenge lies in reconstructing global connectivity from fragmented local observations. The paper proves a "No-Go" theorem: if a graph contains very long induced cycles or "hubs" with degrees proportional to the total node count, accurate estimation is mathematically impossible with sublinear samples. In such cases, a sampled path could belong to one large cycle or multiple small components, and the observer cannot distinguish between them.

Chordality as a Theoretical Bridge

To overcome these limitations, the authors focus on chordal graphs. A graph is chordal if every cycle of four or more vertices contains a "chord" (an edge connecting two non-adjacent nodes in the cycle). This property is crucial because chordal graphs possess a "Perfect Elimination Ordering" that allows global properties like the number of connected components to be expressed as an alternating sum of clique counts (e.g., nodes, edges, triangles).

Illustration of a chordal graph and its decomposition into smaller structural elements for estimation.

Smoothed Clique-Based Estimators

Directly using alternating sums of clique counts can lead to explosive variance, especially in graphs with large, dense clusters. To mitigate this, the authors introduce a smoothed estimator. This technique applies a Poisson-weighted truncation to the clique counts, effectively trading a small amount of bias for a significant reduction in variance. This approach marks a departure from traditional literature that prioritized unbiasedness at the cost of stability.

Results and Real-World Application

The paper evaluates the proposed estimators on both synthetic and real-world datasets, including the arXiv "cond-mat" collaboration network and human protein-protein interaction maps.

Key findings include:

  • Optimal Sample Complexity: The required sample size for chordal graphs is precisely characterized by the maximum degree $d$ and the clique number $\omega$.
  • Sublinear Efficiency: For chordal graphs, accurate estimation is possible even as the sampling ratio $p$ approaches zero relative to the total graph size $N$.
  • Robustness via Triangulation: Although the theory is grounded in chordality, the authors applied a "triangulation" heuristic to non-chordal real-world data. This involved adding edges to the sampled subgraph to make it chordal before estimation. This heuristic significantly outperformed standard unbiased estimators, which often produced nonsensical results on complex networks.

Conclusion

This work identifies chordality as a key structural property that enables sublinear estimation of graph connectivity. By moving beyond unbiasedness to smoothed estimators, the authors provide a scalable, linear-time framework for analyzing massive networks. Future research remains focused on extending these rigorous theoretical guarantees to "near-chordal" structures and addressing the challenges posed by high-degree "super-hubs."

Summary updated

BibTeX
@inproceedings{klusowski2020estimating,
  author = {Jason M. Klusowski and Yihong Wu},
  title = {{Estimating the Number of Connected Components in a Graph via Subgraph Sampling}},
  booktitle = {Bernoulli},
  year = {2020},
  doi = {10.3150/19-bej1147},
}
Figure