NeurIPS 2026Coming to NeurIPS?Explore papers, orals & directions

Interactive Visual Pattern Search on Graph Data via Graph Representation Learning

Huan Song, Zeng Dai, Panpan Xu, Liu Ren

TL;DR

This paper introduces GraphQ, a novel visual analytics system that enables interactive, example-based search for subgraph patterns within large graph databases. By leveraging graph neural networks (GNNs) for representation learning and a new node-alignment method called NeuroAlign, GraphQ achieves significantly faster and more accurate subgraph matching than existing approaches, making complex graph pattern analysis accessible to users.

What Problem Does This Paper Address?

Graphs are powerful tools for modeling relationships in diverse domains, from program workflows to semantic scene graphs in images. A common and crucial task is identifying recurring subgraph patterns within a collection of graphs. This helps in understanding structural properties, finding reusable components, or retrieving similar data instances. However, traditional subgraph matching algorithms are computationally expensive (often NP-complete) and struggle to provide accurate node correspondences, which are essential for user interpretation and validation. Existing visual query systems often have limitations in expressiveness or scalability. This paper addresses the need for an efficient, interactive, and user-friendly system that can handle large graph databases and complex pattern queries.

Methods

The core of GraphQ's approach lies in graph representation learning using Graph Neural Networks (GNNs). Instead of directly comparing graphs, GNNs encode each graph into a fixed-length vector representation, transforming subgraph matching into a more manageable vector comparison problem.

The system employs two key GNN-based components:

  • NeuroMatch: This component is used for the subgraph decision problem – determining if a query pattern exists within a target graph. It leverages a technique that decomposes graphs into local neighborhoods, making the matching process faster.
  • NeuroAlign: This is the paper's novel contribution for the node-alignment problem. While NeuroMatch can identify that a pattern exists, it often struggles to pinpoint the exact corresponding nodes between the query and the matched subgraph. NeuroAlign uses a cross-graph attention mechanism to directly predict node-to-node correspondences, significantly improving accuracy and interpretability.

The system also incorporates:

  • Interactive Query Interface: Users can visually construct query patterns by selecting nodes and edges from example graphs.
  • Multi-Scale Visualization: Results are presented in both compact thumbnail views and detailed node-link diagrams.
  • User Feedback Mechanisms: Users can refine queries with additional constraints.
  • Approximate Query Matching: An optional feature that allows for finding similar, but not necessarily exact, subgraph patterns.

Datasets

The paper evaluates GraphQ on four diverse datasets:

  • Workflow Dataset: A collection of approximately 500 program workflow graphs from vehicle diagnostics software.
  • MSRC-21: A dataset of natural scene images with 21 semantic object labels, transformed into semantic scene graphs.
  • COX2: A dataset of chemical molecule graphs.
  • Enzymes: A dataset of protein tertiary structure graphs.

The paper does not introduce new benchmark datasets but uses existing ones to demonstrate the generality of their approach.

Key Insights and Ideas

  • Representation Learning for Efficiency: Shifting from direct graph comparison to comparing learned vector embeddings is key to achieving interactive speeds for subgraph search in large databases.
  • The Importance of Node Alignment: Simply knowing a pattern exists isn't enough; accurately identifying which nodes correspond is crucial for users to understand and trust the results. NeuroAlign directly addresses this critical gap.
  • Human-in-the-Loop is Essential: Complex graph pattern search benefits greatly from interactive systems where users can guide the search, refine results, and leverage their domain knowledge.
  • Generalizability: The framework's success across diverse graph types (workflows, scene graphs, molecules, proteins) highlights its broad applicability.

Key Results

  • Subgraph Decision Accuracy: NeuroMatch achieved high precision and recall (around 90%) on the Workflow and MSRC-21 datasets, demonstrating its effectiveness in retrieving relevant graphs.
  • Node Alignment Improvement: NeuroAlign significantly outperformed NeuroMatch in node alignment accuracy, showing improvements of 19%-29% in top-1 accuracy and substantial gains after greedy assignment.
  • Runtime Efficiency: GraphQ offers a 10x-100x speedup compared to the VF2 exact matching algorithm, enabling interactive query performance. The NeuroAlign component adds minimal computational overhead.
  • Qualitative Feedback: Domain experts found GraphQ intuitive, useful for their tasks (e.g., identifying reusable workflow modules), and powerful for interactive exploration.

Limitations and Future Work

  • Multiple Subgraph Isomorphisms: The current NeuroAlign focuses on a single instance of subgraph isomorphism. Handling cases where query nodes map to multiple sets of target nodes (multiple subgraph isomorphisms) is a challenging area for future research.
  • Scalability to Very Large Query Graphs: Training NeuroMatch requires hard negative samples, which can be computationally expensive to generate for very large query graphs.
  • Directed and Disconnected Graphs: The current system primarily works with undirected, connected graphs. Extending it to handle directed graphs and disconnected query patterns is a future direction.
  • Database Indexing: Investigating database indexing techniques on learned embeddings could further improve retrieval efficiency to sub-linear time.
  • Broader Applications: The authors plan to extend GraphQ to other domains like social network analysis and 3D point cloud analysis.

Summary updated

BibTeX
@article{song2022interactive,
  author = {Huan Song and Zeng Dai and Panpan Xu and Liu Ren},
  title = {{Interactive Visual Pattern Search on Graph Data via Graph Representation Learning}},
  journal = {IEEE TVCG},
  year = {2022},
  doi = {10.1109/tvcg.2021.3114857},
}
Figure