PathEnum: Towards Real-Time Hop-Constrained s-t Path Enumeration

Shixuan Sun, Yuhang Chen, Bingsheng He, Bryan Hooi

Abstract

Finding all paths between two nodes within a specific hop constraint (HcPE) is a fundamental task in graph analysis, yet it suffers from exponential search space growth. This paper introduces PathEnum, a framework that achieves real-time performance by shifting pruning to a query-specific indexing phase and employing a cost-based optimizer to select between depth-first search and join-based strategies. Evaluations on massive real-world graphs show PathEnum outperforms state-of-the-art methods by up to 240x.

Introduction

The hop-constrained s-t path enumeration (HcPE) problem involves identifying all paths between a source $s$ and a target $t$ within a maximum of $k$ steps. This task is critical for applications like fraud detection and knowledge graph completion. However, the "search space explosion" in large graphs often makes traditional polynomial delay algorithms too slow for real-time use, as the overhead of pruning invalid paths during the search phase becomes prohibitive.

Graph G and Join Query Q

Methodology

PathEnum addresses these challenges through a three-pronged architecture that prioritizes pre-search indexing and adaptive execution.

PathEnum Architecture

1. Light-weight Indexing

Rather than maintaining a global index, PathEnum constructs a query-dependent index at runtime. By performing two Breadth-First Searches (BFS)—one from $s$ and one from $t$—the system identifies and discards any vertex $v$ that cannot possibly be part of a valid path (i.e., where the distance from $s$ to $v$ plus the distance from $v$ to $t$ exceeds $k$).

2. Join-based Modeling

PathEnum treats path enumeration as a "chain join" problem, similar to relational database queries. This allows the application of advanced join optimization techniques to the graph traversal process.

3. Adaptive Query Optimizer

The framework uses a preliminary estimator to assess the search space size. For small spaces, it employs IDX-DFS (Depth-First Search on the index). For larger, more complex spaces, it utilizes a full-fledged cardinality estimator to determine an optimal "cut position" and executes an IDX-JOIN. This "bushy" join approach splits the path search and joins the results, significantly reducing redundant computation.

Experimental Evaluation

PathEnum was tested on 15 real-world datasets, including social networks (Twitter), web graphs (Web-google), and massive knowledge bases.

  • Performance: PathEnum achieved speedups ranging from 1.9x to 240.7x over the previous state-of-the-art (BC-DFS).
  • Responsiveness: For online applications, the time to return the first 1,000 results was improved by 14.2x to 358.5x.
  • Scalability: The system successfully processed the Twitter-mpi graph (52M vertices, 1.96B edges), maintaining high throughput where competing methods timed out.

Conclusion

PathEnum demonstrates that pruning before the search phase, combined with a cost-based strategy selection, is far more effective than traditional search-time pruning. Future work includes exploring global offline indexing for dynamic graphs and further refining the cost models used by the optimizer.

Summary updated

BibTeX
@inproceedings{sun2021pathenum,
  author = {Shixuan Sun and Yuhang Chen and Bingsheng He and Bryan Hooi},
  title = {{PathEnum: Towards Real-Time Hop-Constrained s-t Path Enumeration}},
  booktitle = {SIGMOD},
  year = {2021},
  doi = {10.1145/3448016.3457290},
}
Figure