Incremental Sliding Window Connectivity over Streaming Graphs

Chao Zhang, Angela Bonifati, M. Tamer Özsu

Introduction

In modern real-time data processing, graphs are rarely static. Applications ranging from fraud detection in financial transactions to traffic management in smart cities rely on streaming graphs, where data arrives as a continuous sequence of edges. To maintain relevance, these systems often employ a sliding window model, focusing only on the most recent edges (e.g., the last hour of activity).

A core challenge in this environment is maintaining connectivity: determining whether two vertices belong to the same connected component. While connectivity is a well-understood problem for static graphs, the high frequency of edge additions and expirations in streaming windows makes it a significant performance bottleneck.

The Challenge of Sliding Windows

In a sliding window, as new edges arrive, older edges "expire" and must be removed from the graph. Traditional "Fully Dynamic Connectivity" (FDC) algorithms handle these updates using complex data structures like dynamic spanning trees. However, the deletion of an expired edge is computationally expensive. When a bridge edge in a spanning tree expires, the algorithm must search the graph for a replacement edge to maintain connectivity, a process that often scales poorly with graph size.

Sliding windows ($w_i$) over a stream of edge updates ($ au_j$), where connectivity must be maintained as edges expire.

As shown in the figure above, windows move across the timeline of edge updates. As the window shifts from $w_2$ to $w_3$, edges from earlier time steps (like $ au_2$) expire while new ones from $ au_7$ are added. Managing this constant churn efficiently is the primary goal of recent research.

The BIC Approach: Eliminating Deletions

To address the inefficiencies of edge deletion, researchers have introduced the Bidirectional Incremental Computation (BIC) model. The fundamental insight of BIC is that in a sliding window, the expiration time of every edge is known the moment it arrives. Instead of treating expirations as unpredictable deletions, BIC transforms the problem into a purely incremental process using two types of buffers:

  1. Forward Buffers ($f$): These process edges in their arrival order.
  2. Backward Buffers ($b$): These process edges in reverse order, starting from the end of a data "chunk."
The BIC model decomposes a sliding window query into a combination of pre-computed backward and forward buffers.

By combining a snapshot from a backward buffer (representing the "tail" of an older chunk) with a snapshot from a forward buffer (representing the "head" of a newer chunk), the system can reconstruct the connectivity of any window that spans the two chunks. Because both buffers are built using only edge insertions, the system can utilize the highly efficient Union-Find (UF) data structure. UF is significantly faster and more cache-friendly than the spanning trees required by FDC methods.

To bridge the gap between these two buffers during a query, the authors developed the Backward-Forward Bipartite Graph (BFBG). This auxiliary structure connects the component roots of the two buffers, allowing global connectivity to be determined in near-constant time.

Experimental Results

The BIC model was evaluated against state-of-the-art FDC methods (such as D-Tree) across 10 diverse datasets, including massive social networks like Friendster (1.8B edges) and Semantic Scholar (8.27B edges).

The results demonstrate a paradigm shift in performance:

  • Throughput: BIC achieved up to a 14× increase in throughput compared to existing methods.
  • Latency: The most significant gain was observed in tail latency (P95), which saw reductions of up to 3900×. This drastic reduction ensures that even the most complex queries in a stream do not cause system backlogs.
  • Memory Efficiency: Through a technique called "Snapshot Isolation," BIC manages to store the necessary connectivity states with less memory overhead than traditional methods that require full adjacency lists.

Conclusion

By reframing edge expiration as a bidirectional insertion problem, the BIC model sidesteps the most costly operations in dynamic graph analysis. The transition from complex spanning trees to optimized Union-Find structures allows for massive gains in both throughput and reliability. Future work aims to extend this bidirectional logic to other graph properties, such as shortest paths and reachability, potentially revolutionizing how we analyze streaming data at scale.

Summary updated

BibTeX
@article{zhang2024incremental,
  author = {Chao Zhang and Angela Bonifati and M. Tamer Özsu},
  title = {{Incremental Sliding Window Connectivity over Streaming Graphs}},
  journal = {Proc. VLDB Endow.},
  year = {2024},
  doi = {10.14778/3675034.3675040},
}
Figure