DeMEtRIS: Counting (near)-Cliques by Crawling

Suman K. Bera, Jayesh Choudhari, Shahrzad Haddadan, Sara Ahmadian

Introduction

Counting subgraphs, or motifs, such as triangles and cliques, is a fundamental task in network analysis with applications ranging from bioinformatics to cybersecurity. However, modern massive graphs like Facebook or Twitter are often too large to store in memory and are only accessible through "crawling" via public APIs. In this random walk model, traditional sampling methods struggle due to high variance and the inherent dependency between successive samples.

DeMEtRIS (Dense Motif Estimation through Random Incident Sampling) is a novel, scalable algorithm designed to estimate the number of cliques and "near-cliques" by crawling only a tiny fraction of a network. It achieves high precision (under 5% error) while querying less than 5% of the graph's edges, significantly outperforming previous state-of-the-art methods.

Methodology

The core innovation of DeMEtRIS is a hierarchical sampling approach combined with a new theoretical framework for $c$-dense motifs.

Hierarchical Construction

Instead of searching for complex motifs like 5-cliques directly, DeMEtRIS builds them layer-by-layer. It starts by sampling edges via a random walk, then iteratively extends these into triangles, 4-cliques, and finally 5-cliques. This "layer-by-layer" approach effectively trims the search space and maintains low estimator variance.

Theoretical Foundations: Arboricity

The algorithm exploits a graph property called arboricity—a measure of global density. The authors prove a new combinatorial result: the number of $c$-dense motifs (where vertices are missing at most $c$ edges) can be bounded by the graph's arboricity. This insight enables sub-linear crawling complexity ($O(n^{1-\epsilon})$), making it theoretically sound for massive graphs. To prevent overcounting, strict mathematical assignment rules ensure each motif is uniquely identified during the sampling process.

Experimental Evaluation

DeMEtRIS was evaluated on several large-scale real-world social network datasets, including soc-sinaweibo (59M vertices) and soc-orkut (3M vertices).

Median relative error for various motifs across five datasets as the percentage of edges visited increases.

As shown in the evaluation, DeMEtRIS consistently achieves a median relative error of less than 5% across all datasets and motif types (4-cliques, 5-cliques, 4-chord cycles, and almost-5-cliques) with a budget of only 4-5% of edges visited. The error rates drop sharply as the sampling budget increases, demonstrating the algorithm's efficiency.

Comparison with State-of-the-Art

When compared against SRW2, a leading motif counting framework, DeMEtRIS demonstrates significantly superior accuracy. While SRW2 often exhibits errors exceeding 10-20% (and in some cases much higher) at low query budgets, DeMEtRIS maintains high precision within the same constraints.

Performance comparison between DeMEtRIS and the SRW2 baseline across different motifs and datasets.

Conclusion

DeMEtRIS represents a significant advancement in graph crawling algorithms. By leveraging hierarchical sampling and arboricity-based bounds, it provides a theoretically sound and practically efficient method for motif estimation in massive, restricted-access graphs. While the algorithm is sensitive to the "mixing time" of the graph and is optimized specifically for dense motifs, it sets a new benchmark for accuracy and scalability in the field. Future work will explore extending this approach to more general subgraph structures and reducing dependency on graph mixing times.

Summary updated

BibTeX
@inproceedings{bera2023demetris,
  author = {Suman K. Bera and Jayesh Choudhari and Shahrzad Haddadan and Sara Ahmadian},
  title = {{DeMEtRIS: Counting (near)-Cliques by Crawling}},
  booktitle = {WSDM},
  year = {2023},
  doi = {10.1145/3539597.3570438},
}
Figure