A Strengthened Branch and Bound Algorithm for the Maximum Common (Connected) Subgraph Problem

Jianrong Zhou, Kun He, Jiongzhi Zheng, Chu-Min Li, Yanli Liu

Introduction

The Maximum Common Subgraph (MCS) problem and its connected variant (MCCS) are fundamental challenges in graph theory with extensive applications in fields such as cheminformatics, computer vision, and malware detection. Given two graphs, the objective is to identify the largest subgraph isomorphism between them. Due to the NP-hard nature of these problems, exact solvers typically employ Branch and Bound (BnB) frameworks to explore the search space efficiently.

The Maximum Common Subgraph Problem

The core task involves finding a mapping between vertices of two graphs $G_0$ and $G_1$ that preserves adjacency while maximizing the number of matched vertices. This process is often visualized as finding the largest shared structure embedded within two distinct networks.

Example of a Maximum Common Subgraph (MCS) mapping between two graphs $G_0$ and $G_1$.

Methodology: McSplit+LL

This research introduces McSplit+LL, an enhancement of the state-of-the-art McSplit+RL solver. The "LL" suffix refers to the integration of two primary innovations: Long-Short Memory (LSM) and Leaf vertex Union Match (LUM).

Long-Short Memory (LSM)

Reinforcement learning (RL) has been used to guide branching decisions by rewarding vertex matches that lead to significant search space pruning. However, static reward accumulation often suffers from "stale data," where early-stage successes mislead the search in later, structurally different phases. LSM addresses this by maintaining separate short-term and long-term reward lists with a decaying mechanism. When a score exceeds a predefined threshold, the list is halved, ensuring the algorithm prioritizes recent, contextually relevant information.

Leaf vertex Union Match (LUM)

LUM is a structural optimization based on the observation that leaf nodes (vertices with degree one) are often interchangeable once their parent nodes are matched. The authors proved that if two vertices $p \in G_0$ and $q \in G_1$ are matched, their respective sets of leaf neighbors can be matched greedily without sacrificing optimality. This allows the algorithm to bypass numerous redundant branching steps, effectively "jumping" deeper into the search tree.

Experimental Evaluation

The algorithm was tested against a massive dataset of 25,552 instances, ranging from biochemical reactions to 3D meshes.

Comparison of McSplit+LL and McSplit+RL performance on MCS instances, showing the number of solved instances over time.

As shown in the results, McSplit+LL significantly outperforms the previous state-of-the-art, McSplit+RL. On a subset of 2,309 moderate-difficulty MCS instances, McSplit+LL solved 2,208 cases within the time limit, a nearly 10% improvement over its predecessor. Similar gains were observed for the MCCS variant. Furthermore, the algorithm demonstrated substantial speedups on easier instances, reducing average runtimes by approximately 30-40%.

Conclusion

By integrating adaptive reinforcement learning through LSM and structural pruning via LUM, McSplit+LL sets a new benchmark for the Maximum Common Subgraph problem. The success of the "forgetting" mechanism in LSM highlights the importance of adaptivity in complex search spaces, while LUM demonstrates how local symmetries can be exploited to mitigate exponential complexity. Future work may involve extending the LUM principle to more complex local graph structures beyond simple leaves.

Summary updated

BibTeX
@inproceedings{zhou2022strengthened,
  author = {Jianrong Zhou and Kun He and Jiongzhi Zheng and Chu-Min Li and Yanli Liu},
  title = {{A Strengthened Branch and Bound Algorithm for the Maximum Common (Connected) Subgraph Problem}},
  booktitle = {International Joint Conference on Artificial Intelligence},
  year = {2022},
  doi = {10.24963/ijcai.2022/265},
}
Figure