[Paper Review] Why do simple algorithms for triangle enumeration work in the real world?
This paper explains why the MinBucket algorithm—selecting triangle enumeration paths via the lowest-degree middle vertex—achieves dramatic speedups in real-world graphs. It proves that the algorithm's expected running time is governed by the ℓ₄/₃-norm of the degree sequence, yielding linear time for power-law degree distributions with exponent α ≥ 7/3 and non-trivial speedups for α ∈ (2, 3).
Listing all triangles is a fundamental graph operation. Triangles can have important interpretations in real-world graphs, especially social and other interaction networks. Despite the lack of provably efficient (linear, or slightly super-linear) worst-case algorithms for this problem, practitioners run simple, efficient heuristics to find all triangles in graphs with millions of vertices. How are these heuristics exploiting the structure of these special graphs to provide major speedups in running time? We study one of the most prevalent algorithms used by practitioners. A trivial algorithm enumerates all paths of length $2$, and checks if each such path is incident to a triangle. A good heuristic is to enumerate only those paths of length $2$ where the middle vertex has the lowest degree. It is easily implemented and is empirically known to give remarkable speedups over the trivial algorithm. We study the behavior of this algorithm over graphs with heavy-tailed degree distributions, a defining feature of real-world graphs. The erased configuration model (ECM) efficiently generates a graph with asymptotically (almost) any desired degree sequence. We show that the expected running time of this algorithm over the distribution of graphs created by the ECM is controlled by the $\ell_{4/3}$-norm of the degree sequence. Norms of the degree sequence are a measure of the heaviness of the tail, and it is precisely this feature that allows non-trivial speedups of simple triangle enumeration algorithms. As a corollary of our main theorem, we prove expected linear-time performance for degree sequences following a power law with exponent $α\geq 7/3$, and non-trivial speedup whenever $α\in (2,3)$.
Motivation & Objective
- To explain the empirical success of simple triangle enumeration heuristics like MinBucket in real-world graphs despite poor worst-case theoretical bounds.
- To analyze the performance of the MinBucket algorithm on graphs with heavy-tailed degree distributions, common in real-world networks.
- To establish a theoretical foundation linking the algorithm's efficiency to the structural properties of real-world graphs, particularly the ℓ₄/₃-norm of the degree sequence.
- To validate the theoretical model using experimental results on graphs generated by the erased configuration model (ECM) with power-law degree distributions.
Proposed method
- The authors model real-world graphs using the erased configuration model (ECM), which generates random graphs with a specified degree sequence.
- They analyze the expected number of path pairs processed in each bucket of the MinBucket algorithm, focusing on the contribution from vertices with low degree.
- The key theoretical tool is the use of the ℓ₄/₃-norm of the degree sequence to bound the expected work, showing that heavy-tailed distributions (with finite ℓ₄/₃-norm) lead to sub-quadratic performance.
- They derive an asymptotic expression for the expected number of pairs of paths in the same bucket, which corresponds to the algorithm's work, using linearity of expectation and concentration bounds.
- The analysis leverages the monotone convergence theorem and tail bounds to prove convergence of the expected work to a finite constant times n for power-law degree distributions.
- Experiments on ECM-generated graphs with power-law exponents α = 2.3 and α = 2.4 validate the theoretical predictions, showing the work approaches linear scaling as n increases.
Experimental results
Research questions
- RQ1Why does the MinBucket algorithm, despite having poor worst-case time complexity, perform significantly faster than the trivial algorithm on real-world graphs?
- RQ2How does the structure of real-world graphs—specifically heavy-tailed degree distributions—affect the performance of the MinBucket algorithm?
- RQ3What mathematical property of the degree sequence governs the expected running time of the MinBucket algorithm in random graphs?
- RQ4For which power-law degree distributions does the MinBucket algorithm achieve linear expected time complexity?
- RQ5To what extent does the theoretical analysis based on the erased configuration model (ECM) match empirical performance on synthetic graphs with similar degree distributions?
Key findings
- The expected running time of the MinBucket algorithm is asymptotically bounded by a constant multiple of n times the ℓ₄/₃-norm of the degree sequence.
- For power-law degree distributions with exponent α ≥ 7/3, the MinBucket algorithm achieves expected linear time complexity.
- For power-law degree distributions with α ∈ (2, 3), the algorithm achieves non-trivial speedups over the trivial O(∑dᵢ²) algorithm.
- The theoretical constant for the expected work in the α = 2.4 case is approximately 0.687935, and experimental results on ECM graphs with up to 80 million nodes converge toward this linear bound.
- The experimental results show that the ratio of work to n levels off below 1 for α = 2.4, confirming the theoretical prediction of linear scaling.
- For α = 2.3, the work grows superlinearly, consistent with the theory that ℓ₄/₃-norm divergence leads to superlinear performance.
Read this paper
Open the full text in the Nubint reader and ask about any passage as you read.
Read this paper on NubintThis review was generated by AI from the original paper. Please check the paper before citing it.