Skip to main content
QUICK REVIEW

[Paper Review] Clique counting in MapReduce: theory and experiments

Irene Finocchi, Marco Finocchi|arXiv (Cornell University)|Mar 4, 2014
Complex Network Analysis TechniquesPhysics and Astronomy40 references14 citations
TL;DR

This paper presents the first scalable, exact MapReduce algorithm for counting k-cliques in large graphs, achieving optimal work complexity O(m^{k/2}) and O(m^{3/2}) total space, with communication cost independent of k. It also introduces a highly accurate sampling-based estimator that reduces running time and space while maintaining high precision, especially for large k and dense graphs.

ABSTRACT

We tackle the problem of counting the number of $k$-cliques in large-scale graphs, for any constant $k \ge 3$. Clique counting is essential in a variety of applications, among which social network analysis. Due to its computationally intensive nature, we settle for parallel solutions in the MapReduce framework, which has become in the last few years a {\em de facto} standard for batch processing of massive data sets. We give both theoretical and experimental contributions. On the theory side, we design the first exact scalable algorithm for counting (and listing) $k$-cliques. Our algorithm uses $O(m^{3/2})$ total space and $O(m^{k/2})$ work, where $m$ is the number of graph edges. This matches the best-known bounds for triangle listing when $k=3$ and is work-optimal in the worst case for any $k$, while keeping the communication cost independent of $k$. We also design a sampling-based estimator that can dramatically reduce the running time and space requirements of the exact approach, while providing very accurate solutions with high probability. We then assess the effectiveness of different clique counting approaches through an extensive experimental analysis over the Amazon EC2 platform, considering both our algorithms and their state-of-the-art competitors. The experimental results clearly highlight the algorithm of choice in different scenarios and prove our exact approach to be the most effective when the number of $k$-cliques is large, gracefully scaling to non-trivial values of $k$ even on clusters of small/medium size. Our approximation algorithm achieves extremely accurate estimates and large speedups, especially on the toughest instances for the exact algorithms. As a side effect, our study also sheds light on the number of $k$-cliques of several real-world graphs, mainly social networks, and on its growth rate as a function of $k$.

Motivation & Objective

  • Address the challenge of efficiently counting k-cliques in large-scale graphs, particularly in social networks with high clustering coefficients.
  • Design a theoretically optimal, scalable MapReduce algorithm for exact k-clique counting that minimizes work and communication cost.
  • Develop a sampling-based approximation method that drastically reduces runtime and space usage while maintaining high accuracy.
  • Evaluate both exact and approximate algorithms experimentally on real-world graphs using Amazon EC2 to determine performance trade-offs across different workloads and k values.

Proposed method

  • Design a MapReduce algorithm that partitions the graph based on high-degree vertices and uses a two-phase approach: first, map each vertex to its high-degree neighbors; second, count (k-1)-cliques in induced subgraphs.
  • Use a work-optimality strategy by limiting the number of edges processed per reducer to O(m^{(k-1)/2}) and total space to O(m^{3/2}), independent of k.
  • Implement a color-based sampling technique that reduces the number of 2-paths processed in round 2 by a factor of p^{k-2}, improving efficiency and accuracy over plain sampling.
  • Introduce a recursive workload distribution strategy that defers clique counting for large high-neighborhoods, trading global space for reduced local computation time.
  • Leverage the MapReduce abstraction to handle fault tolerance, load balancing, and data shuffling automatically, focusing on algorithmic design.
  • Apply concentration bounds from probability theory to prove that the sampling estimator is highly accurate with high probability, requiring weaker conditions than prior work for k=3.

Experimental results

Research questions

  • RQ1Can an exact, scalable MapReduce algorithm be designed for k-clique counting that achieves optimal work complexity and independent communication cost from k?
  • RQ2How can sampling be effectively used to approximate k-clique counts with minimal loss in accuracy while drastically reducing runtime and space?
  • RQ3What is the performance trade-off between exact and approximate algorithms across different real-world graphs and values of k?
  • RQ4How does the accuracy and speedup of the sampling-based estimator scale with increasing k and varying sampling probabilities?
  • RQ5To what extent can the algorithm scale to large graphs and clusters of small-to-medium size without significant performance degradation?

Key findings

  • The exact k-clique counting algorithm achieves O(m^{k/2}) work and O(m^{3/2}) total space, matching the best-known bounds for triangle counting (k=3), and is work-optimal for any k.
  • The communication cost remains O(m^{3/2}) regardless of k, unlike prior multiway join approaches, making it more scalable for larger k.
  • The color-based sampling estimator reduced running time by up to 24× on the socLiveJ1 graph for k=6, with an approximation error of only 0.61%.
  • For k=3, the sampling estimator required weaker probabilistic conditions than the prior triangle counting method by Pagh and Tsourakakis, improving theoretical guarantees.
  • The algorithm gracefully scaled to k=7 on real-world graphs like egoGplus and orkut, with the approximate method enabling estimation in minutes where exact computation would take hours.
  • The experimental results show that the number of k-cliques grows rapidly with k in real-world social networks, making efficient approximation essential for practical analysis.

Read this paper

Open the full text in the Nubint reader and ask about any passage as you read.

Read this paper on Nubint

This review was generated by AI from the original paper. Please check the paper before citing it.