Detecting the Maximum Common Subgraph (MCS) between two input graphs is fundamental for applications in biomedical analysis , malware detection, cloud computing, etc. This is especially important in the task of drug design, where the successful extraction of common substructures in compounds can reduce the number of experiments needed to be conducted by humans. However, MCS computation is NP-hard, and state-of-the-art exact MCS solvers do not have worst-case time complexity guarantee and cannot handle large graphs in practice . Designing learning based models to find the MCS between two graphs in an approximate yet accurate way while utilizing as few labeled MCS instances as possible remains to be a challenging task. Here we propose RLMCS , a Graph Neural Network based model for MCS detection through reinforcement learning . Our model uses an exploration tree to extract subgraphs in two graphs one node pair at a time , and is trained to optimize subgraph extraction rewards via Deep Q-Networks. A novel graph embedding method is proposed to generate state representations for nodes and extracted subgraphs jointly at each step . Experiments on real graph datasets demonstrate that our model performs favorably to exact MCS solvers and supervised neural graph matching network models in terms of accuracy and efficiency .
Detecting the Maximum Common Subgraph (MCS) between two input graphs is fundamental for applications in drug synthesis , malware detection, cloud computing, etc. However, MCS computation is NP-hard, and state-of-the-art MCS solvers rely on heuristic search algorithms which in practice cannot find good solution for large graph pairs given a limited computation budget. We propose GLSearch , a Graph Neural Network (GNN) based learning to search model . Our model is built upon the branch and bound algorithm, which selects one pair of nodes from the two input graphs to expand at a time . Instead of using heuristics, we propose a novel GNN-based Deep Q-Network (DQN) to select the node pair, allowing the search process faster and more adaptive. To further enhance the training of DQN, we leverage the search process to provide supervision in a pre-training stage and guide our agent during an imitation learning stage . Experiments on synthetic and real-world large graph pairs demonstrate that our model learns a search strategy that is able to detect significantly larger common subgraphs given the same computation budget. Our GLSearch can be potentially extended to solve many other combinatorial problems with constraints on graphs .
R
biomedical analysis
drug synthesis
D
This is especially important in the task of drug design, where the successful extraction of common substructures in compounds can reduce the number of experiments needed to be conducted by humans.
R
exact MCS solvers do not have worst-case time complexity guarantee and cannot handle large graphs in practice . Designing learning based models to find the MCS between two graphs in an approximate yet accurate way while utilizing as few labeled MCS instances as possible remains to be a challenging task. Here we propose RLMCS
MCS solvers rely on heuristic search algorithms which in practice cannot find good solution for large graph pairs given a limited computation budget. We propose GLSearch
R
based model for MCS detection through reinforcement learning
(GNN) based learning to search model
R
uses an exploration tree to extract subgraphs in two graphs one node pair
is built upon the branch and bound algorithm, which selects one pair of nodes from the two input graphs to expand
R
, and is trained to optimize subgraph extraction rewards via Deep Q-Networks. A novel graph embedding method is proposed to generate state representations for nodes and extracted subgraphs jointly at each step
. Instead of using heuristics, we propose a novel GNN-based Deep Q-Network (DQN) to select the node pair, allowing the search process faster and more adaptive. To further enhance the training of DQN, we leverage the search process to provide supervision in a pre-training stage and guide our agent during an imitation learning stage
R
real graph datasets
synthetic and real-world large graph pairs
R
performs favorably to exact MCS solvers and supervised neural graph matching network models in terms of accuracy and efficiency
learns a search strategy that is able to detect significantly larger common subgraphs given the same computation budget. Our GLSearch can be potentially extended to solve many other combinatorial problems with constraints on graphs