R-GPM: Parallel Graph Pattern Mining
- R-GPM is a parallel framework that generalizes graph pattern mining by using user-defined subgraph relations to partition connected induced subgraphs.
- The method combines bounded-depth exact enumeration with MCMC sampling, employing non-backtracking walks and producer-consumer parallelism to achieve near-linear scalability.
- Empirical evaluations demonstrate its efficacy in motif counting and high-order GNN loss reweighting, significantly reducing computational time and cost.
R-GPM refers to the parallel framework "Graph Pattern Mining and Learning through User-defined Relations," introduced to generalize traditional graph pattern mining (GPM) by supporting computation of pattern statistics defined over arbitrary, user-specified subgraph relations rather than fixed pattern frequencies or simple motif counts. R-GPM combines Markov chain Monte Carlo (MCMC) sampling, exact enumeration, algorithmic optimizations, and massively parallel execution to yield efficient and scalable estimators for class-based pattern statistics, with rigorous theoretical guarantees and empirical validation in both combinatorial motif studies and deep learning graph model applications (Teixeira et al., 2018).
1. Motivation and Formalization
Conventional GPM focuses on enumerating or counting specific subgraph patterns according to hard-coded notions of relevance (typically frequency or density). Such rigidity impedes flexible mining for emerging classes of structural or attribute-driven patterns—requiring custom algorithms for each new relation. R-GPM generalizes the paradigm by introducing a user-defined subgraph relation , which is required to be an equivalence-isomorphic relation (i.e., it is reflexive, symmetric, transitive, and only relates isomorphic patterns). This approach partitions the set of -node connected induced subgraphs (CISs) into equivalence classes, enabling quantification of pattern significance over these generalized classes.
Definitions used in R-GPM:
- CIS set:
- Pattern: Canonical representative for isomorphism class of
- Class of under :
Given a subgraph weight function , R-GPM defines:
and for a pattern (canonical label) 0,
1
with normalization 2 (Teixeira et al., 2018).
2. Algorithmic Framework and Architecture
Given the super-exponential growth of 3 and non-enumerability of classes for moderate 4, R-GPM leverages a layered, parallel architecture:
- Upper Layer (Producer): Performs a random walk on the 5-order high-order network (6-HON) of the input graph (nodes = 7-CISes, edges = 8-overlaps). Each visited subgraph is queued for further processing.
- Lower Layer (Consumer): Consumes queued CISes, computes unbiased estimators for 9 and related statistics via hybrid exact and sampling routines. This division enables parallel execution across many threads or cores.
The framework exploits independence of sampling tours in the lower layer and asynchronous producer-consumer pipelining to achieve nearly linear scalability up to at least 44 cores (Teixeira et al., 2018).
3. Exact–Plus–MCMC Estimation Methodology
R-GPM combines bounded-depth exact enumeration with MCMC-based residual estimation to offer scalable, unbiased class-based statistics:
- Iteration-bounded Class Computation: Given a budget 0, perform an exact BFS traversal in 1-HON starting from subgraph 2. This discovers a partial class 3 and exact sum 4.
- Random-Walk-Tour Residual Estimator: For the undiscovered residual 5, employ non-backtracking random walks (nRW) with supernode collapse at 6. Multiple independent random-walk tours begin and end at 7, and the sum over the intermediate sample path is used to unbiasedly estimate the remainder.
The width and correctness of the estimator,
8
is proven in Theorem 1 to be unbiased for 9, relying on renewal-reward theory and the stationary distribution of nRW in 0 (Teixeira et al., 2018).
4. Pattern Statistic Estimation and Consistency
For pattern-level statistics 1, the upper layer aggregates over random-walk samples using Horvitz–Thompson estimators:
2
with 3 an unbiased degree estimator for the equivalence class (Teixeira et al., 2018). Theorem 2 establishes almost sure consistency 4 as 5, for 6. Empirical evidence confirms rapid variance decay with increased supernode size and number of tours.
5. Algorithmic Optimizations
R-GPM incorporates key innovations, including:
- Supernode Collapsing: All discovered class members 7 are collapsed into a single high-degree supernode, decreasing expected return time for random-walk tours.
- Non-backtracking Walks: Immediate backsteps are disallowed, reducing autocorrelation and accelerating mixing.
- BFS Pruning Predicate 8: If 9 is local or supports coarse filtering, pruning precludes exploration of irrelevant branches for increased computational efficiency.
- Producer–Consumer Parallelism: Full decoupling between walk and estimation enables saturating multi-core architectures for massive throughput improvements (Teixeira et al., 2018).
Empirically, these optimizations yield 1–3 orders-of-magnitude reductions in computational cost for medium-sized subgraph class estimation.
6. Experimental Results and Applications
R-GPM's practical efficacy is demonstrated in key applications:
- High-order GNN Loss Reweighting: In SPNN models, R-GPM enables stochastic gradient estimates for structure-weighted loss optimization, yielding statistically significant gains in test accuracy. For example, in DBLP graph evolution prediction, R-GPM-reweighted losses increase average weighted accuracy from 0.64 (baseline) to 0.69 (0) (Teixeira et al., 2018).
- Motif Class Counting: In biological networks, R-GPM enables motif ranking under rich percolation or connectivity equivalence relations, producing rankings that can diverge strongly from conventional motif frequencies (Kendall’s 1, 2 in yeast PPI data).
Scalability benchmarks confirm near-linear speedup on many-core hardware. For instance, on DBLP1, wall time for computing 10,000 estimators drops from 1,002 min on 11 cores to 322 min on 44 cores (speedup ×3.1).
7. Limitations and Open Challenges
While R-GPM establishes a flexible and scalable framework for generalized GPM, several outstanding challenges are highlighted:
- Relation Class Restriction: Only equivalence-isomorphic 3 relations are supported for correctness guarantees; extending beyond equivalence (e.g., thresholded overlap, directed percolation) is an open area.
- Mixing Time Control: The 4-HON may become poorly connected for large 5 or sparse graphs, affecting estimator variance and convergence rates.
- Analytic Variance Modeling: Practical estimator variance control relies on empirical tuning; theoretical variance bounds as a function of structural graph parameters and class size would enable principled resource allocation.
- Generality to Directed/Attributed Graphs: Extension of the underlying architecture to cover directed, attributed, or hypergraphs may require new high-order network constructions and relation semantics.
- User Usability: The flexibility of R-GPM puts the burden on users to supply 6, 7, and 8-testing code; higher-level DSLs or relation libraries would facilitate adoption.
Despite these, R-GPM demonstrates a robust generalization of GPM to arbitrary relation-driven settings, enabling advanced queries, unbiased sampling, and parallel resource utilization well beyond the capabilities of existing motif-centric methods (Teixeira et al., 2018).