[Paper Review] O'Reach: Even Faster Reachability in Large Graphs
O'Reach is a novel reachability algorithm that enables constant-time queries in large directed graphs using a linear-sized index, significantly accelerating query performance over existing methods. By leveraging supportive vertices and cache-friendly data structures, it outperforms even precomputed reachability matrices in practice, especially for negative queries, due to superior memory access patterns and reduced space overhead.
One of the most fundamental problems in computer science is the reachability problem: Given a directed graph and two vertices s and t, can s reach t via a path? We revisit existing techniques and combine them with new approaches to support a large portion of reachability queries in constant time using a linear-sized reachability index. Our new algorithm O'Reach can be easily combined with previously developed solutions for the problem or run standalone. In a detailed experimental study, we compare a variety of algorithms with respect to their index-building and query times as well as their memory footprint on a diverse set of instances. Our experiments indicate that the query performance often depends strongly not only on the type of graph, but also on the result, i.e., reachable or unreachable. Furthermore, we show that previous algorithms are significantly sped up when combined with our new approach in almost all scenarios. Surprisingly, due to cache effects, a higher investment in space doesn't necessarily pay off: Reachability queries can often be answered even faster than single memory accesses in a precomputed full reachability matrix.
Motivation & Objective
- To address the scalability limitations of traditional reachability algorithms in large, static directed graphs.
- To reduce query time to constant time while maintaining linear space complexity.
- To improve upon existing index-based approaches by optimizing for both positive and negative reachability queries.
- To demonstrate that higher memory investment does not always yield faster query performance due to cache effects.
- To provide a flexible, composable framework that enhances existing algorithms without requiring full reimplementation.
Proposed method
- O'Reach constructs a linear-sized reachability index using supportive vertices—vertices that help determine reachability efficiently.
- It employs a hybrid approach combining topological ordering, strongly connected component (SCC) decomposition, and reverse graph analysis to precompute reachability shortcuts.
- The algorithm uses a cache-optimized data structure to minimize memory access latency, especially benefiting negative queries.
- It supports both standalone use and integration with existing algorithms like PReaCH, PPL, and TF, enhancing their performance through lightweight augmentation.
- Three configurable parameters allow trade-offs between space, preprocessing time, and query speed.
- The method exploits the fact that unreachable queries can be resolved faster than a single memory access in a full reachability matrix due to favorable cache behavior.
Experimental results
Research questions
- RQ1Can reachability queries be answered in constant time with only linear space overhead in large graphs?
- RQ2How does the performance of reachability algorithms vary between positive and negative queries?
- RQ3To what extent can existing algorithms be accelerated by integrating O'Reach’s techniques?
- RQ4Does increased memory usage always lead to faster query performance, or do cache effects dominate?
- RQ5Can a lightweight, composable index achieve sub-microsecond query times across diverse graph types?
Key findings
- O’Reach achieves average query times below 0.35 microseconds when combined with PPL, making it the fastest solution across all tested instances.
- Even with only 1.5 GB of memory, O’Reach outperforms full reachability matrices in practice due to superior cache locality, especially for negative queries.
- Combining O’Reach with PReaCH yields an average query time of at most 11.1 microseconds, offering a strong trade-off between initialization cost and performance.
- The index size of O’Reach depends only on the number of vertices, not edge density, making it highly space-efficient for sparse graphs.
- Surprisingly, negative queries are often answered faster than a single memory access in a full matrix, due to effective cache utilization.
- The performance of algorithms depends not only on graph type but also on the ratio of reachable to unreachable queries, with O’Reach excelling in both scenarios.
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.