SPECTRAL SUBGRAPH LOCALIZATION

Abstract

Several graph mining problems are based on some variant of the subgraph isomorphism problem: Given two graphs, G and Q, does G contain a subgraph isomorphic to Q? As this problem is NP-complete, many methods avoid addressing it explicitly. In this paper, we propose a method that solves the problem by localizing, i.e., finding the position of, Q in G, by means of an alignment among graph spectra. Finding a node correspondence from Q to G thereafter is relegated to a separate task, as an instance of the graph alignment problem. We demonstrate that our spectral approach outperforms a baseline based on the state-of-the-art method for graph alignment in terms of accuracy on real graphs and scales to hundreds of nodes as no other method does.

1. INTRODUCTION

Graph analysis tasks frequently require localizing a smaller target graph Q within a larger source graph G, i.e., finding a subgraph of G that is best aligned with Q. This type of problem may appear as subgraph discovery (Kuramochi & Karypis, 2001; Bianchini et al., 2018) , where we need to find any target graph in G, in subgraph querying (Katsarou et al., 2015; Sun & Luo, 2019) , where we find out whether a target subgraph match exists within a collection of source graphs, or graph matching (Zhang & Tong, 2016) , where we have to align corresponding nodes across two graphs, potentially of different sizes. Such subgraph localization is of interest in practical applications such as localizing a smaller electronic circuit within a large circuit (Fyrbiak et al., 2019) , detecting submolecules in bigger molecules (Najmanovich et al., 2008) , and localizing parts of shapes in computational geometry (Rampini et al., 2019) . For instance, the task of subcircuit detection (Fyrbiak et al., 2019) involves sampling multiple subgraphs and comparing the spectra of their adjacency matrices to that of the query subgraph. Despite the prevalence of the problem, current research has avoided tackling it directly, due to its NP-hardness. 1 0 2 0 3 0 4 1 5 1 6 1 7 1 8 0 δ(v) 1 3 2 4 Q 1 3 2 4 5 6 7 8 G 1 2 3 4 5 6 7 8 Figure 1 : An instance of subgraph localization (left) and its solution (right). In this paper, we propose a novel spectral solution to the problem of subgraph localization, built around the notion of identifying the spectrum λ Q of a graph Q within that of another graph G. Figure 1 visualizes an instance of the subgraph localization problem by our formulation; we aim to find a function δ that indicates which nodes in G correspond to Q. Our solution effectively recovers both the nodes belonging to the part and the edges that connect the part to the rest of the graph. This problem is an instance of inverse eigenvalues problems (Chu & Golub, 2005) , the class of problems which aim to reconstruct a matrix from its spectrum. Our experimental study demonstrates that our approach tackles the subgraph localization problem more effectively than state-of-the-art neural competitors and showcases its applicability to the real world problem of subgraph alignment. In summary, our contributions are as follows: • We propose a spectral formulation for the subgraph localization problem (Sec. 4). • We show that our solution achieves the optimum value under mild conditions (Sec. 3). • We experimentally validate the effectiveness of our solution on real and synthetic graphs (Sec. 5). 1

