NeurIPS 2026Coming to NeurIPS?Explore papers, orals & directions

Parallel Algorithms for Counting Triangles in Networks with Large Degrees

Shaikh Arifuzzaman, Maleq Khan, Madhav V. MarathearXiv 2014

Abstract

Counting triangles is a fundamental task in graph mining, yet it faces significant scalability challenges in real-world networks characterized by power-law degree distributions. This paper presents two MPI-based parallel algorithms designed to handle massive networks with billions of edges. By employing non-overlapping partitions and a novel "surrogate" communication scheme, the proposed methods overcome the memory bottlenecks inherent in traditional overlapping partitioning schemes. Experimental results on large-scale real-world and synthetic datasets demonstrate substantial improvements in memory efficiency and computational speedup.

Introduction

Triangle counting is essential for analyzing network properties such as clustering coefficients and social homophily. However, as networks grow to include billions of edges and massive "hub" nodes, existing distributed-memory algorithms often fail. The primary culprit is the use of overlapping graph partitions, which causes memory requirements to explode when a single high-degree node forces nearly the entire graph to be replicated across multiple processors.

Addressing the Memory Bottleneck

The core challenge in distributed triangle counting for scale-free networks is the skewed degree distribution. In a network like Twitter, a few nodes have millions of connections. If an algorithm requires overlapping partitions to count triangles spanning across nodes, these hubs necessitate duplicating vast amounts of data, leading to out-of-memory errors.

To solve this, the authors propose a Space-Efficient Algorithm utilizing strictly non-overlapping partitions. To manage the resulting inter-partition communication without overwhelming the network, they introduce the Surrogate Approach.

The Surrogate Approach

In a naive "Direct" approach, a processor needing a neighbor list from another node would request and pull that data over the network. If multiple processors need the same list, it is sent multiple times. In contrast, the Surrogate Approach "pushes" the computation. A processor sends its neighbor list once to a target node, which then acts as a surrogate, performing the necessary intersections locally. This significantly reduces redundant network traffic.

Figure 3: Speedup comparison between the Surrogate and Direct communication approaches across different real-world datasets.

As shown in Figure 3, the Surrogate approach consistently outperforms the Direct approach, providing much better scalability as the number of processors increases.

Dynamic Load Balancing

For graphs that can fit within the memory of a single node, the authors propose a Dynamic Load Balancing Algorithm. This method uses a coordinator-worker model to assign tasks. To prevent "stragglers"—processors that remain busy while others are idle—the algorithm employs a strategy of dynamically decreasing task sizes. By handing out large chunks of work initially and progressively smaller chunks toward the end, the system ensures that all processors finish their tasks nearly simultaneously, maximizing utilization.

Experimental Evaluation

The algorithms were tested on various datasets, including a Twitter graph with 2.4 billion edges and synthetic Preferential Attachment (PA) networks designed to simulate worst-case power-law distributions.

Figure 5: Speedup factor on synthetic PA networks comparing the proposed algorithm against existing state-of-the-art methods.

Key Results

  • Massive Memory Reduction: On the 2.4 billion edge Twitter graph, the space-efficient algorithm reduced the maximum partition size from 6.8 GB (required by the previous state-of-the-art, PATRIC) to just 265 MB.
  • Communication Performance: On 200 processors, the Surrogate approach processed the Twitter graph in 12.33 minutes, compared to 35.49 minutes for the direct approach.
  • Scalability: Figure 5 illustrates the superior scalability of the proposed algorithm on synthetic PA networks compared to prior work, maintaining high speedup factors even as the number of processors grows to 300.

Conclusion

By moving away from overlapping partitions and adopting a "push-compute" surrogate model, triangle counting can be scaled to the world's largest social networks. While the dynamic load balancing approach offers significant speedups for in-memory graphs, future work could involve hybridizing these two techniques to provide robust, load-balanced performance for graphs of any size.

Summary updated

BibTeX
@misc{arifuzzaman2014parallel,
  author = {Shaikh Arifuzzaman and Maleq Khan and Madhav V. Marathe},
  title = {{Parallel Algorithms for Counting Triangles in Networks with Large Degrees}},
  year = {2014},
  eprint = {1406.5687},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/1406.5687},
}
Figure