Abstract
We study the problem of computing shortest path or distance between two query vertices in a graph, which has numerous important applications. Quite a number of indexes have been proposed to answer such distance queries. However, all of these indexes can only process graphs of size barely up to 1 million vertices, which is rather small in view of many of the fast-growing real-world graphs today such as social networks and Web graphs. We propose an efficient index, which is a novel labeling scheme based on the independent set of a graph. We show that our method can handle graphs of size three orders of magnitude larger than those existing indexes.
Introduction
Finding the exact shortest path or distance between two vertices—known as Point-to-Point (P2P) distance querying—is a fundamental operation in graph analysis. While specialized algorithms exist for road networks with low highway dimensions, they often fail on general sparse graphs such as social media networks, web graphs, or RDF datasets. Existing indexing methods like 2-hop labeling or tree decomposition suffer from massive construction costs and memory overhead, typically limiting their applicability to graphs with fewer than 1 million vertices. As modern networks reach billions of nodes, a more scalable exact querying mechanism is required.
The IS-LABEL Methodology
The authors introduce IS-LABEL, an indexing scheme that leverages the concept of independent sets to build a vertex hierarchy. An independent set is a collection of vertices where no two are adjacent.
Vertex Hierarchy Construction
The algorithm iteratively identifies an independent set of vertices, removes them, and introduces "augmenting edges" between their neighbors to preserve shortest-path distances. This process creates a sequence of increasingly smaller and denser graphs. Importantly, the algorithms are designed to be I/O-efficient, minimizing random disk accesses to allow processing of graphs that exceed the capacity of main memory (RAM).
k-level Truncation and Relaxed Labeling
To prevent the top-level graphs from becoming excessively dense, the hierarchy construction stops at a level $k$. Vertices are then assigned labels containing distances to their ancestors in higher levels. A "relaxed" labeling scheme is used, where only upper-bound distances are stored, significantly accelerating index construction without compromising the accuracy of the final query results.
Query Processing
Distance queries are answered by checking vertex labels. If nodes share ancestors, the distance is computed via label intersection. If not, the system performs an optimized, label-guided bidirectional Dijkstra search on the top-level graph $G_k$.
Experimental Evaluation
The method was tested on several large-scale datasets, including the BTC RDF graph (164.7M vertices) and the UK Web graph (6.9M vertices).
- Scalability: IS-LABEL successfully indexed the BTC dataset, which is three orders of magnitude larger than the limits of previous exact indexing methods.
- Performance: Average query times were 11.55 ms for the BTC graph and 28.02 ms for the Web graph.
- Efficiency: Compared to a modified VC-Index, IS-LABEL was up to 1130x faster. The index for the 164.7M vertex graph required only 10.6 GB of storage, fitting easily on standard consumer hardware.
Conclusion
IS-LABEL represents a significant advancement in exact P2P distance querying. By utilizing independent sets for hierarchy construction and a relaxed labeling scheme, it achieves unprecedented scalability and efficiency on massive, general-purpose graphs.
Summary updated