Efficient Processing of Reachability and Time-Based Path Queries in a Temporal Graph

Huanhuan Wu, Yuzhen Huang, James Cheng, Jinfeng Li, Yiping KearXiv 2016

TL;DR

The paper introduces TopChain, a highly scalable indexing technique for temporal graphs that enables lightning-fast reachability and time-based path queries. By transforming temporal graphs into Directed Acyclic Graphs (DAGs) and employing a novel top-$k$ chain labeling strategy, it outperforms existing methods by orders of magnitude and is the first to support efficient real-time updates on massive datasets.

What Problem Does This Paper Address?

In many real-world networks—like social media, transit systems, or financial transactions—relationships aren't static; they happen at specific times and have specific durations. These are modeled as temporal graphs.

Standard graph algorithms for finding paths or checking reachability fail here because time imposes a strict order: you can't take a connecting flight that departs before your first flight arrives. While static graph reachability is well-understood, temporal graphs present a unique challenge: the "time-respecting" constraint makes the search space much more complex. Existing indexing methods either don't scale to graphs with millions of edges or cannot handle the frequent updates typical of live temporal data (e.g., new messages or calls being added constantly).

Methods

The authors propose a multi-step approach to tame temporal complexity:

  1. Graph Transformation: They first transform the temporal graph $\mathcal{G}$ into a Directed Acyclic Graph (DAG) $G$. Each vertex in the original graph is split into multiple nodes representing distinct arrival and departure times. They prove that as long as edge traversal times are non-zero, this transformed graph is guaranteed to be a DAG.

    A temporal graph (a) and its transformed DAG version (b)
  2. TopChain Labeling: To avoid the "curse of dimensionality" in large DAGs, they decompose the graph into chains (sequences of nodes where each can reach the next). Instead of storing every reachable node for every vertex, they store only the top-$k$ most "important" chain labels (based on vertex degree). This keeps the index size linear and manageable.

    Example of a DAG decomposed into four chains
  3. Pruned Online Search: For queries, the system first checks these top-$k$ labels. If they don't provide a definitive answer, the labels are used to aggressively prune a depth-first search, ensuring the search converges quickly.

  4. Dynamic Updates: They utilize the actual time stamps as part of the chain coordinates. This clever trick allows the index to be updated incrementally when new edges are added, without needing a full, expensive re-computation of the entire index.

Datasets

The authors evaluated TopChain on 15 real-world temporal graphs, spanning several domains:

  • Public Transit: Networks for cities like Austin, Berlin, and Toronto (from Google Transit Data).
  • Social & Communication: Enron emails, Flickr growth, YouTube, and DBLP co-authorship.
  • E-commerce & Web: Amazon ratings, Wikipedia growth, and the "delicious" bookmarking network.
  • Scale: The datasets ranged from small transit networks to the massive "delicious" dataset, which contains over 219 million temporal edges.

Key Insights and Ideas

  • The DAG Guarantee: The realization that temporal constraints naturally turn a graph into a DAG is the "aha moment" that allows the authors to leverage decades of research on DAG reachability.
  • Chain Merging: By merging arrival and departure nodes of the same original vertex into a single chain, they effectively halved the number of chains needed, significantly boosting query speed.
  • The Power of $k=5$: Experimental results showed that storing just 5 labels per vertex is a "sweet spot." It provides enough information to prune the vast majority of search paths while keeping the index footprint tiny.
  • Time as a Coordinate: Using time stamps directly in the labeling scheme is what makes dynamic updates feasible. It turns a global indexing problem into a local update problem.

Key Results

  • Speedup: TopChain was the fastest method in 11 out of 15 datasets. Compared to other state-of-the-art reachability indexes (like IP+ or Ferrari), it was often 2 to 3 orders of magnitude faster.
  • Scalability: TopChain successfully processed the 219M-edge "delicious" dataset, while most competitors either crashed or timed out.
  • Efficiency: Index construction time and size are linear relative to the graph size, making it practical for deployment in large-scale systems.
  • Dynamic Performance: It outperformed the previous state-of-the-art for dynamic updates (DAGGER) by significant margins, especially on graphs with high average degrees.

Limitations and Future Work

  • Edge Deletions: The current work focuses on edge insertions, which is the most common case for temporal logs. However, a robust method for handling edge deletions or modifications of historical data was not discussed in detail.
  • Heuristic Ranking: While ranking chains by degree worked well, the authors note that different ranking strategies might be better suited for specific graph topologies.
  • Distributed Implementation: The paper suggests that future work involves implementing TopChain in distributed frameworks like Pregel+ or Husky to handle even larger, web-scale temporal graphs.

Summary updated

BibTeX
@misc{wu2016efficient,
  author = {Huanhuan Wu and Yuzhen Huang and James Cheng and Jinfeng Li and Yiping Ke},
  title = {{Efficient Processing of Reachability and Time-Based Path Queries in a Temporal Graph}},
  year = {2016},
  eprint = {1601.05909},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/1601.05909},
}
Figure