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

Graph Pattern Mining and Learning through User-defined Relations (Extended Version)

Carlos H. C. Teixeira, Leonardo Cotta, Bruno Ribeiro, Wagner Meira Jr.

Abstract

Graph Pattern Mining (GPM) is a fundamental task in network science, yet it remains constrained by exponential computational complexity and a lack of flexibility in defining subgraph relationships. This paper introduces R-GPM, a scalable framework that enables users to define custom subgraph relations. By integrating a computationally bounded exact algorithm with a novel unbiased MCMC estimator on high-order networks, R-GPM achieves up to a 1,000x speedup over traditional methods while maintaining high accuracy and near-linear parallel scalability.

Introduction

Analyzing recurring subgraphs, or "motifs," is crucial for understanding complex systems ranging from biological pathways to social networks. However, current GPM tools face two primary challenges. First, the number of $k$-node subgraphs grows exponentially with graph size, making exhaustive enumeration computationally prohibitive. Second, existing frameworks are often "hard-coded" for specific patterns like cliques, requiring significant manual effort to implement new, domain-specific relations.

R-GPM addresses these issues by providing a generalized framework that treats traditional motif counting as a special case of user-defined relations. This flexibility allows researchers to explore complex patterns, such as those defined by shared hubs or pattern percolation, without redesigning the underlying algorithms.

Methodology: The R-GPM Framework

The R-GPM framework operates on a High-Order Network (HON), where each node represents a $k$-node subgraph and edges represent shared vertices between subgraphs. The system architecture is divided into two distinct layers to balance accuracy and efficiency.

The R-GPM architecture featuring Upper and Lower layers for pattern and weight estimation.

Upper Layer: Pattern Estimation

The Upper Layer performs a random walk on the HON to sample subgraph classes. This process estimates the overall pattern statistics ($F$) across the network.

Lower Layer: Class Weight Estimation

When the Upper Layer identifies a subgraph, the Lower Layer calculates its "class weight" ($\alpha$). It employs a hybrid strategy:

  1. Exact Search: A bounded Breadth-First Search (BFS) explores the subgraph's neighborhood up to a user-defined budget ($B$).
  2. Sampling the Residual: If the budget is exceeded, the system switches to an unbiased estimator based on Non-Backtracking Random Walk Tours (nRWT).
  3. Supernode Optimization: Subgraphs identified during the exact search are collapsed into a "supernode," which accelerates the convergence of the random walk by reducing return times.

Key Insights

A core theoretical innovation in R-GPM is the application of the renewal-reward theorem from Markov chain theory. This allows for the creation of an unbiased estimator that seamlessly merges partial exact results with sampling data. By focusing sampling efforts on the "residual"—the portion of the subgraph space unreachable by the bounded exact search—R-GPM maximizes the utility of its computational budget.

Experimental Results

The framework was evaluated on real-world datasets, including the Yeast protein-protein network and bibliometric networks (DBLP, MSR). Despite the relatively small size of the base graphs, the corresponding HONs contained up to 66 million nodes.

SSE analysis and top 5 motif convergence over random walk steps.

Key findings include:

  • Performance: R-GPM demonstrated speedups of 10x to 1000x compared to exact DFS-based enumeration.
  • Accuracy: As shown in the Sum of Squared Errors (SSE) analysis, the estimator converges rapidly toward zero error.
  • Scalability: The framework's producer-consumer model achieved near-linear speedup on up to 44 cores.
  • Downstream Utility: In subgraph evolution prediction tasks, R-GPM-weighted training samples improved accuracy from 0.64 to 0.69 over baseline methods.

Conclusion

R-GPM represents a significant step forward in making graph pattern mining both flexible and scalable. While the framework handles HON construction on-the-fly, future work will focus on reducing memory overhead for extremely large $k$ values and optimizing the performance of complex user-defined pruning functions. Extending this approach to directed and multi-layer graphs remains a promising avenue for future research.

Summary updated

BibTeX
@inproceedings{teixeira2018graph,
  author = {Carlos H. C. Teixeira and Leonardo Cotta and Bruno Ribeiro and Wagner Meira Jr.},
  title = {{Graph Pattern Mining and Learning through User-defined Relations (Extended Version)}},
  booktitle = {ICDM},
  year = {2018},
  url = {https://openreview.net/forum?id=IbACxw83zN},
}
Figure