An Overview of Reachability Indexes on Graphs

Chao Zhang, Angela Bonifati, M. Tamer Özsu

Abstract

Reachability queries—determining if a path exists between two nodes—are a cornerstone of graph analysis in domains ranging from financial fraud detection to bioinformatics. However, as graph sizes scale to millions or billions of edges, traditional search algorithms like BFS or DFS become too slow, while full transitive closure precomputation is space-prohibitive. This paper provides a comprehensive overview of reachability indexes, which aim to provide near-constant query times with manageable storage overhead. We explore the evolution from plain reachability in simple graphs to complex path-constrained queries in edge-labeled networks.

Introduction

In modern graph databases, the "reachability problem" is ubiquitous. Whether tracing money laundering paths or navigating social hierarchies, the core question remains: "Can node A reach node B?" For massive real-world datasets, the challenge lies in finding the "Goldilocks" zone between search-time efficiency and storage space. A simple graph traversal (BFS/DFS) has $O(V+E)$ time complexity, which is unacceptable for high-frequency queries on large graphs. Conversely, storing the full Transitive Closure (TC) requires $O(V^2)$ space, which is unfeasible for graphs with millions of vertices. Reachability indexes bridge this gap by storing compact auxiliary information that speeds up queries.

Indexing Techniques for Plain Reachability

Plain reachability focuses on simple "Yes/No" path existence. The authors categorize these techniques into three primary families:

  1. Tree-Cover Based: These methods use spanning trees to assign intervals to nodes. Reachability is determined by interval containment. Modern iterations like GRAIL (Graph Reachability Indexing via Labeling) utilize multiple random spanning trees to quickly prune "No" answers.
  2. 2-Hop Labeling: Each node stores a small set of "in-hubs" and "out-hubs." A path exists from A to B if they share a common hub. While finding the optimal set of hubs is NP-hard, heuristic approaches provide excellent performance.
  3. Approximate Transitive Closure: Techniques such as BFL (Bloom Filter Labeling) use probabilistic data structures to provide a fast "No" or a "Maybe." A "Maybe" response triggers a limited traversal to confirm the path.
Comparison of (a) a plain graph and (b) an edge-labeled graph used for path-constrained reachability queries.
Summary of indexing techniques for plain reachability, categorized by framework and index type.

Path-Constrained Reachability

Real-world graphs often have labeled edges (e.g., "friendOf," "worksFor"). A path-constrained query might ask if A can reach B using only a specific subset of labels. This adds a layer of complexity, as the index must now account for edge semantics.

  • Sufficient Path-Label Sets (SPLS): This concept involves storing only the minimal sets of labels required to reach a destination, discarding redundant or more restrictive paths.
  • Generalized 2-Hop: This extends standard hub labeling to include label constraints, though it significantly increases index size and construction time.

Key Insights and Performance

A major takeaway is the "Power of No." Modern indexes are often optimized to prove a path does not exist almost instantly. This is particularly effective in sparse real-world graphs where most node pairs are unreachable. Furthermore, there is a significant "Complexity Gap" between plain and labeled reachability. While plain graphs with millions of nodes can be indexed in seconds, labeled graphs with complex regular expression constraints still pose significant scalability hurdles.

Conclusion and Future Directions

Despite decades of research, several challenges remain. Most current indexes are static and struggle with dynamic graphs where edges are frequently added or deleted. Additionally, creating a unified index that handles arbitrary Regular Path Queries (RPQs) remains an elusive goal. Finally, the integration of these academic advancements into mainstream Graph Database Management Systems (GDBMSs) is an ongoing process that will define the next generation of graph processing.

Summary updated

BibTeX
@inproceedings{zhang2023overview,
  author = {Chao Zhang and Angela Bonifati and M. Tamer Özsu},
  title = {{An Overview of Reachability Indexes on Graphs}},
  booktitle = {SIGMOD Conference Companion},
  year = {2023},
  doi = {10.1145/3555041.3589408},
}
Figure