Fast Search for Dynamic Multi-Relational Graphs

Sutanay Choudhury, Lawrence B. Holder, George Chin Jr., John Feo

Abstract

Acting on time-critical events by processing ever growing social media or news streams is a major technical challenge. Many of these data sources can be modeled as multi-relational graphs. Continuous queries or techniques to search for rare events that typically arise in monitoring applications have been studied extensively for relational databases. This work is dedicated to answer the question that emerges naturally: how can we efficiently execute a continuous query on a dynamic graph? This paper presents an exact subgraph search algorithm that exploits the temporal characteristics of representative queries for online news or social media monitoring. The algorithm is based on a novel data structure called the Subgraph Join Tree (SJ-Tree) that leverages the structural and semantic characteristics of the underlying multi-relational graph. The paper concludes with extensive experimentation on several real-world datasets that demonstrates the validity of this approach.

Introduction: The Challenge of Continuous Querying

In the modern era of "information barrage," data from social media and news streams arrive in a constant, high-volume flow. This data is most effectively modeled as a multi-relational graph, where nodes represent entities (e.g., users, articles, locations) and edges represent diverse relationships (e.g., "authored by," "located at," "related to").

A critical requirement for monitoring applications is continuous querying: the ability to identify complex patterns (subgraph isomorphisms) in real-time as new edges are streamed into the graph. Traditional graph search algorithms are typically designed for static datasets and are NP-complete, making them unsuitable for rapidly changing environments. Existing incremental methods often suffer from a "combinatorial explosion" of partial matches, which prevents them from scaling to the throughput required by platforms like Twitter or global news feeds.

Incremental matching of a query graph over time.

The SJ-Tree: A Hierarchical Approach

To address these challenges, this paper introduces the Subgraph Join Tree (SJ-Tree). The SJ-Tree is a specialized data structure that employs a "divide and conquer" strategy for subgraph matching.

Query Decomposition and Hierarchical Joins

The core idea is to decompose a complex query graph into a binary tree hierarchy.

  1. Leaf Nodes: These represent "search primitives"—small, highly selective subgraphs that are computationally inexpensive to find.
  2. Internal Nodes: These represent the "join" of the partial matches found by their child nodes.
  3. Incremental Processing: When a new edge arrives, the system performs a localized search to see if it completes any leaf-level primitives. If a match is found, it is propagated up the tree, joining with existing partial matches in sibling nodes until a complete match reaches the root.
Decomposition of a query into an SJ-Tree hierarchy.

Temporal Pruning

A key innovation of the SJ-Tree algorithm is its use of temporal constraints. By exploiting the fact that streaming events typically occur within a specific time window ($t_W$) and often follow a chronological order, the algorithm can aggressively prune partial matches that fall outside these bounds. This significantly reduces the memory footprint and prevents the exponential growth of the search space.

Experimental Evaluation

The researchers evaluated the SJ-Tree algorithm against several real-world datasets, significantly larger than those used in previous literature:

  • New York Times: A news dataset (~40k vertices, ~68k edges) linking articles to facets.
  • DBLP: A co-authorship network (~3.1M vertices, ~3.2M edges).
  • Tencent Weibo: A massive social media dataset (~2.5M vertices, ~89.6M edges).

Key Results

  • Performance: The SJ-Tree algorithm outperformed the baseline incremental algorithm (IncIsoMatch) by multiple orders of magnitude, particularly as graph density increased.
  • Throughput: On the Tencent Weibo dataset, the system processed 100,000 edges in approximately 10 seconds with temporal windowing. This equates to a throughput of roughly 864 million edges per day, comfortably exceeding the daily volume of platforms like Twitter (300-400 million posts).
  • Selectivity: The results highlight that prioritizing rare sub-patterns (high selectivity) acts as a "shield," preventing the system from tracking thousands of irrelevant partial matches.

Conclusion and Future Work

The SJ-Tree provides a robust framework for real-time monitoring of dynamic multi-relational graphs. However, several avenues for future research remain. Currently, the construction of the SJ-Tree (the "query plan") is largely manual; automating the selection of optimal search primitives and join orders based on data distribution is a key next step. Additionally, while the current model relies on strict monotonic temporal ordering, future iterations could handle more complex, overlapping temporal relationships within the search window.

Summary updated

Abstract

Acting on time-critical events by processing ever growing social media or news streams is a major technical challenge. Many of these data sources can be modeled as multi-relational graphs. Continuous queries or techniques to search for rare events that typically arise in monitoring applications have been studied extensively for relational databases. This work is dedicated to answer the question that emerges naturally: how can we efficiently execute a continuous query on a dynamic graph? This paper presents an exact subgraph search algorithm that exploits the temporal characteristics of representative queries for online news or social media monitoring. The algorithm is based on a novel data structure called the Subgraph Join Tree (SJ-Tree) that leverages the structural and semantic characteristics of the underlying multi-relational graph. The paper concludes with extensive experimentation on several real-world datasets that demonstrates the validity of this approach.
BibTeX
@inproceedings{choudhury2013fast,
  author = {Sutanay Choudhury and Lawrence B. Holder and George Chin Jr. and John Feo},
  title = {{Fast Search for Dynamic Multi-Relational Graphs}},
  booktitle = {DyNetMM@SIGMOD},
  year = {2013},
  url = {https://openreview.net/forum?id=n_FtjamNde},
}
Figure