AOT: Pushing the Efficiency Boundary of Main-Memory Triangle Listing

Michael Yu, Lu Qin, Ying Zhang, Wenjie Zhang, Xuemin Lin

Introduction

Triangle listing—the process of identifying all sets of three mutually connected vertices in a graph—is a fundamental operation in network analysis. It underpins critical tasks such as community detection, spam discovery, and calculating clustering coefficients. However, as real-world graphs scale to billions of edges, the computational cost of triangle enumeration has become a significant bottleneck.

The Limitations of Static Orientation

Current state-of-the-art (SOTA) algorithms, such as Compact Forward (CF) and kClist, rely on "graph orientation." These methods transform an undirected graph into a Directed Acyclic Graph (DAG) based on a global vertex order (typically by degree) to ensure each triangle is counted exactly once. While effective at avoiding redundancy, this static approach creates an inherent asymmetry. It often forces "look-up" operations on vertices with high out-degrees even when a lower-degree neighbor is available, leading to excessive computation and poor cache performance on skewed datasets.

The AOT Approach: Adaptive Orientation

The authors propose AOT (Adaptive Oriented Triangle-Listing), which introduces a dynamic "adaptive orientation" technique. Unlike previous methods, AOT does not strictly follow a fixed DAG direction. Instead, it categorizes triangles into "positive" and "negative" types based on the out-degree relationships of the vertices involved.

Figure 3: Categorization of triangles into positive and negative types based on the pivot vertex and edge orientation.

For any given edge $(u, v)$, AOT adaptively selects whether to use $u$ or $v$ as the "pivot" to find the third vertex $w$. This flexibility ensures that the set-intersection operation is always performed using the vertex with the smaller out-degree, minimizing the total number of look-ups. This strategy allows AOT to achieve a theoretical time complexity of $\Theta(\sum_{\langle u,v \rangle \in \mathbf{E}} \min\{deg^+(u), deg^+(v)\})$, hitting a theoretical lower bound that static orientation methods cannot reach.

Figure 1: Illustration of the pivot vertex selection logic based on vertex degrees.

Supporting Innovations

Beyond adaptive orientation, AOT incorporates two key practical optimizations:

  1. Local Ordering Strategy: Within each vertex's adjacency list, neighbors are sorted by their total degree. This exploits the tendency of high-degree vertices to share common neighbors, significantly improving CPU cache locality.
  2. Bitmap Hash Table: AOT utilizes a global bitmap hash table to enable $O(1)$ look-ups. Its adaptive structure allows each vertex to build its hash table exactly once, avoiding the frequent rebuilds that slowed down previous hash-based approaches.

Experimental Evaluation

AOT was evaluated against 16 massive real-world graphs, including social networks like twitter-2010 (1.2 billion edges) and web graphs like it-2004.

On the twitter-2010 dataset, AOT listed all 35 billion triangles in just 433 seconds. This represents a 5.5x to 10x speedup over SOTA methods like kClist (2,381s) and CF (4,230s). Furthermore, AOT demonstrated superior parallel scalability, maintaining performance gains through 16 threads where other algorithms often plateaued.

Conclusion

AOT represents a significant leap in triangle listing efficiency by breaking the "orientation trap." By combining a flexible, degree-aware pivot selection strategy with cache-conscious local ordering, it achieves both theoretical dominance and state-of-the-art practical performance on billion-scale graphs. Future work may extend these adaptive principles to dynamic streaming graphs and distributed environments.

Summary updated

BibTeX
@inproceedings{yu2020aot,
  author = {Michael Yu and Lu Qin and Ying Zhang and Wenjie Zhang and Xuemin Lin},
  title = {{AOT: Pushing the Efficiency Boundary of Main-Memory Triangle Listing}},
  booktitle = {DASFAA},
  year = {2020},
  doi = {10.1007/978-3-030-59416-9\_31},
}
Figure