go back
go back
Volume 17, No. 8
Fast Local Subgraph Counting
Abstract
We study local subgraph counting queries,π=(π,π),to count how many times a given π-node pattern graph π appears around every node π£ in a data graph πΊ when the given center node π in π maps to π£. Such local subgraph counting becomes important in GNNs (Graph Neural Networks), where incorporating such counts for every node in πΊ into the GNN architecture enhances the modelβs ability to capture complex relationships within the graph πΊ . It is challenging to count by subgraph isomorphism, which is known to be NP-hard. In this paper, we propose a novel approach by tree-decomposition-based counting. For a complex pattern graph π in π , we find its best tree decomposition π , where a node in π represents a subgraph of π, and a node in π may appear in multiple nodes in π. Let π(π) be the pattern represented by π. Our approach is to count π(π ) by homomorphism with a constraint to count the subgraph in every tree node by subgraph isomorphism. We apply symmetry-breaking rules to reduce the cost of counting by subgraph isomorphism for every node in π , and we develop a new multi-join algorithm to compute such counts. We confirm that our approach on a single machine using a single core can outperform the others significantly.
PVLDB is part of the VLDB Endowment Inc.
Privacy Policy