Large-scale continuous subgraph queries on streams

Sutanay Choudhury, Lawrence B. Holder, George Chin Jr., John FeoarXiv 2012 · DOI

Abstract

Graph pattern matching involves finding exact or approximate matches for a query subgraph in a larger graph. It has been studied extensively and has strong applications in domains such as computer vision, computational biology, social networks, security and finance. The problem of exact graph pattern matching is often described in terms of subgraph isomorphism which is NP-complete. The exponential growth in streaming data from online social networks, news and video streams and the continual need for situational awareness motivates a solution for finding patterns in streaming updates. This paper reviews representative work from continuous query (CQ) systems and identifies important semantics, constraints, and architectural features appropriate for HPC systems performing real-time graph analytics.

Introduction

Modern data sources, ranging from cyber-security logs to social media feeds, are fundamentally dynamic. Unlike traditional static graph analysis, where a query is run once against a fixed dataset, streaming environments require "continuous subgraph queries." In these scenarios, the underlying graph is constantly evolving as new vertices and edges arrive. The challenge lies in the computational complexity: subgraph isomorphism is NP-complete. Re-running a search from scratch with every update is infeasible. This paper explores how borrowing Continuous Query (CQ) concepts from database research and applying temporal constraints can make real-time subgraph matching tractable on high-performance computing (HPC) architectures.

Problem Statement: The Challenge of Streaming Subgraphs

In a streaming context, the goal is to identify specific patterns as they emerge. A query defines a template of nodes and edges that the system searches for within the stream. For example, a query might look for a specific sequence of publications by an author across different years and conferences.

A sample subgraph query representing a search for an author's publication history.

The primary bottleneck is the exponential growth of "partial matches"—substructures that satisfy only a portion of the query. Without constraints, the number of potential combinations to track can quickly overwhelm system memory (categorized as Area I: Memory). Furthermore, the system must process updates fast enough to maintain real-time responsiveness (Area II: Timeliness).

The Incremental Framework

The proposed solution is an incremental framework that avoids redundant computation. Instead of global re-evaluation, the system tracks partial matches and attempts to "grow" them as subsequent data arrives.

The incremental emergence of a subgraph pattern over time.

The core innovation is the application of temporal constraints. By treating time as a first-class constraint, the system can aggressively prune the search space. For instance, if a query specifies that "Event A" must precede "Event B," any partial match where "Event B" arrives first can be immediately discarded, saving significant memory and compute resources.

Key Insights: Leveraging Time and Shared Work

In static graphs, time is merely an attribute. In streaming graphs, it is a powerful pruning tool. The paper highlights "ordered-arrival" and "clustered-arrival" constraints as the most effective ways to reduce the growth of partial matches.

Additionally, the paper suggests "Shared Work" optimizations. Similar to how databases share results between overlapping queries, graph systems should identify common sub-structures across multiple user queries to avoid redundant processing. This is particularly relevant for large-scale systems where many users might be monitoring for similar threat patterns or social trends.

HPC Integration and Future Directions

Traditional HPC tools often struggle with the irregular memory access patterns inherent in graph theory. The authors suggest that specialized frameworks, potentially utilizing hardware like the massively multi-threaded Cray XMT, are necessary for high-velocity streams.

However, challenges remain. Real-world networks often deliver data out of order, and without strict windowing constraints, memory usage could still become unbounded. Future work involves defining a standardized set of "representative temporal queries" to benchmark performance across different HPC architectures and exploring adaptive pruning strategies that respond to changes in stream velocity.

Summary updated

BibTeX
@misc{choudhury2012large,
  author = {Sutanay Choudhury and Lawrence B. Holder and George Chin Jr. and John Feo},
  title = {{Large-scale continuous subgraph queries on streams}},
  year = {2012},
  eprint = {1208.0055},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/1208.0055},
}
Figure